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

# Publisher APIs

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

The publisher Dashboard API gives you your dashboard numbers with code, creates placements, and reports on your users and agreements. For short recipes, see the [Dashboard API guide](https://docs.trygravity.com/ai-platforms/dashboard-api.md). The reporting endpoints are read-only. `POST /publisher-dashboard/placements` creates a placement.

## Base URL

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

## Authentication

Send your Gravity API key in the `X-API-Key` header on every request. To find the key, open **Settings** in the [dashboard](https://app.trygravity.com) and copy it from the **API Key** card. It's the same key you use to request ads, so you don't need other credentials.

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

> [!WARNING]
>
> Keep the API key on your server. Anyone with the key can read your data and create placements.

Your account has one API key, shared by ad requests, this API, and the [dashboard MCP server](https://docs.trygravity.com/ai-platforms/dashboard-mcp.md). When anyone regenerates it, the old key stops working at once, and every integration and agent that uses it loses access.

If the `X-API-Key` header is missing or the key isn't valid, the response is `401`. See [Errors](https://docs.trygravity.com/api-reference/publisher/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.
* Most reports take `days`, or `start_date` and `end_date` (`YYYY-MM-DD`). A date range replaces `days`. Each endpoint has its own range limit.
* `tz` is an IANA time zone for the daily buckets, for example `America/New_York`. The default is `UTC`.
* Amounts that end in `_microdollars` are in millionths of a dollar. Other revenue fields are in dollars.

## Questions

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


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