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

# Identify API

> Reference for the legacy POST /v0/identify endpoint and the GET /v0/tracking/config endpoint that the SDKs call.

> [!NOTE]
>
> New integrations do not need these endpoints. Send `identify` events in a batch to [`POST /v0/events`](https://docs.manalens.dev/api/events#browser-events), or as [server events](https://docs.manalens.dev/api/events.md#server-events) with the secret key. The Web SDK and the Godot SDK already do this.

## Identify

```http theme={null}
POST /v0/identify
X-Publishable-Key: YOUR_PUBLISHABLE_KEY
Content-Type: application/json
```

Sends one `identify` event. A website sends `page_url`. A game or app build sends `app` in its place. Send one of the two, never both.

### Body

| Field | Rule |
| - | - |
| `user_id` | Required, 1 to 255 characters |
| `traits` | Required object. Keys up to 100 characters. Values are strings (at most 1024 characters), numbers, booleans or `null`. |
| `anonymous_id` | Required UUID: the visitor to link |
| `page_url` | Website only. A URL on the project domain. |
| `app` | Game or app only. The same object as [`context.app`](https://docs.manalens.dev/data/events/common#app-context). |
| `context` | Website only. Optional campaign and referrer fields. |
| `session_id` | Optional. Letters, digits and `_ . : -`, at most 64 characters. |

The body is at most 4 KB. Unknown fields are refused.

```json theme={null}
{
  "user_id": "player_42",
  "traits": { "name": "Ana" },
  "anonymous_id": "3f0c5c1e-8a8e-4c1b-9d7e-2b1f4e6a9c10",
  "app": { "platform": "linux", "engine": "godot" }
}
```

### Responses

| Status | Body |
| - | - |
| `202` | `{ "user_id": "player_42", "accepted": true }` |
| `400` | No body. The body failed validation. |
| `401` | No body. The publishable key is missing or unknown, or the header has a secret key or an API key. |
| `403` | No body: the page URL or origin does not match the project. `WORKSPACE_SUSPENDED` in JSON when the workspace is suspended. |
| `429` | `RATE_LIMITED`. Retry after the `Retry-After` header. |

## Tracking config

```http theme={null}
GET /v0/tracking/config
X-Publishable-Key: YOUR_PUBLISHABLE_KEY
```

The SDKs can read the project's tracking settings. The response is not cached.

```json theme={null}
{ "persistent_identity": true }
```

`persistent_identity` is always `true`: the SDK keeps a persistent first-party `anonymous_id`. Consent mode is an SDK option, not a project setting. See [consent](https://docs.manalens.dev/guides/consent.md).

The same publishable key and origin checks apply as for events. See [authentication](https://docs.manalens.dev/api/authentication.md#extra-checks-on-the-publishable-key).


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