Update User Details

Updates the B2B Edition user account associated with userId. All fields may be updated except companyId and originChannelId, which are read-only for a user account.

Authentication

X-Auth-Tokenstring
### Authentication header | Header | Argument | Description | |:-------|:---------|:------------| | `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see our [Guide to API Accounts](/developer/docs/overview/api-accounts). | ### Further reading For example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example Requests](/developer/docs/overview/api-accounts#x-auth-token-header-example-requests). For more about BigCommerce OAuth scopes, see our [Guide to API Accounts](/developer/docs/overview/api-accounts#oauth-scopes). For a list of API status codes, see [API Status Codes](/developer/api-reference/rest/overview#rest-http-status-codes).
X-Store-Hashstring
### Authentication header | Header | Argument | Description | |:-------|:---------|:------------| | `X-Store-Hash` | `store_hash` | The unique store hash associated with a BigCommerce store that has B2B Edition enabled. |

Path parameters

userIdstringRequired

Request

This endpoint expects an object.
channelIdslist of integersOptional
List of numeric channel IDs the user is associated with. These represent the storefront channels the user can log in to and do business.
companyRoleIdintegerOptional

Numeric code representing the user’s Company-specific role. When present this field overrides the value of the role field.

emailstringOptionalformat: "email"
User's email address. This must be unique within B2B Edition.
extraFieldslist of objectsOptional
firstNamestringOptional
User's first name.
lastNamestringOptional
User's last name.
phoneNumberstringOptional
User's phone number.
roleenumOptional

Numeric code representing the user’s role as admin (0), senior buyer (1), or junior buyer (2).

Allowed values:
uuidstringOptional

External identifier for the user. This field may be used to represent any external user ID. Using the name uuid, B2B Edition does not require the field to be unique.

Response

Success
codeintegerDefaults to 200
Operation status code.
dataobject
metaobject

Errors

404
Not Found Error
422
Unprocessable Entity Error