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

# Send an outbound SMS

> Send an outbound SMS via given provider (Ex: Twilio) and persist a full SMSLogs record.
Validates that numbers are US (+1) or India (+91) only.

Either of the following must be provided
1. assistantNumber
2. phoneNumberId
3. assistantId

Order of precedence for determining the sending number:
1. assistantNumber (if provided)
2. phoneNumberId (if provided)
3. assistantId (if provided)

Returns the persisted log ID and delivery status.



## OpenAPI

````yaml https://api-qa.interactly.ai/api-docs/sms/api.json post /sms/v1/sms/send
openapi: 3.1.0
info:
  title: Interactly API
  description: API for building interactly.ai services
  version: 1.1.0
  contact:
    name: Interactly
    url: https://interactly.ai
    email: developers@interactly.ai
servers:
  - url: https://api-qa.interactly.ai
    description: API Server
security: []
paths:
  /sms/v1/sms/send:
    post:
      tags:
        - SMS Libraries and APIs
      summary: Send an outbound SMS
      description: >-
        Send an outbound SMS via given provider (Ex: Twilio) and persist a full
        SMSLogs record.

        Validates that numbers are US (+1) or India (+91) only.


        Either of the following must be provided

        1. assistantNumber

        2. phoneNumberId

        3. assistantId


        Order of precedence for determining the sending number:

        1. assistantNumber (if provided)

        2. phoneNumberId (if provided)

        3. assistantId (if provided)


        Returns the persisted log ID and delivery status.
      operationId: sms_listener_service_api_send_outbound_sms_v1_sms_send_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendSMSRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - bearer: []
components:
  schemas:
    SendSMSRequest:
      properties:
        phoneProvider:
          anyOf:
            - $ref: '#/components/schemas/PhoneProvider'
            - type: 'null'
          description: SMS provider (twilio/vonage)
          default: twilio
        phoneNumberId:
          anyOf:
            - type: string
              maxLength: 24
              minLength: 24
              pattern: ^[0-9a-f]{24}$
              example: 5eb7cf5a86d9755df3a6c593
            - type: 'null'
          title: Phonenumberid
          description: >-
            Phone number ID — assistant number resolved from this if
            assistantNumber is omitted
        assistantNumber:
          anyOf:
            - type: string
            - type: 'null'
          title: Assistantnumber
          description: >-
            Sender phone number (E.164 or normalizable). Required if
            phoneNumberId not provided.
        userNumber:
          type: string
          title: Usernumber
          description: Recipient phone number (E.164 or normalizable)
        messageContent:
          type: string
          title: Messagecontent
          description: SMS body text
        assistantId:
          anyOf:
            - type: string
            - type: 'null'
          title: Assistantid
          description: Assistant/bot ID sending the SMS
        conversationId:
          anyOf:
            - type: string
            - type: 'null'
          title: Conversationid
          description: Conversation ID for tracking
        workflowId:
          anyOf:
            - type: string
              maxLength: 24
              minLength: 24
              pattern: ^[0-9a-f]{24}$
              example: 5eb7cf5a86d9755df3a6c593
            - type: 'null'
          title: Workflowid
          description: Workflow ID for tracking
        campaignId:
          anyOf:
            - type: string
              maxLength: 24
              minLength: 24
              pattern: ^[0-9a-f]{24}$
              example: 5eb7cf5a86d9755df3a6c593
            - type: 'null'
          title: Campaignid
          description: Campaign ID for tracking
      type: object
      required:
        - userNumber
        - messageContent
      title: SendSMSRequest
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    PhoneProvider:
      type: string
      enum:
        - twilio
        - telnyx
        - vonage
      title: PhoneProvider
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: Bearer
      type: http
      description: >-
        Retrieve your API Key from [Dashboard API Keys
        Section](https://dashboard-qa.interactly.ai/api-keys).

````