focus-mode-template

POST /focus-mode-template/{template_id}/install

Request

  • Base URL
    https://api.focusbear.io (the document declares no server; this is the origin it was published from)
  • Auth
    HTTP bearer

Response

user_idstring
namestring
allowed_appsstring[]
allowed_urlsstring[]
metadataobject
categoriesobject[]

Per-entry categories for this block list: [{ entry, category }], where entry mirrors an allowed_urls / allowed_apps value and category is a client taxonomy id.

Encrypted like the other list columns, because the entries are the user's own blocked sites. Nullable with no SQL default on purpose: a plaintext '[]' default could not be read back through the encryption transformer, so "empty" is applied in code by the response serializer.

Deliberately outside MAX_ALLOWLIST_TOTAL_BYTES: that budget exists because a shared mode's allow-lists ride verbatim inside Pusher/FCM payloads, and categories never does — a class session snapshots only allowed_apps / allowed_urls. Anything that starts fanning the whole mode out over realtime must bring this column into that budget.

app_identitiesobject[] nullable

Platform identities for the app entries (allowed_apps, and on focus modes the Windows app's metadata.allowed_apps_win), keyed by entry like categories. Clients match the running app by these instead of a renameable name; entries with none are matched by name as before. Filled from the common-apps catalog on every write, so older clients that send names only still get them. Encrypted and nullable with no SQL default for the same reason as categories.

is_ai_enabledboolean required
focus_mode_template_idstring
team_idstring nullable

Team-shared focus mode (Teacher Mode): team_id = school (parent team) makes the mode visible school-wide, team_id = class makes it class-wide; NULL = personal mode. user_id stays the creator; shared modes are managed by that team's admins.

deleted_atstring date-time
idstring
created_atstring
updated_atstring

Changes

No recorded changes to this operation across all 1 revision of this API.