{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/rendry-io/json-schema/rendry-io-embed-session-schema.json",
  "title": "EmbedSession",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/rendry-io-embed-api-openapi.yml#/components/schemas/EmbedSession",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "account_id": {
      "type": "string"
    },
    "actor_id": {
      "type": "string"
    },
    "subject": {
      "type": "string"
    },
    "parent_origin": {
      "type": "string"
    },
    "mode": {
      "type": "string",
      "enum": [
        "live",
        "test"
      ]
    },
    "role": {
      "type": "string",
      "enum": [
        "editor",
        "viewer"
      ]
    },
    "expires_at": {
      "type": "string",
      "format": "date-time"
    },
    "bootstrap_secret": {
      "type": "string",
      "description": "Only in issue response; one-use secret delivered by the customer server to its authenticated host page in memory."
    },
    "token": {
      "type": "string",
      "description": "Only in redeem response; em_... credential for the same-origin editor child."
    },
    "brand": {
      "$ref": "#/$defs/EmbedBrand"
    }
  },
  "required": [
    "id",
    "account_id",
    "actor_id",
    "subject",
    "parent_origin",
    "mode",
    "role",
    "expires_at",
    "brand"
  ],
  "$defs": {
    "EmbedBrand": {
      "type": "object",
      "additionalProperties": false,
      "description": "Authenticated session identity; contains no remote source URL or private logo bytes. Empty brand retains Document editor. Rendry attribution always remains.",
      "properties": {
        "name": {
          "type": "string"
        },
        "logo_url": {
          "type": "string",
          "enum": [
            "/api/v1/embed/brand/logo"
          ],
          "description": "Local authenticated snapshot endpoint. Fetch with bearer authorization into a Blob; never put a bearer token in an image URL."
        },
        "accent": {
          "type": "string"
        }
      }
    }
  }
}