DELETE/v1/campaigns/{id}
Campaigns
Delete Campaign
Permanently removes a campaign and its leads. Only a campaign that has never been started can be deleted; cancel a started one instead.
Request
Endpoint
DELETE
/v1/campaigns/{id}Authentication
x-api-keyorAuthorization: BearerPath Parameters
| Name | Type | Description |
|---|---|---|
idrequired | ObjectId | MongoDB ObjectId for the campaign. Invalid ids return 400. |
Response Example
response.json
{
"success": true,
"data": {
"id": "6710b2c3d4e5f60718293a40",
"deleted": true,
"message": "Campaign #48213907 has been deleted."
}
}Status Codes
| HTTP | Meaning | Description |
|---|---|---|
| 200 | OK | Request succeeded. |
| 400 | Bad request | Malformed input, invalid ObjectId, or no updatable fields. |
| 401 | Unauthorized | Missing, invalid, inactive, or origin-restricted API key. |
| 404 | Not found | Resource was not found inside the authenticated user's scope. |
| 409 | Conflict | The campaign has already been started. |
| 429 | Rate limited | Per-IP or per-key request budget was exceeded. |
Security Model
User-scoped by default
This endpoint only sees resources owned by the user attached to the API key. If another user's id is supplied, the API responds as if the resource does not exist.