Skip to main content

1. Sign Up

Create an account at app.adrelay.dev. After signing up, you will be on the free tier which includes 100 API requests per month.

2. Get Your API Key

After signing in, navigate to Settings > API Keys in the dashboard. Your API key will be displayed. Copy it and store it securely — you will need it for every API request.
export ADRELAY_API_KEY="your-api-key-here"

3. Connect a Google Ads Account

Before you can manage campaigns, you need to connect at least one ad platform account. Start the OAuth flow for Google Ads:
curl -X GET "https://api.adrelay.dev/v1/connections/google_ads/authorize" \
  -H "X-API-Key: $ADRELAY_API_KEY"
This returns a redirect URL. Open it in a browser to complete the Google Ads OAuth flow. Once authorized, AdRelay will store the connection and keep tokens refreshed automatically.

4. Sync Your Accounts

After connecting, trigger a sync to pull in your ad account data:
curl -X POST "https://api.adrelay.dev/v1/connections/sync" \
  -H "X-API-Key: $ADRELAY_API_KEY"

5. Make Your First API Call

List all campaigns across your connected platforms:
curl -X GET "https://api.adrelay.dev/v1/campaigns" \
  -H "X-API-Key: $ADRELAY_API_KEY"

Example Response

{
  "unified": [
    {
      "id": "camp_abc123",
      "platform": "google_ads",
      "remote_id": "123456789",
      "name": "Summer Sale 2026",
      "status": "ACTIVE",
      "goal": "CONVERSIONS",
      "budget_amount": 50.00,
      "budget_period": "DAILY",
      "currency": "USD",
      "created_at": "2026-03-01T12:00:00Z",
      "updated_at": "2026-03-15T08:30:00Z"
    },
    {
      "id": "camp_def456",
      "platform": "meta_ads",
      "remote_id": "987654321",
      "name": "Brand Awareness Q1",
      "status": "PAUSED",
      "goal": "AWARENESS",
      "budget_amount": 100.00,
      "budget_period": "DAILY",
      "currency": "USD",
      "created_at": "2026-01-15T09:00:00Z",
      "updated_at": "2026-03-10T14:20:00Z"
    }
  ],
  "pagination": {
    "next_cursor": "eyJpZCI6ImNhbXBfZGVmNDU2In0=",
    "has_more": true
  }
}

Next Steps

Authentication

Deep dive into API key auth and OAuth flows.

Connecting Ad Accounts

Connect Meta and TikTok accounts alongside Google.

Creating Campaigns

Create campaigns programmatically across platforms.

API Reference

Explore the full API reference.