{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/inboxpolicy-com/json-schema/inboxpolicy-com-capture-session-schema.json",
  "title": "CaptureSession",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/inboxpolicy-com-openapi.json#/components/schemas/CaptureSession",
  "properties": {
    "id": {
      "type": "string",
      "description": "Unique identifier for the capture session."
    },
    "state": {
      "$ref": "#/$defs/CaptureSessionState",
      "description": "Current state of the capture session. A session records while active, is completing once completion is requested, and becomes a reusable recording once completed."
    },
    "browser_session_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Opaque identifier for the spawned browser session. Null once the browser is gone."
    },
    "iframe_url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "URL to embed in an iframe to control the browser. Only usable while the session is active."
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Timestamp when the object was created."
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "description": "Timestamp when the object was last updated."
    }
  },
  "type": "object",
  "required": [
    "id",
    "state",
    "browser_session_id",
    "iframe_url",
    "created_at",
    "updated_at"
  ],
  "$defs": {
    "CaptureSessionState": {
      "type": "string",
      "enum": [
        "active",
        "completing",
        "completed",
        "abandoned",
        "failed"
      ],
      "title": "CaptureSessionState"
    }
  }
}