Every API here is available over the APIs.io API and to AI agents over MCP.
openapi: 3.2.0
info:
title: Brix App Instances API
version: '1'
summary: 'Control plane for Brix digital signage: screens, content, playlists, schedules, casts and emergencies.'
description: 'Generated from the route table the API actually mounts
(`apps/api/routes.snapshot.json`), the description each route is required to
carry (`tests/contracts/route-registry.json`), and request/response schemas
(`apps/api/src/openapi/`). CI enforces all three, so this document cannot list a
route that does not exist or omit one that does.
**Schemas.** 447 operations carry request and response schemas
(`x-brix-schema: verified`). Each is checked in CI against the response the
real handler returns — a missing, mistyped or undeclared field fails the build.
The remaining operations are route-level only (`x-brix-schema: none`): their
path, method, permission and purpose are exact, but the shape of `data` is not
yet modelled, and we would rather say so than publish a schema that validates
against nothing. Objects are open: a new field is not a breaking change.
**Envelope.** Success bodies are `{ "data": … }`. Failures are
`{ "error": "", "message": "…" }`, plus `requestId` on a 5xx.
Many list routes page opt-in (see each operation): pass `?limit=` and
follow `nextCursor` via `?cursor=` until it is null.
**Authentication.** `Authorization: Bearer ` with an API key
(`ak_…`, created in the console under Settings → API & MCP) or a user session. An
API key carries a creator-chosen set of `resource.verb` permissions and may be
pinned to one location''s subtree; a key can never be granted a permission its
creator does not hold. The permission an operation needs is in
`x-brix-permission` and in its security requirement.
**Tenancy.** Every request resolves to one workspace. A resource belonging to
another tenant returns 404, never 403, so a response never confirms that an
account exists.
**Rate limits.** A 429 carries `Retry-After`; a 503 `database_busy` means retry
after the `Retry-After` interval.'
servers:
- url: https://api.brixsignage.com
description: Production
security:
- bearerAuth: []
tags:
- name: app-instances
paths:
/v1/app-instances:
get:
operationId: listAppInstances
tags:
- app-instances
summary: List app instances
description: List every app configured in the workspace, including its id, `appKey`, name, configuration, and node. This is the data behind the My apps grid.
x-brix-permission: app-instance.view
x-brix-schema: verified
parameters:
- name: limit
in: query
required: false
schema:
type: integer
minimum: 1
maximum: 200
description: Page size. Omit to get every row; pass it to page by `cursor`.
- name: cursor
in: query
required: false
schema:
type: string
description: The `nextCursor` of the previous page.
- name: count
in: query
required: false
schema:
type: string
enum:
- '1'
description: 'With `limit`: also return `total`, the number of matching rows.'
- name: usableAt
in: query
required: false
schema:
type: string
description: 'Location id: only rows usable at that location (homed there, at the workspace root, or shared to it).'
responses:
'200':
description: Success.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/AppInstance'
nextCursor:
description: Present when `?limit` was passed. Send it back as `?cursor=` for the next page; null on the last page.
anyOf:
- type: string
- type: 'null'
total:
description: Total matching rows, when the route computes it.
type: integer
required:
- data
example:
data:
- id: app_3c4d5e6f7a8b9c0d
spaceId: space_1a2b3c4d5e6f7a8b
appKey: clock
name: Lobby clock
config:
format: 24h
nodeId: null
lastSnapshotKey: null
lastSnapshotAt: null
importSourceId: null
createdAt: '2026-09-28T09:00:00.000Z'
updatedAt: '2026-09-28T09:00:00.000Z'
deletedAt: null
'401':
description: Missing, expired or revoked bearer token.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: The token lacks the permission this operation needs (see `x-brix-permission`).
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
5XX:
description: Server error. The body carries a `requestId` to quote to support.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
security:
- bearerAuth:
- app-instance.view
post:
operationId: createAppInstance
tags:
- app-instances
summary: Create an app instance
description: 'Configure an app for the workspace with an `appKey`, `name`, and optional `config` and `nodeId`. `appKey` must match one of the apps offered by the store; list the available keys first with GET /v1/apps/catalog.
**Notes.**
- The 201 body is the row as written, not re-read from the database, so columns the create does not set (for example `lastSnapshotAt`) are absent rather than null. `GET` returns every column.'
x-brix-permission: app-instance.create
x-brix-schema: verified
x-brix-notes:
- The 201 body is the row as written, not re-read from the database, so columns the create does not set (for example `lastSnapshotAt`) are absent rather than null. `GET` returns every column.
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
appKey:
type: string
description: A key from `GET /v1/apps/catalog`. An unknown key is refused (422 `unknown_app`).
name:
type: string
config:
description: 'The app''s settings: a JSON object, or the same as a JSON string. Default `{}`.'
anyOf:
- type: object
propertyNames:
type: string
additionalProperties: {}
- type: string
nodeId:
description: 'Home location. Default: the caller''s own location.'
anyOf:
- type: string
- type: 'null'
required:
- appKey
- name
example:
appKey: clock
name: Lobby clock
config:
format: 24h
responses:
'201':
description: Success.
content:
application/json:
schema:
type: object
properties:
data:
type: object
properties:
id:
type: string
description: App instance id.
examples:
- app_3c4d5e6f7a8b9c0d
spaceId:
type: string
description: Workspace id.
appKey:
type: string
description: 'The app type: a key from `GET /v1/apps/catalog` (`clock`, `weather`, `rss`, …).'
name:
type: string
config:
description: The app's settings (JSON). The keys depend on `appKey`.
nodeId:
description: Home location, when one was set or derived.
anyOf:
- type: string
- type: 'null'
lastSnapshotKey:
anyOf:
- type: string
- type: 'null'
lastSnapshotAt:
anyOf:
- type: string
description: ISO-8601 timestamp (UTC).
- type: 'null'
importSourceId:
anyOf:
- type: string
- type: 'null'
createdAt:
type: string
description: ISO-8601 timestamp (UTC).
updatedAt:
type: string
description: ISO-8601 timestamp (UTC).
deletedAt:
anyOf:
- type: string
description: ISO-8601 timestamp (UTC).
- type: 'null'
description: 'Always null on these reads: deleted rows are not listed.'
required:
- id
- spaceId
- appKey
- name
- config
- createdAt
- updatedAt
- deletedAt
required:
- data
example:
data:
id: app_3c4d5e6f7a8b9c0d
spaceId: space_1a2b3c4d5e6f7a8b
appKey: clock
name: Lobby clock
config:
format: 24h
createdAt: '2026-09-28T09:00:00.000Z'
updatedAt: '2026-09-28T09:00:00.000Z'
deletedAt: null
'401':
description: Missing, expired or revoked bearer token.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: The token lacks the permission this operation needs (see `x-brix-permission`).
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'422':
description: Missing `appKey`/`name`, invalid JSON config, unknown app (`unknown_app`), or a location outside this workspace.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
5XX:
description: Server error. The body carries a `requestId` to quote to support.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
security:
- bearerAuth:
- app-instance.create
/v1/app-instances/{id}:
delete:
operationId: deleteAppInstance
tags:
- app-instances
summary: Delete an app instance
description: Delete a configured app instance. Screens and playlists that reference it stop showing it.
x-brix-permission: app-instance.delete
x-brix-schema: verified
parameters:
- name: id
in: path
required: true
schema:
type: string
description: App instance id.
example: app_3c4d5e6f7a8b9c0d
- name: force
in: query
required: false
schema:
type: string
enum:
- 'true'
description: Delete even when it is shared into other places; the shares go with it.
responses:
'200':
description: Success.
content:
application/json:
schema:
type: object
properties:
data:
type: object
properties:
id:
type: string
deleted:
type: boolean
const: true
sharesRemoved:
type: integer
description: Shares removed with it.
required:
- id
- deleted
- sharesRemoved
required:
- data
'401':
description: Missing, expired or revoked bearer token.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: The token lacks the permission this operation needs (see `x-brix-permission`).
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: No such app instance in this workspace.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'409':
description: '`content_shared`: it is shared into other places; `shareCount`, `crossSpaceShares`, `contentShares` say where. Repeat with `?force=true` to delete it and those shares.'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
5XX:
description: Server error. The body carries a `requestId` to quote to support.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
security:
- bearerAuth:
- app-instance.delete
get:
operationId: getAppInstance
tags:
- app-instances
summary: Get an app instance
description: Retrieve one configured app instance, including its full configuration.
x-brix-permission: app-instance.view
x-brix-schema: verified
parameters:
- name: id
in: path
required: true
schema:
type: string
description: App instance id.
example: app_3c4d5e6f7a8b9c0d
responses:
'200':
description: Success.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/AppInstance'
required:
- data
'401':
description: Missing, expired or revoked bearer token.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: The token lacks the permission this operation needs (see `x-brix-permission`).
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: No such app instance in this workspace.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
5XX:
description: Server error. The body carries a `requestId` to quote to support.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
security:
- bearerAuth:
- app-instance.view
patch:
operationId: updateAppInstance
tags:
- app-instances
summary: Update an app instance
description: Edit a configured app's name, configuration, or node. `config` replaces the entire configuration, so read the current value first before submitting changes.
x-brix-permission: app-instance.edit
x-brix-schema: verified
parameters:
- name: id
in: path
required: true
schema:
type: string
description: App instance id.
example: app_3c4d5e6f7a8b9c0d
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
appKey:
type: string
description: A key from `GET /v1/apps/catalog`. An unknown key is refused (422 `unknown_app`).
name:
type: string
config:
description: 'The app''s settings: a JSON object, or the same as a JSON string. Default `{}`.'
anyOf:
- type: object
propertyNames:
type: string
additionalProperties: {}
- type: string
nodeId:
description: 'Home location. Default: the caller''s own location.'
anyOf:
- type: string
- type: 'null'
baseUpdatedAt:
description: 'Optimistic concurrency: the `updatedAt` you read. A stale value is refused with 409 `conflict` and the `current` row.'
type: string
responses:
'200':
description: Success.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/AppInstance'
required:
- data
'401':
description: Missing, expired or revoked bearer token.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: The token lacks the permission this operation needs (see `x-brix-permission`).
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: No such app instance in this workspace.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'409':
description: '`conflict`: the row changed since `baseUpdatedAt`; the body carries `current`.'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'422':
description: Invalid JSON config or unknown app.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
5XX:
description: Server error. The body carries a `requestId` to quote to support.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
security:
- bearerAuth:
- app-instance.edit
/v1/app-instances/{id}/duplicate:
post:
operationId: duplicateAppInstance
tags:
- app-instances
summary: Duplicate an app instance
description: 'Create a copy of a configured app instance, including its configuration and home node, named " copy". Use this to reuse a tuned configuration instead of re-entering it. Requires permission to create app instances at the source instance''s node.
**Notes.**
- The 201 body is the row as written, not re-read from the database, so columns the create does not set (for example `lastSnapshotAt`) are absent rather than null. `GET` returns every column.'
x-brix-permission: app-instance.create
x-brix-schema: verified
x-brix-notes:
- The 201 body is the row as written, not re-read from the database, so columns the create does not set (for example `lastSnapshotAt`) are absent rather than null. `GET` returns every column.
parameters:
- name: id
in: path
required: true
schema:
type: string
description: App instance id.
example: app_3c4d5e6f7a8b9c0d
responses:
'201':
description: Success.
content:
application/json:
schema:
type: object
properties:
data:
type: object
properties:
id:
type: string
description: App instance id.
examples:
- app_3c4d5e6f7a8b9c0d
spaceId:
type: string
description: Workspace id.
appKey:
type: string
description: 'The app type: a key from `GET /v1/apps/catalog` (`clock`, `weather`, `rss`, …).'
name:
type: string
config:
description: The app's settings (JSON). The keys depend on `appKey`.
nodeId:
description: Home location, when one was set or derived.
anyOf:
- type: string
- type: 'null'
lastSnapshotKey:
anyOf:
- type: string
- type: 'null'
lastSnapshotAt:
anyOf:
- type: string
description: ISO-8601 timestamp (UTC).
- type: 'null'
importSourceId:
anyOf:
- type: string
- type: 'null'
createdAt:
type: string
description: ISO-8601 timestamp (UTC).
updatedAt:
type: string
description: ISO-8601 timestamp (UTC).
deletedAt:
anyOf:
- type: string
description: ISO-8601 timestamp (UTC).
- type: 'null'
description: 'Always null on these reads: deleted rows are not listed.'
required:
- id
- spaceId
- appKey
- name
- config
- createdAt
- updatedAt
- deletedAt
required:
- data
'401':
description: Missing, expired or revoked bearer token.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: The token lacks the permission this operation needs (see `x-brix-permission`).
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: No such app instance in this workspace.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
5XX:
description: Server error. The body carries a `requestId` to quote to support.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
security:
- bearerAuth:
- app-instance.create
/v1/app-instances/{id}/restore:
post:
operationId: restoreAppInstance
tags:
- app-instances
summary: Restore a deleted app instance
description: Restore an app instance that was deleted within the last 30 days. The shares removed by the delete come back. Playlist items removed by the delete do not come back; add the app to those playlists again.
x-brix-permission: app-instance.delete
x-brix-schema: verified
parameters:
- name: id
in: path
required: true
schema:
type: string
description: App instance id.
example: app_3c4d5e6f7a8b9c0d
responses:
'200':
description: Success.
content:
application/json:
schema:
type: object
properties:
data:
type: object
properties:
id:
type: string
restored:
type: boolean
const: true
required:
- id
- restored
required:
- data
'401':
description: Missing, expired or revoked bearer token.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: The token lacks the permission this operation needs (see `x-brix-permission`).
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: No such app instance in this workspace, or it was purged.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'409':
description: '`not_deleted`: it is not in the recycle bin.'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
5XX:
description: Server error. The body carries a `requestId` to quote to support.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
security:
- bearerAuth:
- app-instance.delete
/v1/app-instances/{id}/thumbnail:
get:
operationId: getAppInstanceThumbnail
tags:
- app-instances
summary: Get an app instance thumbnail
description: 'Retrieve a shared preview image of an app instance. The same image is reused everywhere the app is previewed, so it loads quickly. Add `?fresh=1` to force a new image to be generated after a configuration change.
**Notes.**
- A cached image is `image/jpeg`. When there is none yet, the answer is a neutral `image/svg+xml` placeholder (header `x-brix-cache: pending`, not cached) while the image is drawn in the background; fetch it again shortly.'
x-brix-permission: app-instance.view
x-brix-schema: verified
x-brix-notes:
- 'A cached image is `image/jpeg`. When there is none yet, the answer is a neutral `image/svg+xml` placeholder (header `x-brix-cache: pending`, not cached) while the image is drawn in the background; fetch it again shortly.'
parameters:
- name: id
in: path
required: true
schema:
type: string
description: App instance id.
example: app_3c4d5e6f7a8b9c0d
- name: fresh
in: query
required: false
schema:
type: string
enum:
- '1'
description: Skip the cached image and draw it again.
responses:
'200':
description: Success. The body is the file itself.
content:
image/*:
schema:
type: string
format: binary
'401':
description: Missing, expired or revoked bearer token.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: The token lacks the permission this operation needs (see `x-brix-permission`).
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: No such app instance in this workspace.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'503':
description: '`browser_unavailable`: images cannot be drawn in this environment.'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
5XX:
description: Server error. The body carries a `requestId` to quote to support.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
security:
- bearerAuth:
- app-instance.view
components:
schemas:
Error:
type: object
properties:
error:
type: string
description: 'Machine-readable code: `unauthorized`, `forbidden`, `not_found`, `validation_error`, `conflict`, `rate_limited`, `internal_error`, …'
message:
description: Human-readable explanation. Safe to show an operator.
type: string
requestId:
description: 'Present on 5xx: quote it to support.'
type: string
required:
- error
additionalProperties: {}
description: Error envelope returned by every failing request.
AppInstance:
type: object
properties:
id:
type: string
description: App instance id.
examples:
- app_3c4d5e6f7a8b9c0d
spaceId:
type: string
description: Workspace id.
appKey:
type: string
description: 'The app type: a key from `GET /v1/apps/catalog` (`clock`, `weather`, `rss`, …).'
name:
type: string
config:
description: The app's settings (JSON). The keys depend on `appKey`.
nodeId:
anyOf:
- type: string
- type: 'null'
description: Home location; null = workspace root.
lastSnapshotKey:
anyOf:
- type: string
- type: 'null'
description: Internal key of the last rendered thumbnail.
lastSnapshotAt:
anyOf:
- type: string
description: ISO-8601 timestamp (UTC).
- type: 'null'
importSourceId:
anyOf:
- type: string
- type: 'null'
description: Id in the system it was imported from, if imported.
createdAt:
type: string
description: ISO-8601 timestamp (UTC).
updatedAt:
type: string
description: ISO-8601 timestamp (UTC).
deletedAt:
anyOf:
- type: string
description: ISO-8601 timestamp (UTC).
- type: 'null'
description: 'Always null on these reads: deleted rows are not listed.'
required:
- id
- spaceId
- appKey
- name
- config
- nodeId
- lastSnapshotKey
- lastSnapshotAt
- importSourceId
- createdAt
- updatedAt
- deletedAt
description: An installed, configured app.
securitySchemes:
bearerAuth:
type: http
scheme: bearer
description: An API key (`ak_…`) or a user session token. API keys carry `resource.verb` permissions.