Skip to content

Update User

PUT
/user/{userId}
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.

userId
required
string

User ID

Media typeapplication/json
object
givenName

User’s first name

string
familyName

User’s last name

string
email

User’s email address. Takes effect once confirmed via /user/{userId}/confirm.

string format: email
locale

User’s language

string
>= 2 characters <= 2 characters

Example

en
oldPassword

Current password (required for password change)

string format: password
newPassword

New password

string format: password
mfa

Enable or disable multi-factor authentication

boolean
mfaCode

TOTP code from the authenticator app, to finish enabling MFA

string
mfaName

Name of the authenticator device

string
default: App
password

Password, required to disable MFA

string format: password

User updated successfully

Media typeapplication/json
object
userId

Unique identifier for the user (UUID)

string
email

User’s email address

string
givenName

User’s first name

string
familyName

User’s last name

string
locale

User’s language

string
multifactor

Whether multi-factor authentication is enabled

boolean
perms

User permissions per tenant (tenant domain prefix -> role mapping)

object
key
additional properties

User role in a tenant

string
Allowed values: Owner Admin ReadOnly
SecretCode

TOTP secret, returned when MFA setup was started

string

Example

{
"locale": "en",
"perms": {
"additionalProperty": "Owner"
}
}

Missing, invalid or expired credentials

Media typeapplication/json

Error response. Some rejections carry only message.

object
message
required

Error message

string
errorCode

Error code

string
Allowed values: ERR_API_BAD_REQUEST ERR_API_NOT_AUTHORIZED ERR_API_PAYMENT_REQUIRED ERR_API_FORBIDDEN ERR_API_RESOURCE_NOT_FOUND ERR_API_RESOURCE_IN_USE ERR_API_RESOURCE_ALREADY_EXISTS ERR_API_UNEXPECTED_STATE ERR_API_CONTENT_TOO_LARGE ERR_API_VALIDATION_FAILED ERR_API_VERIFICATION_FAILED ERR_API_NO_TENANT ERR_API_INVALID_INVITATION ERR_API_USER_DISABLED ERR_API_FAILED_DEPENDENCY ERR_EXOLINK_GENERIC
details

Failed validations, for requests checked against a schema

Array<object>
object
path

Path of the invalid field

string
message
string
code
string

Example

{
"message": "Not authorized",
"errorCode": "ERR_API_NOT_AUTHORIZED"
}

The caller may not perform this action

Media typeapplication/json

Error response. Some rejections carry only message.

object
message
required

Error message

string
errorCode

Error code

string
Allowed values: ERR_API_BAD_REQUEST ERR_API_NOT_AUTHORIZED ERR_API_PAYMENT_REQUIRED ERR_API_FORBIDDEN ERR_API_RESOURCE_NOT_FOUND ERR_API_RESOURCE_IN_USE ERR_API_RESOURCE_ALREADY_EXISTS ERR_API_UNEXPECTED_STATE ERR_API_CONTENT_TOO_LARGE ERR_API_VALIDATION_FAILED ERR_API_VERIFICATION_FAILED ERR_API_NO_TENANT ERR_API_INVALID_INVITATION ERR_API_USER_DISABLED ERR_API_FAILED_DEPENDENCY ERR_EXOLINK_GENERIC
details

Failed validations, for requests checked against a schema

Array<object>
object
path

Path of the invalid field

string
message
string
code
string

Example

{
"message": "Forbidden",
"errorCode": "ERR_API_FORBIDDEN"
}

Validation or verification failed

Media typeapplication/json

Error response. Some rejections carry only message.

object
message
required

Error message

string
errorCode

Error code

string
Allowed values: ERR_API_BAD_REQUEST ERR_API_NOT_AUTHORIZED ERR_API_PAYMENT_REQUIRED ERR_API_FORBIDDEN ERR_API_RESOURCE_NOT_FOUND ERR_API_RESOURCE_IN_USE ERR_API_RESOURCE_ALREADY_EXISTS ERR_API_UNEXPECTED_STATE ERR_API_CONTENT_TOO_LARGE ERR_API_VALIDATION_FAILED ERR_API_VERIFICATION_FAILED ERR_API_NO_TENANT ERR_API_INVALID_INVITATION ERR_API_USER_DISABLED ERR_API_FAILED_DEPENDENCY ERR_EXOLINK_GENERIC
details

Failed validations, for requests checked against a schema

Array<object>
object
path

Path of the invalid field

string
message
string
code
string

Example

{
"message": "Missing parameter: displayName",
"errorCode": "ERR_API_VALIDATION_FAILED"
}