---
title: "Identify user"
method: PUT
path: "/v1/users/{user_id}"
tags: ["Users"]
---

# Identify user

`PUT /v1/users/{user_id}`

Create or update a user with the provided identification data. When you identify an existing user, the system merges the properties you specific with what is currently set on the user, updating only the fields included in your requests.

## Path parameters

- `user_id` string, required

## Request body

- IdentifyUserRequest — A set of parameters to identify a user with. Does not include the user ID, as that's specified elsewhere in the request. You can supply any additional properties you'd like to upsert for the user.
  - `avatar` string, nullable — A URL for the avatar of the user.
  - `channel_data` InlineChannelDataRequest — A request to set channel data for a type of channel inline.
  - `created_at` string, date-time, nullable — The creation date of the user from your system.
  - `email` string, nullable — The primary email address for the user.
  - `locale` string, nullable — The locale of the user. Used for [message localization](/concepts/translations).
  - `name` string, nullable — Display name of the user.
  - `phone_number` string, nullable — The [E.164](https://www.twilio.com/docs/glossary/what-e164) phone number of the user (required for SMS channels).
  - `preferences` InlinePreferenceSetRequest — Inline set preferences for a recipient, where the key is the preference set id. Preferences that are set inline will be merged into any existing preferences rather than replacing them.
  - `timezone` string, nullable — The timezone of the user. Must be a valid [tz database time zone string](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). Used for [recurring schedules](/concepts/schedules#scheduling-workflows-with-recurring-schedules-for-recipients).

## Response `200`

OK

- User — A [User](/concepts/users) represents an individual in your system who can receive notifications through Knock. Users are the most common recipients of notifications and are always referenced by your internal identifier.
  - `__typename` string, required — The typename of the schema.
  - `avatar` string, nullable — A URL for the avatar of the user.
  - `created_at` string, date-time, nullable — The creation date of the user from your system.
  - `email` string, nullable — The primary email address for the user.
  - `id` string, required — The unique identifier of the user.
  - `name` string, nullable — Display name of the user.
  - `phone_number` string, nullable — The [E.164](https://www.twilio.com/docs/glossary/what-e164) phone number of the user (required for SMS channels).
  - `timezone` string, nullable — The timezone of the user. Must be a valid [tz database time zone string](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). Used for [recurring schedules](/concepts/schedules#scheduling-workflows-with-recurring-schedules-for-recipients).
  - `updated_at` string, date-time, required — The timestamp when the resource was last updated.

---

[API](https://skmtc.net/knocklabs/apis/knock-api.md) · [All operations](https://skmtc.net/knocklabs/apis/knock-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/knocklabs/knock-api/versions/4b8499dddbc5/schema)
