Docs

Create Role

Create a custom role with exactly the permissions you choose, then assign it to members. You can grant only permissions you hold yourself.

POST

Headers

Optional headers
string

Optional. The id of the organization to act in. Leave it out to act in the API key's own organization. A key can also act in its child organizations, and, with "Use this key across all of your organizations" on, in every organization its creator can open in the app. List them with GET /v2/companies. Every response's X-Company-Id header names the organization it acted in. See Organizations.

Body

Arguments
stringrequired

The role name, up to 255 characters.

string

What the role is for, up to 255 characters.

array of string

Permission keys to grant. Leave it out to create the role with no permissions.

Response fields

idstring

Unique id of the role.

namestring

The role's name.

descriptionstring

The role's description. Empty when nobody wrote one.

isAdminboolean

True if the role grants admin rights.

isGlobalboolean

True for roles MindCloud provides to every company. Global roles are read-only: writing one answers 404.

createdOndate

When the role was created.

memberCountnumber

How many people in the company hold the role, people whose invite is pending included. A role with members cannot be deleted.

permissionsarray of objects

Everything the role allows, as { key, name } pairs.

  • keystring

    The permission key, such as workflow:run.

  • namestring

    The permission's display name.