Skip to main content
POST
Execute campaign

Authorizations

Authorization
string
header
required

API key or access token

Path Parameters

id
string
required

Unique identifier for the campaign

Minimum string length: 1
Example:

"cmp_987654321"

Body

application/json

Optional request body for executing a campaign. Unknown fields are rejected.

debug
boolean

When true, includes detailed debug information in error responses from media buy execution

Response

Execute campaign

Response from executing or pausing a campaign

campaignId
string
required

Campaign ID

Example:

"cmp_987654321"

previousStatus
enum<string>
required

Previous campaign status

Available options:
DRAFT,
ACTIVE,
PAUSED,
ENDING,
COMPLETED,
CANCELED,
ARCHIVED
newStatus
enum<string>
required

New campaign status

Available options:
DRAFT,
ACTIVE,
PAUSED,
ENDING,
COMPLETED,
CANCELED,
ARCHIVED
success
boolean
required

Whether the status change was fully successful. False when any media buy execution failed.

mediaBuysExecuted
integer

Number of DRAFT media buys for which execution was attempted. Always present on execute responses; absent on pause responses. This existing field can include failed attempts; use mediaBuysSucceeded for successful executions.

Required range: 0 <= x <= 9007199254740991
Example:

2

mediaBuysAttempted
integer

Number of DRAFT media buys for which execution was attempted. Always present on execute responses; absent on pause responses. This equals mediaBuysExecuted and mediaBuysSucceeded plus mediaBuysFailed.

Required range: 0 <= x <= 9007199254740991
mediaBuysSucceeded
integer

Number of attempted media buys that executed successfully. Use this field to identify successful executions.

Required range: 0 <= x <= 9007199254740991
mediaBuysFailed
integer

Number of attempted media buys that failed. Each failure has an entry in errors.

Required range: 0 <= x <= 9007199254740991
reason
enum<string>

Machine-readable reason for a no-op execute. Present only when the campaign had no media buys to execute, in which case the campaign status is preserved rather than set to ACTIVE.

Available options:
no_media_buys_to_execute
errors
object[]

Structured error details per failed media buy. Only present when there are failures.

warnings
object[]

Non-fatal outcomes from execution. creatives_dropped: a buy forwarded with a compatible creative subset (which may be empty). optimization_goals_dropped: a buy forwarded without optimization goals its product does not declare it can optimize to (the goals were still disclosed in the seller brief). pacing_not_applied: a buy launched without the campaign's asap or front_loaded pacing because the seller (Meta) does not accept a pacing instruction; it runs on the seller's standard even pacing. stale_draft: the existing DRAFT cart was retried as-is because discovery products were updated via add_discovery_products after the last staging run — call create_media_buys with replace: true to apply the new selection.

A non-fatal outcome from campaign execution