> ## 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.

# List Connections

> List all connected ad platform accounts.

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

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

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

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

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

  data = response.json()
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "connections": [
      {
        "id": "conn_abc123",
        "platform": "google_ads",
        "status": "ACTIVE",
        "label": "Main Google Account",
        "remote_account_id": "123-456-7890",
        "created_at": "2026-03-01T12:00:00Z",
        "last_synced_at": "2026-03-21T08:00:00Z"
      },
      {
        "id": "conn_def456",
        "platform": "meta_ads",
        "status": "ACTIVE",
        "label": null,
        "remote_account_id": "act_987654321",
        "created_at": "2026-03-05T10:00:00Z",
        "last_synced_at": "2026-03-21T08:00:00Z"
      }
    ]
  }
  ```

  ```json 401 theme={null}
  {
    "error": "Invalid or missing API key.",
    "code": "UNAUTHORIZED",
    "timestamp": 1711036800,
    "request_id": "req_abc123"
  }
  ```
</ResponseExample>


## OpenAPI

````yaml GET /v1/connections
openapi: 3.1.0
info:
  title: Adrelay API
  version: 0.1.0
  description: >-
    Unified Ad Platform API — proxy and normalize campaigns across Google Ads,
    Meta, TikTok, and more.
servers:
  - url: https://api.adrelay.dev/v1
    description: Production
  - url: http://localhost:3001
    description: Local
security: []
paths:
  /v1/connections:
    get:
      summary: List connections
      description: Returns all connections for the authenticated customer.
      responses:
        '200':
          description: List of connections
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectionListResponse'
      security:
        - apiKey: []
components:
  schemas:
    ConnectionListResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/ConnectionResponse'
      required:
        - data
    ConnectionResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
        platform:
          $ref: '#/components/schemas/Platform'
        platformAccountId:
          type: string
        platformAccountName:
          type:
            - string
            - 'null'
        label:
          type:
            - string
            - 'null'
        status:
          $ref: '#/components/schemas/ConnectionStatus'
        currency:
          type: string
        scopes:
          type: array
          items:
            type: string
        createdAt:
          type: string
        updatedAt:
          type: string
      required:
        - id
        - platform
        - platformAccountId
        - platformAccountName
        - label
        - status
        - currency
        - scopes
        - createdAt
        - updatedAt
    Platform:
      type: string
      enum:
        - GOOGLE
        - META
        - TIKTOK
        - LINKEDIN
        - PINTEREST
        - REDDIT
    ConnectionStatus:
      type: string
      enum:
        - PENDING
        - ACTIVE
        - REVOKED
        - ERROR
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-Key

````