Delete campaign
DELETE
/api/v1/ext/dbr-campaigns/{id}
Delete a stopped or completed campaign, or a draft that never went live.
Auth: Bearer access_token
Scope: dbr_campaigns.write
A live or running campaign must be stopped first; the campaign service refuses otherwise, and its status, code and message are passed on. The agent is kept.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | string | yes | Campaign id. |
| workspace_id | query | number | yes | A workspace of the installer. |
Responses
| Status | When |
|---|---|
200 | OK |
409 | Still running (stop it first) |
401 | Missing or invalid token |
403 | Missing scope |
404 | workspace_id does not exist or is not the installer's (same response for both) |
404 | The campaign does not exist or is in another workspace |
RequestResponses
curl -X DELETE "https://backend.mysmsgateway.app/api/v1/ext/dbr-campaigns/{id}" \
-H "Authorization: Bearer <ACCESS_TOKEN>"OK
{
"success": true,
"message": "Campaign deleted.",
"data": {
"deleted": true
}
}Try It!
This endpoint needs a bearer token. Open Settings (top right) and paste your access_token.
Path parameters
Campaign id.
Query parameters
A workspace of the installer.
Request URL
DELETEhttps://backend.mysmsgateway.app/api/v1/ext/dbr-campaigns/%7Bid%7D
Previous
« Resume campaign
