POST
/
api
/
identify
Identify a user or group
curl --request POST \
  --url http://localhost:3000/api/identify \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "user": {
    "id": "user-1",
    "metadata": {
      "name": "John"
    }
  }
}'
{
  "user": "<string>",
  "group": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

User, group, or both to identify. Records are created for users or groups with appropriate metadata, or metadata is updated for existing users or groups. When a user is provided alongside a group, a link between the user and group is created.

user
Example:

"my-user-id"

group
Example:
{
"id": "my-group-id",
"metadata": { "plan": "pro" }
}

Response

200 - application/json

Successful greeting response

user
string | null
required

ID of user, if user was provided

group
string | null
required

ID of group, if group was provided