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

# Introduction

> Base URL, response envelope, conventions, and what the CreatorAudit v2 API covers.

The CreatorAudit v2 API tracks Instagram and TikTok creators, accounts, and their
content, and serves the engagement analytics computed from them. It is a JSON REST
API with predictable envelopes, cursor pagination, and RFC 9457 error bodies.

## Base URL

All v2 endpoints live under a single base URL:

```
https://api.creatoraudit.com/v2
```

`v2` is the current, stable version. `v1` is legacy and deprecated — build new
integrations on `v2`. See [Versioning](/api-reference/versioning) for the policy.

<Note>
  Every request needs your organization API key as a bearer token, except the
  unauthenticated `GET /health` and `GET /meta`. See
  [Authentication](/api-reference/authentication).
</Note>

## A first request

Verify your key and see which organization it belongs to with `GET /v2/whoami`:

```bash theme={null}
curl https://api.creatoraudit.com/v2/whoami \
  -H "Authorization: Bearer YOUR_API_KEY"
```

```json theme={null}
{
  "data": {
    "type": "whoami",
    "organization_id": "0b3f2c14-9a6d-4f1e-8b2a-1c2d3e4f5a6b",
    "api_key_name": "Production key"
  }
}
```

Continue with the [Quickstart](/quickstart) for an end-to-end walkthrough.

## Response envelope

Successful responses are wrapped in a consistent envelope.

* **Single resource** — `{ "data": { ... } }`
* **Collection** — `{ "data": [ ... ], "pagination": { ... }, "filters": { ... } }`
* **Collection with metadata** — `{ "data": ..., "meta": { ... } }`

`pagination` carries `next_cursor`, `has_next`, `limit`, and — when you pass
`include_total=true` — `total_count`. `filters` echoes the filter and sort that
produced the page. See [Pagination](/api-reference/pagination) and
[Filtering and sorting](/api-reference/filtering-and-sorting).

## Conventions

| Concern      | Convention                                                             |
| ------------ | ---------------------------------------------------------------------- |
| Content type | Requests and responses are JSON; the API only produces JSON.           |
| IDs          | Resource IDs are UUIDs.                                                |
| Timestamps   | ISO 8601 in UTC (e.g. `2026-06-14T09:30:00Z`); dates are `YYYY-MM-DD`. |
| Platforms    | `instagram` or `tiktok`.                                               |
| Request IDs  | Every response echoes an `X-Request-ID` header for correlation.        |
| Errors       | RFC 9457 problem details (`application/problem+json`).                 |

A write request whose body is not `application/json` returns `415`; a request
whose `Accept` header cannot be satisfied as JSON returns `406`. Full details are
in [Errors](/api-reference/errors).

## What the API covers

The endpoints are organized into seven resource groups. Browse them — each with a live request explorer — under **Endpoints** in the sidebar.

<CardGroup cols={2}>
  <Card title="Accounts" icon="user">
    Track and manage Instagram and TikTok accounts. Creating an account begins automated
    tracking.
  </Card>

  <Card title="Videos" icon="video">
    Individually tracked posts, account-discovered videos, and batch engagement deltas.
  </Card>

  <Card title="Creators" icon="users">
    Group accounts under a creator for roll-up analytics, plus the top-creators
    leaderboard.
  </Card>

  <Card title="Analytics" icon="chart-line">
    Daily metrics and time series for the organization, accounts, creators, and videos,
    plus batch windowed metrics.
  </Card>

  <Card title="Overview" icon="gauge">
    Organization-wide headline stats with period-over-period changes.
  </Card>

  <Card title="Search" icon="magnifying-glass">
    Cross-entity search over accounts, creators, and videos.
  </Card>

  <Card title="System" icon="heart-pulse">
    The unauthenticated `GET /health` and `GET /meta` discovery document, plus `GET
            /whoami`.
  </Card>
</CardGroup>

## Playground and OpenAPI spec

Every endpoint page in this reference has an interactive playground: fill in your
API key and parameters, send the request, and read the live response without
leaving the docs.

You can also work from the machine-readable spec:

* Browse it at [`openapi.json`](/api-reference/openapi.json).
* Fetch it programmatically — `GET /v2/meta` advertises the current
  `openapi_url`, `docs_url`, and API version.

Generate clients, mocks, or contract tests from the spec, then point them at the
base URL above.
