Update a user
PATCH/users/{userId}
Base URL: https://api.tinkermode.com
This endpoint will update the user name and password with the specified ID. Only a project with "email" mode type can update a password.
Authentication
Send an Authorization header of the form ModeCloud <AUTH_CODE>.
Must contain API key of the matching user, or the API key of a user with permissions to update other users, a service account token with permissions on other users, or a Project API Key with admin permission.
Path parameters
| Name | Type | Required | Constraints | Description |
|---|---|---|---|---|
userId | integer | Yes | The unique ID for the specified user. |
Request body
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
auth2FActivated | boolean | No | read-only (server-generated) | True if user has activated two-factor authentication. |
creationTime | string | No | read-only (server-generated); format: date-time | The time when the user was created. |
email | string | No | read-only (server-generated) | A valid email address. Present if project uses email addresses to uniquely identify users. |
externalKey | string | No | read-only (server-generated) | If present, this is the unique key used in an external system to identify this user. This field is relevant only if project is using BYOU. |
id | integer | Yes | read-only (server-generated) | This is a unique user ID assigned at time of creation. |
managedExternally | boolean | No | read-only (server-generated) | True if user account is managed by an external ID provider such as Microsoft Entra ID. |
name | string | Yes | Display name of the user. | |
password | string | No | A valid password. This is used only when creating or updating a user who logs in by email and password. | |
passwordUpdateTime | string | No | read-only (server-generated); format: date-time | The time when the password was last changed. Present only if user account is based on email/password. |
phoneNumber | string | No | read-only (server-generated); pattern: ^(\+)([0-9]{5,})$ | A valid phone number with country code (beginning with the '+' symbol). Present if project uses phone numbers to uniquely identify users. |
projectId | integer | Yes | read-only (server-generated) | The project ID that this user belongs to. |
verified | boolean | No | read-only (server-generated) | Displays true if the user has verified their account. |
Request example
{
"name": "Jane Smith",
"password": "a_secure_password"
}Responses
204 Successfully updated user's name or password. There is no return body.
401 Authorization is required to access this resource.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |
403 Request failed because of invalid data or denied permission.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |
404 User was unable to be found. Please check the user ID.
429 Request failed because of rate limit.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |
500 An unexpected error has occurred.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |
503 The service is temporarily unavailable.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |