Skip to content
UneeqUneeqUneeq Docs

Update user details

PUT
/external/v1/organization/{organizationID}/users/{userID}
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"
}'

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.

organizationID
required
string

ID of the organization the API key belongs to, for example org_HYPCX67vaupjhdTn.

Example

org_HYPCX67vaupjhdTn
userID
required
string format: uuid

ID of a member of the organization (any status). Must be a lowercase hyphenated UUID.

Media typeapplication/json

At least one field must be sent with a non-empty value.

object
name

New display name. Empty string means no change.

string
<= 250 characters
email

New email address. Empty string means no change. Must not belong to another active account.

string format: email
<= 254 characters
locale

The language the person trains in. It does not change the language of the Uneeq interface. Omit to leave unchanged.

string
Allowed values: ar-SA ar-AE ar-EG ar-MA zh-CN en-AU en-CA en-GB en-GH en-HK en-IE en-IN en-KE en-NG en-NZ en-PH en-PK en-SG en-TZ en-US en-ZA fr-FR fr-CA de-DE hi-IN it-IT ja-JP ko-KR pt-BR pt-PT es-ES es-MX
user_theme

Interface theme. Null or omitted means no change.

string | null
Allowed values: light dark system

Example

{
"name": "Jane Doe",
"email": "jane.doe@example.com",
"locale": "en-US",
"user_theme": "system"
}

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: ”). No error_code.

Media typeapplication/json

The body of an error returned by an endpoint.

object
message
required

Human-readable explanation of what went wrong.

string
error_code

Stable machine-readable cause. Present only for errors that have one.

string

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.

Media typeapplication/json

The body of an error returned before the request reaches an endpoint (authentication and rate limiting).

object
error
required

Human-readable explanation of what went wrong.

string

Example generated

{
"error": "example"
}

The user is not a member of the organization (message “unable to get user info by auth id”).

Media typeapplication/json

The body of an error returned by an endpoint.

object
message
required

Human-readable explanation of what went wrong.

string
error_code

Stable machine-readable cause. Present only for errors that have one.

string

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”.

Media typeapplication/json

The body of an error returned by an endpoint.

object
message
required

Human-readable explanation of what went wrong.

string
error_code

Stable machine-readable cause. Present only for errors that have one.

string

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.

Media typeapplication/json

The body of an error returned before the request reaches an endpoint (authentication and rate limiting).

object
error
required

Human-readable explanation of what went wrong.

string

Example generated

{
"error": "example"
}
Retry-After
integer
>= 1

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.

Media typeapplication/json

The body of an error returned by an endpoint.

object
message
required

Human-readable explanation of what went wrong.

string
error_code

Stable machine-readable cause. Present only for errors that have one.

string

Example generated

{
"message": "example",
"error_code": "example"
}