Update content role
  • 02 Feb 2022
  • 1 Minute to read
  • Contributors
  • Dark
    Light

Update content role

  • Dark
    Light

PUT /teams/{userId}/content

Updates the content roles of the user. 

Note
To update an SSO user who hasn't logged into the system, you can pass the invitation ID as userId and in the body set is_invitation_id to true.

Header

ParameterTypeDescription
api_tokenstringYou can get the REST API from Settings > Advanced > API tokens.


Body Parameters

ParameterRequiredTypeDescription
content_permissionsYesobject[]Content permissions of the user. Note that the user can have multiple content permissions.
is_invitation_idNobooleanApplicable only for SSO users. If temporary invitation ID is passed as user ID, then set this to true.

Body Parameters > content_permissions

ParameterRequired
TypeDescription
associated_content_role_idYesstringThe content role ID. To get the available roles in the project use the GET /roles endpoint.
access_scopeYesbooleanApplicable only for SSO users. If temporary invitation ID is passed as user ID, then set this to true.

Body Parameters > content_permissions > access_scope

ParameterRequiredTypeDescription
access_levelYesnumberThe access level for the user. 0-None, 1-Category, 2-Version, 3-Project, 4-Language
categoriesConditionallyobject[]List of category scope objects. The field is required when access_level is set to 1-Category
project_versionsConditionallystring[]List of project version IDs the reader has access to. Mandatory when access_level is set to 2-Version.
languagesConditionallyobject[]List of language scope objects. The field is required when access_level is set to 4-Language.

Body Parameters > content_permissions > access_scope > categories

ParameterRequiredTypeDescription
category_idYesstringThe category ID to which the user should be given access.
project_version_idYesstringThe project version ID to which the category belongs.
language_codeYesstringThe language to which the user should be given access.

Body Parameters > content_permissions > access_scope > languages

ParameterRequiredTypeDescription
project_version_idYesstringThe project version ID to which the user should be given access.
language_codeYesstringThe language to which the user should be given access.


Sample Request

{
	"associated_portal_role_id": "c1b8ae08-78d5-41d9-b3c4-3b0892b05ca8",
	"is_invitation_id": false
}


Sample Response

If the result property is true, then it indicates that the record has been successfully updated.


Was this article helpful?