> ## Documentation Index
> Fetch the complete documentation index at: https://docs.adrelay.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Get up and running with AdRelay in under 5 minutes.

## 1. Sign Up

Create an account at [app.adrelay.dev](https://app.adrelay.dev/sign-up). 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.

```bash theme={null}
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:

```bash theme={null}
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:

```bash theme={null}
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:

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://api.adrelay.dev/v1/campaigns" \
    -H "X-API-Key: $ADRELAY_API_KEY"
  ```

  ```javascript Node.js theme={null}
  const response = await fetch("https://api.adrelay.dev/v1/campaigns", {
    method: "GET",
    headers: {
      "X-API-Key": process.env.ADRELAY_API_KEY,
    },
  });

  const data = await response.json();
  console.log(data);
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      "https://api.adrelay.dev/v1/campaigns",
      headers={"X-API-Key": "your-api-key-here"},
  )

  data = response.json()
  print(data)
  ```
</CodeGroup>

### Example Response

```json theme={null}
{
  "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

<CardGroup cols={2}>
  <Card title="Authentication" icon="key" href="/authentication">
    Deep dive into API key auth and OAuth flows.
  </Card>

  <Card title="Connecting Ad Accounts" icon="plug" href="/guides/connecting-ad-accounts">
    Connect Meta and TikTok accounts alongside Google.
  </Card>

  <Card title="Creating Campaigns" icon="plus" href="/guides/creating-campaigns">
    Create campaigns programmatically across platforms.
  </Card>

  <Card title="API Reference" icon="code" href="/api-reference/campaigns/list">
    Explore the full API reference.
  </Card>
</CardGroup>
