Roles API

Roles endpoints in the Brix REST API: 6 operations (GET, POST, PATCH, DELETE), with auth, permissions and curl examples.

View as Markdown

Base URL https://api.brixsignage.com. Send Authorization: Bearer $BRIX_API_KEY unless an operation says No auth. The permission chip names what the key must hold. See Authentication and scopes, Errors and rate limits and Pagination.

GET/v1/roles

Bearer token permission-group.view

Returns the workspace's roles, both built-in and custom, with the permissions each one carries. **Notes.** - Not paginated.

curl "https://api.brixsignage.com/v1/roles" \
  -H "Authorization: Bearer $BRIX_API_KEY"

Response 200 Success.

FieldTypeDescription
dataarray of Role
data[].idstring
data[].namestring
data[].colorstring | nullDisplay style for the role chip.
data[].descriptionstringEmpty string when not set.
data[].builtInbooleanA role that ships with the product. It cannot be deleted, and its permissions, features and scope cannot be changed.
data[].permissions"all" | array of string`resource.action` permissions, or `"all"` (every permission, now and later).
data[].features"all" | array of stringFeature keys the role unlocks, or `"all"`.
data[].scopeobject | objectWhere the role applies: the whole workspace, or only the listed locations.
data[].characterstring | nullA decorative label. Not used for access.
data[].memberCountintegerRole assignments that use this role (one per person per location).
data[].createdAtstringISO-8601 timestamp (UTC).
data[].updatedAtstringISO-8601 timestamp (UTC).

Response 401 Missing, expired or revoked bearer token.

FieldTypeDescription
errorstringMachine-readable code: `unauthorized`, `forbidden`, `not_found`, `validation_error`, `conflict`, `rate_limited`, `internal_error`, …
messagestringHuman-readable explanation. Safe to show an operator.
requestIdstringPresent on 5xx: quote it to support.

Response 403 The token lacks the permission this operation needs (see `x-brix-permission`).

FieldTypeDescription
errorstringMachine-readable code: `unauthorized`, `forbidden`, `not_found`, `validation_error`, `conflict`, `rate_limited`, `internal_error`, …
messagestringHuman-readable explanation. Safe to show an operator.
requestIdstringPresent on 5xx: quote it to support.

Response 5XX Server error. The body carries a `requestId` to quote to support.

FieldTypeDescription
errorstringMachine-readable code: `unauthorized`, `forbidden`, `not_found`, `validation_error`, `conflict`, `rate_limited`, `internal_error`, …
messagestringHuman-readable explanation. Safe to show an operator.
requestIdstringPresent on 5xx: quote it to support.

POST/v1/roles

Bearer token permission-group.create

Creates a custom role. Provide name and permissions, a list of resource.action strings or "all". You cannot create a role that holds permissions you do not hold yourself. **Notes.** - permissions, features and scope are stored as sent: the handler does not check their shape, so a malformed value is stored and read back as it was written. - builtIn in the body is ignored.

Request body application/json

FieldTypeRequiredDescription
namestringyesRequired on create.
colorstringno
descriptionstringno
permissions"all" | array of stringnoYou must hold every permission you grant, workspace-wide. Default `[]`.
features"all" | array of stringnoDefault `[]`.
scopeobject | objectnoDefault `{ "kind": "workspace" }`.
characterstring | nullno
curl -X POST "https://api.brixsignage.com/v1/roles" \
  -H "Authorization: Bearer $BRIX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Store manager","permissions":["screen.view","screen.cast","media.view","media.create"]}'

Response 201 Success.

FieldTypeDescription
dataRoleA named set of permissions assigned to people at locations.
data.idstring
data.namestring
data.colorstring | nullDisplay style for the role chip.
data.descriptionstringEmpty string when not set.
data.builtInbooleanA role that ships with the product. It cannot be deleted, and its permissions, features and scope cannot be changed.
data.permissions"all" | array of string`resource.action` permissions, or `"all"` (every permission, now and later).
data.features"all" | array of stringFeature keys the role unlocks, or `"all"`.
data.scopeobject | objectWhere the role applies: the whole workspace, or only the listed locations.
data.characterstring | nullA decorative label. Not used for access.
data.memberCountintegerRole assignments that use this role (one per person per location).
data.createdAtstringISO-8601 timestamp (UTC).
data.updatedAtstringISO-8601 timestamp (UTC).

Response 401 Missing, expired or revoked bearer token.

FieldTypeDescription
errorstringMachine-readable code: `unauthorized`, `forbidden`, `not_found`, `validation_error`, `conflict`, `rate_limited`, `internal_error`, …
messagestringHuman-readable explanation. Safe to show an operator.
requestIdstringPresent on 5xx: quote it to support.

Response 403 `permissions` holds a permission you do not hold workspace-wide.

FieldTypeDescription
errorstringMachine-readable code: `unauthorized`, `forbidden`, `not_found`, `validation_error`, `conflict`, `rate_limited`, `internal_error`, …
messagestringHuman-readable explanation. Safe to show an operator.
requestIdstringPresent on 5xx: quote it to support.

Response 422 `name` missing.

FieldTypeDescription
errorstringMachine-readable code: `unauthorized`, `forbidden`, `not_found`, `validation_error`, `conflict`, `rate_limited`, `internal_error`, …
messagestringHuman-readable explanation. Safe to show an operator.
requestIdstringPresent on 5xx: quote it to support.

Response 5XX Server error. The body carries a `requestId` to quote to support.

FieldTypeDescription
errorstringMachine-readable code: `unauthorized`, `forbidden`, `not_found`, `validation_error`, `conflict`, `rate_limited`, `internal_error`, …
messagestringHuman-readable explanation. Safe to show an operator.
requestIdstringPresent on 5xx: quote it to support.

GET/v1/roles/{id}

Bearer token permission-group.view

Returns one role with its full list of permissions.

ParameterInTypeRequiredDescription
idpathstringyesRole id.
curl "https://api.brixsignage.com/v1/roles/{id}" \
  -H "Authorization: Bearer $BRIX_API_KEY"

Response 200 Success.

FieldTypeDescription
dataRoleA named set of permissions assigned to people at locations.
data.idstring
data.namestring
data.colorstring | nullDisplay style for the role chip.
data.descriptionstringEmpty string when not set.
data.builtInbooleanA role that ships with the product. It cannot be deleted, and its permissions, features and scope cannot be changed.
data.permissions"all" | array of string`resource.action` permissions, or `"all"` (every permission, now and later).
data.features"all" | array of stringFeature keys the role unlocks, or `"all"`.
data.scopeobject | objectWhere the role applies: the whole workspace, or only the listed locations.
data.characterstring | nullA decorative label. Not used for access.
data.memberCountintegerRole assignments that use this role (one per person per location).
data.createdAtstringISO-8601 timestamp (UTC).
data.updatedAtstringISO-8601 timestamp (UTC).

Response 401 Missing, expired or revoked bearer token.

FieldTypeDescription
errorstringMachine-readable code: `unauthorized`, `forbidden`, `not_found`, `validation_error`, `conflict`, `rate_limited`, `internal_error`, …
messagestringHuman-readable explanation. Safe to show an operator.
requestIdstringPresent on 5xx: quote it to support.

Response 403 The token lacks the permission this operation needs (see `x-brix-permission`).

FieldTypeDescription
errorstringMachine-readable code: `unauthorized`, `forbidden`, `not_found`, `validation_error`, `conflict`, `rate_limited`, `internal_error`, …
messagestringHuman-readable explanation. Safe to show an operator.
requestIdstringPresent on 5xx: quote it to support.

Response 404 No such role in this workspace (or it is deleted).

FieldTypeDescription
errorstringMachine-readable code: `unauthorized`, `forbidden`, `not_found`, `validation_error`, `conflict`, `rate_limited`, `internal_error`, …
messagestringHuman-readable explanation. Safe to show an operator.
requestIdstringPresent on 5xx: quote it to support.

Response 5XX Server error. The body carries a `requestId` to quote to support.

FieldTypeDescription
errorstringMachine-readable code: `unauthorized`, `forbidden`, `not_found`, `validation_error`, `conflict`, `rate_limited`, `internal_error`, …
messagestringHuman-readable explanation. Safe to show an operator.
requestIdstringPresent on 5xx: quote it to support.

PATCH/v1/roles/{id}

Bearer token permission-group.edit

Updates a role. The same rule as creating a role applies: you cannot add or remove a permission you do not hold yourself. Only a signed-in account owner can take full ownership away from a role that people hold; an API key cannot. On a built-in role, only the name, color and description change; its permissions, features and scope stay fixed. **Notes.** - permissions, features and scope are stored as sent: the handler does not check their shape, so a malformed value is stored and read back as it was written. - builtIn in the body is ignored. - On a built-in role, permissions, features and scope are ignored without an error; only name, color, description and character change.

ParameterInTypeRequiredDescription
idpathstringyesRole id.

Request body application/json

FieldTypeRequiredDescription
namestringnoRequired on create.
colorstringno
descriptionstringno
permissions"all" | array of stringnoYou must hold every permission you grant, workspace-wide. Default `[]`.
features"all" | array of stringnoDefault `[]`.
scopeobject | objectnoDefault `{ "kind": "workspace" }`.
characterstring | nullno
curl -X PATCH "https://api.brixsignage.com/v1/roles/{id}" \
  -H "Authorization: Bearer $BRIX_API_KEY" \
  -H "Content-Type: application/json"

Response 200 Success.

FieldTypeDescription
dataRoleA named set of permissions assigned to people at locations.
data.idstring
data.namestring
data.colorstring | nullDisplay style for the role chip.
data.descriptionstringEmpty string when not set.
data.builtInbooleanA role that ships with the product. It cannot be deleted, and its permissions, features and scope cannot be changed.
data.permissions"all" | array of string`resource.action` permissions, or `"all"` (every permission, now and later).
data.features"all" | array of stringFeature keys the role unlocks, or `"all"`.
data.scopeobject | objectWhere the role applies: the whole workspace, or only the listed locations.
data.characterstring | nullA decorative label. Not used for access.
data.memberCountintegerRole assignments that use this role (one per person per location).
data.createdAtstringISO-8601 timestamp (UTC).
data.updatedAtstringISO-8601 timestamp (UTC).

Response 401 Missing, expired or revoked bearer token.

FieldTypeDescription
errorstringMachine-readable code: `unauthorized`, `forbidden`, `not_found`, `validation_error`, `conflict`, `rate_limited`, `internal_error`, …
messagestringHuman-readable explanation. Safe to show an operator.
requestIdstringPresent on 5xx: quote it to support.

Response 403 You would add or remove a permission you do not hold workspace-wide, or change `scope` of a role whose permissions you do not hold workspace-wide; `owner_required`: the change takes full ownership away from a role people hold, and the caller is not a signed-in owner (an API key never is).

FieldTypeDescription
errorstringMachine-readable code: `unauthorized`, `forbidden`, `not_found`, `validation_error`, `conflict`, `rate_limited`, `internal_error`, …
messagestringHuman-readable explanation. Safe to show an operator.
requestIdstringPresent on 5xx: quote it to support.

Response 404 No such role in this workspace.

FieldTypeDescription
errorstringMachine-readable code: `unauthorized`, `forbidden`, `not_found`, `validation_error`, `conflict`, `rate_limited`, `internal_error`, …
messagestringHuman-readable explanation. Safe to show an operator.
requestIdstringPresent on 5xx: quote it to support.

Response 409 `last_owner_role`: this is the only role with full ownership.

FieldTypeDescription
errorstringMachine-readable code: `unauthorized`, `forbidden`, `not_found`, `validation_error`, `conflict`, `rate_limited`, `internal_error`, …
messagestringHuman-readable explanation. Safe to show an operator.
requestIdstringPresent on 5xx: quote it to support.

Response 5XX Server error. The body carries a `requestId` to quote to support.

FieldTypeDescription
errorstringMachine-readable code: `unauthorized`, `forbidden`, `not_found`, `validation_error`, `conflict`, `rate_limited`, `internal_error`, …
messagestringHuman-readable explanation. Safe to show an operator.
requestIdstringPresent on 5xx: quote it to support.

DELETE/v1/roles/{id}

Bearer token permission-group.delete

Soft-deletes a custom role. The role can later be restored. Refuses the request while anyone is still assigned to the role.

ParameterInTypeRequiredDescription
idpathstringyesRole id.
curl -X DELETE "https://api.brixsignage.com/v1/roles/{id}" \
  -H "Authorization: Bearer $BRIX_API_KEY"

Response 200 Success.

FieldTypeDescription
dataobject
data.idstring
data.deletedtrue

Response 401 Missing, expired or revoked bearer token.

FieldTypeDescription
errorstringMachine-readable code: `unauthorized`, `forbidden`, `not_found`, `validation_error`, `conflict`, `rate_limited`, `internal_error`, …
messagestringHuman-readable explanation. Safe to show an operator.
requestIdstringPresent on 5xx: quote it to support.

Response 403 The token lacks the permission this operation needs (see `x-brix-permission`).

FieldTypeDescription
errorstringMachine-readable code: `unauthorized`, `forbidden`, `not_found`, `validation_error`, `conflict`, `rate_limited`, `internal_error`, …
messagestringHuman-readable explanation. Safe to show an operator.
requestIdstringPresent on 5xx: quote it to support.

Response 404 No such role in this workspace.

FieldTypeDescription
errorstringMachine-readable code: `unauthorized`, `forbidden`, `not_found`, `validation_error`, `conflict`, `rate_limited`, `internal_error`, …
messagestringHuman-readable explanation. Safe to show an operator.
requestIdstringPresent on 5xx: quote it to support.

Response 409 `protected` (a built-in role), `last_owner_role`, or `in_use` (people still hold the role).

FieldTypeDescription
errorstringMachine-readable code: `unauthorized`, `forbidden`, `not_found`, `validation_error`, `conflict`, `rate_limited`, `internal_error`, …
messagestringHuman-readable explanation. Safe to show an operator.
requestIdstringPresent on 5xx: quote it to support.

Response 5XX Server error. The body carries a `requestId` to quote to support.

FieldTypeDescription
errorstringMachine-readable code: `unauthorized`, `forbidden`, `not_found`, `validation_error`, `conflict`, `rate_limited`, `internal_error`, …
messagestringHuman-readable explanation. Safe to show an operator.
requestIdstringPresent on 5xx: quote it to support.

POST/v1/roles/{id}/restore

Bearer token permission-group.delete

Restores a previously deleted custom role. Requires the same permission needed to delete a role. **Notes.** - Answers the whole restored role, not the { id, restored } acknowledgement other restores use.

ParameterInTypeRequiredDescription
idpathstringyesRole id.
curl -X POST "https://api.brixsignage.com/v1/roles/{id}/restore" \
  -H "Authorization: Bearer $BRIX_API_KEY"

Response 200 Success.

FieldTypeDescription
dataRoleA named set of permissions assigned to people at locations.
data.idstring
data.namestring
data.colorstring | nullDisplay style for the role chip.
data.descriptionstringEmpty string when not set.
data.builtInbooleanA role that ships with the product. It cannot be deleted, and its permissions, features and scope cannot be changed.
data.permissions"all" | array of string`resource.action` permissions, or `"all"` (every permission, now and later).
data.features"all" | array of stringFeature keys the role unlocks, or `"all"`.
data.scopeobject | objectWhere the role applies: the whole workspace, or only the listed locations.
data.characterstring | nullA decorative label. Not used for access.
data.memberCountintegerRole assignments that use this role (one per person per location).
data.createdAtstringISO-8601 timestamp (UTC).
data.updatedAtstringISO-8601 timestamp (UTC).

Response 401 Missing, expired or revoked bearer token.

FieldTypeDescription
errorstringMachine-readable code: `unauthorized`, `forbidden`, `not_found`, `validation_error`, `conflict`, `rate_limited`, `internal_error`, …
messagestringHuman-readable explanation. Safe to show an operator.
requestIdstringPresent on 5xx: quote it to support.

Response 403 The token lacks the permission this operation needs (see `x-brix-permission`).

FieldTypeDescription
errorstringMachine-readable code: `unauthorized`, `forbidden`, `not_found`, `validation_error`, `conflict`, `rate_limited`, `internal_error`, …
messagestringHuman-readable explanation. Safe to show an operator.
requestIdstringPresent on 5xx: quote it to support.

Response 404 No such role in this workspace.

FieldTypeDescription
errorstringMachine-readable code: `unauthorized`, `forbidden`, `not_found`, `validation_error`, `conflict`, `rate_limited`, `internal_error`, …
messagestringHuman-readable explanation. Safe to show an operator.
requestIdstringPresent on 5xx: quote it to support.

Response 409 `not_deleted`: the role is not deleted.

FieldTypeDescription
errorstringMachine-readable code: `unauthorized`, `forbidden`, `not_found`, `validation_error`, `conflict`, `rate_limited`, `internal_error`, …
messagestringHuman-readable explanation. Safe to show an operator.
requestIdstringPresent on 5xx: quote it to support.

Response 5XX Server error. The body carries a `requestId` to quote to support.

FieldTypeDescription
errorstringMachine-readable code: `unauthorized`, `forbidden`, `not_found`, `validation_error`, `conflict`, `rate_limited`, `internal_error`, …
messagestringHuman-readable explanation. Safe to show an operator.
requestIdstringPresent on 5xx: quote it to support.