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

# Send email

> Queues an email for delivery. Returns `202 Accepted` immediately —
delivery is asynchronous. Use webhooks or poll `GET /api/v1/emails/{id}` for status.

The `from` address domain must be verified in your workspace.
Provide at least one of `html` or `text`. If `html` is provided without `text`,
Torpedo generates a plain-text version automatically. To opt out of a text part,
send `text` as an empty string.




## OpenAPI

````yaml /openapi.yaml post /api/v1/emails
openapi: 3.0.3
info:
  title: Torpedo API
  version: '1.0'
  description: |
    Torpedo is a transactional email API built for developers.
    Send emails from your own verified domain with a single HTTP call.
  contact:
    email: support@torpedo.co.mz
  termsOfService: https://torpedo.co.mz/terms
servers:
  - url: https://api.torpedo.co.mz
    description: Production
security:
  - ApiKeyAuth: []
paths:
  /api/v1/emails:
    post:
      tags:
        - Emails
      summary: Send email
      description: >
        Queues an email for delivery. Returns `202 Accepted` immediately —

        delivery is asynchronous. Use webhooks or poll `GET /api/v1/emails/{id}`
        for status.


        The `from` address domain must be verified in your workspace.

        Provide at least one of `html` or `text`. If `html` is provided without
        `text`,

        Torpedo generates a plain-text version automatically. To opt out of a
        text part,

        send `text` as an empty string.
      operationId: sendEmail
      parameters:
        - name: Idempotency-Key
          in: header
          required: false
          schema:
            type: string
          description: >
            Optional unique key for deduplication. If a request with the same
            key

            has already been accepted, returns the original response without
            sending again.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - from
                - to
                - subject
              description: Provide at least one of `html` or `text`.
              properties:
                from:
                  type: string
                  description: |
                    Sender address. Must use a verified domain.
                    Accepts bare email or display name format.
                  example: Acme <hello@myapp.com>
                to:
                  type: string
                  format: email
                  example: user@example.com
                subject:
                  type: string
                  example: Welcome to Acme
                html:
                  type: string
                  description: >-
                    HTML body of the email. If `text` is omitted, Torpedo
                    generates plain text from this field.
                  example: <h1>Welcome!</h1><p>Thanks for signing up.</p>
                text:
                  type: string
                  description: >-
                    Optional plain-text body. Set to an empty string to send no
                    text part.
                  example: Welcome! Thanks for signing up.
                replyTo:
                  type: string
                  format: email
                  description: Optional reply-to address
            example:
              from: Acme <hello@myapp.com>
              to: user@example.com
              subject: Welcome to Acme
              html: <h1>Welcome!</h1><p>Thanks for signing up.</p>
      responses:
        '202':
          description: Email queued for delivery
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                      status:
                        type: string
                        example: queued
        '402':
          description: Monthly or daily sending quota exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Domain not verified, recipient suppressed, or domain scope mismatch
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              message:
                type: string
                example: Domain not verified
              field:
                type: string
                example: from
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: |
        Prefix `tor_` followed by a base64url-encoded random key.
        Obtain one from `POST /api/v1/workspaces` or `POST /api/v1/auth/keys`.

````