curl --request POST \
--url https://app.thinnest.ai/api/v1/campaigns \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"kind": "whatsapp",
"name": "Diwali sale — VIP customers",
"template": "diwali_offer_v2",
"language": "en",
"variables": [
{
"position": 1,
"source": "contact_name"
},
{
"position": 2,
"source": "fixed",
"value": "FESTIVE20"
}
],
"tags": [
"vip"
],
"launch": true
}
'{
"id": "cmp_9a3b7c21-4d5e-4f60-8a1b-2c3d4e5f6a7b",
"agent": "ag_5c4a5f93-2b1e-4c0a-9d3f-7e8a1b2c3d4e",
"name": "Diwali sale — VIP customers",
"kind": "whatsapp",
"status": "sending",
"template": "diwali_offer_v2",
"purpose": null,
"counts": {
"recipients": 412,
"sent": 0,
"delivered": 0,
"read": 0,
"replied": 0,
"failed": 0,
"skipped": 0
},
"scheduledAt": null,
"startedAt": "2026-10-06T10:00:02.311Z",
"finishedAt": null,
"createdAt": "2026-10-06T10:00:01.874Z",
"lastError": null,
"message": "Sending started. Messages go out in the background."
}Create Campaign
Creates a WhatsApp broadcast (kind: "whatsapp") or a calling campaign (kind: "voice") as a draft, with the same checks as the console’s builder: WhatsApp connected and the template approved with every blank filled, or for calls an agent with a number that answers phone calls and is licensed for this kind of call. The audience is built from your contacts right away, by consent; people who asked not to be contacted are always left out. Send launch: true to start it at once, or scheduledAt to start it later; a launch that is refused (no paid plan, not enough balance) still leaves the draft and says why in message, and an audience of nobody is never launched. Needs a full key.
curl --request POST \
--url https://app.thinnest.ai/api/v1/campaigns \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"kind": "whatsapp",
"name": "Diwali sale — VIP customers",
"template": "diwali_offer_v2",
"language": "en",
"variables": [
{
"position": 1,
"source": "contact_name"
},
{
"position": 2,
"source": "fixed",
"value": "FESTIVE20"
}
],
"tags": [
"vip"
],
"launch": true
}
'{
"id": "cmp_9a3b7c21-4d5e-4f60-8a1b-2c3d4e5f6a7b",
"agent": "ag_5c4a5f93-2b1e-4c0a-9d3f-7e8a1b2c3d4e",
"name": "Diwali sale — VIP customers",
"kind": "whatsapp",
"status": "sending",
"template": "diwali_offer_v2",
"purpose": null,
"counts": {
"recipients": 412,
"sent": 0,
"delivered": 0,
"read": 0,
"replied": 0,
"failed": 0,
"skipped": 0
},
"scheduledAt": null,
"startedAt": "2026-10-06T10:00:02.311Z",
"finishedAt": null,
"createdAt": "2026-10-06T10:00:01.874Z",
"lastError": null,
"message": "Sending started. Messages go out in the background."
}Authorizations
Headers
Developers only: the customer workspace this request acts in — its org_… id from POST /customers. Leave it out to act in your own workspace. Refused with 404 (Workspace not found.) when the id is unknown, is not one of your customers, or is not an org_… id; 410 when that customer was deleted (restore it with POST /customers/{id}/restore until it is erased); 403 when the key belongs to one customer workspace (it cannot act as another); 400 when your workspace is not a developer workspace. /customers/* and GET /customers/usage are your own workspace's and refuse the header with 400: call them without it.
"org_3fKq9TzQ1mN8vB2xR7cLpA"
Body
- WhatsApp broadcast
- Calling campaign
A WhatsApp broadcast or a calling campaign, told apart by kind.
Which contacts the campaign draws from. whatsapp_consented: people who messaged you on WhatsApp and agreed to hear from you — the safest list, and a broadcast's default. consented: everyone who agreed to marketing, on any channel — a calling campaign's default. imported: contacts that came from your own imports; they may never have contacted you. everyone: every contact with a number. People who asked not to be contacted are left out whichever you choose.
whatsapp_consented, consented, imported, everyone Response
Created. The campaign as Get Campaign shows it, plus message: how many people it will reach, that it started, or why a requested launch did not happen (the campaign is then a draft you can launch later).
The campaign, plus a sentence about what just happened.
What happened, in a sentence you can show a person: how many people it will reach, that sending or calling started (and, when the balance covers only part of it, how far it goes), or — on create with launch: true — why the launch was refused and the campaign kept as a draft.
"Created. 412 people will receive it."