Create a role

Creates a role with the given name, description and permissions, scoped to one or more structure types. Returns the created role.

Use this endpoint to define a new role for your organization. A role grants its permission set to any user who holds it on a structure. Creating a role grants no access on its own. Assign users to it with the Add users to a role endpoint.

Scope the role with structure_type_ids. The role can then be assigned only on structures of those types. Resolve your organization's structure types from the Structures section.

Requirements

Field limits

  • name holds 1 to 36 characters.
  • description holds 1 to 200 characters.
  • structure_type_ids holds 1 to 100 structure type IDs.
  • permissions holds any combination of the values listed in the Roles overview.

The response returns the created role, including the id you need to assign users to it.

πŸ“˜

A new role is never the default role for a structure type. is_default and user_count are read-only and appear only on the role returned in the response.

Body Params
structure_type_ids
array of strings
required

Required. List of structure type IDs to associate with the role. Limited to 100 per request.

structure_type_ids*
string
required

The role title

string
required

The role description

permissions
array of objects

The list of permissions enabled for this role.

permissions
Responses

Language
Credentials
Bearer
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json