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

# Advertiser APIs

> Base URL, authentication, limits, and conventions for the advertiser Dashboard API.

The advertiser Dashboard API lets you read reports and manage campaigns, ad groups, targeting, and pixels with your API key. For short recipes, see the [Dashboard API guide](https://docs.trygravity.com/advertisers/dashboard-api.md). To send conversions from your server, use the [Conversions API](https://docs.trygravity.com/advertisers/server-conversions.md).

## Base URL

```
https://platform.trygravity.com
```

## Authentication

Send your advertiser API key in the `X-API-Key` header on every request. You'll find the key in the [Gravity dashboard](https://app.trygravity.com) under **Settings → Organization**.

```bash theme={null}
curl https://platform.trygravity.com/advertiser-dashboard/info \
  -H "X-API-Key: YOUR_API_KEY"
```

> [!WARNING]
>
> The API key has full access to your advertiser account. Keep it on your server.

The key has no scopes. Anyone with it can read your data, create and change campaigns, and activate spend. Don't put it in browser code, a mobile app, or a public repository.

Your account has one API key. The Dashboard API, the Conversions API, MMP postbacks, and the [dashboard MCP server](https://docs.trygravity.com/advertisers/dashboard-mcp.md) all use it. A user with permission to edit the organization settings can regenerate it in **Settings → Organization**. When the key is regenerated, the old key stops working at once, so update every integration and agent that uses it.

If the `X-API-Key` header is missing, the response is `422`. If the key isn't valid, the response is `401` with `Invalid API key`. See [Errors](https://docs.trygravity.com/api-reference/advertiser/errors.md).

## Rate limits

The Platform API allows about 100 requests per second from one client IP address. Over the limit, the response is `429` with a `Retry-After` header. Wait that many seconds, then try again.

## Conventions

* Request and response bodies are JSON, except the audience upload, which is `multipart/form-data`.
* Dates in query parameters use `YYYY-MM-DD`. Report endpoints take `tz`, an IANA time zone that sets where each day starts and ends.
* Spend and budgets are in dollars. Conversion values in `/conversions` use `value_cents`.
* `PATCH` endpoints change only the fields that you send.

## Pagination

List endpoints that can return many rows page in one of two ways:

* **Cursor:** [`/conversions`](https://docs.trygravity.com/api-reference/advertiser/reports#get-/advertiser-dashboard/conversions) and [`/geo-targets`](https://docs.trygravity.com/api-reference/advertiser/targeting#get-/advertiser-dashboard/geo-targets) return `has_more` and `next_cursor`. Send `next_cursor` as `cursor` to get the next page.
* **Offset:** [`/ad-group-metrics`](https://docs.trygravity.com/api-reference/advertiser/reports#get-/advertiser-dashboard/ad-group-metrics) returns at most 2,000 ad groups per call, with `total_ad_groups` and `truncated`. While `truncated` is `true`, send the request again with `offset` increased by 2000.

## Questions

Send an email to [support@trygravity.com](mailto:support@trygravity.com) for all API questions.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.