For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Dev Portal
DocsAPI ReferenceLearnCommunityChangelog
DocsAPI ReferenceLearnCommunityChangelog
    • About Our APIs
  • REST
    • Overview
      • Overview
      • Storefront
      • Management
        • Overview
          • Addresses
          • Authentication
          • Channels
          • Company
          • Invoice Management
          • Orders
          • Payment
          • Quotes
          • Sales Staff
          • Shopping List
          • Super Admin
          • Users
            • GETList B2B Users
            • POSTCreate Company User
            • POSTBulk Create Users
            • GETGet User Details
            • PUTUpdate User Details
            • DELDelete User
            • GETGet User Details by BigCommerce Customer ID
            • GETList Extra Fields for Users
  • GraphQL
    • Overview
  • MCP
    • Overview
Dev Portal
LogoLogo
RESTB2BManagementUsers

Update User Details

PUT
https://api-b2b.bigcommerce.com/api/v3/io/users/:userId
PUT
/api/v3/io/users/:userId
$curl -X PUT https://api-b2b.bigcommerce.com/api/v3/io/users/123 \
> -H "X-Auth-Token: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{}'
1{
2 "code": 200,
3 "data": {
4 "id": 1,
5 "companyId": 42,
6 "createdAt": 1,
7 "updatedAt": 1,
8 "customerId": 12345,
9 "companyRoleName": "Approver",
10 "channelList": [
11 {
12 "channelId": 1,
13 "channelName": "Default Storefront",
14 "iconUrl": "https://s3.amazonaws.com/bc-channel-platform/channel-icons/bigcommerce.svg"
15 }
16 ],
17 "firstName": "Marie",
18 "lastName": "Curie",
19 "email": "john.doe@example.com",
20 "phoneNumber": "+1-555-123-4567",
21 "role": 1,
22 "companyRoleId": 10,
23 "uuid": "user-uuid-1",
24 "extraFields": [
25 {
26 "fieldName": "customField1",
27 "fieldValue": "value1"
28 }
29 ]
30 },
31 "meta": {
32 "message": "Success"
33 }
34}

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.

Was this page helpful?
Previous

Get User Details

Next

Delete User

Built with

Authentication

X-Auth-Tokenstring
| 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-fundamentals/api-accounts). | For example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example Requests](/developer/docs/overview/api-fundamentals/api-accounts#x-auth-token-header-example-requests). For more about BigCommerce OAuth scopes, see our [Guide to API Accounts](/developer/docs/overview/api-fundamentals/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
| Header | Argument | Description | |:-------|:---------|:------------| | `X-Store-Hash` | `store_hash` | The unique store hash associated with a BigCommerce store that has B2B Edition enabled. |

Path parameters

userIdintegerRequired

The unique identifier of the user as reported by Get All Users.

Request

This endpoint expects an object.
firstNamestringOptional
User's first name.
lastNamestringOptional
User's last name.
emailstringOptionalformat: "email"
User's email address. This must be unique within B2B Edition.
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:
companyRoleIdintegerOptional

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

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.

extraFieldslist of objectsOptional
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.

Response

Success
codeintegerDefaults to 200
Operation status code.
dataobject
metaobject

Errors

404
Not Found Error
422
Unprocessable Entity Error
HeaderArgumentDescription
X-Auth-Tokenaccess_tokenFor more about API accounts that generate access_tokens, see our Guide to API Accounts.

For example requests and more information about authenticating BigCommerce APIs, see Authentication and Example Requests.

For more about BigCommerce OAuth scopes, see our Guide to API Accounts.

For a list of API status codes, see API Status Codes.

HeaderArgumentDescription
X-Store-Hashstore_hashThe unique store hash associated with a BigCommerce store that has B2B Edition enabled.