curl --request POST \
--url https://api-qa.interactly.ai/sms/v1/sms/send \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"userNumber": "<string>",
"messageContent": "<string>",
"phoneProvider": "twilio",
"phoneNumberId": "5eb7cf5a86d9755df3a6c593",
"assistantNumber": "<string>",
"assistantId": "<string>",
"conversationId": "<string>",
"workflowId": "5eb7cf5a86d9755df3a6c593",
"campaignId": "5eb7cf5a86d9755df3a6c593"
}
'import requests
url = "https://api-qa.interactly.ai/sms/v1/sms/send"
payload = {
"userNumber": "<string>",
"messageContent": "<string>",
"phoneProvider": "twilio",
"phoneNumberId": "5eb7cf5a86d9755df3a6c593",
"assistantNumber": "<string>",
"assistantId": "<string>",
"conversationId": "<string>",
"workflowId": "5eb7cf5a86d9755df3a6c593",
"campaignId": "5eb7cf5a86d9755df3a6c593"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
userNumber: '<string>',
messageContent: '<string>',
phoneProvider: 'twilio',
phoneNumberId: '5eb7cf5a86d9755df3a6c593',
assistantNumber: '<string>',
assistantId: '<string>',
conversationId: '<string>',
workflowId: '5eb7cf5a86d9755df3a6c593',
campaignId: '5eb7cf5a86d9755df3a6c593'
})
};
fetch('https://api-qa.interactly.ai/sms/v1/sms/send', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-qa.interactly.ai/sms/v1/sms/send",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'userNumber' => '<string>',
'messageContent' => '<string>',
'phoneProvider' => 'twilio',
'phoneNumberId' => '5eb7cf5a86d9755df3a6c593',
'assistantNumber' => '<string>',
'assistantId' => '<string>',
'conversationId' => '<string>',
'workflowId' => '5eb7cf5a86d9755df3a6c593',
'campaignId' => '5eb7cf5a86d9755df3a6c593'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-qa.interactly.ai/sms/v1/sms/send"
payload := strings.NewReader("{\n \"userNumber\": \"<string>\",\n \"messageContent\": \"<string>\",\n \"phoneProvider\": \"twilio\",\n \"phoneNumberId\": \"5eb7cf5a86d9755df3a6c593\",\n \"assistantNumber\": \"<string>\",\n \"assistantId\": \"<string>\",\n \"conversationId\": \"<string>\",\n \"workflowId\": \"5eb7cf5a86d9755df3a6c593\",\n \"campaignId\": \"5eb7cf5a86d9755df3a6c593\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-qa.interactly.ai/sms/v1/sms/send")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"userNumber\": \"<string>\",\n \"messageContent\": \"<string>\",\n \"phoneProvider\": \"twilio\",\n \"phoneNumberId\": \"5eb7cf5a86d9755df3a6c593\",\n \"assistantNumber\": \"<string>\",\n \"assistantId\": \"<string>\",\n \"conversationId\": \"<string>\",\n \"workflowId\": \"5eb7cf5a86d9755df3a6c593\",\n \"campaignId\": \"5eb7cf5a86d9755df3a6c593\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-qa.interactly.ai/sms/v1/sms/send")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"userNumber\": \"<string>\",\n \"messageContent\": \"<string>\",\n \"phoneProvider\": \"twilio\",\n \"phoneNumberId\": \"5eb7cf5a86d9755df3a6c593\",\n \"assistantNumber\": \"<string>\",\n \"assistantId\": \"<string>\",\n \"conversationId\": \"<string>\",\n \"workflowId\": \"5eb7cf5a86d9755df3a6c593\",\n \"campaignId\": \"5eb7cf5a86d9755df3a6c593\"\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}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
- assistantNumber
- phoneNumberId
- assistantId
Order of precedence for determining the sending number:
- assistantNumber (if provided)
- phoneNumberId (if provided)
- assistantId (if provided)
Returns the persisted log ID and delivery status.
curl --request POST \
--url https://api-qa.interactly.ai/sms/v1/sms/send \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"userNumber": "<string>",
"messageContent": "<string>",
"phoneProvider": "twilio",
"phoneNumberId": "5eb7cf5a86d9755df3a6c593",
"assistantNumber": "<string>",
"assistantId": "<string>",
"conversationId": "<string>",
"workflowId": "5eb7cf5a86d9755df3a6c593",
"campaignId": "5eb7cf5a86d9755df3a6c593"
}
'import requests
url = "https://api-qa.interactly.ai/sms/v1/sms/send"
payload = {
"userNumber": "<string>",
"messageContent": "<string>",
"phoneProvider": "twilio",
"phoneNumberId": "5eb7cf5a86d9755df3a6c593",
"assistantNumber": "<string>",
"assistantId": "<string>",
"conversationId": "<string>",
"workflowId": "5eb7cf5a86d9755df3a6c593",
"campaignId": "5eb7cf5a86d9755df3a6c593"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
userNumber: '<string>',
messageContent: '<string>',
phoneProvider: 'twilio',
phoneNumberId: '5eb7cf5a86d9755df3a6c593',
assistantNumber: '<string>',
assistantId: '<string>',
conversationId: '<string>',
workflowId: '5eb7cf5a86d9755df3a6c593',
campaignId: '5eb7cf5a86d9755df3a6c593'
})
};
fetch('https://api-qa.interactly.ai/sms/v1/sms/send', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-qa.interactly.ai/sms/v1/sms/send",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'userNumber' => '<string>',
'messageContent' => '<string>',
'phoneProvider' => 'twilio',
'phoneNumberId' => '5eb7cf5a86d9755df3a6c593',
'assistantNumber' => '<string>',
'assistantId' => '<string>',
'conversationId' => '<string>',
'workflowId' => '5eb7cf5a86d9755df3a6c593',
'campaignId' => '5eb7cf5a86d9755df3a6c593'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-qa.interactly.ai/sms/v1/sms/send"
payload := strings.NewReader("{\n \"userNumber\": \"<string>\",\n \"messageContent\": \"<string>\",\n \"phoneProvider\": \"twilio\",\n \"phoneNumberId\": \"5eb7cf5a86d9755df3a6c593\",\n \"assistantNumber\": \"<string>\",\n \"assistantId\": \"<string>\",\n \"conversationId\": \"<string>\",\n \"workflowId\": \"5eb7cf5a86d9755df3a6c593\",\n \"campaignId\": \"5eb7cf5a86d9755df3a6c593\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-qa.interactly.ai/sms/v1/sms/send")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"userNumber\": \"<string>\",\n \"messageContent\": \"<string>\",\n \"phoneProvider\": \"twilio\",\n \"phoneNumberId\": \"5eb7cf5a86d9755df3a6c593\",\n \"assistantNumber\": \"<string>\",\n \"assistantId\": \"<string>\",\n \"conversationId\": \"<string>\",\n \"workflowId\": \"5eb7cf5a86d9755df3a6c593\",\n \"campaignId\": \"5eb7cf5a86d9755df3a6c593\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-qa.interactly.ai/sms/v1/sms/send")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"userNumber\": \"<string>\",\n \"messageContent\": \"<string>\",\n \"phoneProvider\": \"twilio\",\n \"phoneNumberId\": \"5eb7cf5a86d9755df3a6c593\",\n \"assistantNumber\": \"<string>\",\n \"assistantId\": \"<string>\",\n \"conversationId\": \"<string>\",\n \"workflowId\": \"5eb7cf5a86d9755df3a6c593\",\n \"campaignId\": \"5eb7cf5a86d9755df3a6c593\"\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Retrieve your API Key from Dashboard API Keys Section.
Body
Recipient phone number (E.164 or normalizable)
SMS body text
SMS provider (twilio/vonage)
twilio, telnyx, vonage Phone number ID — assistant number resolved from this if assistantNumber is omitted
24^[0-9a-f]{24}$"5eb7cf5a86d9755df3a6c593"
Sender phone number (E.164 or normalizable). Required if phoneNumberId not provided.
Assistant/bot ID sending the SMS
Conversation ID for tracking
Workflow ID for tracking
24^[0-9a-f]{24}$"5eb7cf5a86d9755df3a6c593"
Campaign ID for tracking
24^[0-9a-f]{24}$"5eb7cf5a86d9755df3a6c593"
Response
Successful Response