PUT/v2/projects/{projectId}/users/{userId}/set-permissions

Set a user's granular project permissions

Sets a user's granular, scope-based direct permissions for a project. Supply scopes to grant scopes and use the language parameters to limit access or actions to specific language IDs. This operation sets direct project permissions for the specified user.

9 parameters
userIdintegerrequired
The integer identifier of the user whose project permissions you want to set.
projectIdintegerrequired
The integer identifier of the project whose permissions you want to set.
scopesarray<string>optional
Scopes to grant to the user.
languagesarray<integer>optional
Integer language IDs that define the languages covered by the permission.
translateLanguagesarray<integer>optional
Integer language IDs for which the user can translate.
viewLanguagesarray<integer>optional
Integer language IDs for which the user can view content.
stateChangeLanguagesarray<integer>optional
Integer language IDs for which the user can change translation state.
suggestLanguagesarray<integer>optional
Integer language IDs for which the user can suggest translations.
suggestManageLanguagesarray<integer>optional
Integer language IDs for which the user can manage suggestions.

5 status codes
200Confirms that the user's granular project permissions were set.
400Returned when the request or its permission values are invalid.
codestringrequired
Allowed:unauthenticatedapi_access_forbiddenapi_key_not_foundinvalid_api_keyinvalid_project_api_keyproject_api_key_expiredbad_credentialsmfa_enabledinvalid_otp_codemfa_not_enabledcan_not_revoke_own_permissionsdata_corrupted
paramsarray<object>optional
401Returned when the request is not authorized.
codestringrequired
Allowed:unauthenticatedapi_access_forbiddenapi_key_not_foundinvalid_api_keyinvalid_project_api_keyproject_api_key_expiredbad_credentialsmfa_enabledinvalid_otp_codemfa_not_enabledcan_not_revoke_own_permissionsdata_corrupted
paramsarray<object>optional
403Returned when the authenticated user does not have permission to set project permissions.
codestringrequired
Allowed:unauthenticatedapi_access_forbiddenapi_key_not_foundinvalid_api_keyinvalid_project_api_keyproject_api_key_expiredbad_credentialsmfa_enabledinvalid_otp_codemfa_not_enabledcan_not_revoke_own_permissionsdata_corrupted
paramsarray<object>optional
404Returned when the project or user is not found.
codestringrequired
Allowed:unauthenticatedapi_access_forbiddenapi_key_not_foundinvalid_api_keyinvalid_project_api_keyproject_api_key_expiredbad_credentialsmfa_enabledinvalid_otp_codemfa_not_enabledcan_not_revoke_own_permissionsdata_corrupted
paramsarray<object>optional

Error handling

A 400 is returned when the request or its permission values are invalid; a 401 when the authenticated user is not authorized; a 403 when the authenticated user lacks permission; and a 404 when the project or user is not found. The userId and projectId path parameters must identify the user and project whose permissions you want to set.