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

# Send a Single SMS Message



## OpenAPI

````yaml https://ugatext.com/api/v1/openapi.json post /sms/send
openapi: 3.0.3
info:
  title: UgaText Developer Communications API
  version: 1.0.0
  description: >-
    Official REST API for UgaText (https://ugatext.com/api/v1). Supports single
    and bulk SMS dispatch across Uganda (+256 via Pandora), Kenya (+254 via Ping
    Africa), Tanzania (+255 via SwalaSMS), and DR Congo (+243 via Coussema SMS
    Gateway), real-time queued → sent → delivered status polling, SMS scheduling
    with recurrence (none, daily, weekly, monthly), bulk campaigns, wallet
    balance queries, Sender ID lifecycle management, opt-out management,
    HMAC-SHA256 webhooks, UCC 21-rule compliance inspection, and OTP
    verification. Rate limit: 600 requests/minute (10 req/sec). Free sandbox
    numbers: +256700000000, +254700000000, +255700000000, or +243810000000.
  contact:
    name: UgaText Developer Support
    url: https://docs.ugatext.com
    email: support@ugatext.com
servers:
  - url: https://ugatext.com/api/v1
    description: UgaText Production API Gateway
security:
  - ClientIdHeader: []
    ClientSecretHeader: []
tags:
  - name: System
    description: Gateway health, route index, and OpenAPI specification
  - name: Authentication
    description: API key verification, generation, configuration, and revocation
  - name: SMS
    description: Single and bulk SMS dispatch, status polling, history, and wallet balance
  - name: Scheduling
    description: Future SMS scheduling, recurrence, rescheduling, and cancellation
  - name: Campaigns
    description: Bulk SMS campaign creation, listing, details, and cancellation
  - name: Verify
    description: OTP verification sessions, services/apps, and analytics
  - name: Sender IDs
    description: >-
      Alphanumeric Sender ID registration, regulatory documents, wallet payment,
      and lifecycle
  - name: Webhooks
    description: Real-time HMAC-SHA256 delivery receipt webhooks and test dispatch
  - name: Opt-Outs
    description: Recipient opt-out suppression list management
  - name: Compliance
    description: Pre-flight 21-rule UCC SMS compliance and GSM segmentation inspection
paths:
  /sms/send:
    post:
      tags:
        - SMS
      summary: Send a Single SMS Message
      parameters:
        - $ref: '#/components/parameters/IdempotencyKeyHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendSMSRequest'
      responses:
        '200':
          description: Message accepted and queued for dispatch
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SendSMSResponse'
        '400':
          description: INVALID_REQUEST
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: INVALID_API_KEY (missing, invalid, or revoked credentials)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '402':
          description: INSUFFICIENT_BALANCE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: SENDER_ID_NOT_APPROVED or COMPLIANCE_BLOCKED
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: INVALID_PHONE_NUMBER
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: RATE_LIMIT_EXCEEDED (600 requests/minute limit exceeded)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - ClientIdHeader: []
          ClientSecretHeader: []
components:
  parameters:
    IdempotencyKeyHeader:
      name: Idempotency-Key
      in: header
      required: false
      schema:
        type: string
        example: 8f14e45f-ceea-467f-a8f1-4e45fceea67f
      description: >-
        Optional unique key (up to 128 chars, e.g. UUID v4) to safely retry POST
        /api/v1/sms/send or POST /api/v1/sms/bulk without duplicate dispatch or
        double billing. Cached for 24 hours per account; replays return
        X-Cache-Lookup: HIT (Idempotent).
  schemas:
    SendSMSRequest:
      type: object
      required:
        - to
        - message
        - sender_id
      properties:
        to:
          type: string
          description: >-
            Recipient phone number in E.164 with or without a leading + (e.g.
            "+256750625684", "+254712345678", "+255712345678", or
            "+243810000000") or local national format ("0750625684"). Accepted
            aliases: "phone", "recipient". Free sandbox numbers: +256700000000,
            +254700000000, +255700000000, +243810000000.
          example: '+256750625684'
        message:
          type: string
          description: 'SMS text body (accepted aliases: "text", "body").'
          example: Your verification code is 482910.
        sender_id:
          type: string
          description: >-
            Approved alphanumeric Sender ID (1-11 chars, e.g. "UGATEXT";
            accepted aliases: "senderId", "from").
          example: UGATEXT
    SendSMSResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        message_id:
          type: string
          example: msg_1760425200000_a1b2c3d4
        status:
          type: string
          enum:
            - queued
            - sent
            - delivered
            - failed
          example: queued
        recipient:
          type: string
          example: '+256750625684'
        phone:
          type: string
          example: '+256750625684'
        sender_id:
          type: string
          example: UGATEXT
        segments:
          type: integer
          example: 1
        units_used:
          type: integer
          example: 1
        encoding:
          type: string
          enum:
            - GSM-7
            - UCS-2
          example: GSM-7
        rate_per_sms:
          type: number
          example: 25
        estimated_cost:
          type: number
          example: 25
        cost_ugx:
          type: number
          example: 25
        currency:
          type: string
          enum:
            - UGX
            - KES
            - USD
            - TZS
          example: UGX
        country:
          type: string
          example: Uganda
        country_code:
          type: string
          example: '+256'
        network:
          type: string
          example: Airtel
        mode:
          type: string
          enum:
            - live
            - sandbox
          example: live
        created_at:
          type: string
          format: date-time
        queued_at:
          type: string
          format: date-time
    ErrorResponse:
      type: object
      required:
        - success
        - error
      properties:
        success:
          type: boolean
          example: false
        retry_after_seconds:
          type: integer
          description: >-
            Seconds to wait before retrying when rate-limited or during an
            active OTP resend cooldown (HTTP 429).
          example: 60
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              example: INVALID_REQUEST
            message:
              type: string
              example: >-
                Authentication failed. Provide a valid 'Client-ID' and
                'Client-Secret' in the request headers.
            retry_after_seconds:
              type: integer
              description: >-
                Seconds remaining before another OTP or rate-limited request is
                permitted (present on 429 COOLDOWN_ACTIVE and rate-limit
                errors).
              example: 60
  securitySchemes:
    ClientIdHeader:
      type: apiKey
      in: header
      name: Client-ID
      description: >-
        Your UgaText Client-ID (e.g. uga_...). Accepted header aliases:
        X-Client-ID, or combined in Authorization: Bearer
        <Client-ID>:<Client-Secret> / X-API-Key: <Client-ID>:<Client-Secret>.
    ClientSecretHeader:
      type: apiKey
      in: header
      name: Client-Secret
      description: >-
        Your UgaText Client-Secret (e.g. sk_live_...). Accepted header alias:
        X-Client-Secret.

````

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