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

Set a user's direct project permission

Sets a user's direct project permission to a selected permission level. Use the language parameters to scope relevant permissions to specific language IDs. The permission level must be one of the values supported by permissionType.

9 parameters
userIdintegerrequired
The integer identifier of the user whose direct project permission you want to set.
permissionTypestringrequired
The permission level to assign: `NONE`, `VIEW`, `TRANSLATE`, `REVIEW`, `EDIT`, or `MANAGE`.
Allowed:NONEVIEWTRANSLATEREVIEWEDITMANAGE
projectIdintegerrequired
The integer identifier of the project whose permission you want to set.
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 direct project permission was set.
400Returned when the request or permission value is 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 the user's project permission.
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 permission value is 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 permissionType path parameter must be NONE, VIEW, TRANSLATE, REVIEW, EDIT, or MANAGE; the userId and projectId path parameters must identify the user and project.