{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/writerslogic-com/json-schema/writerslogic-com-create-session-request-schema.json",
  "title": "CreateSessionRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/api-writerslogic-openapi.json#/components/schemas/CreateSessionRequest",
  "type": "object",
  "required": [
    "platform",
    "document_id",
    "document_hash"
  ],
  "properties": {
    "platform": {
      "type": "string",
      "enum": [
        "macos",
        "windows",
        "linux",
        "web",
        "hubspot",
        "google",
        "atlassian",
        "salesforce",
        "servicenow",
        "microsoft",
        "canvas",
        "blackboard"
      ]
    },
    "document_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 256
    },
    "document_name": {
      "type": "string",
      "maxLength": 512
    },
    "document_hash": {
      "type": "string",
      "pattern": "^[0-9a-fA-F]{64}$"
    },
    "external_context": {
      "type": "string",
      "pattern": "^[A-Za-z0-9._:|~-]{1,256}$",
      "description": "Opaque platform id of the course/context this session was launched in. Required for canvas and blackboard, where one API key serves every launch. Later reads must present it as X-WP-External-Context."
    },
    "external_subject": {
      "type": "string",
      "pattern": "^[A-Za-z0-9._:|~-]{1,256}$",
      "description": "Opaque platform id of the launching user. Requires external_context. Later reads must present it as X-WP-External-Subject, unless X-WP-External-Role is instructor."
    }
  }
}