> ## 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 emails in batch

> Queues up to N emails (plan-dependent) in a single request. All emails are validated
before any are queued — if any check fails the entire request is rejected.
Returns an array of `{ id, status }` per email in the same order as the input.

**Batch size limits by plan:**
| Plan | Max emails per batch |
|------|---------------------|
| Launch | 50 |
| Starter | 100 |
| Growth | 500 |
| Scale | 1,000 |




## OpenAPI

````yaml /openapi.yaml post /api/v1/emails/batch
openapi: 3.0.3
info:
  title: Torpedo API
  version: '1.0'
  description: |
    Torpedo is a transactional messaging API built for developers.
    Send emails from your own verified domain, SMS to Mozambican numbers, and
    WhatsApp verification codes with a single HTTP call.
  contact:
    email: hello@torpedo.co.mz
  license:
    name: Torpedo API Terms of Service
    url: https://torpedo.co.mz/terms
  termsOfService: https://torpedo.co.mz/terms
servers:
  - url: https://api.torpedo.co.mz
    description: Production
security:
  - ApiKeyAuth: []
paths:
  /api/v1/emails/batch:
    post:
      tags:
        - Emails
      summary: Send emails in batch
      description: >
        Queues up to N emails (plan-dependent) in a single request. All emails
        are validated

        before any are queued — if any check fails the entire request is
        rejected.

        Returns an array of `{ id, status }` per email in the same order as the
        input.


        **Batch size limits by plan:**

        | Plan | Max emails per batch |

        |------|---------------------|

        | Launch | 50 |

        | Starter | 100 |

        | Growth | 500 |

        | Scale | 1,000 |
      operationId: sendEmailBatch
      parameters:
        - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - emails
              properties:
                emails:
                  type: array
                  minItems: 1
                  maxItems: 1000
                  items:
                    type: object
                    required:
                      - from
                      - to
                      - subject
                    description: >-
                      Provide at least one of `html` or `text`. If `html` is
                      provided without `text`, Torpedo generates a plain-text
                      version.
                    properties:
                      from:
                        type: string
                        maxLength: 255
                        description: Sender address. Must use a verified domain.
                        example: Acme <hello@myapp.com>
                      to:
                        type: string
                        format: email
                        maxLength: 255
                        example: user@example.com
                      subject:
                        type: string
                        minLength: 1
                        maxLength: 255
                        example: Welcome to Acme
                      html:
                        type: string
                        maxLength: 1000000
                        description: HTML body of the email
                        example: <h1>Welcome!</h1>
                      text:
                        type: string
                        maxLength: 100000
                        description: >-
                          Optional plain-text body. If omitted, Torpedo
                          generates it from `html`.
                        example: Welcome!
                      replyTo:
                        type: string
                        format: email
                        maxLength: 255
                        description: Optional reply-to address
            example:
              emails:
                - from: Acme <hello@myapp.com>
                  to: alice@example.com
                  subject: Welcome
                  html: <h1>Welcome!</h1>
                - from: Acme <hello@myapp.com>
                  to: bob@example.com
                  subject: Welcome
                  html: <h1>Welcome!</h1>
      responses:
        '202':
          description: All emails queued for delivery
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                        status:
                          type: string
                          example: queued
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          description: The free email trial is unavailable for batch sending
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            Workspace sending is blocked due to elevated bounce or complaint
            rate
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: >-
            Batch exceeds plan limit, domain not verified, or recipient
            suppressed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Monthly or daily sending quota exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  parameters:
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: false
      description: >-
        Unique key for replaying the original accepted response without sending
        again. Leading and trailing whitespace is removed; only the first 255
        characters are retained.
      schema:
        type: string
  responses:
    Unauthorized:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      required:
        - errors
      properties:
        errors:
          type: array
          items:
            type: object
            required:
              - code
              - message
            properties:
              code:
                type: string
                example: VALIDATION_ERROR
              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.
        Create and manage API keys from the authenticated Torpedo dashboard.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.