{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/brixsignage-com/json-schema/brixsignage-com-screen-schema.json",
  "title": "Screen",
  "description": "A screen, composed with its content, live state and health facts.",
  "x-generated": "2026-11-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/brixsignage-com-openapi.json#/components/schemas/Screen",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Screen id."
    },
    "spaceId": {
      "type": "string",
      "description": "Workspace id."
    },
    "nodeId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Location (org node) the screen belongs to; null = workspace root."
    },
    "name": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "online",
        "offline",
        "pairing"
      ],
      "description": "`pairing` = no device has checked in yet."
    },
    "lastSeenAt": {
      "anyOf": [
        {
          "type": "string",
          "description": "ISO-8601 timestamp (UTC)."
        },
        {
          "type": "null"
        }
      ],
      "description": "Last heartbeat or socket ping reply, whichever is later."
    },
    "coreUpdateOfferedAt": {
      "anyOf": [
        {
          "type": "string",
          "description": "ISO-8601 timestamp (UTC)."
        },
        {
          "type": "null"
        }
      ]
    },
    "contentKind": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "playlist",
            "schedule",
            "layout",
            "creative",
            "app",
            "media",
            "signage"
          ]
        },
        {
          "type": "null"
        }
      ],
      "description": "What is assigned. Null = nothing assigned."
    },
    "contentId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "contentFit": {
      "type": "null",
      "description": "Retired; always null. Fit is set on the content."
    },
    "deactivatedAt": {
      "anyOf": [
        {
          "type": "string",
          "description": "ISO-8601 timestamp (UTC)."
        },
        {
          "type": "null"
        }
      ],
      "description": "Set while an operator has deactivated the screen."
    },
    "awaitingPaymentAt": {
      "anyOf": [
        {
          "type": "string",
          "description": "ISO-8601 timestamp (UTC)."
        },
        {
          "type": "null"
        }
      ],
      "description": "Set while the screen waits for payment: it was paired past the screens on the plan. It starts to play when the plan has room."
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "rotation": {
      "type": "integer",
      "description": "0, 90, 180 or 270 degrees."
    },
    "rotationCommandedAt": {
      "anyOf": [
        {
          "type": "string",
          "description": "ISO-8601 timestamp (UTC)."
        },
        {
          "type": "null"
        }
      ]
    },
    "timezone": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "IANA time zone; null = inherited."
    },
    "timezoneSource": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "operator",
            "device"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "operatingHours": {
      "type": "string",
      "description": "`default`, or a JSON-encoded weekly window."
    },
    "lastPanelCommand": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "scheduleScreensOff": {
      "type": "boolean"
    },
    "displayPowerMode": {
      "type": "string",
      "enum": [
        "always-on",
        "follow-schedule",
        "os-default"
      ]
    },
    "playbackMode": {
      "type": "string",
      "enum": [
        "sync",
        "unsync",
        "device-time"
      ]
    },
    "locationLabel": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "locationLat": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ]
    },
    "locationLng": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ]
    },
    "ipCity": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "ipRegion": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "ipCountry": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "ipLat": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ]
    },
    "ipLng": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ]
    },
    "ipTimezone": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "ipGeoAt": {
      "anyOf": [
        {
          "type": "string",
          "description": "ISO-8601 timestamp (UTC)."
        },
        {
          "type": "null"
        }
      ]
    },
    "playerSettings": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Player settings as a JSON-ENCODED string (not an object)."
    },
    "kioskEnabled": {
      "type": "boolean"
    },
    "kioskPinMode": {
      "type": "string",
      "enum": [
        "workspace",
        "custom"
      ]
    },
    "kioskGraceSeconds": {
      "type": "integer"
    },
    "activeEmergencyId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "The live emergency overriding this screen, if any."
    },
    "activeCastId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "The live cast overriding this screen, if any."
    },
    "playerVersionHold": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "sealed": {
      "type": "boolean"
    },
    "sealedAt": {
      "anyOf": [
        {
          "type": "string",
          "description": "ISO-8601 timestamp (UTC)."
        },
        {
          "type": "null"
        }
      ]
    },
    "powerPolicyId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "importSourceId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "billingGroupId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "customFields": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Custom fields as a JSON-ENCODED string."
    },
    "lanSecretAt": {
      "anyOf": [
        {
          "type": "string",
          "description": "ISO-8601 timestamp (UTC)."
        },
        {
          "type": "null"
        }
      ],
      "description": "When the local-trigger key was last set or rotated. The key itself is never returned."
    },
    "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"
        }
      ]
    },
    "location": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "label": {
              "type": "string"
            },
            "lat": {
              "type": "number"
            },
            "lng": {
              "type": "number"
            }
          },
          "required": [
            "label",
            "lat",
            "lng"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "deviceClaimed": {
      "type": "boolean",
      "description": "Status is `pairing` but a device has claimed it and not yet checked in."
    },
    "nodeName": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "groupIds": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Screen groups this screen is in."
    },
    "contentName": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "contentSharedFrom": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Name of the workspace that shared the assigned content in; null when it is this workspace's own."
    },
    "thumbnailUrl": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Preview of the assigned content."
    },
    "contentAppKey": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "contentMediaKind": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "contentState": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "state": {
              "type": "string"
            },
            "reason": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "code": {
              "description": "`normalizing` while the file is prepared for screens.",
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "progress": {
              "description": "Percent of the preparation done (0–99), when known.",
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            },
            "durationSec": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "state",
            "reason"
          ]
        },
        {
          "type": "null"
        }
      ],
      "description": "Assigned media that is not playable yet (processing, failed, needs_action); null otherwise."
    },
    "contentOrientation": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "portrait",
            "landscape",
            "adaptive"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "liveThumbnailAt": {
      "anyOf": [
        {
          "type": "string",
          "description": "ISO-8601 timestamp (UTC)."
        },
        {
          "type": "null"
        }
      ],
      "description": "Capture time of the latest live frame (GET /v1/screens/{id}/live-thumbnail)."
    },
    "liveThumbnailFreshAt": {
      "anyOf": [
        {
          "type": "string",
          "description": "ISO-8601 timestamp (UTC)."
        },
        {
          "type": "null"
        }
      ]
    },
    "currentContentKind": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "image",
            "video",
            "stream"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "currentContentPosterUrl": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "emergencyHeadline": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "castHeadline": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "castStartedAt": {
      "anyOf": [
        {
          "type": "string",
          "description": "ISO-8601 timestamp (UTC)."
        },
        {
          "type": "null"
        }
      ]
    },
    "castExpiresAt": {
      "anyOf": [
        {
          "type": "string",
          "description": "ISO-8601 timestamp (UTC)."
        },
        {
          "type": "null"
        }
      ]
    },
    "castContentKind": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "castContentId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "kioskHasCustomPin": {
      "type": "boolean"
    },
    "kioskHasRecovery": {
      "type": "boolean"
    },
    "obscuredSince": {
      "anyOf": [
        {
          "type": "string",
          "description": "ISO-8601 timestamp (UTC)."
        },
        {
          "type": "null"
        }
      ],
      "description": "A system dialog is covering the screen since this time."
    },
    "pixelHealth": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "ok",
            "frozen",
            "blank"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "displayOffSince": {
      "anyOf": [
        {
          "type": "string",
          "description": "ISO-8601 timestamp (UTC)."
        },
        {
          "type": "null"
        }
      ]
    },
    "displayOffReason": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "standby",
            "wrong-input",
            "disconnected",
            "input-unconfirmed"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "expectedDark": {
      "type": "object",
      "properties": {
        "dark": {
          "type": "boolean",
          "description": "True when the rules say the panel should be off now."
        },
        "reason": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "schedule-block",
                "power-policy",
                "operating-hours"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "nextOpen": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "at": {
                  "type": "string"
                },
                "day": {
                  "type": "string"
                },
                "inMinutes": {
                  "type": "number"
                }
              },
              "required": [
                "at",
                "day",
                "inMinutes"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "minutesSinceOpen": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ]
        },
        "minutesSinceClose": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "dark",
        "reason",
        "nextOpen",
        "minutesSinceOpen",
        "minutesSinceClose"
      ]
    },
    "accountHold": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "enum": [
                "suspended",
                "cancelled",
                "deactivated",
                "trial_expired",
                "awaiting_payment"
              ]
            },
            "reason": {
              "type": "string"
            }
          },
          "required": [
            "status",
            "reason"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "outageSummary30d": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "windowDays": {
              "type": "integer"
            },
            "count": {
              "type": "integer"
            },
            "topCause": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "topCauseShare": {
              "type": "number"
            },
            "hedgedShare": {
              "type": "number"
            },
            "lastCause": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "cause": {
                      "type": "string",
                      "description": "Outage cause key, e.g. `wifi-dropped`, `power-loss`, `unknown`."
                    },
                    "confident": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "cause",
                    "confident"
                  ]
                },
                {
                  "type": "null"
                }
              ]
            },
            "lastKnownCause": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "cause": {
                      "type": "string",
                      "description": "Outage cause key, e.g. `wifi-dropped`, `power-loss`, `unknown`."
                    },
                    "confident": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "cause",
                    "confident"
                  ]
                },
                {
                  "type": "null"
                }
              ]
            },
            "insight": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "windowDays",
            "count",
            "topCause",
            "topCauseShare",
            "hedgedShare",
            "lastCause",
            "lastKnownCause",
            "insight"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "linkFlaps10m": {
      "description": "Socket link flips in the last ten minutes; present only when > 0 (list and get).",
      "type": "integer"
    },
    "state": {
      "anyOf": [
        {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        },
        {
          "type": "null"
        }
      ],
      "description": "The device's last reported state (`updatedAt` plus the heartbeat snapshot). The list returns a lean subset; get and PATCH return it all. Null before the first heartbeat."
    }
  },
  "required": [
    "id",
    "spaceId",
    "nodeId",
    "name",
    "status",
    "lastSeenAt",
    "coreUpdateOfferedAt",
    "contentKind",
    "contentId",
    "contentFit",
    "deactivatedAt",
    "awaitingPaymentAt",
    "tags",
    "rotation",
    "rotationCommandedAt",
    "timezone",
    "timezoneSource",
    "operatingHours",
    "lastPanelCommand",
    "scheduleScreensOff",
    "displayPowerMode",
    "playbackMode",
    "locationLabel",
    "locationLat",
    "locationLng",
    "ipCity",
    "ipRegion",
    "ipCountry",
    "ipLat",
    "ipLng",
    "ipTimezone",
    "ipGeoAt",
    "playerSettings",
    "kioskEnabled",
    "kioskPinMode",
    "kioskGraceSeconds",
    "activeEmergencyId",
    "activeCastId",
    "playerVersionHold",
    "sealed",
    "sealedAt",
    "powerPolicyId",
    "importSourceId",
    "billingGroupId",
    "customFields",
    "lanSecretAt",
    "createdAt",
    "updatedAt",
    "deletedAt",
    "location",
    "deviceClaimed",
    "nodeName",
    "groupIds",
    "contentName",
    "contentSharedFrom",
    "thumbnailUrl",
    "contentAppKey",
    "contentMediaKind",
    "contentState",
    "contentOrientation",
    "liveThumbnailAt",
    "liveThumbnailFreshAt",
    "currentContentKind",
    "currentContentPosterUrl",
    "emergencyHeadline",
    "castHeadline",
    "castStartedAt",
    "castExpiresAt",
    "castContentKind",
    "castContentId",
    "kioskHasCustomPin",
    "kioskHasRecovery",
    "obscuredSince",
    "pixelHealth",
    "displayOffSince",
    "displayOffReason",
    "expectedDark",
    "accountHold",
    "outageSummary30d",
    "state"
  ]
}