Use this endpoint to update a campaign.
Request
End Point https://business.newsbreak.com/business-api/v1/campaign/update/{campaignId}
Method PUT
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 update. |
Request Parameters
| Field | Required | Data Type | Description |
|---|---|---|---|
| name | Y | string | Descriptive name of campaign. |
Example
curl --location --request PUT 'https://business.newsbreak.com/business-api/v1/campaign/update/111111' \
-H 'Content-Type: application/json' \
-H 'Access-Token:{{Access-Token}}' \
-d '{
"name": "my campaign example"
}'
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 the 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": "987654321",
"orgId": "123456789",
"adAccountId": "123456789",
"name": "my campaign example",
"objective": "WEB_CONVERSION",
"budget": 1000,
"onlineStatus": "ACTIVE",
"status": "ON",
"createTime": "1700000000",
"updateTime": "1710000000"
}
}