Skip to main content

Update companies/accounts

Update APIs allow you to modify the various properties of a company or account.

Update a company (REST)

Use the update company request to do any of the following tasks:

  • Enable or disable companies.
  • Set or update company access level.
  • Set or update company profile information such as name, address, contact phone number, and so on.
  • Set or update custom attributes.
  • Set or update external identifiers.

You can update the entire company 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).

To update an existing company, you must know the company uuid generated when you created the company (see Create companies). If you do not know it, you can retrieve the company information by sending a GET request based on the external ID:

GET https://{marketplaceUrl}/api/account/v2/companies/externalID:{external_ID}

For a full update, use the following PUI request:

PUT https://{marketplaceUrl}/api/account/v2/companies/{companyUuid}

For a partial update, use the following PATCH request.

PATCH https://{marketplaceUrl}/api/account/v2/companies/{companyUuid}

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

Request

{
"name": "Example Inc",
"enabled": true,
"address": {
"city": "New York",
"country": "US",
"state": "NY",
"street1": "129 West 81st Street",
"street2": "5A",
"zip": "10029"
},
"companySize": "ENTERPRISE",
"customAttributes": [],
"emailAddress": "info@example.com",
"website": "https://www.example.com",
"vendor": false,
"reseller": false,
"channelAdmin": false,
"externalId": null,
"phoneNumber": "+17731234567",
"defaultRole": "USER",
"countryCode": "US",
"status": "ACTIVE"

Update an account (GraphQL)

You can update an account definition by using the updateAccount mutation to specify new values for different fields. This mutation is equivalent to the REST API for updating a company.

The items you can change include:

  • account name
  • access type
  • country code
  • default role assigned to users

You cannot change the unique account identifier. The users associated with a given account are not part of the account definition: they are defined through account memberships. 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?