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

# Send SMS

> Sends an SMS message to a single recipient.



## OpenAPI

````yaml POST /sms/send
openapi: 3.0.0
info:
  title: ECSEND Developer API
  description: Public API for programmatically sending SMS and managing campaigns/contacts.
  version: 1.0.0
servers:
  - url: https://ecsend.paysgator.com
    description: Production Base URL
security:
  - ApiKeyAuth: []
paths:
  /sms/send:
    post:
      tags:
        - SMS
      summary: Send a single SMS
      description: Sends an SMS message to a single recipient.
      operationId: sendSms
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendSmsRequest'
      responses:
        '200':
          description: Message sent successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SendSmsResponse'
        '400':
          description: Invalid request or failed to send
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    SendSmsRequest:
      type: object
      required:
        - to
        - text
        - senderId
      properties:
        to:
          type: string
          description: Phone number to send SMS to
          example: +25884xxxxxxx
        text:
          type: string
          description: Message content
          example: Hello from ECSEND API!
        senderId:
          type: string
          description: Sender ID displayed on recipient's device
          example: ECSEND
    SendSmsResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        message:
          type: string
          example: Message sent successfully
        historyId:
          type: string
          example: clx123abc
        units:
          type: integer
          example: 1
    Error:
      type: object
      properties:
        error:
          type: string
          example: Unauthorized. Invalid or missing X-Api-Key.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key

````