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

# Send an SMS

> Send a one-way SMS to a phone number, or set a `waitTime` to listen for a reply and capture it in the response.



## OpenAPI

````yaml POST /messages/sms
openapi: 3.1.0
info:
  title: Poku API
  version: 1.0.0
  description: OpenAPI document for the authenticated Poku API routes.
servers:
  - url: https://api.pokulabs.com
security:
  - bearerAuth: []
tags:
  - name: calls
  - name: messages
  - name: forms
  - name: interactions
  - name: numbers
  - name: webhooks
paths:
  /messages/sms:
    post:
      tags:
        - messages
      summary: Send an SMS message
      description: >-
        Send a one-way SMS to a phone number, or set a `waitTime` to listen for
        a reply and capture it in the response.
      operationId: sendSmsMessage
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContactMessageMedium'
      responses:
        '200':
          description: Message sent successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SmsMessageResponse'
              examples:
                noWaitTime:
                  summary: No waitTime set
                  value:
                    interactionId: 092f9eb4-3694-4718-9084-5c786afa87ec
                replyReceived:
                  summary: Reply received within waitTime
                  value:
                    response: 'Human response: Hello there!'
                noReply:
                  summary: No reply received
                  value:
                    response: Human did not respond, please continue where you left off.
components:
  schemas:
    ContactMessageMedium:
      type: object
      required:
        - message
        - to
      properties:
        message:
          $ref: '#/components/schemas/Message'
          description: The content of the message.
        to:
          type: string
          description: >-
            The number you want to message, in E.164 format. See supported
            countries for Poku numbers
            [here](https://docs.pokulabs.com/reference/supported-countries).
        from:
          type: string
          description: >-
            Defaults to your Poku reserved number. If you don't have one, falls
            back to a Poku shared number.


            You can also bring your own number from Twilio or Messagebird.
            Configure your credentials on the [Integrations
            page](https://dashboard.pokulabs.com/integrations) and pass the
            number here in E.164 format. If it's a US number, it must be
            approved for A2P texting.
        waitTime:
          type: number
          minimum: 1
          maximum: 600
          description: >-
            When undefined or not supplied, no reply is captured.


            When supplied, this is the number of seconds the API request is held
            open waiting for a reply. Poku returns the reply in the HTTP
            response.
          example: 60
        followUpTime:
          type: number
          minimum: 1
          maximum: 60000
          description: >-
            Duration in seconds to keep listening for a reply after the
            `waitTime` window closes.


            When a reply arrives within this window, Poku sends it to any
            webhooks you've configured.
          example: 6000
      additionalProperties: false
    SmsMessageResponse:
      type: object
      properties:
        interactionId:
          type: string
          description: >-
            Returned when no waitTime is set. Unique identifier for this
            interaction.
        response:
          type: string
          description: >-
            Returned when waitTime is set. Contains the recipient reply, or a
            timeout message if no reply was received.
    Message:
      type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Authentication header containing your Poku API key. Find it in the [Poku
        dashboard](https://dashboard.pokulabs.com/). The format is "Bearer
        YOUR_API_KEY"

````