Skip to main content

Update users

The APIs described in this topic allow you to update user information such as the following:

  • First and last name
  • Username
  • Locale and currency
  • External identifier
  • Custom attributes

Update a user (REST)

You can update the entire user profile at once (PUT) or do a partial update that changes the value in one or more fields while leaving the others as they are (PATCH).

For a complete update, use the following request:

PUT https://{marketplace_host}/api/account/v2/users/{userUuid}

For a partial update, use the following request:

PATCH https://{marketplace_host}/api/account/v2/users/{userUuid}

The parameters for the PATCH command are identical to those for the PUT command but are optional. Refer to the Patch a user and Update a user API reference for details on authorization rules and the full list of supported request body and query parameters.

Request

{
"firstName": "John",
"lastName": "Smith",
"externalId": "jjivat5h02vhkvhy",
"locale": "en_US",
"currency": "USD",
"customAttributes": []
}

Update a user (GraphQL)

You can update user information with the updateUser mutation. This mutation is the equivalent of the REST API Update a user. However, you cannot change a user's unique identifier in the marketplace or the user's email, as these are intrinsic to the user definition.

A user's membership and role within an account are not part of the user definition: it is defined in an account membership. You must use the account membership APIs to add new memberships, remove existing memberships, or assign new roles to a user within a given account. For more information, see Manage account memberships.

Was this page helpful?