Update user details
curl --request PUT \ --url "$UNEEQ_API_URL/external/v1/organization/$UNEEQ_ORG_ID/users/{userID}" \ --header "Authorization: Bearer $UNEEQ_API_KEY" \ --header "Content-Type: application/json" \ --data '{ "name": "Jane Doe", "email": "jane.doe@example.com", "locale": "en-US", "user_theme": "system"}'const url = `${process.env.UNEEQ_API_URL}/external/v1/organization/${process.env.UNEEQ_ORG_ID}/users/{userID}`;const response = await fetch(url, { method: 'PUT', headers: { Authorization: `Bearer ${process.env.UNEEQ_API_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ "name": "Jane Doe", "email": "jane.doe@example.com", "locale": "en-US", "user_theme": "system" }),});console.log(response.status, await response.text());Updates a member’s name, email, training language or theme. Only the fields you send are changed.
An empty name, email or locale, or a null user_theme, counts as not sent, and at least one
field must be sent. Passwords cannot be changed through the API.
Name and email changes are also applied to the person’s sign-in account when they sign in with a Uneeq username and password. For people who sign in through a corporate identity provider (SSO) only our record is updated, because the identity provider owns those details; use this to record an email change that already happened there. The new email must match the email your identity provider sends at the next sign-in, or the person cannot sign in.
A new email must not belong to another active account, in this organization or anywhere else on the platform (409). An address freed by removing a user can be reused. Sending the person’s current email, in any letter case, is treated as no change. A new email is stored exactly as sent; it is not lower-cased, unlike emails sent to the add-users endpoint.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”ID of the organization the API key belongs to, for example org_HYPCX67vaupjhdTn.
Example
org_HYPCX67vaupjhdTnID of a member of the organization (any status). Must be a lowercase hyphenated UUID.
Request Bodyrequired
Section titled “Request Bodyrequired”At least one field must be sent with a non-empty value.
object
New display name. Empty string means no change.
New email address. Empty string means no change. Must not belong to another active account.
The language the person trains in. It does not change the language of the Uneeq interface. Omit to leave unchanged.
Interface theme. Null or omitted means no change.
Example
{ "name": "Jane Doe", "email": "jane.doe@example.com", "locale": "en-US", "user_theme": "system"}Responses
Section titled “Responses”User updated. No body.
userID is not a UUID or a field failed validation (message “invalid request”); no field was sent
(message “at least one field (name, email, locale, user_theme) must be provided”); or locale is not
supported (message “Unsupported language locale: error_code.
The body of an error returned by an endpoint.
object
Human-readable explanation of what went wrong.
Stable machine-readable cause. Present only for errors that have one.
Example generated
{ "message": "example", "error_code": "example"}The Authorization header is missing, or the API key is not valid for this organization. A key check that fails on the server is also reported as 401.
The body of an error returned before the request reaches an endpoint (authentication and rate limiting).
object
Human-readable explanation of what went wrong.
Example generated
{ "error": "example"}The user is not a member of the organization (message “unable to get user info by auth id”).
The body of an error returned by an endpoint.
object
Human-readable explanation of what went wrong.
Stable machine-readable cause. Present only for errors that have one.
Example generated
{ "message": "example", "error_code": "example"}The email belongs to another active account: “email is already in use by another user” (in this organization) or “email is already in use by an active account outside this organization”.
The body of an error returned by an endpoint.
object
Human-readable explanation of what went wrong.
Stable machine-readable cause. Present only for errors that have one.
Example generated
{ "message": "example", "error_code": "example"}The API key has sent too many requests. Wait for the number of seconds in Retry-After, then retry.
The body of an error returned before the request reaches an endpoint (authentication and rate limiting).
object
Human-readable explanation of what went wrong.
Example generated
{ "error": "example"}Headers
Section titled “Headers”Seconds to wait before retrying.
The body is not valid JSON (“unable to decode request body”), or the user could not be updated (“unable to update user by user id”). If the sign-in account was already updated before the failure, it may now differ from our record; retry the request.
The body of an error returned by an endpoint.
object
Human-readable explanation of what went wrong.
Stable machine-readable cause. Present only for errors that have one.
Example generated
{ "message": "example", "error_code": "example"}
