Broadcasts
A broadcast sends one approved template to many contacts. In paths and fields it is called a campaign. Contacts who have opted out are always skipped, and a broadcast never sends more than the plan’s monthly message allowance has left.
List broadcasts #
GET/api/v1/campaigns
Newest first, each with its delivery counts so far.
Query parameters
statusstring- scheduled, sending, paused, completed or failed.
pageinteger- Which page, starting at 1. A page past the end is an empty list.
limitinteger- How many per page: 1 to 100. 50 when left out.
Returns HTTP 200
okboolean- Always true on success.
campaignslist of Campaign- The broadcasts on this page.
pageinteger- The page you asked for.
pagesinteger- How many pages there are at this limit.
totalinteger- How many items match in all.
limitinteger- Items per page.
has_moreboolean- True while there is a next page.
Errors
- 401
unauthorized - The Authorization header is missing, or the key is wrong or deleted.
- 429
rate_limited - More than 120 requests in a minute with this key. Wait for the seconds in Retry-After.
Plus the errors any request can get.
curl "https://chatilo.me/api/v1/campaigns?status=completed" \
-H "Authorization: Bearer YOUR_API_KEY"<?php
$apiKey = 'YOUR_API_KEY';
$ch = curl_init('https://chatilo.me/api/v1/campaigns?status=completed');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . $apiKey],
]);
$result = json_decode((string) curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
if ($status >= 400) {
throw new RuntimeException($result['error']['code'] . ': ' . $result['error']['message']);
}
print_r($result);const apiKey = 'YOUR_API_KEY';
const response = await fetch("https://chatilo.me/api/v1/campaigns?status=completed", {
headers: {
Authorization: `Bearer ${apiKey}`,
},
});
const result = await response.json();
if (!response.ok) {
throw new Error(`${result.error.code}: ${result.error.message}`);
}
console.log(result);import requests
api_key = "YOUR_API_KEY"
response = requests.get(
"https://chatilo.me/api/v1/campaigns?status=completed",
headers={"Authorization": f"Bearer {api_key}"},
timeout=30,
)
result = response.json()
if not response.ok:
raise RuntimeError(f"{result['error']['code']}: {result['error']['message']}")
print(result){
"ok": true,
"campaigns": [
{
"id": 4001,
"name": "Festive offer",
"status": "completed",
"total": 250,
"sent": 248,
"delivered": 240,
"read": 180,
"failed": 2,
"replied": 9,
"note": null,
"started_at": "2026-01-31T09:30:00Z",
"completed_at": "2026-01-31T09:45:00Z",
"url": "https://chatilo.me/campaigns/4001",
"template_id": 12,
"number_id": 1,
"scheduled_at": null,
"created_at": "2026-01-31T09:30:00Z"
}
],
"page": 1,
"pages": 1,
"total": 1,
"limit": 50,
"has_more": false
}Get a broadcast #
GET/api/v1/campaigns/{id}
One broadcast with its delivery counts, template, audience and the values used to fill the template. Counts move while it is sending; ask again to follow it.
Path
idintegerrequired- The broadcast’s id.
Returns HTTP 200
okboolean- Always true on success.
campaignCampaignDetail- The broadcast.
Errors
- 401
unauthorized - The Authorization header is missing, or the key is wrong or deleted.
- 404
campaign_not_found - No broadcast with that id in this workspace.
- 429
rate_limited - More than 120 requests in a minute with this key. Wait for the seconds in Retry-After.
Plus the errors any request can get.
curl "https://chatilo.me/api/v1/campaigns/4001" \
-H "Authorization: Bearer YOUR_API_KEY"<?php
$apiKey = 'YOUR_API_KEY';
$ch = curl_init('https://chatilo.me/api/v1/campaigns/4001');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . $apiKey],
]);
$result = json_decode((string) curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
if ($status >= 400) {
throw new RuntimeException($result['error']['code'] . ': ' . $result['error']['message']);
}
print_r($result);const apiKey = 'YOUR_API_KEY';
const response = await fetch("https://chatilo.me/api/v1/campaigns/4001", {
headers: {
Authorization: `Bearer ${apiKey}`,
},
});
const result = await response.json();
if (!response.ok) {
throw new Error(`${result.error.code}: ${result.error.message}`);
}
console.log(result);import requests
api_key = "YOUR_API_KEY"
response = requests.get(
"https://chatilo.me/api/v1/campaigns/4001",
headers={"Authorization": f"Bearer {api_key}"},
timeout=30,
)
result = response.json()
if not response.ok:
raise RuntimeError(f"{result['error']['code']}: {result['error']['message']}")
print(result){
"ok": true,
"campaign": {
"id": 4001,
"name": "Festive offer",
"status": "sending",
"total": 250,
"sent": 120,
"delivered": 112,
"read": 64,
"failed": 2,
"replied": 9,
"note": null,
"started_at": "2026-01-31T09:30:00Z",
"completed_at": null,
"url": "https://chatilo.me/campaigns/4001",
"template_id": 12,
"number_id": 1,
"scheduled_at": null,
"created_at": "2026-01-31T09:30:00Z",
"pending": 128,
"template": {
"id": 12,
"name": "order_update",
"language": "en"
},
"audience": {
"type": "tags",
"tags": [
{
"id": 11,
"name": "VIP"
}
]
},
"variables": {
"header": "",
"body": [
"{{first_name}}",
"FESTIVE20"
]
}
}
}Create a broadcast #
POST/api/v1/campaigns
Starts a broadcast now, or schedules it. It behaves exactly like one made on the New broadcast page: the audience is worked out when sending starts, opted-out contacts are skipped, and no more is sent than the plan’s monthly allowance has left. Messages go out over the following minutes; follow progress with “Get a broadcast” or the campaign.finished event.
Body JSON
namestringrequired- A name for your own reference, up to 150 characters.
template_idinteger- The approved template to send. Or use template.
templateobject- {"name", "language"} of an approved template, instead of template_id.
audienceobjectrequired- Who gets it: {"type": "all"} for every contact, {"type": "tags", "tags": ["VIP", "Denver"]} for contacts with any of those tags (names, or ids as numbers), or {"type": "segment", "segment_id": 4}.
variablesobject- {"header", "body"}: body is a list that fills {{1}}, {{2}}… in order. Each value may use {{name}}, {{first_name}}, {{phone}}, {{email}} and contact attributes, filled in per contact. header fills a text header’s variable, or must be a public https link when the template has an image, video or document header.
scheduled_atdate-time- When to start. Leave out to start now. Without an offset the time is read in the workspace’s timezone.
Returns HTTP 201
okboolean- Always true on success.
campaignCampaignDetail- The broadcast as it now is.
Errors
- 401
unauthorized - The Authorization header is missing, or the key is wrong or deleted.
- 403
message_limit - This month’s broadcast message allowance is used up.
- 403
read_only_key - A read-only key was used for a request that changes something.
- 409
idempotency_conflict - A request with the same Idempotency-Key is still running.
- 422
invalid_audience - audience.type isn’t all, tags or segment, or no tag was given.
- 422
invalid_header - The template has a media header and variables.header isn’t a link.
- 422
invalid_idempotency_key - The Idempotency-Key is longer than 200 characters.
- 422
invalid_name - name is missing or longer than 150 characters.
- 422
invalid_schedule - scheduled_at isn’t a time in the future.
- 422
segment_not_found - segment_id is not a segment in this workspace.
- 422
tag_not_found - One of the tags doesn’t exist.
- 422
template_not_found - The template doesn’t exist in this workspace or isn’t approved.
- 429
rate_limited - More than 120 requests in a minute with this key. Wait for the seconds in Retry-After.
Plus the errors any request can get.
curl -X POST "https://chatilo.me/api/v1/campaigns" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Festive offer",
"template": {
"name": "festive_offer",
"language": "en"
},
"audience": {
"type": "tags",
"tags": [
"VIP"
]
},
"variables": {
"body": [
"{{first_name}}",
"FESTIVE20"
]
},
"scheduled_at": "2026-12-20T10:00:00+05:30"
}'<?php
$apiKey = 'YOUR_API_KEY';
$ch = curl_init('https://chatilo.me/api/v1/campaigns');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . $apiKey, 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Festive offer',
'template' => [
'name' => 'festive_offer',
'language' => 'en',
],
'audience' => [
'type' => 'tags',
'tags' => [
'VIP',
],
],
'variables' => [
'body' => [
'{{first_name}}',
'FESTIVE20',
],
],
'scheduled_at' => '2026-12-20T10:00:00+05:30',
]),
]);
$result = json_decode((string) curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
if ($status >= 400) {
throw new RuntimeException($result['error']['code'] . ': ' . $result['error']['message']);
}
print_r($result);const apiKey = 'YOUR_API_KEY';
const response = await fetch("https://chatilo.me/api/v1/campaigns", {
method: 'POST',
headers: {
Authorization: `Bearer ${apiKey}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"name": "Festive offer",
"template": {
"name": "festive_offer",
"language": "en"
},
"audience": {
"type": "tags",
"tags": [
"VIP"
]
},
"variables": {
"body": [
"{{first_name}}",
"FESTIVE20"
]
},
"scheduled_at": "2026-12-20T10:00:00+05:30"
}),
});
const result = await response.json();
if (!response.ok) {
throw new Error(`${result.error.code}: ${result.error.message}`);
}
console.log(result);import requests
api_key = "YOUR_API_KEY"
response = requests.post(
"https://chatilo.me/api/v1/campaigns",
headers={"Authorization": f"Bearer {api_key}"},
json={
"name": "Festive offer",
"template": {
"name": "festive_offer",
"language": "en",
},
"audience": {
"type": "tags",
"tags": [
"VIP",
],
},
"variables": {
"body": [
"{{first_name}}",
"FESTIVE20",
],
},
"scheduled_at": "2026-12-20T10:00:00+05:30",
},
timeout=30,
)
result = response.json()
if not response.ok:
raise RuntimeError(f"{result['error']['code']}: {result['error']['message']}")
print(result){
"ok": true,
"campaign": {
"id": 4001,
"name": "Festive offer",
"status": "scheduled",
"total": 0,
"sent": 0,
"delivered": 0,
"read": 0,
"failed": 0,
"replied": 0,
"note": null,
"started_at": null,
"completed_at": null,
"url": "https://chatilo.me/campaigns/4001",
"template_id": 12,
"number_id": 1,
"scheduled_at": "2026-12-20T04:30:00Z",
"created_at": "2026-01-31T09:30:00Z",
"pending": 0,
"template": {
"id": 12,
"name": "order_update",
"language": "en"
},
"audience": {
"type": "tags",
"tags": [
{
"id": 11,
"name": "VIP"
}
]
},
"variables": {
"header": "",
"body": [
"{{first_name}}",
"FESTIVE20"
]
}
}
}Pause a broadcast #
POST/api/v1/campaigns/{id}/pause
Stops a broadcast that is sending, within a few seconds. Messages already sent are not affected.
Path
idintegerrequired- The broadcast’s id.
Returns HTTP 200
okboolean- Always true on success.
campaignCampaignDetail- The broadcast as it now is.
Errors
- 401
unauthorized - The Authorization header is missing, or the key is wrong or deleted.
- 403
read_only_key - A read-only key was used for a request that changes something.
- 404
campaign_not_found - No broadcast with that id in this workspace.
- 409
invalid_state - The broadcast isn’t sending.
- 429
rate_limited - More than 120 requests in a minute with this key. Wait for the seconds in Retry-After.
Plus the errors any request can get.
curl -X POST "https://chatilo.me/api/v1/campaigns/4001/pause" \
-H "Authorization: Bearer YOUR_API_KEY"<?php
$apiKey = 'YOUR_API_KEY';
$ch = curl_init('https://chatilo.me/api/v1/campaigns/4001/pause');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . $apiKey],
]);
$result = json_decode((string) curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
if ($status >= 400) {
throw new RuntimeException($result['error']['code'] . ': ' . $result['error']['message']);
}
print_r($result);const apiKey = 'YOUR_API_KEY';
const response = await fetch("https://chatilo.me/api/v1/campaigns/4001/pause", {
method: 'POST',
headers: {
Authorization: `Bearer ${apiKey}`,
},
});
const result = await response.json();
if (!response.ok) {
throw new Error(`${result.error.code}: ${result.error.message}`);
}
console.log(result);import requests
api_key = "YOUR_API_KEY"
response = requests.post(
"https://chatilo.me/api/v1/campaigns/4001/pause",
headers={"Authorization": f"Bearer {api_key}"},
timeout=30,
)
result = response.json()
if not response.ok:
raise RuntimeError(f"{result['error']['code']}: {result['error']['message']}")
print(result){
"ok": true,
"campaign": {
"id": 4001,
"name": "Festive offer",
"status": "paused",
"total": 250,
"sent": 120,
"delivered": 112,
"read": 64,
"failed": 2,
"replied": 9,
"note": null,
"started_at": "2026-01-31T09:30:00Z",
"completed_at": null,
"url": "https://chatilo.me/campaigns/4001",
"template_id": 12,
"number_id": 1,
"scheduled_at": null,
"created_at": "2026-01-31T09:30:00Z",
"pending": 128,
"template": {
"id": 12,
"name": "order_update",
"language": "en"
},
"audience": {
"type": "tags",
"tags": [
{
"id": 11,
"name": "VIP"
}
]
},
"variables": {
"header": "",
"body": [
"{{first_name}}",
"FESTIVE20"
]
}
}
}Resume a broadcast #
POST/api/v1/campaigns/{id}/resume
Carries on a paused broadcast from where it stopped.
Path
idintegerrequired- The broadcast’s id.
Returns HTTP 200
okboolean- Always true on success.
campaignCampaignDetail- The broadcast as it now is.
Errors
- 401
unauthorized - The Authorization header is missing, or the key is wrong or deleted.
- 403
read_only_key - A read-only key was used for a request that changes something.
- 404
campaign_not_found - No broadcast with that id in this workspace.
- 409
invalid_state - The broadcast isn’t paused.
- 429
rate_limited - More than 120 requests in a minute with this key. Wait for the seconds in Retry-After.
Plus the errors any request can get.
curl -X POST "https://chatilo.me/api/v1/campaigns/4001/resume" \
-H "Authorization: Bearer YOUR_API_KEY"<?php
$apiKey = 'YOUR_API_KEY';
$ch = curl_init('https://chatilo.me/api/v1/campaigns/4001/resume');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . $apiKey],
]);
$result = json_decode((string) curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
if ($status >= 400) {
throw new RuntimeException($result['error']['code'] . ': ' . $result['error']['message']);
}
print_r($result);const apiKey = 'YOUR_API_KEY';
const response = await fetch("https://chatilo.me/api/v1/campaigns/4001/resume", {
method: 'POST',
headers: {
Authorization: `Bearer ${apiKey}`,
},
});
const result = await response.json();
if (!response.ok) {
throw new Error(`${result.error.code}: ${result.error.message}`);
}
console.log(result);import requests
api_key = "YOUR_API_KEY"
response = requests.post(
"https://chatilo.me/api/v1/campaigns/4001/resume",
headers={"Authorization": f"Bearer {api_key}"},
timeout=30,
)
result = response.json()
if not response.ok:
raise RuntimeError(f"{result['error']['code']}: {result['error']['message']}")
print(result){
"ok": true,
"campaign": {
"id": 4001,
"name": "Festive offer",
"status": "sending",
"total": 250,
"sent": 120,
"delivered": 112,
"read": 64,
"failed": 2,
"replied": 9,
"note": null,
"started_at": "2026-01-31T09:30:00Z",
"completed_at": null,
"url": "https://chatilo.me/campaigns/4001",
"template_id": 12,
"number_id": 1,
"scheduled_at": null,
"created_at": "2026-01-31T09:30:00Z",
"pending": 128,
"template": {
"id": 12,
"name": "order_update",
"language": "en"
},
"audience": {
"type": "tags",
"tags": [
{
"id": 11,
"name": "VIP"
}
]
},
"variables": {
"header": "",
"body": [
"{{first_name}}",
"FESTIVE20"
]
}
}
}Cancel a broadcast #
POST/api/v1/campaigns/{id}/cancel
Stops a scheduled, sending or paused broadcast for good. Messages already sent stay sent; the rest are dropped. The broadcast ends as completed with a note saying it was cancelled.
Path
idintegerrequired- The broadcast’s id.
Returns HTTP 200
okboolean- Always true on success.
campaignCampaignDetail- The broadcast as it now is.
Errors
- 401
unauthorized - The Authorization header is missing, or the key is wrong or deleted.
- 403
read_only_key - A read-only key was used for a request that changes something.
- 404
campaign_not_found - No broadcast with that id in this workspace.
- 409
invalid_state - The broadcast has already finished.
- 429
rate_limited - More than 120 requests in a minute with this key. Wait for the seconds in Retry-After.
Plus the errors any request can get.
curl -X POST "https://chatilo.me/api/v1/campaigns/4001/cancel" \
-H "Authorization: Bearer YOUR_API_KEY"<?php
$apiKey = 'YOUR_API_KEY';
$ch = curl_init('https://chatilo.me/api/v1/campaigns/4001/cancel');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . $apiKey],
]);
$result = json_decode((string) curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
if ($status >= 400) {
throw new RuntimeException($result['error']['code'] . ': ' . $result['error']['message']);
}
print_r($result);const apiKey = 'YOUR_API_KEY';
const response = await fetch("https://chatilo.me/api/v1/campaigns/4001/cancel", {
method: 'POST',
headers: {
Authorization: `Bearer ${apiKey}`,
},
});
const result = await response.json();
if (!response.ok) {
throw new Error(`${result.error.code}: ${result.error.message}`);
}
console.log(result);import requests
api_key = "YOUR_API_KEY"
response = requests.post(
"https://chatilo.me/api/v1/campaigns/4001/cancel",
headers={"Authorization": f"Bearer {api_key}"},
timeout=30,
)
result = response.json()
if not response.ok:
raise RuntimeError(f"{result['error']['code']}: {result['error']['message']}")
print(result){
"ok": true,
"campaign": {
"id": 4001,
"name": "Festive offer",
"status": "completed",
"total": 250,
"sent": 120,
"delivered": 112,
"read": 64,
"failed": 2,
"replied": 9,
"note": "Cancelled before every message was sent.",
"started_at": "2026-01-31T09:30:00Z",
"completed_at": "2026-01-31T09:40:00Z",
"url": "https://chatilo.me/campaigns/4001",
"template_id": 12,
"number_id": 1,
"scheduled_at": null,
"created_at": "2026-01-31T09:30:00Z",
"pending": 0,
"template": {
"id": 12,
"name": "order_update",
"language": "en"
},
"audience": {
"type": "tags",
"tags": [
{
"id": 11,
"name": "VIP"
}
]
},
"variables": {
"header": "",
"body": [
"{{first_name}}",
"FESTIVE20"
]
}
}
}