Skip to content

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.

{
"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
}
FieldTypeDescription
idstringCampaign ID, prefixed with cmpn_.
namestringInternal campaign name.
descriptionstring or nullOptional campaign description.
statusstringactive, paused, or archived.
bidding_typestringCampaign objective. Elo supports clicks only.
budget.lifetime_spend_limit_microsintegerLifetime budget in millionths of a US dollar.
targeting.locations.includestring[]Included ISO country codes. An empty list targets all countries.
start_timeinteger or nullStart time as a Unix timestamp in seconds.
end_timeinteger or nullEnd time as a Unix timestamp in seconds.
created_atintegerCreation time as a Unix timestamp in seconds.
updated_atintegerLast update time as a Unix timestamp in seconds.

POST /campaigns

FieldTypeRequiredDescription
namestringYesFrom 3 to 1,000 characters.
budgetobjectYesThe complete budget object.
budget.lifetime_spend_limit_microsintegerYesAt least 1000000.
descriptionstringNoCampaign description.
bidding_typestringNoOnly clicks is supported. Defaults to clicks.
targetingobjectNoCountry targeting. Defaults to all countries.
targeting.locations.includestring[]NoISO 3166-1 alpha-2 country codes.
statusstringNoactive or paused. Defaults to active.
start_timeintegerNoStart time as a Unix timestamp in seconds.
end_timeintegerNoEnd time as a Unix timestamp in seconds and after start_time.

Country codes are normalized to uppercase.

Terminal window
curl -X POST "https://api.withgrowl.com/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"]
}
}
}'

GET /campaigns

The endpoint supports the shared limit, after, before, and order pagination parameters.

Terminal window
curl "https://api.withgrowl.com/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"
}

GET /campaigns/{campaign_id}

Terminal window
curl "https://api.withgrowl.com/v1/adm/campaigns/cmpn_67f480125c61f3e66f163c22" \
-H "Authorization: Bearer $ELO_ADS_API_KEY"

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.

Terminal window
curl -X POST "https://api.withgrowl.com/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
}
}'

Each endpoint returns the updated campaign object.

  • POST /campaigns/{campaign_id}/activate
  • POST /campaigns/{campaign_id}/pause
  • POST /campaigns/{campaign_id}/archive
Terminal window
curl -X POST "https://api.withgrowl.com/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.