openapi: 3.0.0
info:
  title: Textbelt SMS API
  description: This API allows users to send SMS messages using the Textbelt service.
  version: 1.0.0
servers:
  - url: https://textbelt.com
paths:
  /text:
    post:
      operationId: sendSms
      summary: Send an SMS message
      description: Send an SMS message to the specified phone number using Textbelt.
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - phone
                - message
                - key
              properties:
                phone:
                  type: string
                  description: The recipient's phone number in E.164 format (e.g., +1234567890).
                message:
                  type: string
                  description: The text message to send. Long messages will be broken into multiple SMS.
                  maxLength: 1024
                key:
                  type: string
                  description: Your Textbelt API key.
      responses:
        '200':
          description: SMS message sent successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: Indicates whether the SMS message was sent successfully.
                  textId:
                    type: string
                    description: A unique identifier for the sent SMS message.
                  quotaRemaining:
                    type: integer
                    description: The number of messages remaining in your quota.
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: Indicates whether the SMS message was sent successfully.
                  error:
                    type: string
                    description: A description of the error that occurred.
