API keys API

API keys endpoints in the Brix REST API: 4 operations (GET, POST, DELETE). Each lists its path, auth, required permission and a curl example.

View as Markdown · For AI agents: the full docs index is at /llms.txt

Base URL https://api.brixsignage.com. Send Authorization: Bearer $BRIX_API_KEY unless an operation says Auth: none or Auth: no API key. The Permission line names what the key must hold. See Authentication and scopes, Errors and rate limits and Pagination.

Every 4xx and 5xx response below returns this body:

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/api-keys

Auth: Bearer token. Permission: api-key.view.

Returns the workspace's API keys: name, assigned permissions, the location the key is pinned to (if any), and when each was created and last used. Key secrets are never returned. A key is listed only where the caller holds the API key view permission at the key's location; a workspace-wide key needs that permission for the whole workspace. Notes. - Not paginated. Revoked keys are listed too (revokedAt set).

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

Response 200: Success.

FieldTypeDescription
dataarray of ApiKey
data[].idstring
data[].namestring
data[].previewstringThe first characters of the key (ak_us_live_Ab3x), to recognise it. Not usable as a credential.
data[].permissions"all" | array of stringresource.action permissions, or "all" (every permission, now and later).
data[].nodeIdstring | nullThe location the key is pinned to (it can act only there and below). Null = workspace-wide.
data[].lastUsedAtstring | null
data[].expiresAtstring | nullNull = never expires.
data[].expiredboolean
data[].revokedAtstring | nullSet when the key was revoked; a revoked key no longer authenticates.
data[].createdAtstringISO-8601 timestamp (UTC).

Response 401: Missing, expired or revoked bearer token.

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

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

POST /v1/api-keys

Auth: Bearer token. Permission: api-key.create.

Creates a new API key. Provide name, permissions (a list of resource.action strings, or "all"), and an optional nodeId to restrict the key to one location and everything beneath it. The raw key secret is returned exactly once, in this response; only its hash is stored afterward, so it cannot be retrieved again.

Request body: application/json

FieldTypeRequiredDescription
namestringyes
permissions"all" | array of stringnoYou must hold each one where the key applies. Default [] (a key that can do nothing).
nodeIdstring | nullnoPin the key to this location. Omit for a workspace-wide key, which needs its permissions workspace-wide.
expiresInDaysnumber | nullnoDays until the key stops working (at most 3650). Omit, null or 0 = never expires.
curl -X POST "https://api.brixsignage.com/v1/api-keys" \
  -H "Authorization: Bearer $BRIX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Menu board sync","permissions":["screen.view","media.create"],"expiresInDays":365}'

Response 201: Success.

FieldTypeDescription
dataobject
data.idstring
data.namestring
data.previewstringThe first characters of the key (ak_us_live_Ab3x), to recognise it. Not usable as a credential.
data.permissions"all" | array of stringresource.action permissions, or "all" (every permission, now and later).
data.nodeIdstring | nullThe location the key is pinned to (it can act only there and below). Null = workspace-wide.
data.lastUsedAtstring | null
data.expiresAtstring | nullNull = never expires.
data.expiredboolean
data.revokedAtstring | nullSet when the key was revoked; a revoked key no longer authenticates.
data.createdAtstringISO-8601 timestamp (UTC).
data.secretstringThe full key. Shown ONLY in this response; store it now. Send it as Authorization: Bearer <secret>.

Response 401: Missing, expired or revoked bearer token.

Response 403: You do not hold every permission you grant, or not at the key's location (a workspace-wide key needs them workspace-wide). Also refused for a Brix support session.

Response 422: name missing, expiresInDays over 3650 or not a number, or nodeId not a location of this workspace.

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

DELETE /v1/api-keys/{id}

Auth: Bearer token. Permission: api-key.delete.

Revokes an API key immediately, so it can no longer be used. You must hold the permission to delete keys at or above the location the key is pinned to, not merely somewhere else in the workspace. Notes. - The key stays in the list with revokedAt set. Revoking a key again answers 200 and moves revokedAt to now.

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

Response 200: Success.

FieldTypeDescription
dataobject
data.idstring
data.revokedtrue

Response 401: Missing, expired or revoked bearer token.

Response 403: You lack api-key.delete at the key's location.

Response 404: No such key in this workspace.

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

POST /v1/api-keys/{id}/rotate

Auth: Bearer token. Permission: api-key.create.

Replaces an API key's secret with a new one, invalidating the old secret immediately. The new secret is returned exactly once, in this response. You must hold the permission to create keys at or above the location the key is pinned to. Notes. - The key keeps its id, name, permissions, location and expiry; lastUsedAt is reset to null. An expired key can be rotated and stays expired.

ParameterInTypeRequiredDescription
idpathstringyesAPI key id.
curl -X POST "https://api.brixsignage.com/v1/api-keys/{id}/rotate" \
  -H "Authorization: Bearer $BRIX_API_KEY"

Response 200: Success.

FieldTypeDescription
dataobject
data.idstring
data.namestring
data.previewstringThe first characters of the key (ak_us_live_Ab3x), to recognise it. Not usable as a credential.
data.permissions"all" | array of stringresource.action permissions, or "all" (every permission, now and later).
data.nodeIdstring | nullThe location the key is pinned to (it can act only there and below). Null = workspace-wide.
data.lastUsedAtstring | null
data.expiresAtstring | nullNull = never expires.
data.expiredboolean
data.revokedAtstring | nullSet when the key was revoked; a revoked key no longer authenticates.
data.createdAtstringISO-8601 timestamp (UTC).
data.secretstringThe full key. Shown ONLY in this response; store it now. Send it as Authorization: Bearer <secret>.

Response 401: Missing, expired or revoked bearer token.

Response 403: The key holds permissions you cannot grant at its location, you lack api-key.create there, or a Brix support session.

Response 404: No such key in this workspace.

Response 409: revoked: a revoked key cannot be rotated; create a new one.

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