Use this endpoint to update an ad set.
Request
End Point https://business.newsbreak.com/business-api/v1/ad-set/update/{adSetId}
Method PUT
Header
| Field | Required | Data Type | Description |
|---|---|---|---|
| Access-Token | Y | string | Authorized access token. |
Path Variable
| Field | Required | Data Type | Description |
|---|---|---|---|
| adSetId | Y | string | ID of the ad set to update. |
Request Parameters
| Field | Required | Data Type | Description |
|---|---|---|---|
| name | N | string | Descriptive name of the ad set. |
| googlePlayId | N | string | Package name of an Android App looks like this: com.particlenews.newsbreak. Required only for ad sets of an APP_TRAFFIC campaign. |
| iosAppId | N | string | Apple App Store URL uses the following format: http://apps.apple.com/<country>/app/<app–name>/id<store-ID>. Required only for ad sets of an APP_TRAFFIC campaign. |
| budgetType | N | enumerate | Budget type of the ad set. Available values: DAILY, TOTAL. |
| budget | N | integer | Budget of the ad set in cents. |
| startTime | N | integer | Start timestamp of the ad set. |
| endTime | N | integer | End timestamp of the ad set. |
| bidType | N | enumerate | Bid type of the ad set. Available values: CPM, CPC, DAY_ONE_MAX_CONVERSION_VALUE, MAX_CONVERSION, MAX_CONVERSION_VALUE, TARGET_CPA,TARGET_ROAS, DAY_ONE_TARGET_ROAS. |
| schedule | N | map | Schedule of the ad set. It's a map of week day and hour. Use 0 for Sunday, 1 for Monday, and so on. The hour various from 0 to 23, corresponding to the 24 hours in the day. |
| bidRate | N | integer | Bid rate of the ad set in cents. Required only if the bidType is CPM, CPC, TARGET_CPA. |
roas |
N |
double |
Roas of the ad set. Required only if the bidType is |
| deliveryRate | N | enumerate | Only if the bidType is CPM, CPC. Available values: EVENLY, ASAP. |
| targeting | N | map |
Audience targeting criteria. A map of targeting dimensions where each key is a targeting field name (e.g., "gender", "ageGroup", "location") and each value is an object with positive (include) and/or negative (exclude) arrays of string values. If not specified, defaults to "all" (unlimited) for each dimension. See targeting for details. |
Example
curl --location --request PUT 'https://business.newsbreak.com/business-api/v1/ad-set/update/123456789' \
-H 'Content-Type: application/json' \
-H 'Access-Token:{{Access-Token}}' \
-d '
{
"name": "my ad set example",
"budgetType": "DAILY",
"budget": 10000,
"startTime": 1712029800,
"endTime": 1735793459,
"bidType": "TARGET_CPA",
"bidRate": 1000,
"trackingId": "987654321",
"deliveryRate": "ASAP",
"frequencyCaps": [{"impressions":1,"days":1,"timeUnit":"DAY"}],
"schedule": {
"1": [
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16
],
"3": [
6,
7,
8
]
},
"targeting": {
"location": {
"positive": [
"all"
]
},
"gender": {
"positive": [
"female"
]
},
"ageGroup": {
"positive": [
"31-44"
]
},
"language": {
"positive": [
"en_us"
]
},
"interest": {
"positive": [
"all"
]
},
"os": {
"positive": [],
"negative": [
"android@5",
"android@6"
]
},
"manufacturer": {
"positive": [
"all"
]
},
"carrier": {
"positive": [
"all"
]
},
"network": {
"positive": [
"cellular",
"wifi"
]
}
}
}'
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 | Ad set ID. |
| └── name | string | Ad set name. |
| └── orgId | string | Organization ID. |
| └── adAccountId | string | Ad account ID. |
| └── campaignId | string | Campaign ID. |
| └── trackingId | string | Event tracking ID. |
| └── budget | int | Ad set budget in cents. |
| └── budgetType | enumerate | Ad set budget type. |
| └── status | string | Ad set status. |
| └── onlineStatus | string | Ad set Online status. |
| └── startTime | string | Ad set start time. |
| └── endTime | string | Ad set end time. |
| └── schedule | map | Ad set schedule. |
| └── bidType | enumerate | Ad set bid type. |
| └── bidRate | int | Ad set bid rate in cents. |
| └── roas | double | Ad set roas. |
| └── deliveryRate | enumerate | Delivery Rate of the ad set. |
| └── optimization | bool | Whether the creative should be optimized. |
| └── frequencyCaps | list | Delivery frequency cap of the ad set. |
| └── targeting | map | The targeting of the ad set. |
| └── createTime | string | Create time of the ad set. |
| └── updateTime | string | Update time of the ad set. |
Example
{
"code": 0,
"data": {
"id": "123456789",
"orgId": "987654321",
"adAccountId": "123456789",
"campaignId": "987654321",
"name": "my ad set example",
"trackingId": "123456789",
"budget": 10000,
"onlineStatus": "ACTIVE",
"status": "ON",
"budgetType": "DAILY",
"startTime": 1712029800,
"endTime": 1735793459,
"schedule": {
"1": [
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16
],
"3": [
6,
7,
8
]
},
"bidType": "TARGET_CPA",
"bidRate": 1000,
"deliveryRate": "ASAP",
"optimization": true,
"frequencyCaps": [
{
"impressions": 1,
"days": 1,
"timeUnit": "DAY"
}
],
"targeting": {
"gender": {
"positive": [
"female"
]
},
"ageGroup": {
"positive": [
"31-44"
]
},
"interest": {
"positive": [
"all"
]
},
"location": {
"positive": [
"all"
]
},
"language": {
"positive": [
"en_us"
]
},
"os": {
"positive": [],
"negative": [
"android@5",
"android@6"
]
},
"manufacturer": {
"positive": [
"all"
]
},
"carrier": {
"positive": [
"all"
]
},
"network": {
"positive": [
"cellular",
"wifi"
]
}
},
"createTime": "1700000000",
"updateTime": "1710000000"
}
}