---
title: "Identify a visitor of the token's own project (ADR 109 D4)"
method: PUT
path: "/analytics/visitors/{visitor_id}/identify"
tags: ["Analytics"]
---

# Identify a visitor of the token's own project (ADR 109 D4)

`PUT /analytics/visitors/{visitor_id}/identify`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/analytics/visitors/{visitor_id}/identify`
- Auth: HTTP bearer

The form a deployed app uses: the project comes from its injected
deployment token, so the app needs no project id. Behaves exactly like
`PUT /projects/{project_id}/analytics/visitors/{visitor_id}/identify`,
which callers without a project-scoped token use instead.

## Path parameters

- `visitor_id` string, required

## Request body

- IdentifyVisitorRequest: Body of both identify endpoints.
  - `traits` object, nullable: Traits merged into the visitor's `custom_data` at the top level; a key set to `null` is removed. At most 32 keys and 8 KB.
  - `user_id` string, required: The app's own id for the person (database id, UUID, email). At most 256 characters, no control characters.

## Response `200`

What identify did. `applied: false` with an `outcome` says why nothing was stored (unknown visitor, cookieless project).

- IdentifyVisitorResponse: The answer of both identify endpoints.
  - `applied` boolean, required: Whether the visitor carries the requested identity now (`updated` or `unchanged`).
  - `message` string, required
  - `outcome` 'updated' | 'unchanged' | 'visitor_not_found' | 'cookieless_project' | 'browser_identify_refused' | 'server_identity_kept', required: What an identify call did.

## Other responses

- `400`: Not a project-scoped token, an empty or over-long user id, or traits that are not a JSON object within 32 keys and 8 KB
- `401`: Unauthorized
- `403`: Missing `visitors:enrich`, or a raw visitor id
- `429`: The deployment token made too many visitor-changing writes in the last minute
- `500`: Internal server error

## Changes

- **2026-11-21** `fada8eed0111`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/analytics/visitors/:visitor_id/identify/put.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) - [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) - [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/3b040526eb43?raw)
