POST/v1/campaigns/{id}/cancel
Campaigns
Cancel Campaign
Leads that have not been called yet are never called. This cannot be undone.
Request
Endpoint
POST
/v1/campaigns/{id}/cancelAuthentication
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",
"action": "cancel",
"message": "Campaign #48213907 has been cancelled."
}
}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 finished or been cancelled. |
| 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.