Pauses or enables a Google Ads campaign (a change to the connected ad account that starts or stops spend); supports validateOnly.
curl -X POST "https://api.primaryapi.com/v1/run/google-ads.set_campaign_status" \
-H "Authorization: Bearer $PRIMARYAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"customerId":"1234567890","campaignId":"111","status":"PAUSED"}'{
"output": {
"found": true,
"data": {
"name": "Brand - Search",
"changed": true,
"validateOnly": false,
"resourceName": "customers/1234567890/campaigns/111", …
}
},
"credits": 1
}Input and output
6 fields
1234567890.111.PAUSED.customerId THROUGH a manager (MCC) account: that manager account’s id (10 digits). Sent as the login-customer-id header. Omit for accounts the Google account can open directly.8 fields
Good to know
Changes your account. This call creates, edits or deletes something in the connected account, live. Confirm before running it. With an Idempotency-Key it never runs twice, and monitors can’t schedule it.
WRITE: changes the connected Google Ads account.
ENABLED lets the campaign serve and spend money. PAUSED stops it.
Needs the Google Ads capability. A Google account allowed to edit that ad account.
Use validateOnly. True to check first.
Safe to repeat. When the campaign already has that status nothing is sent (changed: false).
The same key and credits work for every API.