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

# Send Email

> Send emails



## OpenAPI

````yaml api-reference/openapi.json POST /emails
openapi: 3.0.1
info:
  title: Sendrealm API
  description: >-
    API for email, push, audience resources, domains, campaign drafts,
    templates, events, topics, and automations
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.sendrealm.com
security:
  - bearerAuth: []
paths:
  /emails:
    post:
      summary: Send an email
      description: Send emails
      parameters:
        - $ref: '#/components/parameters/SendrealmProjectId'
      requestBody:
        description: Send an email
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendEmail'
        required: true
      responses:
        '201':
          description: Email sent successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SendEmailResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  parameters:
    SendrealmProjectId:
      name: X-Sendrealm-Project-Id
      in: header
      required: false
      description: >-
        Select an authorized project for a multi-project or all-project API key.
        Omit it to use the key's default project.
      schema:
        type: string
        format: uuid
  schemas:
    SendEmail:
      type: object
      required:
        - from
        - to
        - subject
        - text
      properties:
        from:
          type: string
          format: email
          description: Email address of the sender
        to:
          type: array
          items:
            type: string
            format: email
          description: List of recipient email addresses
        subject:
          type: string
          description: Subject of the email
        text:
          type: string
          description: Plain text content of the email
        html:
          type: string
          description: HTML content of the email
        tags:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              value:
                type: string
          description: Tags associated with the email
        headers:
          type: object
          additionalProperties:
            type: string
          description: Custom headers for the email
        attachments:
          type: array
          items:
            type: object
            required:
              - name
              - type
              - data
            properties:
              name:
                type: string
                description: Name of the attachment
              type:
                type: string
                description: MIME type of the attachment
              data:
                type: string
                description: Base64-encoded content of the attachment
          description: Attachments included in the email
    SendEmailResponse:
      type: object
      required:
        - status
      properties:
        status:
          type: integer
          description: HTTP response status code
    Error:
      type: object
      required:
        - status
        - error
      properties:
        status:
          type: integer
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
            message:
              type: string
            details:
              $ref: '#/components/schemas/JsonValue'
            issues:
              type: array
              items:
                $ref: '#/components/schemas/ValidationIssue'
    JsonValue:
      oneOf:
        - type: string
          nullable: true
        - type: number
        - type: boolean
        - type: object
          additionalProperties:
            $ref: '#/components/schemas/JsonValue'
        - type: array
          items:
            $ref: '#/components/schemas/JsonValue'
    ValidationIssue:
      type: object
      required:
        - code
        - path
        - message
      properties:
        code:
          type: string
        path:
          type: string
          nullable: true
        message:
          type: string
  responses:
    BadRequest:
      description: Bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Invalid or missing API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````