Add a user
  • 02 Feb 2022
  • 1 Minute to read
  • Contributors
  • Dark
    Light

Add a user

  • Dark
    Light

POST /teams

Adds a user to project


Header

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


Body Parameters

ParameterRequiredTypeDescription
email_idYesstringEmail address of the new user
invited_byYesstringThe ID of the user that will be marked as an inviter
associated_portal_role_idYesstringThe portal role ID. To get the available roles in the project use the GET /roles endpoint.
content_permissionsYesobject[]Content permission of the user
is_sso_userNobooleanSpecify if the user is a Single Sign-On user or not
skip_sso_invitation_emailNobooleanIf set to 'true', the invitation email will not be sent to the user. Applicable only for a Single Sign-On user.
associated_groupsNostring[]List of group IDs the user is associated with.

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_scopeYesstringThe access scope of the user

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

{
    "email_id": "danny.brown@document360.io",
    "associated_portal_role_id": "64ced5a8-c2b9-4421-821a-4e32bdfaaecc",
    "associated_reader_groups": [],
    "content_permissions": [
        {
            "associated_content_role_id": "926c7a3c-0fe8-40c8-a96f-f02c95a12d5c",
            "access_scope": {
                "access_level": 3,
                "categories": [],
                "project_versions": [],
                "languages": []
            }
        }
    ],
    "is_sso_user": false,
    "invited_by": "ee69816b-ee22-458b-aada-fe08461a5ebb"
}

Sample Response

The ID returned will be the user_id. In the case of SSO users, the id returned will be a temporary invitation id. Only when the user logs into the application a user account will be created.

{
    "result": {
        "id": "657b55ef-3440-4e67-a82e-832b36ef351e"
    },
    "extension_data": null,
    "context": null,
    "success": true,
    "errors": [],
    "warnings": [],
    "information": []
}

Was this article helpful?