curl --request POST \
--url https://api.apostra.com/api/v2/buyer/campaigns/{campaignId}/pause \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.apostra.com/api/v2/buyer/campaigns/{campaignId}/pause"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.apostra.com/api/v2/buyer/campaigns/{campaignId}/pause', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"campaignId": "cmp_987654321",
"campaignName": "<string>",
"previousStatus": "DRAFT",
"newStatus": "DRAFT",
"mediaBuyResults": [
{
"mediaBuyId": "<string>",
"name": "<string>",
"previousStatus": "<string>",
"success": true,
"error": "<string>",
"pauseRequestedAt": "2023-11-07T05:31:56Z",
"resumeRequestedAt": "2023-11-07T05:31:56Z"
}
],
"totalMediaBuys": 0,
"successCount": 0,
"failureCount": 0
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}Pause campaign
Pause a running campaign. Cascades to all active media buys and reports the per-media-buy outcome. The campaign becomes PAUSED only when every media buy confirmed the pause; otherwise the call returns 503 with each buy’s outcome in error.details. When the only buys outstanding are ones whose seller accepted the pause and is still applying it, the campaign stays ACTIVE and becomes PAUSED on its own once every seller confirms.
curl --request POST \
--url https://api.apostra.com/api/v2/buyer/campaigns/{campaignId}/pause \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.apostra.com/api/v2/buyer/campaigns/{campaignId}/pause"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.apostra.com/api/v2/buyer/campaigns/{campaignId}/pause', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"campaignId": "cmp_987654321",
"campaignName": "<string>",
"previousStatus": "DRAFT",
"newStatus": "DRAFT",
"mediaBuyResults": [
{
"mediaBuyId": "<string>",
"name": "<string>",
"previousStatus": "<string>",
"success": true,
"error": "<string>",
"pauseRequestedAt": "2023-11-07T05:31:56Z",
"resumeRequestedAt": "2023-11-07T05:31:56Z"
}
],
"totalMediaBuys": 0,
"successCount": 0,
"failureCount": 0
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}Authorizations
API key or access token
Path Parameters
Unique identifier for the campaign
1"cmp_987654321"
Response
Pause campaign
Campaign cascade operation outcome, including the status change result for each media buy
Campaign ID
"cmp_987654321"
Campaign name
Previous campaign status
DRAFT, ACTIVE, PAUSED, ENDING, COMPLETED, CANCELED, ARCHIVED New campaign status
DRAFT, ACTIVE, PAUSED, ENDING, COMPLETED, CANCELED, ARCHIVED Per-media-buy cascade outcomes
Show child attributes
Show child attributes
Total number of media buys the cascade attempted
-9007199254740991 <= x <= 9007199254740991Number of media buys updated successfully
-9007199254740991 <= x <= 9007199254740991Number of media buys that failed to update
-9007199254740991 <= x <= 9007199254740991