{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/brixsignage-com/json-schema/brixsignage-com-workspace-prefs-schema.json",
  "title": "WorkspacePrefs",
  "description": "Workspace preferences. Every key is present (defaults filled in).",
  "x-generated": "2026-11-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/brixsignage-com-openapi.json#/components/schemas/WorkspacePrefs",
  "type": "object",
  "properties": {
    "timeFormat": {
      "type": "string",
      "enum": [
        "12h",
        "24h"
      ]
    },
    "weekStart": {
      "type": "string",
      "enum": [
        "mon",
        "sun"
      ]
    },
    "dateFormat": {
      "type": "string",
      "enum": [
        "mdy",
        "dmy",
        "ymd"
      ]
    },
    "tempUnits": {
      "type": "string",
      "enum": [
        "f",
        "c"
      ]
    },
    "timeZone": {
      "type": "string",
      "description": "IANA time zone. Screens without their own zone use it, and so do schedules timed by the workspace."
    },
    "language": {
      "type": "string",
      "description": "BCP 47 language tag."
    },
    "multinational": {
      "type": "boolean",
      "description": "Shows the per-location and per-screen language settings."
    },
    "newLocationsPayFirst": {
      "type": "boolean",
      "description": "New locations pay for themselves before going live: each adds its own card, and its screens show a hold card (not billed to the account) until then. Default false. Turning it on needs Brix billing with a running plan (409 otherwise)."
    },
    "navExtras": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Console pages switched on that the workspace size hides by default."
    },
    "appBranding": {
      "type": "object",
      "properties": {
        "accent": {
          "type": "string"
        },
        "accent2": {
          "type": "string"
        },
        "theme": {
          "type": "string",
          "enum": [
            "dark",
            "light"
          ]
        },
        "backdrop": {
          "type": "string",
          "enum": [
            "brand",
            "wash",
            "plain",
            "aurora",
            "dots",
            "grid",
            "solid"
          ]
        },
        "intensity": {
          "type": "number"
        }
      },
      "required": [
        "accent",
        "accent2",
        "theme",
        "backdrop",
        "intensity"
      ],
      "description": "The look of the on-screen apps."
    },
    "audio": {
      "type": "object",
      "properties": {
        "volume": {
          "type": "number",
          "description": "0–100."
        },
        "muted": {
          "type": "boolean"
        }
      },
      "required": [
        "volume",
        "muted"
      ],
      "description": "Default screen volume and a master mute."
    },
    "brand": {
      "type": "object",
      "properties": {
        "companyName": {
          "type": "string"
        },
        "logoUrl": {
          "type": "string"
        }
      },
      "required": [
        "companyName",
        "logoUrl"
      ]
    },
    "requireAltText": {
      "type": "boolean"
    },
    "showScreenLogo": {
      "type": "boolean"
    },
    "keepTvOnInput": {
      "type": "boolean",
      "description": "Default for \"Keep the TV on this input\" on screens that have not set their own."
    },
    "standbyContentKind": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "What a screen with nothing to play shows; null = the default card."
    },
    "standbyContentId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "tier": {
      "type": "string",
      "enum": [
        "simple",
        "team",
        "enterprise"
      ],
      "description": "Workspace size. It sets console defaults, not access."
    },
    "industry": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "onboardingCompletedAt": {
      "anyOf": [
        {
          "type": "string",
          "description": "ISO-8601 timestamp (UTC)."
        },
        {
          "type": "null"
        }
      ]
    },
    "setupStep": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Walkthrough position (`s1`…`s5`, `l1`…`l6`, `done`)."
    },
    "welcomeDeclinedAt": {
      "anyOf": [
        {
          "type": "string",
          "description": "ISO-8601 timestamp (UTC)."
        },
        {
          "type": "null"
        }
      ],
      "description": "When the owner declined the setup questions. Null if never declined, or answered later."
    },
    "aboutYouDue": {
      "description": "The workspace is asked the first-sign-in questions (workspaces created from 2026-10-14).",
      "type": "boolean"
    },
    "aboutYouAt": {
      "description": "When the first-sign-in questions were answered.",
      "anyOf": [
        {
          "type": "string",
          "description": "ISO-8601 timestamp (UTC)."
        },
        {
          "type": "null"
        }
      ]
    },
    "expectedScreens": {
      "description": "How many screens the owner said they expect.",
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "orgNameSet": {
      "type": "boolean"
    },
    "tiers": {
      "type": "array",
      "items": {
        "type": "integer"
      },
      "description": "Location tree levels in use."
    },
    "tierLabels": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {
        "type": "string"
      },
      "description": "Custom names for the location tree levels."
    },
    "requireTwoFactor": {
      "type": "boolean"
    },
    "requireSso": {
      "type": "boolean"
    },
    "requireSsoPending": {
      "type": "boolean",
      "description": "Single sign-on was required, and turns on after the first sign-in through the connection."
    },
    "requireSsoPendingSince": {
      "anyOf": [
        {
          "type": "string",
          "description": "ISO-8601 timestamp (UTC)."
        },
        {
          "type": "null"
        }
      ]
    },
    "ai": {
      "type": "object",
      "properties": {
        "enabled": {
          "type": "boolean"
        },
        "features": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "type": "boolean"
          },
          "description": "Per feature (`tags`, `alt-text`, `moderation`, `transcription`, `translation`, `focal-region`, `embedding`); an absent feature follows `enabled`."
        },
        "dailyCallLimit": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ]
        },
        "redactPersonalData": {
          "type": "boolean"
        }
      },
      "required": [
        "enabled",
        "features",
        "dailyCallLimit",
        "redactPersonalData"
      ]
    },
    "retention": {
      "type": "object",
      "properties": {
        "offline": {
          "type": "number"
        },
        "screenshots": {
          "type": "number"
        },
        "playback": {
          "type": "number"
        },
        "deviceLogs": {
          "type": "number"
        },
        "vitals": {
          "type": "number"
        },
        "replays": {
          "type": "number"
        },
        "aiEvents": {
          "type": "number"
        }
      },
      "description": "Days kept per stream, only for the streams the workspace has set. An absent stream uses the platform window."
    },
    "warehouse": {
      "type": "object",
      "properties": {
        "enabled": {
          "type": "boolean"
        },
        "bucketBinding": {
          "type": "string",
          "description": "Set by Brix when the data warehouse feed is provisioned."
        },
        "tables": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "lookbackDays": {
          "type": "integer"
        }
      },
      "required": [
        "enabled",
        "bucketBinding",
        "tables",
        "lookbackDays"
      ],
      "description": "Data warehouse feed. Set by Brix; not writable here."
    },
    "supportAccess": {
      "$ref": "#/$defs/SupportAccessPolicy"
    },
    "kioskHasGlobalPin": {
      "type": "boolean",
      "description": "A workspace Screen Lock PIN is set. The PIN and its hash are never returned."
    }
  },
  "required": [
    "timeFormat",
    "weekStart",
    "dateFormat",
    "tempUnits",
    "timeZone",
    "language",
    "multinational",
    "newLocationsPayFirst",
    "navExtras",
    "appBranding",
    "audio",
    "brand",
    "requireAltText",
    "showScreenLogo",
    "keepTvOnInput",
    "standbyContentKind",
    "standbyContentId",
    "tier",
    "industry",
    "onboardingCompletedAt",
    "setupStep",
    "welcomeDeclinedAt",
    "orgNameSet",
    "tiers",
    "tierLabels",
    "requireTwoFactor",
    "requireSso",
    "requireSsoPending",
    "requireSsoPendingSince",
    "ai",
    "retention",
    "warehouse",
    "supportAccess",
    "kioskHasGlobalPin"
  ],
  "$defs": {
    "SupportAccessPolicy": {
      "type": "object",
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "open",
            "notify",
            "approve"
          ],
          "description": "`open`: Brix support may open the workspace. `notify`: it may, and the owners are emailed. `approve`: a person here must approve each request."
        },
        "grantMinutes": {
          "type": "integer",
          "description": "How long an approval lasts."
        },
        "requestTtlMinutes": {
          "type": "integer",
          "description": "How long a request waits for an answer before it expires."
        }
      },
      "required": [
        "mode",
        "grantMinutes",
        "requestTtlMinutes"
      ]
    }
  }
}