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

# Send SMS

> Queues an SMS for immediate or scheduled delivery. Recipient numbers must use international format.



## OpenAPI

````yaml /openapi.json post /sms
openapi: 3.1.0
info:
  title: Dugble API
  description: >-
    Programmatic access to Dugble email, SMS, sending infrastructure, contacts,
    audiences, suppressions, and broadcasts. Authenticate with a team token sent
    as a Bearer token.
  version: 1.0.0
  contact:
    name: Dugble Support
    email: support@dugble.com
servers:
  - url: https://api.dugble.com
    description: Production
security:
  - BearerAuth: []
tags:
  - name: Email
    description: Send and manage transactional emails.
  - name: SMS
    description: Send and manage SMS messages.
  - name: Domains
    description: Manage and verify sending domains.
  - name: Templates
    description: Create, version, publish, preview, and test reusable email templates.
  - name: Sender IDs
    description: Manage SMS sender IDs.
  - name: Contacts
    description: Manage contacts and their audience memberships.
  - name: Contact Properties
    description: Manage typed custom property definitions used by contacts.
  - name: Topics
    description: Manage contact subscription topics.
  - name: Segments
    description: Manage audience segments.
  - name: Suppressions
    description: Manage suppressed email recipients.
  - name: Broadcasts
    description: Create, schedule, and analyze email broadcasts.
paths:
  /sms:
    post:
      tags:
        - SMS
      summary: Send SMS
      description: >-
        Queues an SMS for immediate or scheduled delivery. Recipient numbers
        must use international format.
      operationId: sendSms
      parameters:
        - $ref: '#/components/parameters/RequiredIdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SmsSendRequest'
            example:
              to: '+233201234567'
              from: Dugble
              body: Your verification code is 123456.
      responses:
        '202':
          description: SMS accepted for asynchronous delivery.
          headers:
            Location:
              description: Relative URL of the queued SMS.
              schema:
                type: string
                example: /sms/49a3999c-0ce1-4ea6-ab68-afcd6dc2e794
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MutationEnvelope'
        default:
          $ref: '#/components/responses/Error'
components:
  parameters:
    RequiredIdempotencyKey:
      name: Idempotency-Key
      in: header
      required: true
      description: >-
        Required unique key for email and SMS send requests. Maximum 256
        characters.
      schema:
        type: string
        maxLength: 256
  schemas:
    SmsSendRequest:
      type: object
      required:
        - to
        - from
        - body
      properties:
        to:
          type: string
          pattern: ^[+][1-9][0-9]{7,14}$
          example: '+233201234567'
          description: Supported E.164 destination number.
        from:
          type: string
          minLength: 1
          maxLength: 11
          example: Dugble
          description: Approved sender ID.
        body:
          type: string
          minLength: 1
          maxLength: 1600
        metadata:
          type: object
          additionalProperties: true
        scheduled_at:
          type: string
          description: >-
            Future RFC 3339 timestamp or supported relative value such as 'in 5
            min'. The resolved time must be at least 30 seconds ahead.
      additionalProperties: false
    MutationEnvelope:
      type: object
      required:
        - success
        - data
      properties:
        success:
          type: boolean
          enum:
            - true
        data:
          $ref: '#/components/schemas/MutationResponse'
    MutationResponse:
      type: object
      required:
        - object
        - id
      properties:
        object:
          type: string
        id:
          type: string
          format: uuid
    ErrorEnvelope:
      type: object
      required:
        - success
        - error
      properties:
        success:
          type: boolean
          enum:
            - false
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              enum:
                - BAD_REQUEST
                - UNAUTHORIZED
                - FORBIDDEN
                - STEP_UP_REQUIRED
                - NOT_FOUND
                - CONFLICT
                - PAYMENT_REQUIRED
                - PAYLOAD_TOO_LARGE
                - UNPROCESSABLE_ENTITY
                - TOO_MANY_REQUESTS
                - INTERNAL_ERROR
                - SERVICE_UNAVAILABLE
            message:
              type: string
  responses:
    Error:
      description: >-
        The request failed. See the HTTP status and structured error code for
        the category.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Team token
      description: >-
        Pass a Dugble team token in the Authorization header as Bearer <token>.
        Team token secrets use the dgb_team_ prefix.

````