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

# Send an email

> Sends an email to one or more contacts identified by their email address ("to" accepts a single email or an array of up to 20), from one of the account verified email channels. Use a saved template ("template_id" or "template_name", plus "variables") or free-form content ("subject" and "html_body"). If no contact exists for a recipient address, one is created. When the account has more than one verified channel, "from" is required to pick the sender address. Single-recipient sends also accept "cc" and "bcc" (up to 10 each): one message is sent where cc recipients are visible to everyone. Multi-recipient "to" arrays instead send an individual private copy per recipient. The response contains a per-recipient result list; "success" is true only when every recipient succeeded.



## OpenAPI

````yaml post /api/public/email/send
openapi: 3.0.0
info:
  title: Vambe AI API
  description: Vambe AI documentation
  version: '1.0'
  contact: {}
servers:
  - url: https://api.vambe.me
    description: Production Server
security: []
tags:
  - name: Vambe AI
    description: ''
paths:
  /api/public/email/send:
    post:
      tags:
        - Email
      summary: Send an email
      description: >-
        Sends an email to one or more contacts identified by their email address
        ("to" accepts a single email or an array of up to 20), from one of the
        account verified email channels. Use a saved template ("template_id" or
        "template_name", plus "variables") or free-form content ("subject" and
        "html_body"). If no contact exists for a recipient address, one is
        created. When the account has more than one verified channel, "from" is
        required to pick the sender address. Single-recipient sends also accept
        "cc" and "bcc" (up to 10 each): one message is sent where cc recipients
        are visible to everyone. Multi-recipient "to" arrays instead send an
        individual private copy per recipient. The response contains a
        per-recipient result list; "success" is true only when every recipient
        succeeded.
      operationId: PublicEmailController_send
      parameters:
        - name: x-api-key
          in: header
          description: API key needed to authorize the request
          required: true
          schema:
            type: string
      requestBody:
        required: true
        description: The email payload
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublicSendEmailDto'
      responses:
        '201':
          description: >-
            Send processed. Returns { success, results: [{ to, success, error?
            }] } with one entry per recipient.
        '400':
          description: Bad request.
        '401':
          description: Unauthorized.
        '404':
          description: Email channel or template not found.
        '422':
          description: The requested sender channel is not verified.
components:
  schemas:
    PublicSendEmailDto:
      type: object
      properties:
        to:
          anyOf:
            - type: string
              format: email
              pattern: >-
                ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
            - minItems: 1
              maxItems: 20
              type: array
              items:
                type: string
                format: email
                pattern: >-
                  ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
        cc:
          minItems: 1
          maxItems: 10
          type: array
          items:
            type: string
            format: email
            pattern: >-
              ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
        bcc:
          minItems: 1
          maxItems: 10
          type: array
          items:
            type: string
            format: email
            pattern: >-
              ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
        contact_name:
          type: string
          minLength: 1
          maxLength: 255
        from:
          type: string
          format: email
          pattern: >-
            ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
        template_id:
          type: string
          format: uuid
          pattern: >-
            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
        template_name:
          type: string
          minLength: 1
          maxLength: 255
        variables:
          type: object
          additionalProperties:
            type: string
        subject:
          type: string
          minLength: 1
        html_body:
          type: string
          minLength: 1
        attachments:
          maxItems: 10
          type: array
          items:
            type: object
            properties:
              filename:
                type: string
                minLength: 1
                maxLength: 255
              content:
                type: string
                minLength: 1
                maxLength: 14000000
              type:
                type: string
                minLength: 1
                maxLength: 255
            required:
              - filename
              - content
      required:
        - to
        - variables

````