Update company member user types

How to use the update company members user types endpoint to update members licenses.

Before using this endpoint, you will need to get an authorization key, the member IDs and the user type ID to include in the request. This guide will show you how to get these information and include them in your request.

Authorization

These endpoints require an API key with Member Information scope generated for your company to use. If you need help creating an API key, follow our Create API keys guide.

To use it, add an API key in the Authenticate header in your API tool with the apikey schema.

The syntax is:

  • Key: Authorization
  • Value: apikey {your API key here}


Finding the user IDs

If you don't have the userIds, you can get them using the GET company members endpoint, which returns a paginated list of all the members in the company and their respective IDs (i.e. username). See our Member information API guide for more information.

Retrieving the user type ID

The GET members summary endpoint retrieves the summary of licenses the company has with their respective IDs. Use our Member information API guide as a reference to use this endpoint and get the license ID to include in your request.

Using the endpoint to update company members user types

With the license ID and the user IDs, use the PATCH enterprise/v1/members/user-types with the following body parameters to update the list of members to the new license.

ParameterDescription
userIdsArray of userIds that will have the license updated.
userTypeID of the license to assign to the users.

Request example:

{  
  "userIds": ["udf658a6b4aa9b66fd7924182", "udf658a6b4aa9b66fd7924182"]  
  "userType": "b1ae35180681a36dexxxxxxx"  
}

Additional information