> ## 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 Custom Transactional Email

> Send a custom transactional email with full control over HTML content, text, attachments, and email properties. This endpoint allows you to send emails with custom HTML or text content without using pre-built templates.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/transactional/custom
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/custom:
    post:
      tags:
        - Transactional Email
      summary: Send Custom Transactional Email
      description: >-
        Send a custom transactional email with full control over HTML content,
        text, attachments, and email properties. This endpoint allows you to
        send emails with custom HTML or text content without using pre-built
        templates.
      operationId: sendCustomTransactionalEmail
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - params
              properties:
                params:
                  $ref: '#/components/schemas/SendCustomTransactionalEmailRequest'
            examples:
              basic:
                summary: Basic HTML email
                value:
                  params:
                    from: notifications@yourdomain.com
                    to: user@example.com
                    subject: Welcome to our platform!
                    html: >-
                      <h1>Welcome!</h1><p>Thank you for signing up for our
                      platform.</p>
              withAttachment:
                summary: Email with attachment
                value:
                  params:
                    from: invoices@yourdomain.com
                    to:
                      - user@example.com
                    subject: 'Your Invoice #12345'
                    html: <h1>Invoice</h1><p>Please find your invoice attached.</p>
                    attachments:
                      - filename: invoice.pdf
                        content: base64-encoded-content
                        content_type: application/pdf
      responses:
        '200':
          description: Email sent successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmailResponse'
              examples:
                success:
                  summary: Successful email send
                  value:
                    success: true
                    email_id: 123e4567-e89b-12d3-a456-426614174000
        '400':
          description: Bad request - Invalid parameters
        '401':
          description: Unauthorized - Invalid or missing API key
        '500':
          description: Internal server error
components:
  schemas:
    SendCustomTransactionalEmailRequest:
      type: object
      required:
        - from
        - to
        - subject
      properties:
        from:
          type: string
          description: >-
            Sender email address. To include a friendly name, use "Your Name
            <sender@domain.com>" format
          example: notifications@yourdomain.com
        to:
          oneOf:
            - type: string
            - type: array
              items:
                type: string
          description: >-
            Recipient email address(es). For multiple addresses, send as an
            array. Maximum 50 recipients
          example: user@example.com
        subject:
          type: string
          description: Email subject line
          example: Welcome to our platform!
        bcc:
          oneOf:
            - type: string
            - type: array
              items:
                type: string
          description: >-
            Bcc recipient email address(es). For multiple addresses, send as an
            array
        cc:
          oneOf:
            - type: string
            - type: array
              items:
                type: string
          description: >-
            Cc recipient email address(es). For multiple addresses, send as an
            array
        scheduled_at:
          type: string
          description: >-
            Schedule email to be sent later. Natural language (e.g.: "in 1 min")
            or ISO 8601 format
          example: '2024-03-15T10:00:00Z'
        reply_to:
          oneOf:
            - type: string
            - type: array
              items:
                type: string
          description: Reply-to email address(es). For multiple addresses, send as an array
        html:
          type: string
          description: The HTML version of the message
          example: <h1>Welcome!</h1><p>Thank you for signing up.</p>
        text:
          type: string
          description: The plain text version of the message
          example: Welcome! Thank you for signing up.
        react:
          type: object
          description: >-
            A React Email component for creating beautiful emails using React
            and TypeScript. This parameter accepts React Email components from
            https://react.email/ - a collection of high-quality, unstyled
            components for email design. Only available in Node.js environments.
        headers:
          type: object
          additionalProperties:
            type: string
          description: Custom headers to add to the email
        attachments:
          type: array
          items:
            $ref: '#/components/schemas/EmailAttachment'
          description: >-
            Filename and content of attachments (max 40MB per email, after
            Base64 encoding)
        tags:
          type: array
          items:
            $ref: '#/components/schemas/EmailTag'
          description: Custom data passed in key/value pairs for tracking and analytics
    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
    EmailAttachment:
      type: object
      properties:
        content:
          type: string
          description: Content of an attached file, passed as Base64 string
        filename:
          type: string
          description: Name of attached file
          example: invoice.pdf
        path:
          type: string
          description: Path where the attachment file is hosted
        content_type:
          type: string
          description: >-
            Content type for the attachment, if not set will be derived from the
            filename property
          example: application/pdf
        content_id:
          type: string
          description: 'Content ID for embedding images using cid: in HTML'
    EmailTag:
      type: object
      required:
        - name
        - value
      properties:
        name:
          type: string
          description: >-
            The name of the email tag (ASCII letters, numbers, underscores,
            dashes only, max 256 chars)
          example: category
        value:
          type: string
          description: >-
            The value of the email tag (ASCII letters, numbers, underscores,
            dashes only, max 256 chars)
          example: welcome
  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

````