Skip to main content

Update a user (JSON Merge Patch).

PATCH/api/v1/users/{user_id}users:admin

Changes the user's first name and surname (written to the company and to the sign-in identity, as the Admin Console does), organisation, department, external flag and e-mail notification. Changing a name also requires Edit User Profiles, and changing the e-mail notification requires Edit Notification Preferences. The e-mail address, username, active state and the sign-in details are read-only here.

Scopeusers:admin (sensitive)
AsynchronousNo
MCP toolupdate_user
Portal permissionsedit_users

Parameters​

NameInTypeRequiredDescription
user_idpathstringRequired
Docwize-Versionheaderstring (date)Optional
If-MatchheaderstringOptional

Request body​

Content typeType
application/jsonUserPatchInput
application/merge-patch+jsonUserPatchInput

Responses​

StatusDescriptionBody
200Success.application/json User or object
400invalid_version, malformed_jsonapplication/problem+json Problem
401token_expired, unauthenticatedapplication/problem+json Problem
403forbidden, insufficient_scope, token_owner_inactiveapplication/problem+json Problem
404not_foundapplication/problem+json Problem
405method_not_allowedapplication/problem+json Problem
406not_acceptableapplication/problem+json Problem
412precondition_failedapplication/problem+json Problem
413payload_too_largeapplication/problem+json Problem
415unsupported_media_typeapplication/problem+json Problem
421wrong_regionapplication/problem+json Problem
422validation_failedapplication/problem+json Problem
500internal_errorapplication/problem+json Problem
503tenant_unavailable, unavailableapplication/problem+json Problem
504timeoutapplication/problem+json Problem

Errors​

The problem codes this operation can answer with. Each code links to its page.

Schemas​

User​

FieldTypeRequiredDescription
departmentstring or nullRequiredThe department's name; null when none.
display_namestringRequired
emailstring or nullRequired
email_notificationboolean or nullRequiredNull without View Notification Preferences.
first_active_atstring (date-time) or nullRequiredThe first sign-in to this organisation; null when the person never signed in, without View User Activity, or when the sign-in service could not be read.
first_namestring or nullRequired
is_activebooleanRequired
is_externalbooleanRequired
is_non_billableboolean or nullRequiredTrue for a Docwize consultant, who is not billed as a user. Null without View Licenses, or when the consultant list could not be read.
is_verifiedboolean or nullRequiredTrue once the person accepted the invitation and verified the sign-in; false while the invitation is pending or the person has no sign-in. Null when the sign-in service could not be read (a warning says so).
last_active_atstring (date-time) or nullRequiredThe latest sign-in to this organisation; null under the same conditions as first_active_at.
organisation_idstring or nullRequired
surnamestring or nullRequired
user_idstringRequired
usernamestring or nullRequiredThe username and document-number prefix.

UserPatchInput​

FieldTypeRequiredDescription
departmentstring or nullOptional
display_namestring or nullOptional
emailstring or nullOptional
email_notificationboolean or nullOptional
first_active_atstring (date-time) or nullOptional
first_namestring or nullOptional
is_activeboolean or nullOptional
is_externalboolean or nullOptional
is_non_billableboolean or nullOptional
is_verifiedboolean or nullOptional
last_active_atstring (date-time) or nullOptional
organisation_idstring or nullOptional
surnamestring or nullOptional
user_idstring or nullOptional
usernamestring or nullOptional