Update User
const url = 'https://api.exolink.cloud/user/example';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"givenName":"example","familyName":"example","email":"hello@example.com","locale":"en","oldPassword":"example","newPassword":"example","mfa":true,"mfaCode":"example","mfaName":"App","password":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.exolink.cloud/user/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "givenName": "example", "familyName": "example", "email": "hello@example.com", "locale": "en", "oldPassword": "example", "newPassword": "example", "mfa": true, "mfaCode": "example", "mfaName": "App", "password": "example" }'Update user profile information, password or multi-factor authentication.
To enable MFA, send mfa: true without mfaCode: the response carries the TOTP SecretCode
to add to an authenticator app. Then send the app’s code as mfaCode to verify and enable it.
To disable MFA, send mfa: false with the user’s password.
To change the email, send email with the user’s password. The code goes to the new address,
and the old address is told about the change.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”User ID
Request Bodyrequired
Section titled “Request Bodyrequired”object
User’s first name
User’s last name
User’s email address. Needs password. Takes effect once confirmed via /user/{userId}/confirm.
User’s language
Example
enCurrent password (required for password change)
New password
Enable or disable multi-factor authentication
TOTP code from the authenticator app, to finish enabling MFA
Name of the authenticator device
Current password, required to change the email or disable MFA
Responses
Section titled “Responses”User updated successfully
object
Unique identifier for the user (UUID)
User’s email address
User’s first name
User’s last name
User’s language
Whether multi-factor authentication is enabled
User permissions per tenant (tenant domain prefix -> role mapping)
object
User role in a tenant
TOTP secret, returned when MFA setup was started
Example
{ "locale": "en", "perms": { "additionalProperty": "Owner" }}Missing, invalid or expired credentials
Error response. Some rejections carry only message.
object
Error message
Error code
Failed validations, for requests checked against a schema
object
Path of the invalid field
Example
{ "message": "Not authorized", "errorCode": "ERR_API_NOT_AUTHORIZED"}The caller may not perform this action
Error response. Some rejections carry only message.
object
Error message
Error code
Failed validations, for requests checked against a schema
object
Path of the invalid field
Example
{ "message": "Forbidden", "errorCode": "ERR_API_FORBIDDEN"}Validation or verification failed
Error response. Some rejections carry only message.
object
Error message
Error code
Failed validations, for requests checked against a schema
object
Path of the invalid field
Example
{ "message": "Missing parameter: displayName", "errorCode": "ERR_API_VALIDATION_FAILED"}