List SMS Numbers
curl --request GET \
--url https://api.bland.ai/v1/sms/numbers \
--header 'authorization: <authorization>'import requests
url = "https://api.bland.ai/v1/sms/numbers"
headers = {"authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {authorization: '<authorization>'}};
fetch('https://api.bland.ai/v1/sms/numbers', 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.bland.ai/v1/sms/numbers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.bland.ai/v1/sms/numbers"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.bland.ai/v1/sms/numbers")
.header("authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bland.ai/v1/sms/numbers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"data": [
{
"phone_number": "+14155552671",
"sms_config": {
"webhook": "https://example.com/sms-webhook",
"request_data": { "ref": "campaign_123" },
"time_out": 15,
"messaging_service_sid": "MG1234567890abcdef",
"objective": "Provide quick support to customers.",
"tools": ["lookup", "escalate"],
"temperature": 0.7,
"pathway_id": "abc123",
"pathway_version": "latest",
"start_node_id": "entry-node",
"restart_after_end_call": true,
"timezone": "America/New_York",
"citation_schema_ids": ["b0477cba-1c97-4105-8ac9-46cb8eae5cf1"],
"disposition_ids": ["d1234567-abcd-1234-efgh-123456789012"],
"summary_prompt": "Summarize the key points and outcome of this conversation."
},
"conversation_count": 34
}
],
"errors": null
}
Messaging
List SMS Numbers
Retrieve all phone numbers configured for SMS, along with their configuration and conversation counts. Pass ?channel=whatsapp or ?channel=imessage to return WhatsApp or iMessage configurations instead of SMS.
GET
/
v1
/
sms
/
numbers
List SMS Numbers
curl --request GET \
--url https://api.bland.ai/v1/sms/numbers \
--header 'authorization: <authorization>'import requests
url = "https://api.bland.ai/v1/sms/numbers"
headers = {"authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {authorization: '<authorization>'}};
fetch('https://api.bland.ai/v1/sms/numbers', 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.bland.ai/v1/sms/numbers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.bland.ai/v1/sms/numbers"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.bland.ai/v1/sms/numbers")
.header("authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bland.ai/v1/sms/numbers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"data": [
{
"phone_number": "+14155552671",
"sms_config": {
"webhook": "https://example.com/sms-webhook",
"request_data": { "ref": "campaign_123" },
"time_out": 15,
"messaging_service_sid": "MG1234567890abcdef",
"objective": "Provide quick support to customers.",
"tools": ["lookup", "escalate"],
"temperature": 0.7,
"pathway_id": "abc123",
"pathway_version": "latest",
"start_node_id": "entry-node",
"restart_after_end_call": true,
"timezone": "America/New_York",
"citation_schema_ids": ["b0477cba-1c97-4105-8ac9-46cb8eae5cf1"],
"disposition_ids": ["d1234567-abcd-1234-efgh-123456789012"],
"summary_prompt": "Summarize the key points and outcome of this conversation."
},
"conversation_count": 34
}
],
"errors": null
}
Enterprise Feature - SMS is only available on Enterprise plans. Contact your Bland representative for access.
Headers
string
required
Your API key for authentication.
Response
array
A list of phone numbers with SMS configurations.
string
The E.164 formatted phone number assigned to the user.
object
The configuration used when handling inbound SMS messages.
string
When the agent sends a response, we’ll send the message details in a POST request to the URL you specify here, along with chat history.
object
Request data fields are available to the AI agent during the call when referenced in the associated pathway or task.
number
Maximum time to wait for a response. Default is no timeout.
string
Twilio Messaging Service SID, if set.
string
The assistant’s objective or system instruction.
array
A list of tools available to the assistant.
number
The model’s temperature setting, controlling creativity.
string
The ID of the linked conversational pathway (if any).
string
The specific version of the pathway to use.
string
The ID of the first node to enter in the pathway.
boolean
When
true, a new conversation is automatically started if the user texts after the current conversation has ended. When false, subsequent messages are stored in the ended conversation without triggering a new reply.string
The timezone used for time-based variables in the conversation (e.g.
"America/New_York").string[]
IDs of citation schemas configured for this number. Citations are extracted when conversations end. See Citations.
string[]
IDs of outcomes configured for this number. Outcomes are evaluated when conversations end. See Outcomes.
string
Custom prompt used to generate a conversation summary when the conversation ends.
integer
The number of SMS conversations handled by this number.
null
Always
null on success.{
"data": [
{
"phone_number": "+14155552671",
"sms_config": {
"webhook": "https://example.com/sms-webhook",
"request_data": { "ref": "campaign_123" },
"time_out": 15,
"messaging_service_sid": "MG1234567890abcdef",
"objective": "Provide quick support to customers.",
"tools": ["lookup", "escalate"],
"temperature": 0.7,
"pathway_id": "abc123",
"pathway_version": "latest",
"start_node_id": "entry-node",
"restart_after_end_call": true,
"timezone": "America/New_York",
"citation_schema_ids": ["b0477cba-1c97-4105-8ac9-46cb8eae5cf1"],
"disposition_ids": ["d1234567-abcd-1234-efgh-123456789012"],
"summary_prompt": "Summarize the key points and outcome of this conversation."
},
"conversation_count": 34
}
],
"errors": null
}
Docs for agents: llms.txt
Was this page helpful?