v2

latestOpenAPI 3.1.02026-07-2661920.3 KB
SMS Libraries and APIs

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.

post/sms/v1/sms/send

Request body

phoneProvider'twilio' | 'telnyx' | 'vonage'
phoneNumberIdstring nullable

Phone number ID — assistant number resolved from this if assistantNumber is omitted

assistantNumberstring nullable

Sender phone number (E.164 or normalizable). Required if phoneNumberId not provided.

userNumberstring required

Recipient phone number (E.164 or normalizable)

messageContentstring required

SMS body text

assistantIdstring nullable

Assistant/bot ID sending the SMS

conversationIdstring nullable

Conversation ID for tracking

workflowIdstring nullable

Workflow ID for tracking

campaignIdstring nullable

Campaign ID for tracking

Example request

{
  "phoneNumberId": "5eb7cf5a86d9755df3a6c593",
  "workflowId": "5eb7cf5a86d9755df3a6c593",
  "campaignId": "5eb7cf5a86d9755df3a6c593"
}

Response

Successful Response

{"stackTrail":"paths:/sms/v1/sms/send:post:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}