{
  "components": {
    "schemas": {
      "AccessChange": {
        "additionalProperties": false,
        "properties": {
          "$schema": {
            "description": "A URL to the JSON Schema for this object.",
            "examples": [
              "https://example.com/schemas/AccessChange.json"
            ],
            "format": "uri",
            "readOnly": true,
            "type": "string"
          },
          "action": {
            "enum": [
              "grant",
              "revoke",
              "suspend"
            ],
            "type": "string"
          },
          "bindingId": {
            "type": "string"
          },
          "commandId": {
            "format": "uuid",
            "type": "string"
          },
          "role": {
            "enum": [
              "owner",
              "administrator",
              "author",
              "learner",
              "unit_manager",
              ""
            ],
            "type": "string"
          },
          "unitId": {
            "type": "string"
          },
          "userId": {
            "format": "uuid",
            "type": "string"
          },
          "version": {
            "format": "int64",
            "minimum": 1,
            "type": "integer"
          }
        },
        "required": [
          "commandId",
          "userId",
          "version",
          "action",
          "role",
          "unitId",
          "bindingId"
        ],
        "type": "object"
      },
      "Audit": {
        "additionalProperties": false,
        "properties": {
          "action": {
            "type": "string"
          },
          "actor": {
            "type": "string"
          },
          "at": {
            "type": "string"
          },
          "resource": {
            "type": "string"
          }
        },
        "required": [
          "action",
          "actor",
          "resource",
          "at"
        ],
        "type": "object"
      },
      "Binding": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "unit": {
            "type": "string"
          },
          "unitId": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "role",
          "unitId",
          "unit"
        ],
        "type": "object"
      },
      "Capability": {
        "additionalProperties": false,
        "properties": {
          "configured": {
            "type": "boolean"
          },
          "provider": {
            "type": "string"
          },
          "purpose": {
            "type": "string"
          }
        },
        "required": [
          "provider",
          "configured",
          "purpose"
        ],
        "type": "object"
      },
      "Caption": {
        "additionalProperties": false,
        "properties": {
          "label": {
            "type": "string"
          },
          "language": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "url",
          "language",
          "label"
        ],
        "type": "object"
      },
      "Channel": {
        "additionalProperties": false,
        "properties": {
          "available": {
            "type": "boolean"
          },
          "detail": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "available",
          "detail"
        ],
        "type": "object"
      },
      "Command": {
        "additionalProperties": false,
        "properties": {
          "$schema": {
            "description": "A URL to the JSON Schema for this object.",
            "examples": [
              "https://example.com/schemas/Command.json"
            ],
            "format": "uri",
            "readOnly": true,
            "type": "string"
          },
          "action": {
            "enum": [
              "save",
              "publish",
              "assign",
              "progress",
              "save_resource",
              "archive_resource",
              "bookmark_resource",
              "bookmark_course"
            ],
            "type": "string"
          },
          "answer": {
            "format": "int64",
            "type": "integer"
          },
          "bookmarked": {
            "type": "boolean"
          },
          "commandId": {
            "format": "uuid",
            "type": "string"
          },
          "course": {
            "$ref": "#/components/schemas/Course"
          },
          "courseId": {
            "type": "string"
          },
          "dueAt": {
            "type": "string"
          },
          "enrolmentId": {
            "type": "string"
          },
          "lessonId": {
            "type": "string"
          },
          "resource": {
            "$ref": "#/components/schemas/Resource"
          },
          "resourceId": {
            "type": "string"
          },
          "revision": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "userIds": {
            "items": {
              "type": "string"
            },
            "maxItems": 100,
            "type": [
              "array",
              "null"
            ]
          }
        },
        "required": [
          "action",
          "commandId"
        ],
        "type": "object"
      },
      "Company": {
        "additionalProperties": false,
        "properties": {
          "$schema": {
            "description": "A URL to the JSON Schema for this object.",
            "examples": [
              "https://example.com/schemas/Company.json"
            ],
            "format": "uri",
            "readOnly": true,
            "type": "string"
          },
          "accent": {
            "enum": [
              "violet",
              "mint",
              "blue",
              "peach",
              "rose",
              "sand"
            ],
            "type": "string"
          },
          "logo": {
            "maxLength": 350000,
            "type": "string"
          },
          "name": {
            "maxLength": 160,
            "minLength": 1,
            "type": "string"
          },
          "revision": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "supportEmail": {
            "maxLength": 254,
            "type": "string"
          },
          "supportUrl": {
            "maxLength": 2048,
            "type": "string"
          },
          "timezone": {
            "maxLength": 80,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "name",
          "timezone",
          "logo",
          "accent",
          "supportEmail",
          "supportUrl",
          "revision"
        ],
        "type": "object"
      },
      "Course": {
        "additionalProperties": false,
        "properties": {
          "category": {
            "maxLength": 60,
            "type": "string"
          },
          "colour": {
            "enum": [
              "violet",
              "peach",
              "mint",
              "blue",
              "rose",
              "sand"
            ],
            "type": "string"
          },
          "description": {
            "maxLength": 600,
            "type": "string"
          },
          "duration": {
            "format": "int64",
            "maximum": 600,
            "minimum": 1,
            "type": "integer"
          },
          "id": {
            "type": "string"
          },
          "lessons": {
            "items": {
              "$ref": "#/components/schemas/Lesson"
            },
            "maxItems": 100,
            "type": [
              "array",
              "null"
            ]
          },
          "modules": {
            "items": {
              "$ref": "#/components/schemas/Module"
            },
            "maxItems": 30,
            "type": [
              "array",
              "null"
            ]
          },
          "revision": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "status": {
            "enum": [
              "draft",
              "published"
            ],
            "type": "string"
          },
          "title": {
            "maxLength": 160,
            "type": "string"
          },
          "versionId": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "title",
          "description",
          "category",
          "colour",
          "duration",
          "revision",
          "versionId",
          "status",
          "lessons"
        ],
        "type": "object"
      },
      "Delivery": {
        "additionalProperties": false,
        "properties": {
          "channel": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "read": {
            "type": "boolean"
          },
          "reason": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          }
        },
        "required": [
          "userId",
          "name",
          "channel",
          "state",
          "reason",
          "read"
        ],
        "type": "object"
      },
      "Destination": {
        "additionalProperties": false,
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "events": {
            "items": {
              "type": "string"
            },
            "maxItems": 20,
            "type": [
              "array",
              "null"
            ]
          },
          "provider": {
            "enum": [
              "mixpanel",
              "ga4",
              "klaviyo",
              "meta"
            ],
            "type": "string"
          }
        },
        "required": [
          "provider",
          "enabled",
          "events"
        ],
        "type": "object"
      },
      "Draft": {
        "additionalProperties": false,
        "properties": {
          "$schema": {
            "description": "A URL to the JSON Schema for this object.",
            "examples": [
              "https://example.com/schemas/Draft.json"
            ],
            "format": "uri",
            "readOnly": true,
            "type": "string"
          },
          "body": {
            "maxLength": 8000,
            "minLength": 1,
            "type": "string"
          },
          "channels": {
            "items": {
              "type": "string"
            },
            "maxItems": 2,
            "minItems": 1,
            "type": [
              "array",
              "null"
            ]
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "recipients": {
            "items": {
              "type": "string"
            },
            "maxItems": 100,
            "minItems": 1,
            "type": [
              "array",
              "null"
            ]
          },
          "revision": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "subject": {
            "maxLength": 160,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "id",
          "revision",
          "subject",
          "body",
          "recipients",
          "channels"
        ],
        "type": "object"
      },
      "Enrolment": {
        "additionalProperties": false,
        "properties": {
          "category": {
            "type": "string"
          },
          "certificateState": {
            "type": "string"
          },
          "colour": {
            "type": "string"
          },
          "completed": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "contentAvailable": {
            "type": "boolean"
          },
          "courseId": {
            "type": "string"
          },
          "dueAt": {
            "type": "string"
          },
          "duration": {
            "format": "int64",
            "type": "integer"
          },
          "id": {
            "type": "string"
          },
          "lessons": {
            "items": {
              "$ref": "#/components/schemas/Lesson"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "modules": {
            "items": {
              "$ref": "#/components/schemas/Module"
            },
            "maxItems": 30,
            "type": [
              "array",
              "null"
            ]
          },
          "state": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "userId",
          "courseId",
          "title",
          "state",
          "dueAt",
          "completed",
          "lessons",
          "category",
          "colour",
          "duration",
          "contentAvailable",
          "certificateState"
        ],
        "type": "object"
      },
      "ErrorDetail": {
        "additionalProperties": false,
        "properties": {
          "location": {
            "description": "Where the error occurred, e.g. 'body.items[3].tags' or 'path.thing-id'",
            "type": "string"
          },
          "message": {
            "description": "Error message text",
            "type": "string"
          },
          "value": {
            "description": "The value at the given location"
          }
        },
        "type": "object"
      },
      "ErrorModel": {
        "additionalProperties": false,
        "properties": {
          "$schema": {
            "description": "A URL to the JSON Schema for this object.",
            "examples": [
              "https://example.com/schemas/ErrorModel.json"
            ],
            "format": "uri",
            "readOnly": true,
            "type": "string"
          },
          "detail": {
            "description": "A human-readable explanation specific to this occurrence of the problem.",
            "examples": [
              "Property foo is required but is missing."
            ],
            "type": "string"
          },
          "errors": {
            "description": "Optional list of individual error details",
            "items": {
              "$ref": "#/components/schemas/ErrorDetail"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "instance": {
            "description": "A URI reference that identifies the specific occurrence of the problem.",
            "examples": [
              "https://example.com/error-log/abc123"
            ],
            "format": "uri",
            "type": "string"
          },
          "status": {
            "description": "HTTP status code",
            "examples": [
              400
            ],
            "format": "int64",
            "type": "integer"
          },
          "title": {
            "description": "A short, human-readable summary of the problem type. This value should not change between occurrences of the error.",
            "examples": [
              "Bad Request"
            ],
            "type": "string"
          },
          "type": {
            "default": "about:blank",
            "description": "A URI reference to human-readable documentation for the error.",
            "examples": [
              "https://example.com/errors/example"
            ],
            "format": "uri",
            "type": "string"
          }
        },
        "type": "object"
      },
      "Event": {
        "additionalProperties": false,
        "properties": {
          "$schema": {
            "description": "A URL to the JSON Schema for this object.",
            "examples": [
              "https://example.com/schemas/Event.json"
            ],
            "format": "uri",
            "readOnly": true,
            "type": "string"
          },
          "activityId": {
            "type": "string"
          },
          "duration": {
            "format": "double",
            "maximum": 86400,
            "minimum": 0,
            "type": "number"
          },
          "enrolmentId": {
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "name": {
            "maxLength": 40,
            "type": "string"
          },
          "page": {
            "maxLength": 40,
            "type": "string"
          },
          "playbackId": {
            "type": "string"
          },
          "position": {
            "format": "double",
            "maximum": 86400,
            "minimum": 0,
            "type": "number"
          },
          "rate": {
            "format": "double",
            "maximum": 4,
            "minimum": 0,
            "type": "number"
          },
          "sequence": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "id",
          "name",
          "page"
        ],
        "type": "object"
      },
      "Info": {
        "additionalProperties": false,
        "properties": {
          "$schema": {
            "description": "A URL to the JSON Schema for this object.",
            "examples": [
              "https://example.com/schemas/Info.json"
            ],
            "format": "uri",
            "readOnly": true,
            "type": "string"
          },
          "build_time": {
            "type": "string"
          },
          "commit": {
            "type": "string"
          },
          "version": {
            "type": "string"
          }
        },
        "required": [
          "version",
          "commit",
          "build_time"
        ],
        "type": "object"
      },
      "Lesson": {
        "additionalProperties": false,
        "properties": {
          "answer": {
            "format": "int64",
            "type": "integer"
          },
          "body": {
            "maxLength": 20000,
            "type": "string"
          },
          "bodyFormat": {
            "enum": [
              "plain",
              "html"
            ],
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "kind": {
            "enum": [
              "text",
              "quiz",
              "video"
            ],
            "type": "string"
          },
          "moduleId": {
            "type": "string"
          },
          "options": {
            "items": {
              "type": "string"
            },
            "maxItems": 4,
            "type": [
              "array",
              "null"
            ]
          },
          "title": {
            "maxLength": 160,
            "type": "string"
          },
          "video": {
            "$ref": "#/components/schemas/Video"
          }
        },
        "required": [
          "id",
          "title",
          "kind",
          "body"
        ],
        "type": "object"
      },
      "LiveOutputBody": {
        "additionalProperties": false,
        "properties": {
          "$schema": {
            "description": "A URL to the JSON Schema for this object.",
            "examples": [
              "https://example.com/schemas/LiveOutputBody.json"
            ],
            "format": "uri",
            "readOnly": true,
            "type": "string"
          },
          "status": {
            "description": "Process is alive",
            "enum": [
              "ok"
            ],
            "type": "string"
          }
        },
        "required": [
          "status"
        ],
        "type": "object"
      },
      "Member": {
        "additionalProperties": false,
        "properties": {
          "bindings": {
            "items": {
              "$ref": "#/components/schemas/Binding"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "suspended": {
            "type": "boolean"
          },
          "version": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "name",
          "suspended",
          "version",
          "bindings"
        ],
        "type": "object"
      },
      "MembershipBody": {
        "additionalProperties": false,
        "properties": {
          "current": {
            "description": "True when this session is already bound here",
            "type": "boolean"
          },
          "name": {
            "description": "Organisation name",
            "type": "string"
          },
          "organisation_id": {
            "description": "Organisation the signed-in subject can enter",
            "type": "string"
          }
        },
        "required": [
          "organisation_id",
          "name",
          "current"
        ],
        "type": "object"
      },
      "MembershipsOutputBody": {
        "additionalProperties": false,
        "properties": {
          "$schema": {
            "description": "A URL to the JSON Schema for this object.",
            "examples": [
              "https://example.com/schemas/MembershipsOutputBody.json"
            ],
            "format": "uri",
            "readOnly": true,
            "type": "string"
          },
          "memberships": {
            "items": {
              "$ref": "#/components/schemas/MembershipBody"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "required": [
          "memberships"
        ],
        "type": "object"
      },
      "Message": {
        "additionalProperties": false,
        "properties": {
          "$schema": {
            "description": "A URL to the JSON Schema for this object.",
            "examples": [
              "https://example.com/schemas/Message.json"
            ],
            "format": "uri",
            "readOnly": true,
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "channels": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "createdAt": {
            "type": "string"
          },
          "deliveries": {
            "items": {
              "$ref": "#/components/schemas/Delivery"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "read": {
            "type": "boolean"
          },
          "recipientIds": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "revision": {
            "format": "int64",
            "type": "integer"
          },
          "sender": {
            "type": "string"
          },
          "senderId": {
            "type": "string"
          },
          "sentAt": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "subject": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "subject",
          "body",
          "sender",
          "senderId",
          "revision",
          "state",
          "createdAt",
          "sentAt",
          "read",
          "channels"
        ],
        "type": "object"
      },
      "MessagePreferenceInputBody": {
        "additionalProperties": false,
        "properties": {
          "$schema": {
            "description": "A URL to the JSON Schema for this object.",
            "examples": [
              "https://example.com/schemas/MessagePreferenceInputBody.json"
            ],
            "format": "uri",
            "readOnly": true,
            "type": "string"
          },
          "email": {
            "type": "boolean"
          }
        },
        "required": [
          "email"
        ],
        "type": "object"
      },
      "MessageSendInputBody": {
        "additionalProperties": false,
        "properties": {
          "$schema": {
            "description": "A URL to the JSON Schema for this object.",
            "examples": [
              "https://example.com/schemas/MessageSendInputBody.json"
            ],
            "format": "uri",
            "readOnly": true,
            "type": "string"
          },
          "revision": {
            "format": "int64",
            "minimum": 1,
            "type": "integer"
          }
        },
        "required": [
          "revision"
        ],
        "type": "object"
      },
      "Module": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "summary": {
            "maxLength": 1200,
            "type": "string"
          },
          "title": {
            "maxLength": 160,
            "type": "string"
          }
        },
        "required": [
          "id",
          "title",
          "summary"
        ],
        "type": "object"
      },
      "Page": {
        "additionalProperties": false,
        "properties": {
          "$schema": {
            "description": "A URL to the JSON Schema for this object.",
            "examples": [
              "https://example.com/schemas/Page.json"
            ],
            "format": "uri",
            "readOnly": true,
            "type": "string"
          },
          "canSend": {
            "type": "boolean"
          },
          "channels": {
            "items": {
              "$ref": "#/components/schemas/Channel"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "emailOptIn": {
            "type": "boolean"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/Message"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "next": {
            "type": "string"
          }
        },
        "required": [
          "items",
          "next",
          "canSend",
          "channels",
          "emailOptIn"
        ],
        "type": "object"
      },
      "People": {
        "additionalProperties": false,
        "properties": {
          "$schema": {
            "description": "A URL to the JSON Schema for this object.",
            "examples": [
              "https://example.com/schemas/People.json"
            ],
            "format": "uri",
            "readOnly": true,
            "type": "string"
          },
          "canManage": {
            "type": "boolean"
          },
          "members": {
            "items": {
              "$ref": "#/components/schemas/Member"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "next": {
            "type": "string"
          },
          "selfId": {
            "type": "string"
          },
          "units": {
            "items": {
              "$ref": "#/components/schemas/Unit"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "required": [
          "members",
          "units",
          "next",
          "canManage",
          "selfId"
        ],
        "type": "object"
      },
      "Person": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "unit": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "unit"
        ],
        "type": "object"
      },
      "Playback": {
        "additionalProperties": false,
        "properties": {
          "$schema": {
            "description": "A URL to the JSON Schema for this object.",
            "examples": [
              "https://example.com/schemas/Playback.json"
            ],
            "format": "uri",
            "readOnly": true,
            "type": "string"
          },
          "captions": {
            "items": {
              "$ref": "#/components/schemas/Caption"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "expiresAt": {
            "type": "string"
          },
          "position": {
            "format": "double",
            "type": "number"
          },
          "url": {
            "type": "string"
          },
          "video": {
            "$ref": "#/components/schemas/Video"
          },
          "watchedSeconds": {
            "format": "double",
            "type": "number"
          }
        },
        "required": [
          "video",
          "position",
          "watchedSeconds"
        ],
        "type": "object"
      },
      "Preference": {
        "additionalProperties": false,
        "properties": {
          "$schema": {
            "description": "A URL to the JSON Schema for this object.",
            "examples": [
              "https://example.com/schemas/Preference.json"
            ],
            "format": "uri",
            "readOnly": true,
            "type": "string"
          },
          "analytics": {
            "type": "boolean"
          },
          "marketing": {
            "type": "boolean"
          }
        },
        "required": [
          "analytics",
          "marketing"
        ],
        "type": "object"
      },
      "ProfileDetails": {
        "additionalProperties": false,
        "properties": {
          "$schema": {
            "description": "A URL to the JSON Schema for this object.",
            "examples": [
              "https://example.com/schemas/ProfileDetails.json"
            ],
            "format": "uri",
            "readOnly": true,
            "type": "string"
          },
          "address": {
            "maxLength": 1000,
            "type": "string"
          },
          "email": {
            "maxLength": 254,
            "type": "string"
          },
          "name": {
            "maxLength": 160,
            "minLength": 1,
            "type": "string"
          },
          "phone": {
            "maxLength": 60,
            "type": "string"
          }
        },
        "required": [
          "name",
          "email",
          "phone",
          "address"
        ],
        "type": "object"
      },
      "ProfileOutputBody": {
        "additionalProperties": false,
        "properties": {
          "$schema": {
            "description": "A URL to the JSON Schema for this object.",
            "examples": [
              "https://example.com/schemas/ProfileOutputBody.json"
            ],
            "format": "uri",
            "readOnly": true,
            "type": "string"
          },
          "address": {
            "description": "Postal address",
            "type": "string"
          },
          "email": {
            "description": "Contact email",
            "type": "string"
          },
          "name": {
            "description": "Display name",
            "type": "string"
          },
          "phone": {
            "description": "Telephone number",
            "type": "string"
          }
        },
        "required": [
          "name",
          "email",
          "phone",
          "address"
        ],
        "type": "object"
      },
      "ReadyOutputBody": {
        "additionalProperties": false,
        "properties": {
          "$schema": {
            "description": "A URL to the JSON Schema for this object.",
            "examples": [
              "https://example.com/schemas/ReadyOutputBody.json"
            ],
            "format": "uri",
            "readOnly": true,
            "type": "string"
          },
          "status": {
            "description": "Process may receive traffic",
            "enum": [
              "ready"
            ],
            "type": "string"
          }
        },
        "required": [
          "status"
        ],
        "type": "object"
      },
      "Receipt": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "occurredAt": {
            "type": "string"
          },
          "page": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "state": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "page",
          "occurredAt",
          "provider",
          "state",
          "reason"
        ],
        "type": "object"
      },
      "ReportCreateInputBody": {
        "additionalProperties": false,
        "properties": {
          "$schema": {
            "description": "A URL to the JSON Schema for this object.",
            "examples": [
              "https://example.com/schemas/ReportCreateInputBody.json"
            ],
            "format": "uri",
            "readOnly": true,
            "type": "string"
          },
          "requestId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "requestId"
        ],
        "type": "object"
      },
      "ReportHistoryItem": {
        "additionalProperties": false,
        "properties": {
          "createdAt": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "state": {
            "enum": [
              "queued",
              "ready",
              "failed"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "state",
          "createdAt"
        ],
        "type": "object"
      },
      "ReportStatus": {
        "additionalProperties": false,
        "properties": {
          "$schema": {
            "description": "A URL to the JSON Schema for this object.",
            "examples": [
              "https://example.com/schemas/ReportStatus.json"
            ],
            "format": "uri",
            "readOnly": true,
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "state": {
            "enum": [
              "queued",
              "ready",
              "failed"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "state"
        ],
        "type": "object"
      },
      "Resource": {
        "additionalProperties": false,
        "properties": {
          "body": {
            "maxLength": 30000,
            "type": "string"
          },
          "bookmarked": {
            "type": "boolean"
          },
          "category": {
            "maxLength": 60,
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "kind": {
            "enum": [
              "guide",
              "checklist",
              "template",
              "policy"
            ],
            "type": "string"
          },
          "revision": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "summary": {
            "maxLength": 600,
            "type": "string"
          },
          "title": {
            "maxLength": 160,
            "type": "string"
          }
        },
        "required": [
          "id",
          "title",
          "summary",
          "category",
          "kind",
          "body",
          "revision",
          "bookmarked"
        ],
        "type": "object"
      },
      "SSOAction": {
        "additionalProperties": false,
        "properties": {
          "$schema": {
            "description": "A URL to the JSON Schema for this object.",
            "examples": [
              "https://example.com/schemas/SSOAction.json"
            ],
            "format": "uri",
            "readOnly": true,
            "type": "string"
          },
          "action": {
            "enum": [
              "check",
              "publish",
              "disable"
            ],
            "type": "string"
          },
          "revision": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "revision",
          "action"
        ],
        "type": "object"
      },
      "SSOChange": {
        "additionalProperties": false,
        "properties": {
          "$schema": {
            "description": "A URL to the JSON Schema for this object.",
            "examples": [
              "https://example.com/schemas/SSOChange.json"
            ],
            "format": "uri",
            "readOnly": true,
            "type": "string"
          },
          "config": {
            "$ref": "#/components/schemas/SSOConfig"
          },
          "domains": {
            "items": {
              "type": "string"
            },
            "maxItems": 20,
            "type": [
              "array",
              "null"
            ]
          },
          "revision": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "revision",
          "config"
        ],
        "type": "object"
      },
      "SSOChoice": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "protocol": {
            "type": "string"
          },
          "signInUrl": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "protocol",
          "signInUrl"
        ],
        "type": "object"
      },
      "SSOChoices": {
        "additionalProperties": false,
        "properties": {
          "$schema": {
            "description": "A URL to the JSON Schema for this object.",
            "examples": [
              "https://example.com/schemas/SSOChoices.json"
            ],
            "format": "uri",
            "readOnly": true,
            "type": "string"
          },
          "company": {
            "type": "string"
          },
          "connections": {
            "items": {
              "$ref": "#/components/schemas/SSOChoice"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "required": [
          "company",
          "connections"
        ],
        "type": "object"
      },
      "SSOConfig": {
        "additionalProperties": false,
        "properties": {
          "certificate": {
            "maxLength": 12000,
            "type": "string"
          },
          "clientId": {
            "maxLength": 254,
            "type": "string"
          },
          "clientSecret": {
            "maxLength": 4096,
            "type": "string"
          },
          "issuer": {
            "maxLength": 2048,
            "type": "string"
          },
          "jwksUrl": {
            "maxLength": 2048,
            "type": "string"
          },
          "name": {
            "maxLength": 100,
            "minLength": 1,
            "type": "string"
          },
          "protocol": {
            "enum": [
              "saml",
              "oidc"
            ],
            "type": "string"
          },
          "ssoUrl": {
            "maxLength": 2048,
            "type": "string"
          },
          "tokenUrl": {
            "maxLength": 2048,
            "type": "string"
          }
        },
        "required": [
          "protocol",
          "name",
          "issuer",
          "ssoUrl",
          "tokenUrl",
          "jwksUrl",
          "certificate",
          "clientId"
        ],
        "type": "object"
      },
      "SSOConnections": {
        "additionalProperties": false,
        "properties": {
          "$schema": {
            "description": "A URL to the JSON Schema for this object.",
            "examples": [
              "https://example.com/schemas/SSOConnections.json"
            ],
            "format": "uri",
            "readOnly": true,
            "type": "string"
          },
          "canManage": {
            "type": "boolean"
          },
          "connections": {
            "items": {
              "$ref": "#/components/schemas/SSOSummary"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "limit": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "connections",
          "canManage",
          "limit"
        ],
        "type": "object"
      },
      "SSOSummary": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "lastSignIn": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "protocol": {
            "type": "string"
          },
          "revision": {
            "format": "int64",
            "type": "integer"
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "protocol",
          "status",
          "revision",
          "lastSignIn"
        ],
        "type": "object"
      },
      "SSOView": {
        "additionalProperties": false,
        "properties": {
          "$schema": {
            "description": "A URL to the JSON Schema for this object.",
            "examples": [
              "https://example.com/schemas/SSOView.json"
            ],
            "format": "uri",
            "readOnly": true,
            "type": "string"
          },
          "callbackUrl": {
            "type": "string"
          },
          "canManage": {
            "type": "boolean"
          },
          "checkedRevision": {
            "format": "int64",
            "type": "integer"
          },
          "config": {
            "$ref": "#/components/schemas/SSOConfig"
          },
          "domains": {
            "items": {
              "type": "string"
            },
            "maxItems": 20,
            "type": [
              "array",
              "null"
            ]
          },
          "entityId": {
            "type": "string"
          },
          "hasSecret": {
            "type": "boolean"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "lastSignIn": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "publishedRevision": {
            "format": "int64",
            "type": "integer"
          },
          "revision": {
            "format": "int64",
            "type": "integer"
          },
          "signInUrl": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "publishedRevision",
          "id",
          "domains",
          "canManage",
          "config",
          "hasSecret",
          "revision",
          "checkedRevision",
          "status",
          "message",
          "callbackUrl",
          "entityId",
          "signInUrl",
          "lastSignIn"
        ],
        "type": "object"
      },
      "SessionOutputBody": {
        "additionalProperties": false,
        "properties": {
          "$schema": {
            "description": "A URL to the JSON Schema for this object.",
            "examples": [
              "https://example.com/schemas/SessionOutputBody.json"
            ],
            "format": "uri",
            "readOnly": true,
            "type": "string"
          },
          "organisation_id": {
            "description": "Organisation bound to this session",
            "type": "string"
          },
          "user_id": {
            "description": "Local user bound to this session",
            "type": "string"
          }
        },
        "required": [
          "organisation_id",
          "user_id"
        ],
        "type": "object"
      },
      "Settings": {
        "additionalProperties": false,
        "properties": {
          "$schema": {
            "description": "A URL to the JSON Schema for this object.",
            "examples": [
              "https://example.com/schemas/Settings.json"
            ],
            "format": "uri",
            "readOnly": true,
            "type": "string"
          },
          "destinations": {
            "items": {
              "$ref": "#/components/schemas/Destination"
            },
            "maxItems": 4,
            "type": [
              "array",
              "null"
            ]
          },
          "revision": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "revision",
          "destinations"
        ],
        "type": "object"
      },
      "State": {
        "additionalProperties": false,
        "properties": {
          "$schema": {
            "description": "A URL to the JSON Schema for this object.",
            "examples": [
              "https://example.com/schemas/State.json"
            ],
            "format": "uri",
            "readOnly": true,
            "type": "string"
          },
          "accent": {
            "type": "string"
          },
          "canAdmin": {
            "type": "boolean"
          },
          "courses": {
            "items": {
              "$ref": "#/components/schemas/Course"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "drafts": {
            "items": {
              "$ref": "#/components/schemas/Course"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "enrolments": {
            "items": {
              "$ref": "#/components/schemas/Enrolment"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "limited": {
            "type": "boolean"
          },
          "logo": {
            "type": "string"
          },
          "organisation": {
            "type": "string"
          },
          "people": {
            "items": {
              "$ref": "#/components/schemas/Person"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "resources": {
            "items": {
              "$ref": "#/components/schemas/Resource"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "roles": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "savedCourseIds": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "supportEmail": {
            "type": "string"
          },
          "supportUrl": {
            "type": "string"
          },
          "timezone": {
            "type": "string"
          },
          "user": {
            "$ref": "#/components/schemas/Person"
          }
        },
        "required": [
          "resources",
          "savedCourseIds",
          "canAdmin",
          "logo",
          "accent",
          "supportEmail",
          "supportUrl",
          "timezone",
          "drafts",
          "limited",
          "organisation",
          "user",
          "roles",
          "courses",
          "people",
          "enrolments"
        ],
        "type": "object"
      },
      "SwitchInputBody": {
        "additionalProperties": false,
        "properties": {
          "$schema": {
            "description": "A URL to the JSON Schema for this object.",
            "examples": [
              "https://example.com/schemas/SwitchInputBody.json"
            ],
            "format": "uri",
            "readOnly": true,
            "type": "string"
          },
          "organisation_id": {
            "description": "Organisation to enter",
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "organisation_id"
        ],
        "type": "object"
      },
      "Unit": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "type": "object"
      },
      "Video": {
        "additionalProperties": false,
        "properties": {
          "captionsReviewed": {
            "type": "boolean"
          },
          "hash": {
            "maxLength": 64,
            "type": "string"
          },
          "id": {
            "maxLength": 32,
            "type": "string"
          },
          "provider": {
            "enum": [
              "youtube",
              "vimeo",
              "vimeo_api"
            ],
            "type": "string"
          }
        },
        "required": [
          "provider",
          "id",
          "captionsReviewed"
        ],
        "type": "object"
      },
      "View": {
        "additionalProperties": false,
        "properties": {
          "$schema": {
            "description": "A URL to the JSON Schema for this object.",
            "examples": [
              "https://example.com/schemas/View.json"
            ],
            "format": "uri",
            "readOnly": true,
            "type": "string"
          },
          "canManage": {
            "type": "boolean"
          },
          "capabilities": {
            "items": {
              "$ref": "#/components/schemas/Capability"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "events": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "organisationId": {
            "type": "string"
          },
          "preferences": {
            "$ref": "#/components/schemas/Preference"
          },
          "settings": {
            "$ref": "#/components/schemas/Settings"
          },
          "vimeoApi": {
            "type": "boolean"
          }
        },
        "required": [
          "organisationId",
          "preferences",
          "settings",
          "capabilities",
          "canManage",
          "vimeoApi",
          "events"
        ],
        "type": "object"
      }
    },
    "securitySchemes": {
      "browserSession": {
        "description": "Secure HTTP-only browser session issued by /auth/login and its callback. Not an API key for third-party services. Company and role checks apply.",
        "in": "cookie",
        "name": "__Host-session",
        "type": "apiKey"
      },
      "csrfCookie": {
        "description": "CSRF cookie issued with the session. Required alongside the session and CSRF header for protected writes.",
        "in": "cookie",
        "name": "__Host-csrf",
        "type": "apiKey"
      },
      "csrfHeader": {
        "description": "Same-origin app copies the __Host-csrf cookie into this header. The server validates it against the stored session secret and requires a matching Origin.",
        "in": "header",
        "name": "X-CSRF-Token",
        "type": "apiKey"
      }
    }
  },
  "info": {
    "title": "ZubLMS API",
    "version": "0.0.0-dev"
  },
  "openapi": "3.1.0",
  "paths": {
    "/api/v1/activity/config": {
      "get": {
        "description": " Anonymous access uses an installation-selected organisation and a secure visitor cookie. Anonymous writes require exact same-origin Origin; authenticated writes require session CSRF verification.",
        "operationId": "activity-config",
        "parameters": [
          {
            "in": "cookie",
            "name": "__Host-session",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "cookie",
            "name": "__Host-activity",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "cookie",
            "name": "__Host-csrf",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Origin",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "User-Agent",
            "schema": {
              "maxLength": 512,
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Activity-Path",
            "schema": {
              "maxLength": 256,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/View"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "browserSession": [],
            "csrfCookie": [],
            "csrfHeader": []
          },
          {}
        ],
        "summary": "Current event destinations and privacy choices",
        "tags": [
          "Activity \u0026 video"
        ]
      }
    },
    "/api/v1/activity/events": {
      "post": {
        "description": "Browser-observed engagement is not an authoritative completion or assessment. Optional forwarding requires consent at capture and dispatch. Events have stable IDs; changed replay payloads conflict. No free-form properties, URLs, search text or profile data are accepted. Anonymous access uses an installation-selected organisation and a secure visitor cookie. Anonymous writes require exact same-origin Origin; authenticated writes require session CSRF verification.",
        "operationId": "activity-capture",
        "parameters": [
          {
            "in": "cookie",
            "name": "__Host-session",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "cookie",
            "name": "__Host-activity",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "cookie",
            "name": "__Host-csrf",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Origin",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "User-Agent",
            "schema": {
              "maxLength": 512,
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Activity-Path",
            "schema": {
              "maxLength": 256,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Event"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "browserSession": [],
            "csrfCookie": [],
            "csrfHeader": []
          },
          {}
        ],
        "summary": "Record an allowlisted activity or video engagement event",
        "tags": [
          "Activity \u0026 video"
        ]
      }
    },
    "/api/v1/activity/history": {
      "get": {
        "operationId": "activity-history",
        "parameters": [
          {
            "in": "cookie",
            "name": "__Host-session",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "cookie",
            "name": "__Host-activity",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "cookie",
            "name": "__Host-csrf",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Origin",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "User-Agent",
            "schema": {
              "maxLength": 512,
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Activity-Path",
            "schema": {
              "maxLength": 256,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Receipt"
                  },
                  "type": [
                    "array",
                    "null"
                  ]
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "browserSession": [],
            "csrfCookie": [],
            "csrfHeader": []
          }
        ],
        "summary": "Recent company activity and provider submission status",
        "tags": [
          "Activity \u0026 video"
        ]
      }
    },
    "/api/v1/activity/preferences": {
      "put": {
        "description": " Anonymous access uses an installation-selected organisation and a secure visitor cookie. Anonymous writes require exact same-origin Origin; authenticated writes require session CSRF verification.",
        "operationId": "activity-preferences",
        "parameters": [
          {
            "in": "cookie",
            "name": "__Host-session",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "cookie",
            "name": "__Host-activity",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "cookie",
            "name": "__Host-csrf",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Origin",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "User-Agent",
            "schema": {
              "maxLength": 512,
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Activity-Path",
            "schema": {
              "maxLength": 256,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Preference"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Preference"
                }
              }
            },
            "description": "OK",
            "headers": {
              "Domain": {
                "schema": {
                  "type": "string"
                }
              },
              "Expires": {
                "schema": {
                  "type": "string"
                }
              },
              "HttpOnly": {
                "schema": {
                  "type": "boolean"
                }
              },
              "MaxAge": {
                "schema": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "Name": {
                "schema": {
                  "type": "string"
                }
              },
              "Partitioned": {
                "schema": {
                  "type": "boolean"
                }
              },
              "Path": {
                "schema": {
                  "type": "string"
                }
              },
              "Quoted": {
                "schema": {
                  "type": "boolean"
                }
              },
              "Raw": {
                "schema": {
                  "type": "string"
                }
              },
              "RawExpires": {
                "schema": {
                  "type": "string"
                }
              },
              "SameSite": {
                "schema": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "Secure": {
                "schema": {
                  "type": "boolean"
                }
              },
              "Set-Cookie": {
                "schema": {
                  "type": "string"
                }
              },
              "Unparsed": {
                "schema": {
                  "type": "string"
                }
              },
              "Value": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "browserSession": [],
            "csrfCookie": [],
            "csrfHeader": []
          },
          {}
        ],
        "summary": "Choose optional analytics and marketing event sharing",
        "tags": [
          "Activity \u0026 video"
        ]
      }
    },
    "/api/v1/activity/settings": {
      "put": {
        "operationId": "activity-settings",
        "parameters": [
          {
            "in": "cookie",
            "name": "__Host-session",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "cookie",
            "name": "__Host-activity",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "cookie",
            "name": "__Host-csrf",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Origin",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "User-Agent",
            "schema": {
              "maxLength": 512,
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Activity-Path",
            "schema": {
              "maxLength": 256,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Settings"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "browserSession": [],
            "csrfCookie": [],
            "csrfHeader": []
          }
        ],
        "summary": "Choose company destinations and allowed event types",
        "tags": [
          "Activity \u0026 video"
        ]
      }
    },
    "/api/v1/activity/video/{enrolment}/{activity}": {
      "get": {
        "operationId": "video-playback",
        "parameters": [
          {
            "in": "cookie",
            "name": "__Host-session",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "cookie",
            "name": "__Host-activity",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "cookie",
            "name": "__Host-csrf",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Origin",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "User-Agent",
            "schema": {
              "maxLength": 512,
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Activity-Path",
            "schema": {
              "maxLength": 256,
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "enrolment",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "activity",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Playback"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "browserSession": [],
            "csrfCookie": [],
            "csrfHeader": []
          }
        ],
        "summary": "Resolve authorised video playback and last observed position",
        "tags": [
          "Activity \u0026 video"
        ]
      }
    },
    "/api/v1/company": {
      "get": {
        "operationId": "company-read",
        "parameters": [
          {
            "in": "cookie",
            "name": "__Host-session",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Company"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "browserSession": []
          }
        ],
        "summary": "Read company settings",
        "tags": [
          "Company administration"
        ]
      },
      "put": {
        "operationId": "company-update",
        "parameters": [
          {
            "in": "cookie",
            "name": "__Host-session",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "cookie",
            "name": "__Host-csrf",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Origin",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Company"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Company"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "browserSession": [],
            "csrfCookie": [],
            "csrfHeader": []
          }
        ],
        "summary": "Update company settings",
        "tags": [
          "Company administration"
        ]
      }
    },
    "/api/v1/company/access": {
      "post": {
        "operationId": "company-access",
        "parameters": [
          {
            "in": "cookie",
            "name": "__Host-session",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "cookie",
            "name": "__Host-csrf",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Origin",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccessChange"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "browserSession": [],
            "csrfCookie": [],
            "csrfHeader": []
          }
        ],
        "summary": "Change member access as an organisation owner",
        "tags": [
          "Company administration"
        ]
      }
    },
    "/api/v1/company/audit": {
      "get": {
        "operationId": "company-audit",
        "parameters": [
          {
            "in": "cookie",
            "name": "__Host-session",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Audit"
                  },
                  "type": [
                    "array",
                    "null"
                  ]
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "browserSession": []
          }
        ],
        "summary": "Read the latest 100 company administration events",
        "tags": [
          "Company administration"
        ]
      }
    },
    "/api/v1/company/people": {
      "get": {
        "operationId": "company-people",
        "parameters": [
          {
            "in": "cookie",
            "name": "__Host-session",
            "schema": {
              "type": "string"
            }
          },
          {
            "explode": false,
            "in": "query",
            "name": "after",
            "schema": {
              "maxLength": 36,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/People"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "browserSession": []
          }
        ],
        "summary": "Read company members and role scopes",
        "tags": [
          "Company administration"
        ]
      }
    },
    "/api/v1/company/sso": {
      "get": {
        "operationId": "company-sso-read",
        "parameters": [
          {
            "in": "cookie",
            "name": "__Host-session",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SSOView"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "browserSession": []
          }
        ],
        "summary": "Read redacted SSO setup",
        "tags": [
          "Company administration"
        ]
      },
      "put": {
        "operationId": "company-sso-save",
        "parameters": [
          {
            "in": "cookie",
            "name": "__Host-session",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "cookie",
            "name": "__Host-csrf",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Origin",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SSOChange"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SSOView"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "browserSession": [],
            "csrfCookie": [],
            "csrfHeader": []
          }
        ],
        "summary": "Save an encrypted SSO draft",
        "tags": [
          "Company administration"
        ]
      }
    },
    "/api/v1/company/sso/actions": {
      "post": {
        "operationId": "company-sso-action",
        "parameters": [
          {
            "in": "cookie",
            "name": "__Host-session",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "cookie",
            "name": "__Host-csrf",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Origin",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SSOAction"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SSOView"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "browserSession": [],
            "csrfCookie": [],
            "csrfHeader": []
          }
        ],
        "summary": "Validate or submit SSO for operator review",
        "tags": [
          "Company administration"
        ]
      }
    },
    "/api/v1/company/sso/connections": {
      "get": {
        "operationId": "company-sso-connections",
        "parameters": [
          {
            "in": "cookie",
            "name": "__Host-session",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SSOConnections"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "browserSession": []
          }
        ],
        "summary": "List company SSO connections without secrets",
        "tags": [
          "Company administration"
        ]
      }
    },
    "/api/v1/company/sso/connections/{connection}": {
      "get": {
        "operationId": "company-sso-connection",
        "parameters": [
          {
            "in": "cookie",
            "name": "__Host-session",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "connection",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SSOView"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "browserSession": []
          }
        ],
        "summary": "Read one connection or prepare an unused UUID draft",
        "tags": [
          "Company administration"
        ]
      },
      "put": {
        "operationId": "company-sso-connection-save",
        "parameters": [
          {
            "in": "cookie",
            "name": "__Host-session",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "cookie",
            "name": "__Host-csrf",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Origin",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "connection",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SSOChange"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SSOView"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "browserSession": [],
            "csrfCookie": [],
            "csrfHeader": []
          }
        ],
        "summary": "Save one encrypted SSO connection and exact domain routes",
        "tags": [
          "Company administration"
        ]
      }
    },
    "/api/v1/company/sso/connections/{connection}/actions": {
      "post": {
        "operationId": "company-sso-connection-action",
        "parameters": [
          {
            "in": "cookie",
            "name": "__Host-session",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "cookie",
            "name": "__Host-csrf",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Origin",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "connection",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SSOAction"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SSOView"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "browserSession": [],
            "csrfCookie": [],
            "csrfHeader": []
          }
        ],
        "summary": "Validate, request activation or block one SSO connection",
        "tags": [
          "Company administration"
        ]
      }
    },
    "/api/v1/enrolments/{id}/certificate": {
      "get": {
        "operationId": "certificate-download",
        "parameters": [
          {
            "in": "cookie",
            "name": "__Host-session",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "explode": false,
            "in": "query",
            "name": "format",
            "schema": {
              "default": "pdf",
              "enum": [
                "pdf",
                "html"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "browserSession": []
          }
        ],
        "summary": "Download current authorised completion evidence",
        "tags": [
          "Evidence"
        ]
      }
    },
    "/api/v1/messages": {
      "get": {
        "operationId": "messages-list",
        "parameters": [
          {
            "in": "cookie",
            "name": "__Host-session",
            "schema": {
              "type": "string"
            }
          },
          {
            "explode": false,
            "in": "query",
            "name": "folder",
            "schema": {
              "default": "inbox",
              "enum": [
                "inbox",
                "sent",
                "drafts"
              ],
              "type": "string"
            }
          },
          {
            "explode": false,
            "in": "query",
            "name": "after",
            "schema": {
              "maxLength": 300,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page"
                }
              }
            },
            "description": "OK",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "browserSession": []
          }
        ],
        "summary": "Read your inbox, sent messages or drafts",
        "tags": [
          "Messaging"
        ]
      },
      "put": {
        "operationId": "messages-save",
        "parameters": [
          {
            "in": "cookie",
            "name": "__Host-session",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "cookie",
            "name": "__Host-csrf",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Origin",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Draft"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Message"
                }
              }
            },
            "description": "OK",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "browserSession": [],
            "csrfCookie": [],
            "csrfHeader": []
          }
        ],
        "summary": "Save your draft with a revision check",
        "tags": [
          "Messaging"
        ]
      }
    },
    "/api/v1/messages/preferences": {
      "put": {
        "operationId": "messages-preferences",
        "parameters": [
          {
            "in": "cookie",
            "name": "__Host-session",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "cookie",
            "name": "__Host-csrf",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Origin",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MessagePreferenceInputBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "browserSession": [],
            "csrfCookie": [],
            "csrfHeader": []
          }
        ],
        "summary": "Choose whether to receive optional message email alerts",
        "tags": [
          "Messaging"
        ]
      }
    },
    "/api/v1/messages/{id}": {
      "get": {
        "operationId": "messages-read",
        "parameters": [
          {
            "in": "cookie",
            "name": "__Host-session",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Message"
                }
              }
            },
            "description": "OK",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "browserSession": []
          }
        ],
        "summary": "Read a message you sent or received",
        "tags": [
          "Messaging"
        ]
      }
    },
    "/api/v1/messages/{id}/read": {
      "post": {
        "operationId": "messages-mark-read",
        "parameters": [
          {
            "in": "cookie",
            "name": "__Host-session",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "cookie",
            "name": "__Host-csrf",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Origin",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "browserSession": [],
            "csrfCookie": [],
            "csrfHeader": []
          }
        ],
        "summary": "Mark your own in-app message as read",
        "tags": [
          "Messaging"
        ]
      }
    },
    "/api/v1/messages/{id}/send": {
      "post": {
        "description": "In-app receipt and optional email jobs commit atomically. Repeat the same message ID and revision after an ambiguous response. Optional email is a private-link alert, requires recipient opt-in and provider configuration, and SMTP acceptance is not delivery confirmation.",
        "operationId": "messages-send",
        "parameters": [
          {
            "in": "cookie",
            "name": "__Host-session",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "cookie",
            "name": "__Host-csrf",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Origin",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MessageSendInputBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "browserSession": [],
            "csrfCookie": [],
            "csrfHeader": []
          }
        ],
        "summary": "Send the reviewed draft to its selected audience",
        "tags": [
          "Messaging"
        ]
      }
    },
    "/api/v1/reports": {
      "get": {
        "operationId": "report-history",
        "parameters": [
          {
            "in": "cookie",
            "name": "__Host-session",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ReportHistoryItem"
                  },
                  "type": [
                    "array",
                    "null"
                  ]
                }
              }
            },
            "description": "OK",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "browserSession": []
          }
        ],
        "summary": "Read own recent report requests",
        "tags": [
          "Reports"
        ]
      }
    },
    "/api/v1/reports/enrolments": {
      "post": {
        "operationId": "report-request",
        "parameters": [
          {
            "in": "cookie",
            "name": "__Host-session",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "cookie",
            "name": "__Host-csrf",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Origin",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReportCreateInputBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportStatus"
                }
              }
            },
            "description": "Accepted"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "browserSession": [],
            "csrfCookie": [],
            "csrfHeader": []
          }
        ],
        "summary": "Queue a scoped enrolment CSV",
        "tags": [
          "Reports"
        ]
      }
    },
    "/api/v1/reports/{id}": {
      "get": {
        "operationId": "report-status",
        "parameters": [
          {
            "in": "cookie",
            "name": "__Host-session",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportStatus"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "browserSession": []
          }
        ],
        "summary": "Read own report request status",
        "tags": [
          "Reports"
        ]
      }
    },
    "/api/v1/reports/{id}/download": {
      "get": {
        "operationId": "report-download",
        "parameters": [
          {
            "in": "cookie",
            "name": "__Host-session",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "browserSession": []
          }
        ],
        "summary": "Download a current scoped report",
        "tags": [
          "Reports"
        ]
      }
    },
    "/api/v1/workspace": {
      "get": {
        "operationId": "workspace-read",
        "parameters": [
          {
            "in": "cookie",
            "name": "__Host-session",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/State"
                }
              }
            },
            "description": "OK",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "browserSession": []
          }
        ],
        "summary": "Current authorised native workspace",
        "tags": [
          "Workspace"
        ]
      }
    },
    "/api/v1/workspace/commands": {
      "post": {
        "operationId": "workspace-command",
        "parameters": [
          {
            "in": "cookie",
            "name": "__Host-session",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "cookie",
            "name": "__Host-csrf",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Origin",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Command"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "browserSession": [],
            "csrfCookie": [],
            "csrfHeader": []
          }
        ],
        "summary": "Apply an authenticated native workspace action",
        "tags": [
          "Workspace"
        ]
      }
    },
    "/auth/backchannel-logout": {
      "post": {
        "description": "OIDC back-channel logout form. Verifies the configured issuer, client audience, signature, expiry and logout event. Does not use browser cookies. Duplicate valid notifications are idempotent.",
        "operationId": "browser-backchannel-logout",
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "properties": {
                  "logout_token": {
                    "description": "Signed OIDC logout token",
                    "type": "string"
                  }
                },
                "required": [
                  "logout_token"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Matching sessions revoked or notification already applied"
          },
          "400": {
            "description": "Invalid logout token or form"
          },
          "503": {
            "description": "Revocation unavailable; provider should retry"
          }
        },
        "summary": "Receive signed provider session revocation",
        "tags": [
          "Authentication"
        ]
      }
    },
    "/auth/callback": {
      "get": {
        "description": "Exchanges one authorisation code and sets a host-only session cookie.",
        "operationId": "browser-callback",
        "parameters": [
          {
            "explode": false,
            "in": "query",
            "name": "code",
            "schema": {
              "type": "string"
            }
          },
          {
            "explode": false,
            "in": "query",
            "name": "state",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "303": {
            "description": "See Other",
            "headers": {
              "Domain": {
                "schema": {
                  "type": "string"
                }
              },
              "Expires": {
                "schema": {
                  "type": "string"
                }
              },
              "HttpOnly": {
                "schema": {
                  "type": "boolean"
                }
              },
              "Location": {
                "schema": {
                  "type": "string"
                }
              },
              "MaxAge": {
                "schema": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "Name": {
                "schema": {
                  "type": "string"
                }
              },
              "Partitioned": {
                "schema": {
                  "type": "boolean"
                }
              },
              "Path": {
                "schema": {
                  "type": "string"
                }
              },
              "Quoted": {
                "schema": {
                  "type": "boolean"
                }
              },
              "Raw": {
                "schema": {
                  "type": "string"
                }
              },
              "RawExpires": {
                "schema": {
                  "type": "string"
                }
              },
              "SameSite": {
                "schema": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "Secure": {
                "schema": {
                  "type": "boolean"
                }
              },
              "Set-Cookie": {
                "schema": {
                  "type": "string"
                }
              },
              "Unparsed": {
                "schema": {
                  "type": "string"
                }
              },
              "Value": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Complete browser sign-in",
        "tags": [
          "Authentication"
        ]
      }
    },
    "/auth/company-sso": {
      "get": {
        "operationId": "company-sso-login",
        "parameters": [
          {
            "in": "cookie",
            "name": "__Host-session",
            "schema": {
              "type": "string"
            }
          },
          {
            "explode": false,
            "in": "query",
            "name": "connection",
            "schema": {
              "maxLength": 36,
              "type": "string"
            }
          },
          {
            "explode": false,
            "in": "query",
            "name": "domain",
            "schema": {
              "maxLength": 253,
              "type": "string"
            }
          }
        ],
        "responses": {
          "302": {
            "description": "Found",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "browserSession": []
          }
        ],
        "summary": "Start one explicitly selected or uniquely resolved company SSO connection",
        "tags": [
          "Authentication"
        ]
      }
    },
    "/auth/company-sso/options": {
      "get": {
        "operationId": "company-sso-choices",
        "parameters": [
          {
            "in": "cookie",
            "name": "__Host-session",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SSOChoices"
                }
              }
            },
            "description": "OK",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "browserSession": []
          }
        ],
        "summary": "List active sign-in choices for the resolved company",
        "tags": [
          "Authentication"
        ]
      }
    },
    "/auth/login": {
      "get": {
        "description": "Redirects to the configured identity provider. The tenant comes from the verified host.",
        "operationId": "browser-login",
        "responses": {
          "302": {
            "description": "Found",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Start browser sign-in",
        "tags": [
          "Authentication"
        ]
      }
    },
    "/auth/logout": {
      "post": {
        "description": "Requires the session CSRF secret and a matching Origin.",
        "operationId": "browser-logout",
        "parameters": [
          {
            "in": "cookie",
            "name": "__Host-session",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "cookie",
            "name": "__Host-csrf",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Origin",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "headers": {
              "Domain": {
                "schema": {
                  "type": "string"
                }
              },
              "Expires": {
                "schema": {
                  "type": "string"
                }
              },
              "HttpOnly": {
                "schema": {
                  "type": "boolean"
                }
              },
              "MaxAge": {
                "schema": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "Name": {
                "schema": {
                  "type": "string"
                }
              },
              "Partitioned": {
                "schema": {
                  "type": "boolean"
                }
              },
              "Path": {
                "schema": {
                  "type": "string"
                }
              },
              "Quoted": {
                "schema": {
                  "type": "boolean"
                }
              },
              "Raw": {
                "schema": {
                  "type": "string"
                }
              },
              "RawExpires": {
                "schema": {
                  "type": "string"
                }
              },
              "SameSite": {
                "schema": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "Secure": {
                "schema": {
                  "type": "boolean"
                }
              },
              "Set-Cookie": {
                "schema": {
                  "type": "string"
                }
              },
              "Unparsed": {
                "schema": {
                  "type": "string"
                }
              },
              "Value": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "browserSession": [],
            "csrfCookie": [],
            "csrfHeader": []
          }
        ],
        "summary": "End the browser session",
        "tags": [
          "Authentication"
        ]
      }
    },
    "/auth/memberships": {
      "get": {
        "description": "Lists organisations linked to the session's identity. The list comes from the session, not from a client-supplied tenant.",
        "operationId": "browser-memberships",
        "parameters": [
          {
            "in": "cookie",
            "name": "__Host-session",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MembershipsOutputBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "browserSession": []
          }
        ],
        "summary": "Organisations for this sign-in",
        "tags": [
          "Authentication"
        ]
      }
    },
    "/auth/profile": {
      "get": {
        "description": "Decrypts the signed-in user's profile. A key outage returns nothing.",
        "operationId": "browser-profile",
        "parameters": [
          {
            "in": "cookie",
            "name": "__Host-session",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProfileOutputBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "browserSession": []
          }
        ],
        "summary": "Current encrypted profile",
        "tags": [
          "Authentication"
        ]
      },
      "put": {
        "description": "Updates only the signed-in member's personal details. Requires the stored CSRF secret and matching Origin. Contact email does not change the sign-in identity.",
        "operationId": "browser-profile-update",
        "parameters": [
          {
            "in": "cookie",
            "name": "__Host-session",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "cookie",
            "name": "__Host-csrf",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Origin",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProfileDetails"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "browserSession": [],
            "csrfCookie": [],
            "csrfHeader": []
          }
        ],
        "summary": "Update your profile",
        "tags": [
          "Authentication"
        ]
      }
    },
    "/auth/session": {
      "get": {
        "description": "Returns the bound user. A suspended user is refused.",
        "operationId": "browser-session",
        "parameters": [
          {
            "in": "cookie",
            "name": "__Host-session",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionOutputBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "browserSession": []
          }
        ],
        "summary": "Current browser session",
        "tags": [
          "Authentication"
        ]
      }
    },
    "/auth/switch": {
      "post": {
        "description": "Rotates the browser session into another membership. The previous cookie stops working.",
        "operationId": "browser-switch",
        "parameters": [
          {
            "in": "cookie",
            "name": "__Host-session",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "cookie",
            "name": "__Host-csrf",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Origin",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SwitchInputBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content",
            "headers": {
              "Domain": {
                "schema": {
                  "type": "string"
                }
              },
              "Expires": {
                "schema": {
                  "type": "string"
                }
              },
              "HttpOnly": {
                "schema": {
                  "type": "boolean"
                }
              },
              "MaxAge": {
                "schema": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "Name": {
                "schema": {
                  "type": "string"
                }
              },
              "Partitioned": {
                "schema": {
                  "type": "boolean"
                }
              },
              "Path": {
                "schema": {
                  "type": "string"
                }
              },
              "Quoted": {
                "schema": {
                  "type": "boolean"
                }
              },
              "Raw": {
                "schema": {
                  "type": "string"
                }
              },
              "RawExpires": {
                "schema": {
                  "type": "string"
                }
              },
              "SameSite": {
                "schema": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "Secure": {
                "schema": {
                  "type": "boolean"
                }
              },
              "Set-Cookie": {
                "schema": {
                  "type": "string"
                }
              },
              "Unparsed": {
                "schema": {
                  "type": "string"
                }
              },
              "Value": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "browserSession": [],
            "csrfCookie": [],
            "csrfHeader": []
          }
        ],
        "summary": "Switch organisation",
        "tags": [
          "Authentication"
        ]
      }
    },
    "/health/live": {
      "get": {
        "description": "Process-only liveness check. Does not inspect dependencies.",
        "operationId": "health-live",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LiveOutputBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Liveness probe",
        "tags": [
          "Runtime"
        ]
      }
    },
    "/health/ready": {
      "get": {
        "description": "Local configuration and schema readiness. Remote dependency outages use capability health, not this probe.",
        "operationId": "health-ready",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReadyOutputBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Readiness probe",
        "tags": [
          "Runtime"
        ]
      }
    },
    "/version": {
      "get": {
        "description": "Build identity without secrets.",
        "operationId": "version",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Info"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Build version",
        "tags": [
          "Runtime"
        ]
      }
    }
  }
}
