Use this endpoint to delete a campaign.
Request
End Point https://business.newsbreak.com/business-api/v1/campaign/delete/{campaignId}
Method DELETE
Header
| Field | Required | Data Type | Description |
|---|---|---|---|
| Access-Token | Y | string | Authorized access token. |
Path Variable
| Field | Required | Data Type | Description |
|---|---|---|---|
| campaignId | Y | string | ID of the campaign to delete. |
Example
curl --location --request DELETE 'https://business.newsbreak.com/business-api/v1/campaign/delete/111111' \
-H 'Content-Type: application/json' \
-H 'Access-Token:{{Access-Token}}'
Response
Response Parameters
| Field | Data Type | Description |
|---|---|---|
| code | int | Status code, see Return Codes. |
| errMsg | string | Error message when code!=0. |
| data | object | Response object. |
| └── id | string | Campaign ID. |
| └── name | string | Campaign name. |
| └── orgId | string | Organization ID. |
| └── adAccountId | string | Ad account ID. |
| └── objective | string | Objective of campaign. |
| └── budget | int | Campaign budget in cents. |
| └── onlineStatus | string | Online status of the campaign. |
| └── status | string | Campaign status. |
| └── createTime | string | Create time of the campaign. |
| └── updateTime | string | Update time of the campaign. |
Example
{
"code": 0,
"data": {
"id": "111111",
"orgId": "111111",
"adAccountId": "123456",
"name": "my campaign",
"objective": "WEB_CONVERSION",
"budget": 1000,
"onlineStatus":"DELETED",
"status": "OFF",
"createTime": "1700000000",
"updateTime": "1710000000"
}
}