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

> Reference for the identify event: link a visitor to your own user ID and set user traits.

An `identify` event links the current visitor (`anonymous_id`) to a user ID from your app, and sets traits on that user. Activity from before the call then joins the user's history. See [Identify users](https://docs.manalens.dev/guides/identify-users.md) for the full guide.

## Send identify

```ts Web SDK theme={null}
analytics.identify('user_123', { email: 'user@example.com', plan: 'pro' });
```

```gdscript Godot theme={null}
UntitledAnalytics.identify("player_42", {"plan": "supporter"})
```

```bash Server theme={null}
curl -sS https://YOUR_COLLECTOR_ENDPOINT/v0/events \
  -H 'Authorization: Bearer YOUR_SECRET_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"events":[{"channel":"server","type":"identify","user_id":"user_123","anonymous_id":"3f0c5c1e-8a8e-4c1b-9d7e-2b1f4e6a9c10","traits":{"plan":"pro"}}]}'
```

## Fields

| Field | Required | Description |
| - | - | - |
| `type` | Yes | `identify` |
| `user_id` | Yes | A stable ID from your app, 1 to 255 characters. Do not use an email address. |
| `anonymous_id` | No | The visitor to link. The SDKs send it for you. |
| `traits` | No | A flat object. Keys have at most 100 characters. Values are strings (at most 1024 characters), numbers, booleans or `null`. |
| `event` | No | Not allowed on `identify` |

`traits` are allowed only on `identify`. See [common fields](https://docs.manalens.dev/data/events/common.md) for the envelope fields.

## How traits update

* A later `identify` updates only the keys that it sends.
* A `null` value clears a key.
* A work `email` trait also sets `company_domain`. A personal email domain sets `company_domain` to `null`.
* You can also edit traits on the user's profile page. The change is saved as a new `identify` event with `channel` `dashboard`.

## How identity links work

Each event that has both an `anonymous_id` and a `user_id` links that visitor to the user. Reports then count the visitor as the user, including earlier anonymous events. If several users signed in on one shared browser, its anonymous events are not given to any of them. See [core concepts](https://docs.manalens.dev/data/concepts.md#people-and-identity-links).

## Legacy endpoint

`POST /v0/identify` accepts one identify call outside a batch. The Web SDK now sends identify through `/v0/events`, so use this endpoint only for older integrations. See [Identify API](https://docs.manalens.dev/api/identify.md).


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