All tools

Identify a user

Records a user's traits, such as email, name and plan, against their user ID and routes them to the source's destinations.

View on GitHub
Updated Sep 27, 2026Available asAPI

Description

Send `userId` or `anonymousId` and a `traits` object. Segment recommends identifying once when the account is created and again only when its traits change. `SEGMENT_API_KEY` holds the base64 of the source's write key followed by a colon. The API answers 200 even for an event it drops (only oversized payloads and invalid JSON return 400), so confirm arrival in the source's Debugger.

identify-user.md

Identify a user

Records a user's traits, such as email, name and plan, against their user ID and routes them to the source's destinations.

Send userId or anonymousId and a traits object. Segment recommends identifying once when the account is created and again only when its traits change. SEGMENT_API_KEY holds the base64 of the source's write key followed by a colon. The API answers 200 even for an event it drops (only oversized payloads and invalid JSON return 400), so confirm arrival in the source's Debugger.

Set up

Use the first option your agent supports.

API (official)

Before doing anything else, make one read-only call to confirm access.

Rules

  • Ask the user before anything that sends messages, costs money, or changes data.
  • Never print API keys.

Built from these files in the repository

The layout and the rules come from lib/catalog/render-markdown.ts, the set-up wording from lib/catalog/render-access.ts.

Ways in

RouteSourceCallRequiredDocs
APIOfficialPOST /v1/identifyAPI key in $SEGMENT_API_KEYDocs

Workflows using Identify a user

No workflows yet
No published workflow uses Identify a user yet.