> ## Documentation Index
> Fetch the complete documentation index at: https://flywheel.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Send Transactional Email Template

> Send a transactional email using a pre-built template. Templates are created in the Flywheel dashboard and can include dynamic variables that are populated at send time.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/transactional/template
openapi: 3.0.0
info:
  title: Flywheel API
  description: >-
    Complete API for tracking events, sending transactional emails, and building
    comprehensive user profiles
  version: 1.0.0
  contact:
    email: support@flywheel.cx
servers:
  - url: https://api.flywheel.cx
    description: Production server
security:
  - apiKeyAuth: []
    authTypeHeader: []
paths:
  /v1/transactional/template:
    post:
      tags:
        - Transactional Email
      summary: Send Transactional Email Template
      description: >-
        Send a transactional email using a pre-built template. Templates are
        created in the Flywheel dashboard and can include dynamic variables that
        are populated at send time.
      operationId: sendTemplateTransactionalEmail
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - params
              properties:
                params:
                  $ref: '#/components/schemas/SendTemplateTransactionalEmailRequest'
            examples:
              welcome:
                summary: Welcome email template
                value:
                  params:
                    transactional_template_id: 550e8400-e29b-41d4-a716-446655440000
                    to: user@example.com
                    variables:
                      first_name: John
                      company_name: Acme Corp
                      activation_url: https://app.yourdomain.com/activate?token=xyz
      responses:
        '200':
          description: Email sent successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmailResponse'
              examples:
                success:
                  summary: Successful template email send
                  value:
                    success: true
                    email_id: 987fcdeb-51a2-43d1-9f12-123456789abc
        '400':
          description: Bad request - Invalid template ID or parameters
        '401':
          description: Unauthorized - Invalid or missing API key
        '404':
          description: Template not found
        '500':
          description: Internal server error
components:
  schemas:
    SendTemplateTransactionalEmailRequest:
      type: object
      required:
        - transactional_template_id
        - to
        - variables
      properties:
        transactional_template_id:
          type: string
          format: uuid
          description: The UUID of the transactional email template to use
          example: 550e8400-e29b-41d4-a716-446655440000
        to:
          oneOf:
            - type: string
            - type: array
              items:
                type: string
          description: >-
            Recipient email address(es). For multiple addresses, send as an
            array
          example: user@example.com
        variables:
          type: object
          additionalProperties:
            type: string
          description: Dynamic variables to populate in the email template
          example:
            first_name: John
            company_name: Acme Corp
            activation_url: https://app.yourdomain.com/activate?token=xyz
    EmailResponse:
      type: object
      properties:
        success:
          type: boolean
          description: Whether the email was sent successfully
          example: true
        email_id:
          type: string
          format: uuid
          description: >-
            Unique UUID identifier for the sent email, can be used for tracking
            delivery status
          example: 123e4567-e89b-12d3-a456-426614174000
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Enter your API key obtained from the Flywheel dashboard (without 'Bearer
        ' prefix)
    authTypeHeader:
      type: apiKey
      in: header
      name: Auth-Type
      description: Authentication type header. Must be set to 'api' for all API requests.
      x-default: api
      x-example: api

````