{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Campaigns
Stop Campaign
Stop campaign execution permanently.
POST
/
api
/
v1
/
campaigns
/
{campaign_id}
/
stop
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Stop (cancel) a campaign permanently. Use this to terminate a running, paused, or scheduled campaign.
Stopping a campaign marks all remaining pending contacts as cancelled. Use pause if you plan to resume later.
Path Parameters
campaign_id(integer, required): The unique identifier of the campaign
Behavior
When you stop a campaign:- Campaign status changes to
cancelled - In-progress calls may complete (provider-dependent)
- Pending contacts are marked as cancelled
- Completion timestamp is recorded
- Campaign cannot be resumed (use re-execute for new run)
Valid Starting Statuses
You can stop campaigns that are:running- Currently executingpaused- Temporarily pausedscheduled- Waiting to start
Response
Response
{
"message": "Campaign stopped successfully"
}
Example Code
cURL
curl -X POST "https://api.burki.dev/api/v1/campaigns/42/stop" \
-H "Authorization: Bearer YOUR_API_KEY"
Python
import requests
response = requests.post(
"https://api.burki.dev/api/v1/campaigns/42/stop",
headers={"Authorization": "Bearer YOUR_API_KEY"}
)
if response.status_code == 200:
print("Campaign stopped successfully")
else:
print(f"Error: {response.json()}")
JavaScript
const response = await fetch("https://api.burki.dev/api/v1/campaigns/42/stop", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_KEY"
}
});
if (response.ok) {
console.log("Campaign stopped successfully");
} else {
const error = await response.json();
console.error("Error:", error);
}
Error Responses
| Status Code | Description |
|---|---|
| 400 | Campaign cannot be stopped (invalid status) |
| 404 | Campaign not found |
Pause vs Stop
| Action | Resume Possible | Status | Use Case |
|---|---|---|---|
| Pause | Yes | paused | Temporary break, plan to continue |
| Stop | No | cancelled | Permanent termination |
Re-running a Stopped Campaign
To run a stopped campaign again, use the Re-execute Campaign endpoint to reset contacts and start fresh.⌘I