Skip to content

Quickstart

This guide creates a paused campaign hierarchy, then changes each object to active.

  1. Set your API key

    Store the key in an environment variable. Do not commit it or expose it in client-side code.

    Terminal window
    export ELO_ADS_API_KEY="elo_..."
  2. Confirm the ad account

    Terminal window
    curl "https://api.withgrowl.com/v1/adm/ad_account" \
    -H "Authorization: Bearer $ELO_ADS_API_KEY"
    {
    "id": "67f47f965c61f3e66f163c21",
    "name": "Acme Ads",
    "created_at": 1744070400
    }
  3. Create a campaign

    A campaign defines the lifetime budget, country targeting, schedule, and state. One US dollar equals 1,000,000 micros.

    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"]
    }
    }
    }'

    Save the returned campaign ID, such as cmpn_67f480125c61f3e66f163c22.

  4. Create an ad group

    Elo currently supports click billing. max_bid_micros is the maximum bid for one click.

    Terminal window
    curl -X POST "https://api.withgrowl.com/v1/adm/ad_groups" \
    -H "Authorization: Bearer $ELO_ADS_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
    "campaign_id": "cmpn_67f480125c61f3e66f163c22",
    "name": "Productivity shoppers",
    "status": "paused",
    "context_hints": ["productivity", "team collaboration"],
    "bidding_config": {
    "billing_event_type": "click",
    "max_bid_micros": 250000
    }
    }'

    Save the returned ad-group ID, such as adgrp_67f480455c61f3e66f163c23.

  5. Create an ad

    Provide a complete text creative, a destination URL, and optionally an image URL and price.

    Terminal window
    curl -X POST "https://api.withgrowl.com/v1/adm/ads" \
    -H "Authorization: Bearer $ELO_ADS_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
    "ad_group_id": "adgrp_67f480455c61f3e66f163c23",
    "name": "Planner launch card",
    "status": "paused",
    "creative": {
    "title": "Plan work faster",
    "body": "Bring tasks, docs, and meetings together.",
    "target_url": "https://example.com/workspace-planner",
    "image_url": "https://example.com/assets/planner-card.png",
    "price": "$12/month"
    }
    }'

    Save the returned ad ID, such as ad_67f480795c61f3e66f163c24.

  6. Activate the hierarchy

    Change the ad, ad group, and campaign to active with their dedicated action endpoints:

    Terminal window
    curl -X POST "https://api.withgrowl.com/v1/adm/ads/ad_67f480795c61f3e66f163c24/activate" \
    -H "Authorization: Bearer $ELO_ADS_API_KEY"
    curl -X POST "https://api.withgrowl.com/v1/adm/ad_groups/adgrp_67f480455c61f3e66f163c23/activate" \
    -H "Authorization: Bearer $ELO_ADS_API_KEY"
    curl -X POST "https://api.withgrowl.com/v1/adm/campaigns/cmpn_67f480125c61f3e66f163c22/activate" \
    -H "Authorization: Bearer $ELO_ADS_API_KEY"

For every field and update operation, see Campaigns, Ad groups, and Ads.