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

# Send SMS

> Send an SMS message to a specified recipient.



## OpenAPI

````yaml POST /sms/send
openapi: 3.0.1
info:
  title: Delaphone CPaaS API
  description: APIs for sending SMS, purchasing data bundles, and buying airtime.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.delaphonegh.com
security:
  - bearerAuth: []
paths:
  /sms/send:
    post:
      description: Send an SMS message to a specified recipient.
      requestBody:
        description: SMS details to be sent.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SMSRequest'
        required: true
      responses:
        '202':
          description: SMS sent successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SMSResponse'
        '400':
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401'
        '402':
          description: Payment Required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error402'
        '403':
          description: Insufficient Permissions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error403'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500'
components:
  schemas:
    SMSRequest:
      type: object
      required:
        - recipient
        - message
      properties:
        recipient:
          description: Phone number of the recipient
          type: string
        message:
          description: Text message to be sent
          type: string
        sender_id:
          description: Custom sender ID (if applicable)
          type: string
        webhook_url:
          description: URL to receive status updates
          type: string
        scheduled_time:
          description: Time to schedule the message
          type: string
    SMSResponse:
      type: object
      properties:
        success:
          description: Indicates whether the SMS request was successful
          type: boolean
        status:
          description: HTTP status code of the SMS request
          type: integer
        message:
          description: Message indicating the result of the SMS request
          type: string
        data:
          type: array
          description: Array of details for each recipient
          items:
            type: object
            properties:
              recipient:
                description: The recipient's phone number
                type: string
              message_id:
                description: Unique identifier for the message
                type: string
              status:
                description: Status of the SMS message
                type: string
            required:
              - recipient
              - message_id
              - status
      required:
        - success
        - status
        - message
        - data
    Error:
      required:
        - error
        - message
      type: object
      properties:
        success:
          type: boolean
          default: false
        error:
          type: object
          properties:
            status:
              type: integer
              format: int32
            title:
              type: string
              example: Invalid Request Value
            detail:
              type: string
    Error401:
      required:
        - error
        - message
      type: object
      properties:
        success:
          type: boolean
          default: false
        error:
          type: object
          properties:
            status:
              type: integer
              format: int32
              example: 401
            title:
              type: string
              example: Authentication failed
              description: 'Title of the error (default: Authentication failed)'
            detail:
              type: string
    Error402:
      required:
        - error
        - message
      type: object
      properties:
        success:
          type: boolean
          default: false
        error:
          type: object
          properties:
            status:
              type: integer
              format: int32
              example: 402
            title:
              type: string
              example: Payment Required
              description: 'Title of the error (default: Payment Failed)'
            detail:
              type: string
    Error403:
      required:
        - error
        - message
      type: object
      properties:
        success:
          type: boolean
          default: false
        error:
          type: object
          properties:
            status:
              type: integer
              format: int32
              example: 403
            title:
              type: string
              example: Insufficient permissions
              description: 'Title of the error (default: Authentication failed)'
            detail:
              type: string
    Error404:
      required:
        - error
        - message
      type: object
      properties:
        success:
          type: boolean
          default: false
        error:
          type: object
          properties:
            status:
              type: integer
              format: int32
              example: 404
            title:
              type: string
              example: Not found
              description: The requested resource was not found
            detail:
              type: string
              example: The requested resource was not found
    Error500:
      required:
        - error
        - message
      type: object
      properties:
        success:
          type: boolean
          default: false
        error:
          type: object
          properties:
            status:
              type: integer
              format: int32
              example: 500
            title:
              type: string
              example: Internal server error
              description: 'Title of the error (default: Authentication failed)'
            detail:
              type: string
              example: >-
                We could not fulfil your request. Kindly try again in a few
                moments
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````