Skip to main content
PUT/users/:id/

Update user

You can update a specific user. You can also set up any custom attribute of your choice. Custom attributes have to be created in the User app before sending them within requests.

Attributes

Optional unless marked required

custom_idstring
The unique identifier for the user which is provided by the client.
idinteger
A unique identifier for the user which is given by User automatically.
company_custom_idstring
A unique identifier for the company which is provided by the client.
custom_attrstring
An example value of your custom attribute.
emailstring
A user email address.
first_namestring
A first name for a user (the maximum number of characters is 40).
last_namestring
A last name for a user (the maximum number of characters is 40).
tagslist(strings)
A list of tag names.

Request​

curl -X PUT "https://<your_app_subdomain>.user.com/api/public/users/:id/" \
-H "Authorization: Token <your_64_char_api_key>" \
-H "Accept: */*; version=2" \
-H "Content-Type: application/json" \
-d '{
"first_name": "John",
"api_audit_20261110_1519_seats": 5
}'

Response examples​

{
"id": 1924,
"user_key": "g7lvoickax9e",
"name": "Alexandra Doe",
"email": "johndoe@example.com",
"gender": "unknown",
"status": "visitor",
"phone_number": null,
"first_seen": null,
"last_seen": null,
"page_views": 0,
"last_ip": null,
"timezone": null,
"city": null,
"region": null,
"country": null,
"unsubscribed": true,
"browser_language": null,
"widget_language": null,
"score": 0,
"browser": null,
"os_type": null,
"resolution": null,
"created_at": "2026-11-10T14:20:02.361287Z",
"updated_at": "2026-11-10T14:20:04.790980Z",
"companies": [],
"gravatar_url": null,
"lists": [],
"tags": [],
"notifications": true,
"facebook_url": null,
"linkedin_url": null,
"twitter_url": null,
"google_url": null,
"last_contacted": null,
"custom_id": "alex",
"web_push_subscription": false,
"assigned_to": null,
"most_active_time": null,
"lt_opened_email": null,
"lt_clicked_email": null,
"email_mx_valid": true,
"referrer": null,
"last_heard_from": null,
"spambounced": false,
"softbounced": false,
"hardbounced": false,
"marked_email_as_spam": true,
"email_opt_in": null,
"email_tracking_optin": null
}

A 400 names every field that was rejected, each with its messages. The ones you're most likely to see:

MessageWhen
email: Enter a valid email address.The value isn't an email address.
gender: "abc" is not a valid choice.The value isn't one of the gender values.
<custom attribute>: A valid integer is required.The value doesn't fit the attribute's type (a number attribute here).
custom_id: Client User with user_id abc already existsAnother contact already has that custom_id.

A company_custom_id no company has is ignored: the rest of the update is saved.

Response fields​

Fields returned in the 200 OK response body.

idinteger
A unique identifier for the user which is given by User automatically.
user_keystring
A unique identifier (12 random characters) for the user which is given by User automatically.
namestring
Read-only attribute, made from the combination of the first_name and last_name attributes.
emailstring
A user email
genderstring
unknown (default), male or female. Not detected automatically.
statusstring
user if the contact's email address has been sent to User through the code on your website, otherwise visitor.
phone_numberstringnullable
A user phone number
first_seenstringnullable
A date for user's first website visit.
last_seendatetimenullable
A date of last user's website visit.
page_viewsinteger
A total number of user's page visits occurrences.
last_ipstringnullable
An address IP (identifier assigned to each device, e.g., laptop, printer, mobile etc.) from the last user visit.
timezonestringnullable
A timezone of the user's browser.
citystringnullable
City of the contact's last visit, based on the IP address.
regionstringnullable
Region of the contact's last visit, based on the IP address.
countrystringnullable
Country of the contact's last visit, based on the IP address.
unsubscribedboolean
A flag true/false informing if user is unsubscribed from emails.
browser_languagestringnullable
A user's browser language
widget_languagestringnullable
Language of the chat widget for this contact, used when the widget is set to follow it; null if not set.
scoreinteger
A number of points assinged to the user.
browserstringnullable
A name of user's browser last used to visit your website.
os_typestringnullable
An operating system of the user’s device
resolutionstringnullable
A screen resolution of the device the user has visited your website.
created_atstring (date-time)
A creation date of a user.
updated_atstring (date-time)
A date of last user update.
companiesarray
Companies the contact is a member of, each with id, name and member_since.
gravatar_urlstringnullable
A user avatar url from gravatar.
listsarray of objects
Lists the contact is on, each with id, name and description.
tagsarray of objects
Tags on the contact, each with id and name.
notificationsboolean
A flag true/false informing if your team is receiving notifications about new chat messages from this user.
facebook_urlstringnullable
A URL of user's Facebook profile.
linkedin_urlstringnullable
A URL of user's LinkedIn profile.
twitter_urlstringnullable
A URL of user's Twitter profile.
google_urlstringnullable
A URL of user's Google+ profile.
last_contacteddatetimenullable
A date of last contact with user - any communication (email or chat, automated or otherwise) sent from your team to the user.
custom_idstring
The unique identifier for the user which is provided by the client.
web_push_subscriptionboolean
true if the contact has at least one web push subscription.
assigned_tointegernullable
ID of the agent group the contact is assigned to, or null.
most_active_timestringnullable
Most Active Time is an attribute that is based on historical data determined by the hours of previous use and the most likely active use. Time in this attribute is positioned in the UTC timezone, and there's no possible way to change the timezone for the attribute.
lt_opened_emailstring (date-time)nullable
When the contact last opened one of your emails.
lt_clicked_emailstring (date-time)nullable
When the contact last clicked a link in one of your emails.
email_mx_validboolean
Whether the email address passed User's validation; set to false after a hard bounce.
referrerstringnullable
URL of the page the contact came to your website from.
last_heard_fromstring (date-time)nullable
When the contact last sent your team a message (chat or email). Emails count only once your inbox is connected over IMAP.
spambouncedboolean
true once an email to the contact bounced as spam.
softbouncedboolean
true once an email to the contact soft-bounced.
hardbouncedboolean
true once an email to the contact hard-bounced or was dropped.
marked_email_as_spamboolean
Defaults to true and isn't changed when emails bounce; check spambounced for spam bounces.
email_opt_inbooleannullable
Email marketing consent: true given, false refused, null not recorded.
email_tracking_optinbooleannullable
Consent to email open and click tracking: true given, false refused, null not recorded.
note

Errors that can come from any endpoint (401, 429, 500, 502, 504) are described in HTTP response codes.