> ## 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 Usage Logs

> Retrieve API usage logs for your account.

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

  ```javascript Node.js theme={null}
  const response = await fetch("https://api.adrelay.dev/v1/usage-logs", {
    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/usage-logs",
      headers={"X-API-Key": "your-api-key-here"},
  )

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

<ResponseExample>
  ```json 200 theme={null}
  {
    "usage_logs": [
      {
        "id": "log_abc123",
        "method": "GET",
        "path": "/v1/campaigns",
        "status_code": 200,
        "timestamp": "2026-03-21T09:45:00Z",
        "response_time_ms": 120
      },
      {
        "id": "log_def456",
        "method": "POST",
        "path": "/v1/campaigns",
        "status_code": 201,
        "timestamp": "2026-03-21T09:30:00Z",
        "response_time_ms": 850
      }
    ],
    "pagination": {
      "next_cursor": "eyJpZCI6ImxvZ19kZWY0NTYifQ==",
      "has_more": true
    }
  }
  ```

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

Usage logs provide visibility into your API request history including response status codes and latency. Logs are retained for 30 days.
