curl --request POST \
--url https://api.algosmiths.com/api/v1/broadcasts/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"phone_number_id": 123,
"template_id": 123,
"template_params": {},
"template_variables": {},
"filter_tags": [
"<string>"
],
"filter_conv_status": "<string>",
"segment_id": 123,
"list_id": 123
}
'import requests
url = "https://api.algosmiths.com/api/v1/broadcasts/"
payload = {
"phone_number_id": 123,
"template_id": 123,
"template_params": {},
"template_variables": {},
"filter_tags": ["<string>"],
"filter_conv_status": "<string>",
"segment_id": 123,
"list_id": 123
}
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({
phone_number_id: 123,
template_id: 123,
template_params: {},
template_variables: {},
filter_tags: ['<string>'],
filter_conv_status: '<string>',
segment_id: 123,
list_id: 123
})
};
fetch('https://api.algosmiths.com/api/v1/broadcasts/', 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.algosmiths.com/api/v1/broadcasts/",
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([
'phone_number_id' => 123,
'template_id' => 123,
'template_params' => [
],
'template_variables' => [
],
'filter_tags' => [
'<string>'
],
'filter_conv_status' => '<string>',
'segment_id' => 123,
'list_id' => 123
]),
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.algosmiths.com/api/v1/broadcasts/"
payload := strings.NewReader("{\n \"phone_number_id\": 123,\n \"template_id\": 123,\n \"template_params\": {},\n \"template_variables\": {},\n \"filter_tags\": [\n \"<string>\"\n ],\n \"filter_conv_status\": \"<string>\",\n \"segment_id\": 123,\n \"list_id\": 123\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.algosmiths.com/api/v1/broadcasts/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"phone_number_id\": 123,\n \"template_id\": 123,\n \"template_params\": {},\n \"template_variables\": {},\n \"filter_tags\": [\n \"<string>\"\n ],\n \"filter_conv_status\": \"<string>\",\n \"segment_id\": 123,\n \"list_id\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.algosmiths.com/api/v1/broadcasts/")
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 \"phone_number_id\": 123,\n \"template_id\": 123,\n \"template_params\": {},\n \"template_variables\": {},\n \"filter_tags\": [\n \"<string>\"\n ],\n \"filter_conv_status\": \"<string>\",\n \"segment_id\": 123,\n \"list_id\": 123\n}"
response = http.request(request)
puts response.read_body{}{}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Create a broadcast draft
Resolves recipients from filter_tags/filter_conv_status, a segment_id, or a list_id (list takes precedence) and creates a DRAFT — this call never sends anything. A broadcast only actually sends after a separate POST /api/v1/broadcasts/{id}/confirm/ call.
curl --request POST \
--url https://api.algosmiths.com/api/v1/broadcasts/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"phone_number_id": 123,
"template_id": 123,
"template_params": {},
"template_variables": {},
"filter_tags": [
"<string>"
],
"filter_conv_status": "<string>",
"segment_id": 123,
"list_id": 123
}
'import requests
url = "https://api.algosmiths.com/api/v1/broadcasts/"
payload = {
"phone_number_id": 123,
"template_id": 123,
"template_params": {},
"template_variables": {},
"filter_tags": ["<string>"],
"filter_conv_status": "<string>",
"segment_id": 123,
"list_id": 123
}
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({
phone_number_id: 123,
template_id: 123,
template_params: {},
template_variables: {},
filter_tags: ['<string>'],
filter_conv_status: '<string>',
segment_id: 123,
list_id: 123
})
};
fetch('https://api.algosmiths.com/api/v1/broadcasts/', 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.algosmiths.com/api/v1/broadcasts/",
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([
'phone_number_id' => 123,
'template_id' => 123,
'template_params' => [
],
'template_variables' => [
],
'filter_tags' => [
'<string>'
],
'filter_conv_status' => '<string>',
'segment_id' => 123,
'list_id' => 123
]),
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.algosmiths.com/api/v1/broadcasts/"
payload := strings.NewReader("{\n \"phone_number_id\": 123,\n \"template_id\": 123,\n \"template_params\": {},\n \"template_variables\": {},\n \"filter_tags\": [\n \"<string>\"\n ],\n \"filter_conv_status\": \"<string>\",\n \"segment_id\": 123,\n \"list_id\": 123\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.algosmiths.com/api/v1/broadcasts/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"phone_number_id\": 123,\n \"template_id\": 123,\n \"template_params\": {},\n \"template_variables\": {},\n \"filter_tags\": [\n \"<string>\"\n ],\n \"filter_conv_status\": \"<string>\",\n \"segment_id\": 123,\n \"list_id\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.algosmiths.com/api/v1/broadcasts/")
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 \"phone_number_id\": 123,\n \"template_id\": 123,\n \"template_params\": {},\n \"template_variables\": {},\n \"filter_tags\": [\n \"<string>\"\n ],\n \"filter_conv_status\": \"<string>\",\n \"segment_id\": 123,\n \"list_id\": 123\n}"
response = http.request(request)
puts response.read_body{}{}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Workspace API key, e.g. Authorization: Bearer cb_live_.... Create one in Settings → API Keys. See public_api.md § 3 for scopes.
Body
Phone number ID from GET /api/v1/phone-numbers/
Template ID from GET /api/v1/templates/
Legacy template parameter overrides
Per-contact template variable mapping (maps placeholder index to field/static value)
Recipient filter: contacts matching any of these tags
Recipient filter: conversation status (e.g. OPEN, CLOSED, PENDING)
Recipient filter: segment ID
Recipient filter: contact list ID (takes precedence over segment_id and filter_*)

