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

# Identify User

> Link an anonymous device to an identified user. No API key required.

<Info>
  This endpoint is designed for client-side SDKs and does not require an API key. Call this after a user logs in to associate their push-enabled device with their user profile.
</Info>

## Request Body

<ParamField body="account_id" type="string" required>
  Your Notvis account ID.
</ParamField>

<ParamField body="device_id" type="string" required>
  The device ID used during registration. Used to look up and transfer push tokens from the anonymous device contact to the identified user.
</ParamField>

<ParamField body="contact_id" type="string">
  The Notvis contact ID of the identified user. Either `contact_id` or `external_id` is required.
</ParamField>

<ParamField body="external_id" type="string">
  Your application's user ID. Used to look up the Notvis contact. Either `contact_id` or `external_id` is required.
</ParamField>

## Response

<ResponseField name="contact_id" type="string">
  The resolved contact ID of the identified user.
</ResponseField>

<ResponseField name="identified" type="boolean">
  Always `true` on success.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.notvis.com/v1/push/identify \
    -H "Content-Type: application/json" \
    -d '{
      "account_id": "your-account-id",
      "device_id": "device-uuid-123",
      "external_id": "user-12345"
    }'
  ```

  ```javascript JavaScript (SDK) theme={null}
  await fetch('https://api.notvis.com/v1/push/identify', {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({
      account_id: 'your-account-id',
      device_id: deviceId,
      external_id: currentUserId,
    }),
  });
  ```
</RequestExample>

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "contact_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
    "identified": true
  }
  ```

  ```json 404 Not Found theme={null}
  {
    "code": 404,
    "message": "contact not found"
  }
  ```
</ResponseExample>
