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

# Send SMS

> Send an SMS message to a phone number. Messages are sent via the Surge SMS API and queued for delivery.



## OpenAPI

````yaml post /v2/send-sms
openapi: 3.0.3
info:
  title: OpenMic External API v2
  version: '2.0'
  description: >-
    The OpenMic External API (v2) provides programmatic access to agents, calls,

    phone numbers, tools, contact lists, campaigns, and voices.


    ## Authentication

    All endpoints require an API key passed as a Bearer token in the

    `Authorization` header:

    ```

    Authorization: Bearer <your_api_key>

    ```


    ## Rate Limiting

    Most endpoints are limited to **100 requests per minute** per organization.

    The `POST /create-phone-call` endpoint has a stricter limit of **5 requests
    per minute**.
  contact:
    name: OpenMic Support
servers:
  - url: https://api.openmic.ai
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Auth
    description: Verify API key identity.
  - name: Agents
    description: Create and manage voice AI agents.
  - name: Calls
    description: Initiate and track phone calls.
  - name: Phone Numbers
    description: Manage phone numbers and agent assignments.
  - name: Tools
    description: Manage agent tools (API requests, call transfers, etc.).
  - name: Contact Lists
    description: Manage contact lists and individual contacts.
  - name: Campaigns
    description: Create and manage outbound dialing campaigns.
  - name: Voices
    description: Browse available voices for agents.
  - name: SMS
    description: Send SMS messages.
paths:
  /v2/send-sms:
    post:
      tags:
        - SMS
      summary: Send SMS
      description: Send an SMS message to a phone number. Messages are queued for delivery.
      operationId: sendSms
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendSmsRequest'
            example:
              from_number: '+16625658792'
              to_number: '+17189153182'
              message: >-
                Hello from OpenMic! Here is your appointment link:
                https://example.com/book
      responses:
        '201':
          description: SMS queued for delivery
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SendSmsResponse'
              example:
                id: msg_01kpbgtyntfktvzseh0ykcmqm4
                from_number: '+16625658792'
                to_number: '+17189153182'
                message: >-
                  Hello from OpenMic! Here is your appointment link:
                  https://example.com/book
                status: queued
        '401':
          $ref: '#/components/responses/Unauthorized'
        '422':
          description: >-
            Validation error — invalid phone number format or unsupported
            destination
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    SendSmsRequest:
      type: object
      required:
        - to_number
        - message
      properties:
        from_number:
          type: string
          description: >-
            Sender phone number in E.164 format. Optional — defaults to your
            account's Surge phone number if not provided.
          example: '+16625658792'
        to_number:
          type: string
          description: Recipient phone number in E.164 format.
          example: '+17189153182'
        message:
          type: string
          description: The text message to send. Must not be empty.
          example: Hello from OpenMic!
    SendSmsResponse:
      type: object
      properties:
        id:
          type: string
          description: Unique message identifier.
          example: msg_01kpbgtyntfktvzseh0ykcmqm4
        from_number:
          type: string
          description: The phone number the message was sent from.
          example: '+16625658792'
        to_number:
          type: string
          description: The phone number the message was sent to.
          example: '+17189153182'
        message:
          type: string
          description: The message body that was sent.
          example: Hello from OpenMic!
        status:
          type: string
          description: The delivery status of the message.
          enum:
            - queued
          example: queued
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
        details:
          type: string
  responses:
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    TooManyRequests:
      description: Rate limit exceeded.
      content:
        application/json:
          schema:
            type: object
            properties:
              success:
                type: boolean
              message:
                type: string
              error:
                type: string
              retryAfter:
                type: integer
    InternalServerError:
      description: Unexpected server error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key obtained from the OpenMic dashboard.

````