Skip to main content
DELETE
/
api
/
v1
/
campaigns
/
{campaign_id}
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>"
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://docs.burki.dev/llms.txt

Use this file to discover all available pages before exploring further.

Permanently delete a campaign and all associated data including contacts, executions, and schedules.
Running campaigns cannot be deleted. Stop the campaign first using the stop endpoint.
This action is irreversible. All campaign data, contacts, and execution history will be permanently deleted.

Path Parameters

  • campaign_id (integer, required): The unique identifier of the campaign

Response

Response
{
  "message": "Campaign deleted successfully"
}

What Gets Deleted

When you delete a campaign, the following data is permanently removed:
  • Campaign configuration and settings
  • All imported contacts
  • Execution history and logs
  • Schedule configurations
  • Import history records

Example Code

cURL
curl -X DELETE "https://api.burki.dev/api/v1/campaigns/42" \
  -H "Authorization: Bearer YOUR_API_KEY"
Python
import requests

response = requests.delete(
    "https://api.burki.dev/api/v1/campaigns/42",
    headers={"Authorization": "Bearer YOUR_API_KEY"}
)

if response.status_code == 200:
    print("Campaign deleted successfully")
else:
    print(f"Error: {response.json()}")
JavaScript
const response = await fetch("https://api.burki.dev/api/v1/campaigns/42", {
  method: "DELETE",
  headers: {
    "Authorization": "Bearer YOUR_API_KEY"
  }
});

if (response.ok) {
  console.log("Campaign deleted successfully");
} else {
  const error = await response.json();
  console.error("Error:", error);
}

Error Responses

Status CodeDescription
400Cannot delete running campaign - stop it first
404Campaign not found
401Unauthorized - invalid or missing API key

Best Practices

  • Export data first if you need to keep records of the campaign results
  • Stop running campaigns before attempting to delete
  • Consider pausing instead of deleting if you might need the campaign later

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

campaign_id
integer
required

Response

Successful Response