Campaigns
A campaign is the top-level Ads API resource. It contains a lifetime budget, country targeting, an optional schedule, and one or more ad groups.
The campaign object
Section titled “The campaign object”{ "id": "cmpn_67f480125c61f3e66f163c22", "name": "Spring launch", "description": "Promote the new productivity bundle.", "status": "active", "bidding_type": "clicks", "budget": { "lifetime_spend_limit_micros": 25000000 }, "targeting": { "locations": { "include": ["US", "CA"] } }, "start_time": null, "end_time": null, "created_at": 1744070418, "updated_at": 1744070418}id- Campaign ID, prefixed with
cmpn_. name- Internal campaign name.
description- Optional campaign description.
statusactive,paused, orarchived.bidding_type- Campaign objective. Elo supports
clicksonly. budget.lifetime_spend_limit_micros- Lifetime budget in millionths of a US dollar.
targeting.locations.include- Included ISO country codes. An empty list targets all countries.
start_time- Start time as a Unix timestamp in seconds.
end_time- End time as a Unix timestamp in seconds.
created_at- Creation time as a Unix timestamp in seconds.
updated_at- Last update time as a Unix timestamp in seconds.
Create a campaign
Section titled “Create a campaign”POST /campaigns
nameRequired- From 3 to 1,000 characters.
budgetRequired- The complete budget object.
budget.lifetime_spend_limit_microsRequired- At least
1000000. description- Campaign description.
bidding_type- Only
clicksis supported. Defaults toclicks. targeting- Country targeting. Defaults to all countries.
targeting.locations.include- ISO 3166-1 alpha-2 country codes.
statusactiveorpaused. Defaults toactive.start_time- Start time as a Unix timestamp in seconds.
end_time- End time as a Unix timestamp in seconds and after
start_time.
Country codes are normalized to uppercase.
curl -X POST "https://api.elo.ad/v1/adm/campaigns" \ -H "Authorization: Bearer $ELO_ADS_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Spring launch", "description": "Promote the new productivity bundle.", "status": "paused", "bidding_type": "clicks", "budget": { "lifetime_spend_limit_micros": 25000000 }, "targeting": { "locations": { "include": ["US", "CA"] } } }'List campaigns
Section titled “List campaigns”GET /campaigns
The endpoint supports the shared limit, after, before, and order
pagination parameters.
curl "https://api.elo.ad/v1/adm/campaigns?limit=20&order=desc" \ -H "Authorization: Bearer $ELO_ADS_API_KEY"{ "object": "list", "data": [ { "id": "cmpn_67f480125c61f3e66f163c22", "name": "Spring launch", "description": "Promote the new productivity bundle.", "status": "paused", "bidding_type": "clicks", "budget": { "lifetime_spend_limit_micros": 25000000 }, "targeting": { "locations": { "include": ["US", "CA"] } }, "start_time": null, "end_time": null, "created_at": 1744070418, "updated_at": 1744070418 } ], "has_more": false, "first_id": "cmpn_67f480125c61f3e66f163c22", "last_id": "cmpn_67f480125c61f3e66f163c22"}Retrieve a campaign
Section titled “Retrieve a campaign”GET /campaigns/{campaign_id}
curl "https://api.elo.ad/v1/adm/campaigns/cmpn_67f480125c61f3e66f163c22" \ -H "Authorization: Bearer $ELO_ADS_API_KEY"Update a campaign
Section titled “Update a campaign”POST /campaigns/{campaign_id}
You can update name, description, budget, targeting, start_time, and
end_time. Send the complete budget or targeting object when changing it.
Set description, start_time, or end_time to null to clear it.
You cannot update bidding_type after creation.
Use a state action instead of including status in an update.
curl -X POST "https://api.elo.ad/v1/adm/campaigns/cmpn_67f480125c61f3e66f163c22" \ -H "Authorization: Bearer $ELO_ADS_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "description": "Updated launch campaign.", "budget": { "lifetime_spend_limit_micros": 30000000 } }'Change campaign state
Section titled “Change campaign state”Each endpoint returns the updated campaign object.
POST /campaigns/{campaign_id}/activatePOST /campaigns/{campaign_id}/pausePOST /campaigns/{campaign_id}/archive
curl -X POST "https://api.elo.ad/v1/adm/campaigns/cmpn_67f480125c61f3e66f163c22/activate" \ -H "Authorization: Bearer $ELO_ADS_API_KEY"Archiving is permanent. Repeating the archive action succeeds, but other
updates and state changes on an archived campaign return 422.