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

# Dispatch a Signed Test Delivery Receipt Webhook



## OpenAPI

````yaml https://ugatext.com/api/v1/openapi.json post /webhooks/test
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:
  /webhooks/test:
    post:
      tags:
        - Webhooks
      summary: Dispatch a Signed Test Delivery Receipt Webhook
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookTestRequest'
      responses:
        '200':
          description: >-
            Test webhook delivery attempted (payload matches real delivery
            payload field-for-field)
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  dispatched_count:
                    type: integer
                    example: 1
                  status_code:
                    type: integer
                    example: 200
                  signature:
                    type: string
                  payload:
                    $ref: '#/components/schemas/WebhookEventPayload'
                  request_payload:
                    $ref: '#/components/schemas/WebhookEventPayload'
        '400':
          description: INVALID_REQUEST (no destination webhook URL provided or configured)
          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'
        '429':
          description: RATE_LIMIT_EXCEEDED (600 requests/minute limit exceeded)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - ClientIdHeader: []
          ClientSecretHeader: []
components:
  schemas:
    WebhookTestRequest:
      type: object
      properties:
        url:
          type: string
          format: uri
          description: >-
            HTTPS webhook endpoint URL to test. If omitted, dispatches to the
            active webhook URLs registered on your account.
          example: https://api.yourdomain.com/sms/dlr
        secret:
          type: string
          description: Optional HMAC-SHA256 signing secret override.
          example: whsec_live_example_secret
        event:
          type: string
          enum:
            - sms.delivered
            - sms.sent
            - sms.failed
          default: sms.delivered
        recipient:
          type: string
          example: '+256750625684'
    WebhookEventPayload:
      type: object
      required:
        - event
        - event_id
        - timestamp
        - data
      properties:
        event:
          type: string
          enum:
            - sms.sent
            - sms.delivered
            - sms.failed
          example: sms.delivered
        event_id:
          type: string
          example: evt_test_9a8b7c6d5e4f
        timestamp:
          type: string
          format: date-time
          example: '2026-10-31T08:00:00.000Z'
        data:
          type: object
          required:
            - message_id
            - recipient
            - sender_id
            - status
            - network
            - mode
            - segments
            - units_used
            - cost_ugx
            - currency
            - provider_reference
            - delivered_at
            - failure_reason
          properties:
            message_id:
              type: string
              example: msg_test_1a2b3c4d
            recipient:
              type: string
              example: '+256750625684'
            sender_id:
              type: string
              example: UGATEXT
            status:
              type: string
              enum:
                - sent
                - delivered
                - failed
              example: delivered
            network:
              type: string
              enum:
                - MTN_UGANDA
                - AIRTEL_UGANDA
                - UTL_UGANDA
                - LYCAMOBILE_UGANDA
                - SAFARICOM_KENYA
                - AIRTEL_KENYA
                - TELKOM_KENYA
                - VODACOM_TANZANIA
                - TIGO_TANZANIA
                - HALOTEL_TANZANIA
                - VODACOM_DRC
              example: MTN_UGANDA
            mode:
              type: string
              enum:
                - live
                - sandbox
              example: live
            segments:
              type: integer
              example: 1
            units_used:
              type: integer
              example: 1
            cost_ugx:
              type: number
              example: 25
            currency:
              type: string
              example: UGX
            provider_reference:
              type: string
              nullable: true
              example: pdr_test_1a2b3c4d
            delivered_at:
              type: string
              format: date-time
              nullable: true
              example: '2026-10-31T08:00:00.000Z'
            failure_reason:
              type: string
              nullable: true
              example: null
    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.