Skip to content

UpdateUser

Request

Update user by specifying id or email. Either id or email is required. If both are provided then an error is returned. The user must have a token with valid permissions.

Endpoint: PATCH /v1/user. Authentication: requires AuthorizationHeader bearer token unless this operation's security is changed. Required AuthMind permission/scope: admin/user (grant this scope on the API token in Admin > API Tokens; a token without it receives 403 Forbidden). Documented parameters: email, id. Request body: send JSON matching the referenced request schema. Response parsing: inspect success; on failure inspect error, errors, or message depending on the referenced schema.

Security
AuthorizationHeader
Query
emailstring

Email of the user to update

idstring

Id of the user to be updated

Bodyapplication/jsonrequired
namestring or null

Display name or resource name, depending on the schema context.

Example:"Jane Doe"
emailstring or null

User email address.

Example:"jane.doe@example.com"
rolestring or null

AuthMind user role. Valid values should be retrieved from GET /v1/roles unless documented otherwise.

Example:"Admin"
old_passwordstring or null

Existing password value used when a password update requires the current password.

Example:"OldDummyPassw0rd!"
passwordstring or null

Password value used by the user-management operation when applicable.

Example:"DummyPassw0rd!"
localestring or null

User locale. Only "English" is currently accepted; any other non-empty value is rejected with 400 Bad Request (Only 'English' locale is supported.). An empty value is allowed.

curl -i -X PATCH \
  'https://apidoc.authmind.com/_mock/v1/docs/v1/user?email=string&id=string' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Jane Doe",
    "email": "jane.doe@example.com",
    "role": "Admin",
    "old_password": "OldDummyPassw0rd!",
    "password": "DummyPassw0rd!",
    "locale": "en-US"
  }'

Responses

Request completed successfully. See the referenced schema for the response envelope and result payload.

Bodyapplication/json
errorsstring

Error message returned when the request fails. This is free-form, human-readable text intended for logging/display -- AuthMind does not define a stable, cross-endpoint error-code contract for it. Branch integration logic on the HTTP status code and the success boolean, not on the contents of this string.

successboolean

Indicates whether the request was successful.

Response
{ "success": true }