> ## 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 SMS

> Queues an SMS message for delivery via SMPP. Returns `202 Accepted` immediately —
delivery is asynchronous. Requires a paid plan and available SMS credits.

The `to` field must be a Mozambican mobile number in E.164 format (`+258XXXXXXXXX`).




## OpenAPI

````yaml /openapi.yaml post /api/v1/sms
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/sms:
    post:
      tags:
        - SMS
      summary: Send SMS
      description: >
        Queues an SMS message for delivery via SMPP. Returns `202 Accepted`
        immediately —

        delivery is asynchronous. Requires a paid plan and available SMS
        credits.


        The `to` field must be a Mozambican mobile number in E.164 format
        (`+258XXXXXXXXX`).
      operationId: sendSms
      parameters:
        - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - to
                - body
              properties:
                to:
                  type: string
                  pattern: ^\+2588[234567]\d{7}$
                  description: >-
                    Recipient phone number in E.164 format (Mozambican numbers
                    only)
                  example: '+258841234567'
                body:
                  type: string
                  minLength: 1
                  maxLength: 1600
                  description: Message text
                  example: Your verification code is 482910. Expires in 10 minutes.
                from:
                  type: string
                  maxLength: 20
                  description: >-
                    Sender ID the recipient sees. Omit it to use your
                    workspace's default sender ID, or the platform sender if you
                    have none. When set, it must exactly match a sender ID
                    approved for your workspace; matching is case-sensitive.
                    Anything else returns 422.
                  example: AcmePay
      responses:
        '202':
          description: Message queued
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                      status:
                        type: string
                        example: queued
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          description: No SMS credits or plan does not support SMS
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Recipient is suppressed or phone number is invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: SMS service not configured on this instance
          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.