Roles & permissions

Roles bundle permissions. Built-in roles (Global Administrator, RMM Technician, PSA Admin…) can't be changed; organisations can create custom roles from the permission catalogue and give them to people.

MethodPathSummary
GET/v1/admin/tenant/applicationsList the platform-wide application catalog
GET/v1/admin/tenant/permissionsList the full platform permission catalog
GET/v1/admin/tenant/rolesList all roles with their application and assigned-user count
GET/v1/admin/tenant/roles/:idGet a role with its full permission checklist
GET/v1/admin/tenant/roles/:id/membersList the users in this tenant who hold a role
POST/v1/admin/tenant/roles/:id/membersGive a user in this tenant a role
DELETE/v1/admin/tenant/roles/:id/members/:userIdTake a role away from a user in this tenant
POST/v1/admin/tenant/rolesCreate a custom role
PATCH/v1/admin/tenant/roles/:idUpdate a custom role's description and permissions
DELETE/v1/admin/tenant/roles/:idDelete a custom role

#List the platform-wide application catalog

GET/v1/admin/tenant/applications

List the platform-wide application catalog. Requires the GLOBAL_ADMIN role. Not filtered to what this tenant has licensed — used to populate the "which app does this role apply to" dropdown when creating a role.

Address
https://<your-org>.brambleit.cloud/api/v1/admin/tenant/applications
Requires
Signed-in session, X-API-Key, or a Bramble app access token (Authorization: Bearer).
Role: GLOBAL_ADMIN.

Response 200

FieldTypeDescription
applicationsarray of object
applications[].idinteger
applications[].namestring
applications[].logostring
Example response
JSON
{
  "applications": [
    {
      "id": 42,
      "name": "Example name",
      "logo": "string"
    }
  ]
}

Example request

Bash
curl -X GET 'https://<your-org>.brambleit.cloud/api/v1/admin/tenant/applications' \
  -H "X-API-Key: $BRAMBLE_KEY"

#List the full platform permission catalog

GET/v1/admin/tenant/permissions

List the full platform permission catalog. Requires the GLOBAL_ADMIN role. Global, not per-tenant. Used to render a checklist when creating a new role, before it has any granted permissions of its own.

Address
https://<your-org>.brambleit.cloud/api/v1/admin/tenant/permissions
Requires
Signed-in session, X-API-Key, or a Bramble app access token (Authorization: Bearer).
Role: GLOBAL_ADMIN.

Response 200

FieldTypeDescription
permissionsarray of object
permissions[].idinteger
permissions[].slugstring
permissions[].display_namestring
permissions[].descriptionstring, or null
permissions[].application_idinteger, or null
permissions[].categorystring, or null
Example response
JSON
{
  "permissions": [
    {
      "id": 42,
      "slug": "example",
      "display_name": "Example display name",
      "description": "string",
      "application_id": 7,
      "category": "string"
    }
  ]
}

Example request

Bash
curl -X GET 'https://<your-org>.brambleit.cloud/api/v1/admin/tenant/permissions' \
  -H "X-API-Key: $BRAMBLE_KEY"

#List all roles with their application and assigned-user count

GET/v1/admin/tenant/roles

List all roles with their application and assigned-user count. Requires the GLOBAL_ADMIN role.

Address
https://<your-org>.brambleit.cloud/api/v1/admin/tenant/roles
Requires
Signed-in session, X-API-Key, or a Bramble app access token (Authorization: Bearer).
Role: GLOBAL_ADMIN.

Response 200

FieldTypeDescription
rolesarray of object
roles[].idinteger
roles[].slugstring
roles[].display_namestring
roles[].descriptionstring, or null
roles[].application_idinteger, or null
roles[].application_namestring
roles[].is_systemboolean
roles[].user_countboolean
Example response
JSON
{
  "roles": [
    {
      "id": 42,
      "slug": "example",
      "display_name": "Example display name",
      "description": "string",
      "application_id": 7,
      "application_name": "Example application name",
      "is_system": true,
      "user_count": false
    }
  ]
}

Example request

Bash
curl -X GET 'https://<your-org>.brambleit.cloud/api/v1/admin/tenant/roles' \
  -H "X-API-Key: $BRAMBLE_KEY"

#Get a role with its full permission checklist

GET/v1/admin/tenant/roles/:id

Get a role with its full permission checklist. Requires the GLOBAL_ADMIN role. Returns every permission applicable to the role's application (or global permissions if application_id is null), each flagged with whether it's currently granted.

Address
https://<your-org>.brambleit.cloud/api/v1/admin/tenant/roles/:id
Requires
Signed-in session, X-API-Key, or a Bramble app access token (Authorization: Bearer).
Role: GLOBAL_ADMIN.

Path parameters

NameTypeDescription
idrequiredinteger

Response 200

FieldTypeDescription
roleany
permissionsarray of any
Example response
JSON
{
  "role": null,
  "permissions": []
}

Errors

StatusMessage
404Role not found

Example request

Bash
curl -X GET 'https://<your-org>.brambleit.cloud/api/v1/admin/tenant/roles/42' \
  -H "X-API-Key: $BRAMBLE_KEY"

#List the users in this tenant who hold a role

GET/v1/admin/tenant/roles/:id/members

List the users in this tenant who hold a role. Requires the GLOBAL_ADMIN role.

Address
https://<your-org>.brambleit.cloud/api/v1/admin/tenant/roles/:id/members
Requires
Signed-in session, X-API-Key, or a Bramble app access token (Authorization: Bearer).
Role: GLOBAL_ADMIN.

Path parameters

NameTypeDescription
idrequiredinteger

Response 200

FieldTypeDescription
membersarray of any
Example response
JSON
{
  "members": []
}

Example request

Bash
curl -X GET 'https://<your-org>.brambleit.cloud/api/v1/admin/tenant/roles/42/members' \
  -H "X-API-Key: $BRAMBLE_KEY"

#Give a user in this tenant a role

POST/v1/admin/tenant/roles/:id/members

Give a user in this tenant a role. Requires the GLOBAL_ADMIN role. Idempotent.

Address
https://<your-org>.brambleit.cloud/api/v1/admin/tenant/roles/:id/members
Requires
Signed-in session, X-API-Key, or a Bramble app access token (Authorization: Bearer).
Role: GLOBAL_ADMIN.

Path parameters

NameTypeDescription
idrequiredinteger

Request body JSON

NameTypeDescription
user_idinteger

Response 200

FieldTypeDescription
successboolean
Example response
JSON
{
  "success": true
}

Errors

StatusMessage
404Role not found
404User not found

Example request

Bash
curl -X POST 'https://<your-org>.brambleit.cloud/api/v1/admin/tenant/roles/42/members' \
  -H "X-API-Key: $BRAMBLE_KEY" \
  -H "Content-Type: application/json" \
  -d '{"user_id":7}'

#Take a role away from a user in this tenant

DELETE/v1/admin/tenant/roles/:id/members/:userId

Take a role away from a user in this tenant. Requires the GLOBAL_ADMIN role. Refuses to remove the tenant's last Global Administrator, or your own Global Administrator role.

Address
https://<your-org>.brambleit.cloud/api/v1/admin/tenant/roles/:id/members/:userId
Requires
Signed-in session, X-API-Key, or a Bramble app access token (Authorization: Bearer).
Role: GLOBAL_ADMIN.

Path parameters

NameTypeDescription
idrequiredinteger
userIdrequirednumber

Response 200

FieldTypeDescription
successboolean
Example response
JSON
{
  "success": true
}

Errors

StatusMessage
404Role not found
404User not found
409You can't remove your own Global Administrator role. Ask another Global Administrator.
409This is the organisation's only Global Administrator.

Example request

Bash
curl -X DELETE 'https://<your-org>.brambleit.cloud/api/v1/admin/tenant/roles/42/members/12.5' \
  -H "X-API-Key: $BRAMBLE_KEY"

#Create a custom role

POST/v1/admin/tenant/roles

Create a custom role. Requires the GLOBAL_ADMIN role. slug is auto-derived from display_name (uppercased, non-alphanumerics collapsed to underscores). New roles are always is_system=0.

Address
https://<your-org>.brambleit.cloud/api/v1/admin/tenant/roles
Requires
Signed-in session, X-API-Key, or a Bramble app access token (Authorization: Bearer).
Role: GLOBAL_ADMIN.

Request body JSON

NameTypeDescription
display_namerequiredstringThe role's name.
descriptionstringWhat the role is for.
application_idstringThe app the role belongs to (optional).
permission_idsarray of anyPermission ids from GET /v1/admin/tenant/permissions.

Response 201

FieldTypeDescription
successboolean
roleobject
role.idinteger
role.slugstring
role.display_namestring
Example response
JSON
{
  "success": true,
  "role": {
    "id": 42,
    "slug": "example",
    "display_name": "Example display name"
  }
}

Errors

StatusMessage
400display_name is required
400display_name must contain at least one letter or number
409A role with that name already exists

Example request

Bash
curl -X POST 'https://<your-org>.brambleit.cloud/api/v1/admin/tenant/roles' \
  -H "X-API-Key: $BRAMBLE_KEY" \
  -H "Content-Type: application/json" \
  -d '{"display_name":"Example display name","description":"string","application_id":"string","permission_ids":[]}'

#Update a custom role's description and permissions

PATCH/v1/admin/tenant/roles/:id

Update a custom role's description and permissions. Requires the GLOBAL_ADMIN role. System roles (GLOBAL_ADMIN/USER/RMM_ADMIN) cannot be edited.

Address
https://<your-org>.brambleit.cloud/api/v1/admin/tenant/roles/:id
Requires
Signed-in session, X-API-Key, or a Bramble app access token (Authorization: Bearer).
Role: GLOBAL_ADMIN.

Path parameters

NameTypeDescription
idrequiredinteger

Request body JSON

NameTypeDescription
display_namestring
descriptionstring
permission_idsarray of any

Response 200

FieldTypeDescription
successboolean
Example response
JSON
{
  "success": true
}

Errors

StatusMessage
404Role not found
403Built-in roles can't be edited. Create a custom role instead.

Example request

Bash
curl -X PATCH 'https://<your-org>.brambleit.cloud/api/v1/admin/tenant/roles/42' \
  -H "X-API-Key: $BRAMBLE_KEY" \
  -H "Content-Type: application/json" \
  -d '{"display_name":"Example display name","description":"string","permission_ids":[]}'

#Delete a custom role

DELETE/v1/admin/tenant/roles/:id

Delete a custom role. Requires the GLOBAL_ADMIN role. System roles cannot be deleted. If users currently hold the role, the request is rejected unless force=true is passed.

Address
https://<your-org>.brambleit.cloud/api/v1/admin/tenant/roles/:id
Requires
Signed-in session, X-API-Key, or a Bramble app access token (Authorization: Bearer).
Role: GLOBAL_ADMIN.

Path parameters

NameTypeDescription
idrequiredinteger

Query parameters

NameTypeDescription
forcestring

Response 200

FieldTypeDescription
successboolean
Example response
JSON
{
  "success": true
}

Errors

StatusMessage
404Role not found
403Built-in roles can't be deleted
409… user(s) currently hold this role. Reassign them first, or pass ?force=true to delete anyway.

Example request

Bash
curl -X DELETE 'https://<your-org>.brambleit.cloud/api/v1/admin/tenant/roles/42' \
  -H "X-API-Key: $BRAMBLE_KEY"