Campaigns
Launch Campaign
Starts a draft, as the console's Send or Start button does, re-running its checks at the moment they matter: your plan must include campaigns, a calling campaign's agent must still have a number that answers phone calls (and, for promotional calls, is licensed for them), and your balance must cover the send. If the balance covers only part of it, the campaign starts and message says how far it goes; the rest stays queued until you top up. Messages go out in the background; calls are paced by your free call lines. A campaign already sending answers 200 and is left alone, and a scheduled draft launched here starts now instead of waiting. Needs a full key.
POST/campaigns/{id}/launch
Path parameters
- idstringrequired
- The campaign's id (
cmp_…), as Create Campaign and List Campaigns return it.
Headers
- Katexs-Workspacestring
- Developers only: the customer workspace this request acts in — its
org_…id fromPOST /customers. Leave it out to act in your own workspace. Refused with404(Workspace not found.) when the id is unknown, is not one of your customers, or is not anorg_…id;410when that customer was deleted (restore it withPOST /customers/{id}/restoreuntil it is erased);403when the key belongs to one customer workspace (it cannot act as another);400when your workspace is not a developer workspace./customers/*andGET /customers/usageare your own workspace's and refuse the header with400: call them without it.
Example request
bash
curl -X POST "https://app.katexs.com/api/v1/campaigns/{id}/launch" \
-H "Authorization: Bearer $KATEXS_API_KEY"Responses
| Status | Description |
|---|---|
200 | Started (or already sending). The campaign as it now is, plus message. |
400 | Katexs-Workspace was sent from a workspace that is not a developer workspace. |
401 | The key is missing, wrong or revoked. The answer is always the same, whichever it is. |
402 | Your plan does not include campaigns, or your balance cannot pay for even the first message or call. The message names the shortfall. |
403 | The key's access level (read-only or build) does not allow this request, the plan does not include it, or a customer's key named another workspace in Katexs-Workspace. code says which: key_scope_read, key_scope_build, workspace_header_forbidden, or forbidden. |
404 | No campaign with that id in this workspace. |
409 | The campaign is not a draft: it has been sent, has failed, is paused (use Resume Campaign) or was cancelled. |
410 | The customer named in Katexs-Workspace was deleted. POST /customers/{id}/restore brings it back until its erase date. |
422 | A calling campaign's agent can no longer call: its number was released or no longer answers phone calls, or a number in its pool is not licensed for promotional calls. |
429 | Over a per-minute limit. Wait for Retry-After seconds. code and limit say which limit: rate_limit_resources (240 requests a minute for the workspace), rate_limit_family (2,400 across a developer's customers), rate_limit_calls, rate_limit_messages, rate_limit_codes, rate_limit_code_recipient, concurrent_calls or number_daily_limit. |
Response fields
- idstringrequired
- The campaign's id.
- agentstringrequired
- A calling campaign: the agent that makes the calls. A broadcast: the agent that answers replies to it.
- namestringrequired
- The campaign's name, as the console lists it.
- kindstringrequired
whatsappfor a broadcast,voicefor a calling campaign. One of:whatsapp,voice.- statusstringrequired
draftuntil launched (a scheduled campaign stays a draft untilscheduledAt),sendingwhile it runs,pausedwhen stopped for now, thensent,failed(it could not run; seelastError) orcancelled. One of:draft,sending,paused,sent,failed,cancelled.- templatestring | nullrequired
- A broadcast's template name.
nullon a calling campaign. - purposestring | nullrequired
- A calling campaign's opening line: the sentence the agent opens each call with, copied from the agent when the campaign was created (editing the agent later does not change it).
nullon a broadcast. - countsobjectrequired
- How far the campaign has got, person by person.
- scheduledAtstring (date-time) | nullrequired
- When a scheduled campaign starts itself.
nullwhen it is started by hand. - startedAtstring (date-time) | nullrequired
- When it started sending.
nullwhile a draft. - finishedAtstring (date-time) | nullrequired
- When it finished or was cancelled.
nullwhile it can still send. - createdAtstring (date-time)required
- When it was created.
- lastErrorstring | nullrequired
- Why the campaign last stopped or failed, when it did. Cleared when it is launched or resumed.
- messagestringrequired
- 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.
200 response
{
"id": "cmp_1f2e3d4c-5b6a-4798-8a7b-6c5d4e3f2a1b",
"agent": "ag_8d7c6b5a-4e3f-4a2b-9c1d-0e9f8a7b6c5d",
"name": "Six-month check-up reminders",
"kind": "voice",
"status": "sending",
"template": null,
"purpose": "Hello, this is Asha calling from Sunrise Dental Clinic.",
"counts": {
"recipients": 180,
"sent": 0,
"delivered": 0,
"read": 0,
"replied": 0,
"failed": 0,
"skipped": 0
},
"scheduledAt": null,
"startedAt": "2026-10-06T10:12:40.903Z",
"finishedAt": null,
"createdAt": "2026-10-06T10:00:01.874Z",
"lastError": null,
"message": "Calling started. The agent rings people a few at a time, as lines free up."
}Last updated November 2026 · Found a problem? Email support@katexs.com
