{"openapi":"3.1.0","info":{"title":"Scribe Service","description":"Clinical scribe service skeleton","version":"1.0.0"},"paths":{"/v1/{workspace_id}/sessions":{"get":{"tags":["Sessions"],"summary":"List Sessions","operationId":"list-sessions","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"continuation_token","in":"query","required":false,"schema":{"title":"Continuation Token"}},{"name":"created_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created After"}},{"name":"created_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created Before"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionListResponse"}}}},"401":{"description":"Bearer token is absent or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The principal is outside this workspace or provider scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No provider-owned resource exists at this URL.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Generation cannot proceed for the current session state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Clinical generation is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Sessions"],"summary":"Create Session","operationId":"create-session","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSessionRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionResponse"}}}},"401":{"description":"Bearer token is absent or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The principal is outside this workspace or provider scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"external_id is already in use by another provider (`conflict`), or was reused with a different fingerprint (`idempotency_key_conflict`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Request validation failed (`validation_error`); a non-in-person `mode` was requested (`use_zoom_endpoint`) — the generic create is in-person only, create a Zoom session via POST /v1/{workspace_id}/zoom/sessions; no canonical `visit_type` was supplied to resolve a supported amd-* template (`note_template_required`); or the `visit_type`/`note_template` does not map to a supported amd-* template (`unsupported_note_template`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/{workspace_id}/sessions/{session_id}/allocate":{"post":{"tags":["Sessions"],"summary":"Allocate Session","description":"Allocate a scribe-streaming GameServer for an owned session and return `{host, expires_at}`.\n\nThe dispatcher leg of create -> allocate -> WS-attach (decision 3): the browser never allocates.\nThe allocation is intentionally NOT persisted as a session mutation — a reconnect re-allocates a\nfresh GameServer, and the WS attach re-verifies ownership.","operationId":"allocate-session","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AllocateResponse"}}}},"401":{"description":"Bearer token is absent or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The principal is outside this workspace or provider scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No provider-owned resource exists at this URL.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The session is not in an allocatable state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"No streaming capacity is available; retry after the `Retry-After` interval.","headers":{"Retry-After":{"description":"Seconds to wait before retrying (retryable capacity signal).","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/{workspace_id}/sessions/{session_id}/ticket":{"post":{"tags":["Sessions"],"summary":"Mint Attach Ticket","description":"Mint a WS attach ticket for an owned, non-terminal session and return `{ticket, expires_at}`.\n\nA thin server-side wrapper over identity's RFC 8693 ``token_exchange`` grant (the mint lives in\nidentity): it forwards the browser's raw provider JWT as ``subject_token`` so identity binds the\nticket to this session/workspace/provider (``aud=scribe-streaming``, scope\n``scribe:streams:connect``, ~5-min TTL). Routing this through the Scribe API keeps the browser's\nCORS surface a single service — CORS can't scope identity's ``/token`` to one grant type. The SDK\n`connectionProvider` calls this on every (re)connect and presents the ticket at the streaming\nworker's WS handshake.","operationId":"mint-attach-ticket","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketResponse"}}}},"401":{"description":"Bearer token is absent or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Missing scribe:sessions:write, wrong provider, or identity rejected the subject token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No provider-owned session exists at this URL.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The session is terminal; no attach ticket can be minted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Ticket minting is temporarily unavailable; please retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/{workspace_id}/sessions/{session_id}":{"get":{"tags":["Sessions"],"summary":"Get Session","operationId":"get-session","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionResponse"}}}},"401":{"description":"Bearer token is absent or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The principal is outside this workspace or provider scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No provider-owned resource exists at this URL.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Generation cannot proceed for the current session state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Clinical generation is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["Sessions"],"summary":"Update Session","description":"Patch an owned session's mutable fields.\n\nIdempotent; only fields present in the body are written (sending `external_appointment_id: null`\nclears the link). A session's `mode` is fixed at create and is not a field on UpdateSessionRequest,\nso PATCH cannot flip a session to zoom (that would mint a bot-less Zoom session that never went\nthrough the saga at POST /zoom/sessions — the 5dca2633 failure class). Returns the full refreshed\nsession so callers see accurate artifact availability.\n\n`effective_started_at` / `effective_ended_at` (phase 114) set the clinician-confirmed visit start / end the\nEHR note's times use; omitted leaves one untouched, `null` resets it to the recorded `started_at` /\n`ended_at`. Both are rejected once the session is terminal — a finalized note completes its session in the\nsame transaction, so a submitted note's times are locked. The resulting pair must keep the end strictly\nafter the start (validated together when both are sent, else against the stored counterpart); a start must\nnot be in the future or more than 12 hours before the session was created; an end only once the session has\nended, not in the future, and at most 12 hours after the start. The session row is locked for the check +\nwrite, so an edit cannot race a finalize.","operationId":"update-session","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSessionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionResponse"}}}},"401":{"description":"Bearer token is absent or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The principal is outside this workspace or provider scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No provider-owned resource exists at this URL.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The session is terminal (its note was finalized, or it ended cancelled/failed) and no longer accepts a checklist re-seed (`visit_type` change) or an `effective_started_at` / `effective_ended_at` edit (`invalid_session_state`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Request validation failed (`validation_error`); a PATCH of `visit_type`/`note_template` would leave the session without a supported amd-* template — no resolvable visit_type (`note_template_required`) or an unrecognized/legacy/mismatched pair (`unsupported_note_template`); or `effective_started_at` / `effective_ended_at` are out of range — end not after start, a time in the future, a start more than 12 hours before the session was created, an end before the session has ended or more than 12 hours after the start (`invalid_effective_start` / `invalid_effective_end`, by offending field).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/{workspace_id}/sessions/{session_id}/end":{"post":{"tags":["Sessions"],"summary":"End Session","description":"End an owned session (`created`/`in-progress` -> `in-review`), guarded against a live stream.\n\nMic race guard (§3A.2): while a streaming worker is attached the WS worker is the sole finalizer,\nso REST end returns 409 `session_streaming` and never touches transcript artifacts. Permitted\nonly for an abandoned/never-streamed session; the guarded flip cannot race the worker or reaper.","operationId":"end-session","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionResponse"}}}},"401":{"description":"Bearer token is absent or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The principal is outside this workspace or provider scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No provider-owned resource exists at this URL.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"A streaming worker is still attached (`session_streaming`) or the session is not in an endable state (`invalid_session_state`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/{workspace_id}/sessions/{session_id}/cancel":{"post":{"tags":["Sessions"],"summary":"Cancel Session","description":"Cancel an owned non-terminal session (-> `cancelled`); the saga-compensation / abort path.\n\nGuarded so a terminal session no-ops with 409 `invalid_session_state`. Touches only status, never\ntranscript artifacts.","operationId":"cancel-session","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionResponse"}}}},"401":{"description":"Bearer token is absent or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The principal is outside this workspace or provider scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No provider-owned resource exists at this URL.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The session is already terminal and cannot be cancelled (`invalid_session_state`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/{workspace_id}/zoom/sessions":{"post":{"tags":["Zoom"],"summary":"Create Zoom Session","description":"Run the whole Zoom capture saga server-side and return `{session, bot_id}` (201).\n\nIn order: validate the meeting link; friendly per-practitioner active-Zoom pre-check; resolve +\ndecrypt the STORED Zoom token (409 `zoom_not_connected` if absent); create the session (born\n`in-progress`, `mode=zoom`, `external_id` idempotency); dispatch the bot via the control plane\nwith the resolved token. If the control plane reports the stored token expired (`rtms_token_expired`),\nthe saga forces a refresh + one dispatch retry; a token that still fails flags the connection\n`reconnect_required` and surfaces 409 `zoom_reconnect_required` (SCR-161). On any other dispatch\nfailure the session is CANCELLED and any straggler bot reaped (503 `bot_dispatch_failed`, or a\ndistinct 409 for meeting-not-found/-live) so nothing is orphaned; a meeting-not-started 409 instead\nDELETES the never-started session + checklist (no row left behind). A duplicate/idempotent create\nwhose bot is already running recovers that bot instead of dispatching a second one.","operationId":"create-zoom-session","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZoomSessionRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZoomSessionResponse"}}}},"401":{"description":"Bearer token is absent or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The principal is outside this workspace or provider scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"meeting_link is not a valid Zoom meeting URL (`invalid_meeting_link`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Request validation failed (`validation_error`); no canonical `visit_type` was supplied to resolve a supported amd-* template (`note_template_required`); or the `visit_type`/`note_template` does not map to a supported amd-* template (`unsupported_note_template`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The practitioner already has an active Zoom session (`active_zoom_session_exists`), the idempotency key was reused with a different fingerprint (`idempotency_key_conflict`), the provider has not connected Zoom (`zoom_not_connected`), Zoom rejected the stored credential — including an invalid/expired OAuth token that couldn't be refreshed at dispatch — and the provider must reconnect (`zoom_reconnect_required`), the Zoom meeting hasn't started yet — start the meeting, then retry (`zoom_meeting_not_started`), the Zoom meeting does not exist — check the meeting link (`zoom_meeting_not_found`), or the meeting link is not the meeting currently running under the provider's Zoom account or Zoom couldn't start capture for it — start it as the host or use the live meeting's link (`zoom_meeting_not_live`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Bot dispatch failed; the session was compensated/cancelled (`bot_dispatch_failed`), or refreshing the stored Zoom token was temporarily unavailable (`zoom_refresh_unavailable`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/{workspace_id}/sessions/{session_id}/zoom/pause":{"post":{"tags":["Zoom"],"summary":"Pause Zoom Bot","description":"Pause the Zoom capture bot bound to an owned session (proxies the control plane).","operationId":"pause-zoom-bot","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZoomBotControlResponse"}}}},"401":{"description":"Bearer token is absent or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The principal is outside this workspace or provider scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No provider-owned resource exists at this URL.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"No live Zoom bot is bound to this session (`bot_not_active`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"The control plane failed to deliver the command (`bot_command_failed`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/{workspace_id}/sessions/{session_id}/zoom/resume":{"post":{"tags":["Zoom"],"summary":"Resume Zoom Bot","description":"Resume the Zoom capture bot bound to an owned session (proxies the control plane).","operationId":"resume-zoom-bot","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZoomBotControlResponse"}}}},"401":{"description":"Bearer token is absent or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The principal is outside this workspace or provider scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No provider-owned resource exists at this URL.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"No live Zoom bot is bound to this session (`bot_not_active`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"The control plane failed to deliver the command (`bot_command_failed`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/{workspace_id}/sessions/{session_id}/events":{"get":{"tags":["Zoom"],"summary":"Stream Zoom Session Events","description":"Bridge the Zoom control plane's event stream to the browser as SSE, under provider-JWT auth.\n\nResolves the owned, live Zoom session to its bound bot, then relays the control plane's Redis-backed\nevent stream (`bot_status` / transcript frames) with a 15 s `ping` keepalive, forwarding\n`Last-Event-ID` upstream for replay and closing cleanly after a terminal `bot_status`. `404` for a\nnon-Zoom, unknown, terminal, or bot-less session. The browser never talks to the control plane and\nholds only its own JWT.","operationId":"stream-zoom-session-events","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}},{"name":"Last-Event-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last-Event-Id"}}],"responses":{"200":{"description":"A live Server-Sent Event stream (header-authenticated `fetch` streaming, not `EventSource`). Emits `bot_status`, `transcript_segment` / `interim_transcript`, and `transcript_finalized` frames plus a `ping` keepalive every 15 s; replays recent events on reconnect via `Last-Event-ID` and closes after a terminal `bot_status`. Each frame is `event: <event>\\ndata: <json>\\n\\n`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZoomSessionEvent"}},"text/event-stream":{"schema":{"$ref":"#/components/schemas/ZoomSessionEvent"}}}},"401":{"description":"Bearer token is absent or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The principal is outside this workspace or provider scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No live Zoom event stream exists (non-Zoom, unknown, or terminal session).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/{workspace_id}/sessions/{session_id}/zoom":{"delete":{"tags":["Zoom"],"summary":"End Zoom Session","description":"End a Zoom session: 202 immediately, then drain the bot + internally finalize in the background.\n\nReturns `{status: \"draining\"}` right away; the background task stops the bot and runs the internal\nzoom-finalize (promote the drained snapshot -> `transcript.json`, flip -> `in-review`) with a\nbounded retry over the drain window. Idempotent: a second DELETE still 202s and no-ops (the drain\ntask sees the already-finalized session and skips promotion). 409 `not_zoom_session` for a mic\nsession.","operationId":"end-zoom-session","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZoomSessionEndResponse"}}}},"401":{"description":"Bearer token is absent or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The principal is outside this workspace or provider scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No provider-owned resource exists at this URL.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The session is not a Zoom session (`not_zoom_session`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/{workspace_id}/appointments":{"get":{"tags":["Appointments"],"summary":"List Appointments","description":"List appointments over a rolling date-anchored window (workspace + provider read-scoped).\n\nPhase 38 ships a deliberate static stub sourced from the superscribe-web seed (see\n`src/appointments.py`); the response contract is stable so the source can later swap to a\ndownstream customer API via a managed External Integration without a wire change. TESTING STOPGAP\n(phase 45a, SUPERSEDED BY PHASE 45): the stub emits a rolling window `[today - back, today +\nforward]` (env-tunable, defaults 14/30 → 360 items max) instead of today-only, so date-pinned\nappointment ids stay in-list across day-rollovers and the phase-41 session join keeps linking a\nsession created on a prior day. Paginated to mirror the sibling `list-sessions` endpoint\n(offset-based `limit` + opaque `continuation_token`); consumers page the full window and bucket\ninto past/today/upcoming client-side.\n\nOptional date-range filter (phase 34): `start_after` (INCLUSIVE) and `start_before` (EXCLUSIVE) are\ntimezone-aware ISO-8601 datetime bounds on the appointment `start` (normalized to UTC; a naive,\ndate-only or malformed bound is a 422), forming the half-open window `[start_after, start_before)`.\nEither may be given alone; both omitted preserves the legacy behavior. The filter is applied\nserver-side over the window BEFORE pagination, so a client that needs only its today+tomorrow slice\nfetches exactly that instead of paging a wide window and filtering client-side. An inverted range or\na span wider than `_MAX_APPOINTMENT_RANGE` returns 400 `invalid_date_range`.\n\nEHR-backed workspaces (ehr-note-writeback phase 03 — the EHR-integrated workspace with its flag on)\nfetch exactly the client's window, so BOTH `start_after` and `start_before` are REQUIRED there\n(omitting either is 400 `invalid_date_range`); the window is never derived server-side.","operationId":"list-appointments","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"continuation_token","in":"query","required":false,"schema":{"title":"Continuation Token"}},{"name":"start_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start After"}},{"name":"start_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Before"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppointmentListResponse"}}}},"400":{"description":"The `start_after` / `start_before` date range is inverted or too wide, or incomplete on an EHR-backed workspace (list-appointments requires both bounds there; get-appointment takes both or neither).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Bearer token is absent or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The principal is outside this workspace or provider scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/{workspace_id}/appointments/{appointment_id}":{"get":{"tags":["Appointments"],"summary":"Get Appointment","description":"Get one appointment by id. An EHR-backed workspace reads the single appointment straight from the\nEHR by id (ehr-note-writeback phase 59) — no schedule-window fetch-and-scan, so a busy provider's\nwindow can't time out, the root cause of the `appointments_unavailable` 503. A genuine missing\nappointment is 404; a failed EHR fetch is 503 `appointments_unavailable` (never masked as not-found).\nEvery other workspace resolves the id against the static seed.","operationId":"get-appointment","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"appointment_id","in":"path","required":true,"schema":{"type":"string","maxLength":512,"title":"Appointment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppointmentResponse"}}}},"401":{"description":"Bearer token is absent or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The principal is outside this workspace or provider scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No provider-owned resource exists at this URL.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Generation cannot proceed for the current session state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"The EHR appointment could not be fetched (`appointments_unavailable`), or the linked session is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/{workspace_id}/sessions/{session_id}/transcript":{"get":{"tags":["Note & artifacts"],"summary":"Get Transcript","operationId":"get-session-transcript","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TranscriptResponse"}}}},"401":{"description":"Bearer token is absent or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The principal is outside this workspace or provider scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No provider-owned resource exists at this URL.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Generation cannot proceed for the current session state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Clinical generation is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/{workspace_id}/sessions/{session_id}/note":{"get":{"tags":["Note & artifacts"],"summary":"Get Note","operationId":"get-session-note","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteReadResponse"}}}},"401":{"description":"Bearer token is absent or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The principal is outside this workspace or provider scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No provider-owned resource exists at this URL.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Generation cannot proceed for the current session state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Clinical generation is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Note & artifacts"],"summary":"Generate Note","operationId":"generate-session-note","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateNoteRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/GeneratedNoteResponse"},{"$ref":"#/components/schemas/GenerationEnqueueResponse"}],"title":"Response Generate-Session-Note"}}}},"200":{"description":"An identical job already succeeded; the note is returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneratedNoteResponse"}}}},"401":{"description":"Bearer token is absent or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The principal is outside this workspace or provider scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No provider-owned resource exists at this URL.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Generation cannot proceed for the current session state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Clinical generation is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"put":{"tags":["Note & artifacts"],"summary":"Update Note","description":"Versioned structured-note autosave with optimistic concurrency (design §4.2).\n\nAccepts `{base_version, structured}` only: a complete structured-document replacement, validated\nas a full document against the pinned template (phase-71 registry) BEFORE the compare-and-set.\nThe CAS on `version` means two racing writers with the same base_version yield exactly one\nsuccess and one 409 version_conflict. Rejected once the session is terminal (append-only, 409\ninvalid_session_state). 404 when no note has been generated yet. An unsupported template is\nrejected with 422 unsupported_note_template; a missing or invalid structured document with 422\nvalidation_error carrying per-field `details`.","operationId":"update-session-note","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateNoteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateNoteResponse"}}}},"401":{"description":"Bearer token is absent or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The principal is outside this workspace or provider scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No provider-owned resource exists at this URL.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The base_version is stale (`version_conflict`) or the session is terminal (`invalid_session_state`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The pinned template is unknown or the version does not match (`unsupported_note_template`), or the structured document failed template validation (`validation_error`, per-field `details`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/{workspace_id}/sessions/{session_id}/summary":{"get":{"tags":["Note & artifacts"],"summary":"Get Summary","operationId":"get-session-summary","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummaryReadResponse"}}}},"401":{"description":"Bearer token is absent or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The principal is outside this workspace or provider scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No provider-owned resource exists at this URL.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Generation cannot proceed for the current session state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Clinical generation is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Note & artifacts"],"summary":"Generate Summary","operationId":"generate-session-summary","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/GeneratedSummaryResponse"},{"$ref":"#/components/schemas/GenerationEnqueueResponse"}],"title":"Response Generate-Session-Summary"}}}},"200":{"description":"An identical job already succeeded; the summary is returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneratedSummaryResponse"}}}},"401":{"description":"Bearer token is absent or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The principal is outside this workspace or provider scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No provider-owned resource exists at this URL.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Generation cannot proceed for the current session state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Clinical generation is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/{workspace_id}/sessions/{session_id}/checklist":{"get":{"tags":["Note & artifacts"],"summary":"Get Checklist","description":"Read the session's checklist.\n\nThe checklist is instantiated from the session's visit type when the session is created and is\nthe authoritative source of its items, so this returns them from the first frame — including\nbefore any transcript exists. Persisted per-item manual and auto toggle state is overlaid on the\nitems. Returns 404 when the session has no checklist.","operationId":"get-session-checklist","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChecklistReadResponse"}}}},"401":{"description":"Bearer token is absent or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The principal is outside this workspace or provider scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No provider-owned resource exists at this URL.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Generation cannot proceed for the current session state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Clinical generation is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["Note & artifacts"],"summary":"Update Checklist","description":"Merge manual per-item toggles into the checklist state, each provenanced (who/when, source).\n\nRequires a generated checklist (404 otherwise); every toggled id must belong to it (422 per-field\notherwise). Toggles are idempotent upserts, re-toggleable until finalize; 409 invalid_session_state\nonce the session is terminal. Auto-check state (phase 09) is written server-side, never here.","operationId":"update-session-checklist","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateChecklistRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChecklistStateResponse"}}}},"401":{"description":"Bearer token is absent or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The principal is outside this workspace or provider scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No provider-owned resource exists at this URL.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The session is terminal and no longer accepts mutations (`invalid_session_state`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/{workspace_id}/sessions/{session_id}/codes":{"get":{"tags":["Note & artifacts"],"summary":"Get Codes","description":"Reload-safe read of the session's ICD codes (phase 130: session-scoped, not generation-anchored).\n\nReturns EVERY code owned by the caller on this session — both AI suggestions and provider-authored\nrows — so provider codes are visible and the read no longer 404s when no codes generation ever ran.\n``generation_status`` is advisory metadata about the AI generation only (``ready`` when none ran or\nit succeeded, ``pending`` while running, ``failed`` with its error): the ``items`` are authoritative\nregardless.","operationId":"get-session-codes","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodesReadResponse"}}}},"401":{"description":"Bearer token is absent or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The principal is outside this workspace or provider scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No provider-owned resource exists at this URL.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Generation cannot proceed for the current session state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Clinical generation is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Note & artifacts"],"summary":"Generate Codes","description":"Enqueue ICD-10-CM code-suggestion generation for an owned session (explicit regenerate).\n\nAsync ensure-semantics: derives the idempotency identity from the canonical transcript + latest\nnote (no request body), then idempotently enqueues a ``scribe.generations`` job\n(``artifact_kind='codes'``). The worker prompts the model, parses strict-JSON suggestions, and\npersists one ``scribe.icd_suggestions`` row per code (an empty extraction is treated as a failed\ngeneration). Returns 202 with the job envelope, or 200 with the codes if an identical job already\nsucceeded. Codes are also auto-enqueued server-side when the note job succeeds.","operationId":"generate-session-codes","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/GeneratedCodesResponse"},{"$ref":"#/components/schemas/GenerationEnqueueResponse"}],"title":"Response Generate-Session-Codes"}}}},"200":{"description":"An identical job already succeeded; the codes are returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneratedCodesResponse"}}}},"401":{"description":"Bearer token is absent or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The principal is outside this workspace or provider scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No provider-owned resource exists at this URL.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Generation cannot proceed for the current session state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Clinical generation is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/{workspace_id}/sessions/{session_id}/actions":{"get":{"tags":["Note & artifacts"],"summary":"Get Actions","description":"Reload-safe action-items poller (phase 09): the same job-state contract as the other artifacts.","operationId":"get-session-actions","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionsReadResponse"}}}},"401":{"description":"Bearer token is absent or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The principal is outside this workspace or provider scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No provider-owned resource exists at this URL.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Generation cannot proceed for the current session state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Clinical generation is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Note & artifacts"],"summary":"Generate Actions","description":"Enqueue post-visit action-item generation for an owned session (explicit regenerate, phase 09).\n\nAsync ensure-semantics identical to codes/summary: derives the idempotency identity from the\ncanonical transcript + latest note (no request body), idempotently enqueues a ``scribe.generations``\njob (``artifact_kind='actions'``), and returns 202 with the job envelope or 200 with the artifact\nwhen an identical job already succeeded. Actions are also auto-enqueued server-side when the note job\nsucceeds. Rejected once the session is terminal (409 ``invalid_session_state``, post-finalize).","operationId":"generate-session-actions","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/GeneratedActionsResponse"},{"$ref":"#/components/schemas/GenerationEnqueueResponse"}],"title":"Response Generate-Session-Actions"}}}},"200":{"description":"An identical job already succeeded; the actions are returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneratedActionsResponse"}}}},"401":{"description":"Bearer token is absent or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The principal is outside this workspace or provider scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No provider-owned resource exists at this URL.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Generation cannot proceed for the current session state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Clinical generation is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/{workspace_id}/sessions/{session_id}/note/finalize":{"post":{"tags":["Note & artifacts"],"summary":"Finalize Note","description":"Server-authoritative finalize (SPEC §6.1 P4): atomically submit the note + complete the session.\n\nPhase 178: finalize accepts ANY stored note shape — there is no note-content/structural validation\ngate. A note with missing required fields, no approved diagnosis, `amd_confirmed=false`, and/or a\nstructurally-off document finalizes 200. The only non-validation mechanics still enforced are\nownership/scope, `base_version` optimistic concurrency, already-submitted idempotency (200), and the\natomic session completion. An already-submitted note is an idempotent 200. A terminal\ncancelled/failed session is 409 invalid_session_state and the note submit is rolled back with it (the\ntwo writes are one unit of work).\n\nEHR writeback (ehr-note-writeback phase 07): with `scribe.note-writeback-enabled` on for the workspace,\nthe note is POSTed to the EHR inside the same transaction, after the session completes and\nbefore commit. Any writeback failure is `ehr_writeback_failed` (500 when the request can't be built, 502\nwhen the EHR call fails) and rolls both writes back (note stays draft); success commits a `note_writebacks` provenance row with them. The already-submitted\nshort-circuit means a successful finalize never re-posts. A separate submit flag sets\n`submitToAmd`: off, the writeback is a dry run (stored + mapped by the EHR, not written to AMD).","operationId":"finalize-session-note","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinalizeNoteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinalizeNoteResponse"}}}},"401":{"description":"Bearer token is absent or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The principal is outside this workspace or provider scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No provider-owned resource exists at this URL.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The base_version is stale (`version_conflict`) or the session is terminal and cannot be completed by finalize (`invalid_session_state`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The note could not be prepared for the workspace's EHR writeback (`ehr_writeback_failed`); the finalize was rolled back, so the note is still a draft and the session is not completed. `details` carries `{field: 'reason', message: <reason>}` with reason one of `provider_email_missing`, `appointment_link_missing`, `unsupported_note`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"The note could not be written back to the workspace's EHR (`ehr_writeback_failed`); the finalize was rolled back, so the note is still a draft and the session is not completed. `details` carries `{field: 'reason', message: <reason>}` with reason one of `ehr_rejected`, `ehr_unavailable`, `chart_note_failed`, `chart_note_not_written` (AMD submit on), plus `{field: 'ehr_message', message: …}` when the EHR returned an error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/{workspace_id}/sessions/{session_id}/note/regenerate-section":{"post":{"tags":["Note & artifacts"],"summary":"Regenerate Note Section","description":"Regenerate a single section of the note as a new version (async ensure-semantics, phase 09).\n\nReuses the phase-08 note `version` for optimistic concurrency: a stale `base_version` (a manual edit\nor another regen landed since the client read) is rejected up front with 409 version_conflict, and\nthe worker re-checks it under a compare-and-set at persist time so a race can never clobber a newer\nnote. Enqueues an `artifact_kind='note'` job whose params carry `section_id`/`base_version`; the\nworker rewrites that section and persists `base_version + 1`. Returns 202 with the job envelope.\nRejected once the session is terminal (409 invalid_session_state, post-finalize immutability).","operationId":"regenerate-session-note-section","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegenerateSectionRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerationEnqueueResponse"}}}},"401":{"description":"Bearer token is absent or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The principal is outside this workspace or provider scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No provider-owned resource exists at this URL.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The base_version is stale (`version_conflict`) or the session is terminal (`invalid_session_state`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The pinned template is unknown or the version does not match (`unsupported_note_template`), or the structured document failed template validation (`validation_error`, per-field `details`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/{workspace_id}/sessions/{session_id}/codes/{suggestion_id}":{"patch":{"tags":["Note & artifacts"],"summary":"Decide Code","description":"Record a provider's approve/reject decision and/or edit the text of one ICD suggestion.\n\nDecision (approve/reject) applies to any owned row (SPEC §6.1 P4; idempotent, re-decidable until\nfinalize). Text edits (code/description/rationale, phase 130) are honored ONLY for provider-authored\nrows — editing an AI suggestion's text is rejected with 422 ``invalid_code_edit`` (AI codes stay\napprove/reject; reject + add a provider code to change one). 409 invalid_session_state once the\nsession is terminal. 404 when the suggestion is unknown or not owned by the provider.","operationId":"decide-session-code","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}},{"name":"suggestion_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Suggestion Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodeDecisionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodeDecisionResponse"}}}},"401":{"description":"Bearer token is absent or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The principal is outside this workspace or provider scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No provider-owned resource exists at this URL.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The session is terminal and no longer accepts mutations (`invalid_session_state`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/{workspace_id}/sessions/{session_id}/codes/manual":{"post":{"tags":["Note & artifacts"],"summary":"Create Code","description":"Add a provider-authored ICD-10 code to an owned session (phase 130).\n\nPersists the code with ``source='provider'``, ``generation_id=NULL``, and ``decision='approved'``\n(adding a code is an affirmative act → it counts toward the finalize diagnosis gate immediately),\nowned by the caller. Does NOT require a codes generation to exist. 409 invalid_session_state once\nthe session is terminal (post-finalize immutable); scoped ``scribe:notes:rw_own``.","operationId":"create-session-code","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCodeRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodeSuggestionResponse"}}}},"401":{"description":"Bearer token is absent or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The principal is outside this workspace or provider scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No provider-owned resource exists at this URL.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The session is terminal and no longer accepts mutations (`invalid_session_state`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/{workspace_id}/sessions/{session_id}/checklist/auto-check":{"post":{"tags":["Note & artifacts"],"summary":"Auto Check Checklist","description":"LLM auto-check of the generated checklist against the (partial) transcript mid-session (phase 09).\n\nEvaluates each generated checklist item against the best-available transcript and returns a per-item\n`matched` verdict; matched items are persisted as `source='auto'` checklist state that COEXISTS with\nmanual `PATCH /checklist` toggles — the upsert preserves any manually-decided item and never\nclobbers it. No generated checklist yet (or no transcript) → an empty `{matches:[]}`.\n\nNo-op guard (phase 88): the handler hashes the auto-check input (selected transcript + checklist\nitems) and compares it to the last-checked hash stored on the session. An unchanged input\nshort-circuits — no LLM call, no upsert — and returns the already-persisted `source='auto'` state; a\nchanged (or first) input runs the LLM as before and then, under the session row lock, persists both\nthe matched items and the new hash. This keeps a redundant re-check (client double-fire, reconnect,\nor a fire ahead of a fresher server snapshot) cheap regardless of the client's cadence.","operationId":"auto-check-session-checklist","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoCheckResponse"}}}},"401":{"description":"Bearer token is absent or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The principal is outside this workspace or provider scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No provider-owned resource exists at this URL.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The session is terminal and no longer accepts mutations (`invalid_session_state`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/{workspace_id}/sessions/{session_id}/ask":{"post":{"tags":["Note & artifacts"],"summary":"Ask Session","description":"Streaming Q&A over the session transcript + latest note (SPEC §3.3, header-auth fetch streaming).\n\nNot persisted as an artifact — only a provenance row is recorded (its id is the `generation_id` in\nthe terminal `done` frame). Reuses `generation.py`'s provider clients. Allowed on\na terminal session (post-visit Q&A is read-only; the post-finalize immutability guard applies only\nto regenerate-section + actions generation).","operationId":"ask-session","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AskRequest"}}}},"responses":{"200":{"description":"A Server-Sent Event stream (header-authenticated `fetch` streaming, not `EventSource`): one or more `delta` frames each `{text}`, then a terminal `done` frame `{generation_id}`; a `ping` keepalive every 15 s, and an `error` frame if generation fails mid-stream. Each frame is `event: <event>\\ndata: <json>\\n\\n`.","content":{"application/json":{"schema":{}},"text/event-stream":{"schema":{"type":"string"}}}},"401":{"description":"Bearer token is absent or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The principal is outside this workspace or provider scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No provider-owned resource exists at this URL.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Clinical generation is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/{workspace_id}/zoom/oauth/authorize":{"post":{"tags":["Zoom"],"summary":"Start Zoom Oauth","description":"Begin the Zoom connect flow: mint a single-use server-held state + PKCE verifier bound to the\nprovider/workspace and return the short-lived Zoom authorize URL the browser navigates to.\n\n`web_origin` is the initiating web app's origin; if the code-level origin rule accepts it, it is\nthreaded through the state so the callback can 302 the browser back to it (phase 55). A missing or\nrejected origin is dropped and the callback falls back to the configured return URL.","operationId":"start-zoom-oauth","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"web_origin","in":"query","required":false,"schema":{"type":"string","maxLength":2048,"default":"","title":"Web Origin"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZoomAuthorizeResponse"}}}},"401":{"description":"Bearer token is absent or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The principal is outside this workspace or provider scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Zoom connect is temporarily unavailable; retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/{workspace_id}/zoom/oauth/callback":{"get":{"tags":["Zoom"],"summary":"Complete Zoom Oauth","description":"Unauthenticated Zoom redirect target (NO Bearer -- the single-use state is the credential).\n\nValidates + atomically consumes (GETDEL) the state, exchanges the code + PKCE verifier, and stores\nthe encrypted tokens. When the flow carries a code-rule-validated web origin, every outcome --\nsuccess, missing code, failed exchange -- 302s the browser back to that web app's settings route\nwith a success/error flag and renders no JSON to the human. A missing/expired/replayed state has\nno record (and therefore no validated origin), so it returns a 400 rather than redirecting the\nbrowser to a dead host. Opted out of the provider-JWT dependency simply by omitting\n`claims: ScribeClaimsParam`.","operationId":"complete-zoom-oauth","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"code","in":"query","required":false,"schema":{"type":"string","maxLength":2048,"default":"","title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"type":"string","maxLength":512,"default":"","title":"State"}}],"responses":{"307":{"description":"Successful Response"},"302":{"description":"Redirect to the web settings route with a `zoom_connected=true` flag on success or a `zoom_error=<reason>` flag on a failed exchange or missing code."},"400":{"description":"No validated web origin to return to (e.g. an invalid/expired/replayed state).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/{workspace_id}/zoom/connection":{"get":{"tags":["Zoom"],"summary":"Get Zoom Connection","description":"Whether the calling provider has a Zoom connection. NEVER returns token material.\n\nHeals a near-expiry token on the poll (phase 35) so a connected-but-idle workspace never lets its\nZoom token lapse — the refresh + persist happen server-side before the status read, which then\nreflects the outcome (`reconnect_required` is set when Zoom has rejected the stored credential).","operationId":"get-zoom-connection","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZoomConnectionResponse"}}}},"401":{"description":"Bearer token is absent or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The principal is outside this workspace or provider scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Zoom"],"summary":"Delete Zoom Connection","description":"Disconnect Zoom: best-effort revoke at Zoom, delete the row. Idempotent -- deleting a\nnon-existent connection still returns 204.","operationId":"delete-zoom-connection","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"responses":{"204":{"description":"Successful Response"},"401":{"description":"Bearer token is absent or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The principal is outside this workspace or provider scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/{workspace_id}/provider/settings":{"get":{"tags":["Provider settings"],"summary":"Get Provider Settings","description":"The calling provider's persisted scribe settings (currently the default Zoom meeting link).\n\nReturns `{zoom_meeting_link: null}` when the provider has no settings row yet -- an unset link is a\nvalid state, never a 404. Provider-scoped via `_provider_id`; decoupled from the Zoom OAuth\nconnection, so a saved link persists whether or not Zoom is connected.","operationId":"get-provider-settings","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Provider settings"],"summary":"Update Provider Settings","description":"Persist the calling provider's default Zoom meeting link (upsert), or clear it with a null.\n\nThe request model validates a non-null link (an http(s) `zoom.us` URL, personal-room aware, <=2048)\nvia the SAME `ZoomMeetingLink` type the create-zoom-session request uses, so both writes accept\nidentical links; a null clears the stored link. The normalized `str(HttpUrl)` form is stored\n(HttpUrl lowercases the host and adds a trailing slash to a bare origin — a no-op for a real\nmeeting link, which always carries a path). Provider-scoped via `_provider_id`. Returns the\npersisted settings.","operationId":"update-provider-settings","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderSettingsUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"ActionItemResponse":{"properties":{"id":{"type":"string","maxLength":128,"title":"Id"},"text":{"type":"string","maxLength":2000,"title":"Text"},"kind":{"type":"string","maxLength":64,"title":"Kind"}},"type":"object","required":["id","text","kind"],"title":"ActionItemResponse"},"ActionsReadResponse":{"properties":{"generation_status":{"$ref":"#/components/schemas/GenerationReadStatus"},"error":{"anyOf":[{"$ref":"#/components/schemas/ErrorDetail"},{"type":"null"}]},"session_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Session Id"},"items":{"anyOf":[{"items":{"$ref":"#/components/schemas/ActionItemResponse"},"type":"array"},{"type":"null"}],"title":"Items"}},"type":"object","required":["generation_status"],"title":"ActionsReadResponse"},"ActionsResponse":{"properties":{"session_id":{"type":"string","format":"uuid","title":"Session Id"},"items":{"items":{"$ref":"#/components/schemas/ActionItemResponse"},"type":"array","title":"Items"}},"type":"object","required":["session_id","items"],"title":"ActionsResponse"},"AllocateResponse":{"properties":{"host":{"type":"string","maxLength":253,"title":"Host"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"}},"type":"object","required":["host","expires_at"],"title":"AllocateResponse"},"AppointmentListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AppointmentResponse"},"type":"array","title":"Items"},"has_more":{"type":"boolean","title":"Has More"},"continuation_token":{"title":"Continuation Token"}},"type":"object","required":["items","has_more"],"title":"AppointmentListResponse"},"AppointmentResponse":{"properties":{"id":{"type":"string","maxLength":512,"title":"Id"},"session":{"anyOf":[{"$ref":"#/components/schemas/AppointmentSession"},{"type":"null"}]},"start":{"type":"string","format":"date-time","title":"Start"},"end":{"type":"string","format":"date-time","title":"End"},"duration_minutes":{"type":"integer","minimum":0.0,"title":"Duration Minutes"},"reason":{"type":"string","maxLength":256,"title":"Reason"},"appointment_type":{"type":"string","maxLength":256,"title":"Appointment Type"},"patient_name":{"type":"string","maxLength":256,"title":"Patient Name"},"patient_entity_id":{"type":"string","maxLength":512,"title":"Patient Entity Id"},"practitioner_name":{"type":"string","maxLength":256,"title":"Practitioner Name"},"practitioner_entity_id":{"type":"string","maxLength":256,"title":"Practitioner Entity Id"},"location_name":{"type":"string","maxLength":256,"title":"Location Name"},"date_of_birth":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date Of Birth"},"mrn":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Mrn"},"active_conditions":{"items":{"type":"string","maxLength":256},"type":"array","maxItems":100,"title":"Active Conditions"},"medications_to_review":{"items":{"type":"string","maxLength":256},"type":"array","maxItems":100,"title":"Medications To Review"}},"type":"object","required":["id","start","end","duration_minutes","reason","appointment_type","patient_name","patient_entity_id","practitioner_name","practitioner_entity_id","location_name"],"title":"AppointmentResponse"},"AppointmentSession":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"status":{"$ref":"#/components/schemas/SessionStatus"},"external_appointment_id":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"External Appointment Id"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"effective_started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Effective Started At","description":"The clinician's edited visit start when one was saved, else `started_at`."},"effective_started_at_edited":{"type":"boolean","title":"Effective Started At Edited","description":"Whether `effective_started_at` is a clinician edit rather than `started_at`."},"effective_ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Effective Ended At","description":"The clinician's edited visit end when one was saved, else `ended_at`."},"effective_ended_at_edited":{"type":"boolean","title":"Effective Ended At Edited","description":"Whether `effective_ended_at` is a clinician edit rather than `ended_at`."}},"type":"object","required":["id","status","started_at","ended_at","created_at","updated_at","effective_started_at","effective_started_at_edited","effective_ended_at","effective_ended_at_edited"],"title":"AppointmentSession","description":"The scribe session linked to an appointment (most-recent match on external_appointment_id).\n\nA focused summary — id + status + lifecycle timestamps — that lets a client render the\nappointment's visit state (e.g. \"in review\", \"completed\") directly from the appointments list,\nwith no second lookup. It is a strict subset of `SessionResponse` (same field names/types) minus\nthe artifact-availability sub-object: resolving artifact availability needs per-kind LATERAL\njoins, so it is deliberately left to `GET /sessions/{id}` and kept out of the appointment join,\nwhich stays a single cheap `DISTINCT ON` query over `scribe.sessions`."},"ArtifactAvailability":{"type":"string","enum":["pending","available","failed"],"title":"ArtifactAvailability"},"ArtifactAvailabilityResponse":{"properties":{"transcript":{"$ref":"#/components/schemas/ArtifactAvailability"},"note":{"$ref":"#/components/schemas/ArtifactAvailability"},"summary":{"$ref":"#/components/schemas/ArtifactAvailability"},"codes":{"$ref":"#/components/schemas/ArtifactAvailability"}},"type":"object","required":["transcript","note","summary","codes"],"title":"ArtifactAvailabilityResponse"},"ArtifactKind":{"type":"string","enum":["note","summary","checklist","codes","actions"]},"AskHistoryMessage":{"properties":{"role":{"type":"string","enum":["user","assistant"],"title":"Role"},"text":{"type":"string","maxLength":10000,"minLength":1,"title":"Text"}},"type":"object","required":["role","text"],"title":"AskHistoryMessage"},"AskRequest":{"properties":{"question":{"type":"string","maxLength":4000,"minLength":1,"title":"Question"},"history":{"items":{"$ref":"#/components/schemas/AskHistoryMessage"},"type":"array","maxItems":50,"title":"History"}},"type":"object","required":["question"],"title":"AskRequest","description":"Body of `POST /sessions/{id}/ask` — a streaming Q&A over the transcript + latest note.\n\nThe answer streams back as SSE `delta {text}` frames then a terminal `done {generation_id}`; the\nresponse is not persisted as an artifact (only a provenance row is recorded)."},"AutoCheckMatch":{"properties":{"item_id":{"type":"string","maxLength":128,"title":"Item Id"},"category":{"type":"string","maxLength":128,"title":"Category"},"matched":{"type":"boolean","title":"Matched"},"evidence":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Evidence"}},"type":"object","required":["item_id","category","matched"],"title":"AutoCheckMatch"},"AutoCheckResponse":{"properties":{"matches":{"items":{"$ref":"#/components/schemas/AutoCheckMatch"},"type":"array","title":"Matches"}},"type":"object","required":["matches"],"title":"AutoCheckResponse","description":"200 body of `POST /sessions/{id}/checklist/auto-check`: the LLM's per-item match verdict.\n\nMatched items are also persisted server-side as `source='auto'` checklist state (coexisting with,\nand never clobbering, manual `PATCH /checklist` toggles)."},"BotStatusEvent":{"properties":{"state":{"type":"string","enum":["joining","waiting_for_host","waiting_for_participant","playing_disclosure","listening","paused","idle","leaving","done","error"],"title":"State"},"reason":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Reason"}},"type":"object","required":["state"],"title":"BotStatusEvent","description":"`bot_status` SSE frame payload: the Zoom capture bot's lifecycle state (+ optional reason).\n\n`joining -> listening -> paused -> leaving -> done|error`; `reason` carries a machine string on the\noff-happy-path transitions (e.g. `join_timeout`). `done`/`error` are terminal: the event stream\ncloses right after relaying one so the client stops reconnecting."},"CarryForwardAvailableField":{"properties":{"amd_field_code":{"type":"string","maxLength":256,"title":"Amd Field Code"},"label":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Label"},"value":{"anyOf":[{"type":"string","maxLength":100000},{"type":"null"}],"title":"Value"},"source_note_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Source Note Id"},"source_signed_at":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Source Signed At"}},"type":"object","required":["amd_field_code"],"title":"CarryForwardAvailableField","description":"One AMD field with a value available to carry forward from the patient's last signed note\n(ehr-note-writeback phases 62 + 69).\n\nNames the field (+ its human label and the prior signed note the value carries from) AND the carried\ndisplay `value` itself, so the web can pre-fill the editing view with what the EHR would carry and let the\nclinician edit it (phase 70). Built at note read from the EHR carry-forward fetch phase 60 already runs,\nkeyed by the `amd_field_code` scribe maps note fields to.\n\nPHI: `value` is the carried chart/patient display content (reversal approved 2026-10-08). It is returned\nto the authenticated clinician like the note body, but must be masked on the web until the clinician opts\nin (phase 70) and must NEVER be logged — PHI-safe logging surfaces codes/counts only. `source_note_id`\n(an id) and `source_signed_at` (a date) are provenance, not PHI."},"CarryForwardStatus":{"type":"string","enum":["ok","unavailable","not_applicable"]},"ChecklistItemStateResponse":{"properties":{"id":{"type":"string","maxLength":128,"title":"Id"},"label":{"type":"string","maxLength":500,"title":"Label"},"category":{"type":"string","maxLength":128,"title":"Category"},"state":{"type":"string","enum":["open","checked"],"title":"State"},"evidence":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Evidence"},"source":{"anyOf":[{"type":"string","enum":["manual","auto"]},{"type":"null"}],"title":"Source"},"updated_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","label","category","state"],"title":"ChecklistItemStateResponse"},"ChecklistItemToggle":{"properties":{"id":{"type":"string","maxLength":128,"minLength":1,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]*$","title":"Id"},"completed":{"type":"boolean","title":"Completed"},"source":{"type":"string","const":"manual","title":"Source","default":"manual"}},"type":"object","required":["id","completed"],"title":"ChecklistItemToggle"},"ChecklistReadResponse":{"properties":{"generation_status":{"$ref":"#/components/schemas/GenerationReadStatus"},"error":{"anyOf":[{"$ref":"#/components/schemas/ErrorDetail"},{"type":"null"}]},"session_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Session Id"},"title":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Title"},"status":{"anyOf":[{"type":"string","enum":["open","completed","archived"]},{"type":"null"}],"title":"Status"},"items":{"anyOf":[{"items":{"$ref":"#/components/schemas/ChecklistItemStateResponse"},"type":"array"},{"type":"null"}],"title":"Items"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["generation_status"],"title":"ChecklistReadResponse"},"ChecklistStateResponse":{"properties":{"session_id":{"type":"string","format":"uuid","title":"Session Id"},"title":{"type":"string","maxLength":256,"title":"Title"},"status":{"type":"string","enum":["open","completed","archived"],"title":"Status"},"items":{"items":{"$ref":"#/components/schemas/ChecklistItemStateResponse"},"type":"array","title":"Items"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["session_id","title","status","items","updated_at"],"title":"ChecklistStateResponse","description":"Response of `PATCH /sessions/{id}/checklist`: the generated checklist with per-item manual\nstate + provenance overlaid, and status recomputed from the effective item states."},"CodeDecision":{"type":"string","enum":["approved","rejected"]},"CodeDecisionRequest":{"properties":{"decision":{"anyOf":[{"$ref":"#/components/schemas/CodeDecision"},{"type":"null"}]},"code":{"anyOf":[{"type":"string","maxLength":64,"minLength":1},{"type":"null"}],"title":"Code"},"description":{"anyOf":[{"type":"string","maxLength":2000,"minLength":1},{"type":"null"}],"title":"Description"},"rationale":{"anyOf":[{"type":"string","maxLength":10000},{"type":"null"}],"title":"Rationale"}},"type":"object","title":"CodeDecisionRequest","description":"Body of `PATCH /sessions/{id}/codes/{suggestion_id}`.\n\nCarries the provider's per-suggestion decision (V340; idempotent, re-decidable until finalize) and,\nsince phase 130, optional text edits (code/description/rationale). Text edits are honored only for\nprovider-authored rows (AI suggestions stay approve/reject). At least one field must be present."},"CodeDecisionResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"code":{"type":"string","maxLength":64,"title":"Code"},"decision":{"$ref":"#/components/schemas/CodeDecision"},"decided_at":{"type":"string","format":"date-time","title":"Decided At"},"source":{"$ref":"#/components/schemas/CodeSource"}},"type":"object","required":["id","code","decision","decided_at","source"],"title":"CodeDecisionResponse","description":"200 body for a persisted code decision/edit, with when it was decided (who is the caller)."},"CodeSource":{"type":"string","enum":["ai","provider"]},"CodeSuggestionResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"code":{"type":"string","maxLength":64,"title":"Code"},"description":{"type":"string","maxLength":2000,"title":"Description"},"rationale":{"type":"string","maxLength":10000,"title":"Rationale"},"confidence":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Confidence"},"decision":{"anyOf":[{"$ref":"#/components/schemas/CodeDecision"},{"type":"null"}]},"source":{"$ref":"#/components/schemas/CodeSource"}},"type":"object","required":["id","code","description","rationale","source"],"title":"CodeSuggestionResponse"},"CodesReadResponse":{"properties":{"generation_status":{"$ref":"#/components/schemas/GenerationReadStatus"},"error":{"anyOf":[{"$ref":"#/components/schemas/ErrorDetail"},{"type":"null"}]},"session_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Session Id"},"items":{"anyOf":[{"items":{"$ref":"#/components/schemas/CodeSuggestionResponse"},"type":"array"},{"type":"null"}],"title":"Items"}},"type":"object","required":["generation_status"],"title":"CodesReadResponse"},"CodesResponse":{"properties":{"session_id":{"type":"string","format":"uuid","title":"Session Id"},"items":{"items":{"$ref":"#/components/schemas/CodeSuggestionResponse"},"type":"array","title":"Items"}},"type":"object","required":["session_id","items"],"title":"CodesResponse"},"CreateCodeRequest":{"properties":{"code":{"type":"string","maxLength":64,"minLength":1,"title":"Code"},"description":{"type":"string","maxLength":2000,"minLength":1,"title":"Description"},"rationale":{"type":"string","maxLength":10000,"title":"Rationale","default":""}},"type":"object","required":["code","description"],"title":"CreateCodeRequest","description":"Body of `POST /sessions/{id}/codes/manual` (phase 130): a provider-authored ICD code.\n\nPersisted with source='provider', generation_id=NULL, and decision='approved' by default (adding a\ncode is an affirmative act → it counts toward the finalize diagnosis gate immediately). Does not\nrequire a codes generation to exist."},"CreateSessionRequest":{"properties":{"external_appointment_id":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"External Appointment Id"},"external_id":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"External Id"},"mode":{"type":"string","enum":["in_person"],"default":"in_person"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"first_name":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Last Name"},"visit_type":{"anyOf":[{"$ref":"#/components/schemas/VisitType"},{"type":"null"}]},"note_template":{"anyOf":[{"$ref":"#/components/schemas/NoteTemplate"},{"type":"null"}]},"timezone":{"type":"string","enum":["Africa/Abidjan","Africa/Accra","Africa/Addis_Ababa","Africa/Algiers","Africa/Asmara","Africa/Asmera","Africa/Bamako","Africa/Bangui","Africa/Banjul","Africa/Bissau","Africa/Blantyre","Africa/Brazzaville","Africa/Bujumbura","Africa/Cairo","Africa/Casablanca","Africa/Ceuta","Africa/Conakry","Africa/Dakar","Africa/Dar_es_Salaam","Africa/Djibouti","Africa/Douala","Africa/El_Aaiun","Africa/Freetown","Africa/Gaborone","Africa/Harare","Africa/Johannesburg","Africa/Juba","Africa/Kampala","Africa/Khartoum","Africa/Kigali","Africa/Kinshasa","Africa/Lagos","Africa/Libreville","Africa/Lome","Africa/Luanda","Africa/Lubumbashi","Africa/Lusaka","Africa/Malabo","Africa/Maputo","Africa/Maseru","Africa/Mbabane","Africa/Mogadishu","Africa/Monrovia","Africa/Nairobi","Africa/Ndjamena","Africa/Niamey","Africa/Nouakchott","Africa/Ouagadougou","Africa/Porto-Novo","Africa/Sao_Tome","Africa/Timbuktu","Africa/Tripoli","Africa/Tunis","Africa/Windhoek","America/Adak","America/Anchorage","America/Anguilla","America/Antigua","America/Araguaina","America/Argentina/Buenos_Aires","America/Argentina/Catamarca","America/Argentina/ComodRivadavia","America/Argentina/Cordoba","America/Argentina/Jujuy","America/Argentina/La_Rioja","America/Argentina/Mendoza","America/Argentina/Rio_Gallegos","America/Argentina/Salta","America/Argentina/San_Juan","America/Argentina/San_Luis","America/Argentina/Tucuman","America/Argentina/Ushuaia","America/Aruba","America/Asuncion","America/Atikokan","America/Atka","America/Bahia","America/Bahia_Banderas","America/Barbados","America/Belem","America/Belize","America/Blanc-Sablon","America/Boa_Vista","America/Bogota","America/Boise","America/Buenos_Aires","America/Cambridge_Bay","America/Campo_Grande","America/Cancun","America/Caracas","America/Catamarca","America/Cayenne","America/Cayman","America/Chicago","America/Chihuahua","America/Ciudad_Juarez","America/Coral_Harbour","America/Cordoba","America/Costa_Rica","America/Coyhaique","America/Creston","America/Cuiaba","America/Curacao","America/Danmarkshavn","America/Dawson","America/Dawson_Creek","America/Denver","America/Detroit","America/Dominica","America/Edmonton","America/Eirunepe","America/El_Salvador","America/Ensenada","America/Fort_Nelson","America/Fort_Wayne","America/Fortaleza","America/Glace_Bay","America/Godthab","America/Goose_Bay","America/Grand_Turk","America/Grenada","America/Guadeloupe","America/Guatemala","America/Guayaquil","America/Guyana","America/Halifax","America/Havana","America/Hermosillo","America/Indiana/Indianapolis","America/Indiana/Knox","America/Indiana/Marengo","America/Indiana/Petersburg","America/Indiana/Tell_City","America/Indiana/Vevay","America/Indiana/Vincennes","America/Indiana/Winamac","America/Indianapolis","America/Inuvik","America/Iqaluit","America/Jamaica","America/Jujuy","America/Juneau","America/Kentucky/Louisville","America/Kentucky/Monticello","America/Knox_IN","America/Kralendijk","America/La_Paz","America/Lima","America/Los_Angeles","America/Louisville","America/Lower_Princes","America/Maceio","America/Managua","America/Manaus","America/Marigot","America/Martinique","America/Matamoros","America/Mazatlan","America/Mendoza","America/Menominee","America/Merida","America/Metlakatla","America/Mexico_City","America/Miquelon","America/Moncton","America/Monterrey","America/Montevideo","America/Montreal","America/Montserrat","America/Nassau","America/New_York","America/Nipigon","America/Nome","America/Noronha","America/North_Dakota/Beulah","America/North_Dakota/Center","America/North_Dakota/New_Salem","America/Nuuk","America/Ojinaga","America/Panama","America/Pangnirtung","America/Paramaribo","America/Phoenix","America/Port-au-Prince","America/Port_of_Spain","America/Porto_Acre","America/Porto_Velho","America/Puerto_Rico","America/Punta_Arenas","America/Rainy_River","America/Rankin_Inlet","America/Recife","America/Regina","America/Resolute","America/Rio_Branco","America/Rosario","America/Santa_Isabel","America/Santarem","America/Santiago","America/Santo_Domingo","America/Sao_Paulo","America/Scoresbysund","America/Shiprock","America/Sitka","America/St_Barthelemy","America/St_Johns","America/St_Kitts","America/St_Lucia","America/St_Thomas","America/St_Vincent","America/Swift_Current","America/Tegucigalpa","America/Thule","America/Thunder_Bay","America/Tijuana","America/Toronto","America/Tortola","America/Vancouver","America/Virgin","America/Whitehorse","America/Winnipeg","America/Yakutat","America/Yellowknife","Antarctica/Casey","Antarctica/Davis","Antarctica/DumontDUrville","Antarctica/Macquarie","Antarctica/Mawson","Antarctica/McMurdo","Antarctica/Palmer","Antarctica/Rothera","Antarctica/South_Pole","Antarctica/Syowa","Antarctica/Troll","Antarctica/Vostok","Arctic/Longyearbyen","Asia/Aden","Asia/Almaty","Asia/Amman","Asia/Anadyr","Asia/Aqtau","Asia/Aqtobe","Asia/Ashgabat","Asia/Ashkhabad","Asia/Atyrau","Asia/Baghdad","Asia/Bahrain","Asia/Baku","Asia/Bangkok","Asia/Barnaul","Asia/Beirut","Asia/Bishkek","Asia/Brunei","Asia/Calcutta","Asia/Chita","Asia/Choibalsan","Asia/Chongqing","Asia/Chungking","Asia/Colombo","Asia/Dacca","Asia/Damascus","Asia/Dhaka","Asia/Dili","Asia/Dubai","Asia/Dushanbe","Asia/Famagusta","Asia/Gaza","Asia/Harbin","Asia/Hebron","Asia/Ho_Chi_Minh","Asia/Hong_Kong","Asia/Hovd","Asia/Irkutsk","Asia/Istanbul","Asia/Jakarta","Asia/Jayapura","Asia/Jerusalem","Asia/Kabul","Asia/Kamchatka","Asia/Karachi","Asia/Kashgar","Asia/Kathmandu","Asia/Katmandu","Asia/Khandyga","Asia/Kolkata","Asia/Krasnoyarsk","Asia/Kuala_Lumpur","Asia/Kuching","Asia/Kuwait","Asia/Macao","Asia/Macau","Asia/Magadan","Asia/Makassar","Asia/Manila","Asia/Muscat","Asia/Nicosia","Asia/Novokuznetsk","Asia/Novosibirsk","Asia/Omsk","Asia/Oral","Asia/Phnom_Penh","Asia/Pontianak","Asia/Pyongyang","Asia/Qatar","Asia/Qostanay","Asia/Qyzylorda","Asia/Rangoon","Asia/Riyadh","Asia/Saigon","Asia/Sakhalin","Asia/Samarkand","Asia/Seoul","Asia/Shanghai","Asia/Singapore","Asia/Srednekolymsk","Asia/Taipei","Asia/Tashkent","Asia/Tbilisi","Asia/Tehran","Asia/Tel_Aviv","Asia/Thimbu","Asia/Thimphu","Asia/Tokyo","Asia/Tomsk","Asia/Ujung_Pandang","Asia/Ulaanbaatar","Asia/Ulan_Bator","Asia/Urumqi","Asia/Ust-Nera","Asia/Vientiane","Asia/Vladivostok","Asia/Yakutsk","Asia/Yangon","Asia/Yekaterinburg","Asia/Yerevan","Atlantic/Azores","Atlantic/Bermuda","Atlantic/Canary","Atlantic/Cape_Verde","Atlantic/Faeroe","Atlantic/Faroe","Atlantic/Jan_Mayen","Atlantic/Madeira","Atlantic/Reykjavik","Atlantic/South_Georgia","Atlantic/St_Helena","Atlantic/Stanley","Australia/ACT","Australia/Adelaide","Australia/Brisbane","Australia/Broken_Hill","Australia/Canberra","Australia/Currie","Australia/Darwin","Australia/Eucla","Australia/Hobart","Australia/LHI","Australia/Lindeman","Australia/Lord_Howe","Australia/Melbourne","Australia/NSW","Australia/North","Australia/Perth","Australia/Queensland","Australia/South","Australia/Sydney","Australia/Tasmania","Australia/Victoria","Australia/West","Australia/Yancowinna","Brazil/Acre","Brazil/DeNoronha","Brazil/East","Brazil/West","CET","CST6CDT","Canada/Atlantic","Canada/Central","Canada/Eastern","Canada/Mountain","Canada/Newfoundland","Canada/Pacific","Canada/Saskatchewan","Canada/Yukon","Chile/Continental","Chile/EasterIsland","Cuba","EET","EST","EST5EDT","Egypt","Eire","Etc/GMT","Etc/GMT+0","Etc/GMT+1","Etc/GMT+10","Etc/GMT+11","Etc/GMT+12","Etc/GMT+2","Etc/GMT+3","Etc/GMT+4","Etc/GMT+5","Etc/GMT+6","Etc/GMT+7","Etc/GMT+8","Etc/GMT+9","Etc/GMT-0","Etc/GMT-1","Etc/GMT-10","Etc/GMT-11","Etc/GMT-12","Etc/GMT-13","Etc/GMT-14","Etc/GMT-2","Etc/GMT-3","Etc/GMT-4","Etc/GMT-5","Etc/GMT-6","Etc/GMT-7","Etc/GMT-8","Etc/GMT-9","Etc/GMT0","Etc/Greenwich","Etc/UCT","Etc/UTC","Etc/Universal","Etc/Zulu","Europe/Amsterdam","Europe/Andorra","Europe/Astrakhan","Europe/Athens","Europe/Belfast","Europe/Belgrade","Europe/Berlin","Europe/Bratislava","Europe/Brussels","Europe/Bucharest","Europe/Budapest","Europe/Busingen","Europe/Chisinau","Europe/Copenhagen","Europe/Dublin","Europe/Gibraltar","Europe/Guernsey","Europe/Helsinki","Europe/Isle_of_Man","Europe/Istanbul","Europe/Jersey","Europe/Kaliningrad","Europe/Kiev","Europe/Kirov","Europe/Kyiv","Europe/Lisbon","Europe/Ljubljana","Europe/London","Europe/Luxembourg","Europe/Madrid","Europe/Malta","Europe/Mariehamn","Europe/Minsk","Europe/Monaco","Europe/Moscow","Europe/Nicosia","Europe/Oslo","Europe/Paris","Europe/Podgorica","Europe/Prague","Europe/Riga","Europe/Rome","Europe/Samara","Europe/San_Marino","Europe/Sarajevo","Europe/Saratov","Europe/Simferopol","Europe/Skopje","Europe/Sofia","Europe/Stockholm","Europe/Tallinn","Europe/Tirane","Europe/Tiraspol","Europe/Ulyanovsk","Europe/Uzhgorod","Europe/Vaduz","Europe/Vatican","Europe/Vienna","Europe/Vilnius","Europe/Volgograd","Europe/Warsaw","Europe/Zagreb","Europe/Zaporozhye","Europe/Zurich","Factory","GB","GB-Eire","GMT","GMT+0","GMT-0","GMT0","Greenwich","HST","Hongkong","Iceland","Indian/Antananarivo","Indian/Chagos","Indian/Christmas","Indian/Cocos","Indian/Comoro","Indian/Kerguelen","Indian/Mahe","Indian/Maldives","Indian/Mauritius","Indian/Mayotte","Indian/Reunion","Iran","Israel","Jamaica","Japan","Kwajalein","Libya","MET","MST","MST7MDT","Mexico/BajaNorte","Mexico/BajaSur","Mexico/General","NZ","NZ-CHAT","Navajo","PRC","PST8PDT","Pacific/Apia","Pacific/Auckland","Pacific/Bougainville","Pacific/Chatham","Pacific/Chuuk","Pacific/Easter","Pacific/Efate","Pacific/Enderbury","Pacific/Fakaofo","Pacific/Fiji","Pacific/Funafuti","Pacific/Galapagos","Pacific/Gambier","Pacific/Guadalcanal","Pacific/Guam","Pacific/Honolulu","Pacific/Johnston","Pacific/Kanton","Pacific/Kiritimati","Pacific/Kosrae","Pacific/Kwajalein","Pacific/Majuro","Pacific/Marquesas","Pacific/Midway","Pacific/Nauru","Pacific/Niue","Pacific/Norfolk","Pacific/Noumea","Pacific/Pago_Pago","Pacific/Palau","Pacific/Pitcairn","Pacific/Pohnpei","Pacific/Ponape","Pacific/Port_Moresby","Pacific/Rarotonga","Pacific/Saipan","Pacific/Samoa","Pacific/Tahiti","Pacific/Tarawa","Pacific/Tongatapu","Pacific/Truk","Pacific/Wake","Pacific/Wallis","Pacific/Yap","Poland","Portugal","ROC","ROK","Singapore","Turkey","UCT","US/Alaska","US/Aleutian","US/Arizona","US/Central","US/East-Indiana","US/Eastern","US/Hawaii","US/Indiana-Starke","US/Michigan","US/Mountain","US/Pacific","US/Samoa","UTC","Universal","W-SU","WET","Zulu","localtime"],"minLength":1,"title":"Timezone"}},"type":"object","required":["timezone"],"title":"CreateSessionRequest"},"ErrorDetail":{"properties":{"field":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Field"},"message":{"type":"string","maxLength":2000,"title":"Message"}},"type":"object","required":["message"],"title":"ErrorDetail"},"ErrorResponse":{"properties":{"code":{"type":"string","maxLength":64,"title":"Code"},"message":{"type":"string","maxLength":2000,"title":"Message"},"correlation_id":{"type":"string","format":"uuid","title":"Correlation Id"},"details":{"items":{"$ref":"#/components/schemas/ErrorDetail"},"type":"array","title":"Details"}},"type":"object","required":["code","message","correlation_id"],"title":"ErrorResponse"},"FieldValueSource":{"type":"string","enum":["transcript","clinician_edit","session_meta","carried_forward","amd_identity_autowrite"]},"FieldWritebackDisposition":{"type":"string","enum":["written","omitted"]},"FieldWritebackReason":{"type":"string","enum":["written_from_transcript","written_from_clinician_edit","written_session_meta","omitted_carried_forward","omitted_identity_autowritten","omitted_empty_no_value","not_populated"]},"FinalizeNoteRequest":{"properties":{"base_version":{"type":"integer","minimum":1.0,"title":"Base Version"}},"type":"object","required":["base_version"],"title":"FinalizeNoteRequest","description":"Body of `POST /sessions/{id}/note/finalize` (V340).\n\n`base_version` is the note version the provider is finalizing; a stale value returns\n409 version_conflict. Server-side gate validation runs on the *stored* document, not the\nrequest, so a client cannot bypass required-field gates."},"FinalizeNoteResponse":{"properties":{"note":{"$ref":"#/components/schemas/NoteResponse"},"writeback_status":{"$ref":"#/components/schemas/WritebackStatus"},"field_dispositions":{"items":{"$ref":"#/components/schemas/NoteFieldDisposition"},"type":"array","title":"Field Dispositions"}},"type":"object","required":["note","writeback_status"],"title":"FinalizeNoteResponse"},"GenerateNoteRequest":{"properties":{"note_type":{"anyOf":[{"$ref":"#/components/schemas/NoteTemplate"},{"type":"null"}]},"instructions":{"anyOf":[{"type":"string","maxLength":1200},{"type":"null"}],"title":"Instructions"}},"type":"object","title":"GenerateNoteRequest"},"GeneratedActionsResponse":{"properties":{"actions":{"$ref":"#/components/schemas/ActionsResponse"},"generation":{"$ref":"#/components/schemas/GenerationMetadata"}},"type":"object","required":["actions","generation"],"title":"GeneratedActionsResponse"},"GeneratedCodesResponse":{"properties":{"codes":{"$ref":"#/components/schemas/CodesResponse"},"generation":{"$ref":"#/components/schemas/GenerationMetadata"}},"type":"object","required":["codes","generation"],"title":"GeneratedCodesResponse"},"GeneratedNoteResponse":{"properties":{"note":{"$ref":"#/components/schemas/NoteResponse"},"generation":{"$ref":"#/components/schemas/GenerationMetadata"}},"type":"object","required":["note","generation"],"title":"GeneratedNoteResponse"},"GeneratedSummaryResponse":{"properties":{"summary":{"$ref":"#/components/schemas/SummaryResponse"},"generation":{"$ref":"#/components/schemas/GenerationMetadata"}},"type":"object","required":["summary","generation"],"title":"GeneratedSummaryResponse"},"GenerationEnqueueResponse":{"properties":{"generation":{"$ref":"#/components/schemas/GenerationEnvelope"}},"type":"object","required":["generation"],"title":"GenerationEnqueueResponse","description":"202 body for an enqueued (or collapsed-onto-in-flight) generation job."},"GenerationEnvelope":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"artifact_kind":{"$ref":"#/components/schemas/ArtifactKind"},"status":{"$ref":"#/components/schemas/GenerationStatus"}},"type":"object","required":["id","artifact_kind","status"],"title":"GenerationEnvelope"},"GenerationMetadata":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"model_provider":{"type":"string","const":"openai","title":"Model Provider"},"model_name":{"type":"string","maxLength":256,"title":"Model Name"},"prompt_version":{"type":"string","maxLength":64,"title":"Prompt Version"},"generated_at":{"type":"string","format":"date-time","title":"Generated At"}},"type":"object","required":["id","model_provider","model_name","prompt_version","generated_at"],"title":"GenerationMetadata"},"GenerationReadStatus":{"type":"string","enum":["ready","pending","failed"]},"GenerationStatus":{"type":"string","enum":["pending","succeeded","failed"]},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"NoteFieldDisposition":{"properties":{"amd_field_code":{"type":"string","maxLength":256,"title":"Amd Field Code"},"label":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Label"},"disposition":{"$ref":"#/components/schemas/FieldWritebackDisposition"},"reason":{"$ref":"#/components/schemas/FieldWritebackReason"},"source":{"anyOf":[{"$ref":"#/components/schemas/FieldValueSource"},{"type":"null"}]},"source_note_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Source Note Id"},"source_signed_at":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Source Signed At"},"source_template_name":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Source Template Name"},"display_value":{"anyOf":[{"type":"string","maxLength":100000},{"type":"null"}],"title":"Display Value"}},"type":"object","required":["amd_field_code","disposition","reason"],"title":"NoteFieldDisposition","description":"What a note writeback did with one AMD field, and why (ehr-note-writeback phase 61).\n\nOne entry per AMD field the backend knows about for the note template — joined from what scribe sent\n(written), the EHR carry-forward response (carried → omitted, with the source signed note),\nthe identity block (identity AMD auto-writes), the per-visit session codes (written session-meta), and\nthe template's known fields (not-populated). `display_value` carries the carried / identity value the\nEHR uses (set for `carried_forward` + `amd_identity_autowrite`; a written field's value already lives\nin the note document, so it is omitted here). PHI: `display_value` is chart/patient content — returned\nto the authenticated clinician like the note body, but NEVER logged."},"NoteGenerationReadStatus":{"type":"string","enum":["ready","pending","failed","empty"]},"NoteReadResponse":{"properties":{"generation_status":{"$ref":"#/components/schemas/NoteGenerationReadStatus"},"writeback_status":{"$ref":"#/components/schemas/WritebackStatus"},"error":{"anyOf":[{"$ref":"#/components/schemas/ErrorDetail"},{"type":"null"}]},"session_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Session Id"},"type":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Type"},"status":{"anyOf":[{"type":"string","enum":["draft","submitted","voided"]},{"type":"null"}],"title":"Status"},"body":{"anyOf":[{"type":"string","maxLength":1000000},{"type":"null"}],"title":"Body","deprecated":true},"structured":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Structured"},"version":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Version"},"generated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Generated At"},"signed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Signed At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"carry_forward_available":{"items":{"$ref":"#/components/schemas/CarryForwardAvailableField"},"type":"array","title":"Carry Forward Available"},"carry_forward_status":{"$ref":"#/components/schemas/CarryForwardStatus","description":"Whether carry_forward_available reflects the EHR: ok (fetched), unavailable (EHR-linked note but the carry-forward could not be fetched), or not_applicable (no EHR writeback for this note).","default":"not_applicable"},"clinician_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Clinician Name"},"prior_diagnoses":{"items":{"$ref":"#/components/schemas/PriorDiagnosisResponse"},"type":"array","title":"Prior Diagnoses","description":"Diagnoses on the patient's signed prior EHR notes, newest first, each code once — offered in the diagnosis picker. Empty unless carry_forward_status is ok."}},"type":"object","required":["generation_status","writeback_status"],"title":"NoteReadResponse","description":"Reload-safe note poller: artifact fields present only when generation_status == \"ready\".\n\n``generation_status == \"empty\"`` is the phase-147 terminal state for a session ended with zero\nusable transcript segments: no note was (or will be) generated, and no artifact fields are present."},"NoteResponse":{"properties":{"session_id":{"type":"string","format":"uuid","title":"Session Id"},"type":{"type":"string","maxLength":64,"title":"Type"},"status":{"type":"string","enum":["draft","submitted","voided"],"title":"Status"},"body":{"anyOf":[{"type":"string","maxLength":1000000},{"type":"null"}],"title":"Body","deprecated":true},"structured":{"additionalProperties":true,"type":"object","title":"Structured"},"version":{"type":"integer","minimum":1.0,"title":"Version"},"generated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Generated At"},"signed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Signed At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["session_id","type","status","structured","version","generated_at","signed_at","updated_at"],"title":"NoteResponse"},"NoteTemplate":{"type":"string","enum":["amd-psych-intake","amd-psych-intake-ip","amd-psych-progress","amd-psych-progress-ip","amd-therapy-intake","amd-therapy-intake-ip","amd-therapy-progress","amd-therapy-progress-ip"]},"NoteValueSource":{"type":"string","enum":["scribe","clinician"]},"PriorDiagnosisResponse":{"properties":{"code":{"type":"string","maxLength":64,"title":"Code","description":"ICD-10-CM code from the prior note, trimmed and upper-cased."},"description":{"type":"string","maxLength":2000,"title":"Description","description":"Diagnosis description as written on the prior note; empty when only the code was entered.","default":""},"last_signed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Signed At","description":"When the newest signed prior note that used this code was signed (UTC)."}},"type":"object","required":["code"],"title":"PriorDiagnosisResponse","description":"One diagnosis from the patient's signed prior EHR notes (ehr-note-writeback phase 121), offered in the\nnote's diagnosis picker so the clinician can add it with one click.\n\nPHI: `code` and `description` are patient diagnoses — returned to the authenticated clinician like the\nnote body, never logged."},"ProviderSettingsResponse":{"properties":{"zoom_meeting_link":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Zoom Meeting Link"}},"type":"object","title":"ProviderSettingsResponse","description":"Response of `GET`/`PUT /provider/settings` (V366).\n\nThe provider's persisted scribe settings. `zoom_meeting_link` is the server-side default Zoom\nmeeting link, decoupled from the Zoom OAuth connection; `null` means the provider has never saved\none (or has cleared it) -- an unset link is a valid state, never a 404."},"ProviderSettingsUpdateRequest":{"properties":{"zoom_meeting_link":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Zoom Meeting Link"}},"type":"object","title":"ProviderSettingsUpdateRequest","description":"Body of `PUT /provider/settings`.\n\nSets the provider's default Zoom meeting link, or clears it with an explicit `null`. A non-null\nlink is validated as a `zoom.us` http(s) URL (personal-room aware, <=2048) via the shared\n`ZoomMeetingLink` type the create-zoom-session request also uses. The wire value stays a plain JSON\nstring; the handler stores the normalized `str(HttpUrl)`."},"RegenerateSectionRequest":{"properties":{"section_id":{"type":"string","maxLength":128,"minLength":1,"title":"Section Id"},"instructions":{"anyOf":[{"type":"string","maxLength":1200},{"type":"null"}],"title":"Instructions"},"base_version":{"type":"integer","minimum":1.0,"title":"Base Version"}},"type":"object","required":["section_id","base_version"],"title":"RegenerateSectionRequest","description":"Body of `POST /sessions/{id}/note/regenerate-section` (SPEC §6.1 P4).\n\nRegenerates a single named section of the current note. `base_version` is the note version the\nclient last read; a stale value returns 409 version_conflict (never clobbers a racing manual edit)."},"SessionListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/SessionResponse"},"type":"array","title":"Items"},"has_more":{"type":"boolean","title":"Has More"},"continuation_token":{"title":"Continuation Token"}},"type":"object","required":["items","has_more"],"title":"SessionListResponse"},"SessionMode":{"type":"string","enum":["in_person","zoom"],"title":"SessionMode","description":"Modality of a scribe session: an in-person (\"mic\") recording or a Zoom meeting."},"SessionResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"status":{"$ref":"#/components/schemas/SessionStatus"},"mode":{"$ref":"#/components/schemas/SessionMode"},"external_appointment_id":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"External Appointment Id"},"first_name":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Last Name"},"visit_type":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Visit Type"},"note_template":{"anyOf":[{"$ref":"#/components/schemas/NoteTemplate"},{"type":"null"}]},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"local_timezone":{"type":"string","maxLength":64,"title":"Local Timezone"},"artifacts":{"$ref":"#/components/schemas/ArtifactAvailabilityResponse"},"effective_started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Effective Started At","description":"The visit start used for the EHR note's start time, date of service, total time and appointment start: the clinician's edit when one was saved, else `started_at`."},"effective_started_at_edited":{"type":"boolean","title":"Effective Started At Edited","description":"Whether `effective_started_at` is a clinician edit rather than `started_at`."},"effective_ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Effective Ended At","description":"The visit end used for the EHR note's end time and total time: the clinician's edit when one was saved, else `ended_at`."},"effective_ended_at_edited":{"type":"boolean","title":"Effective Ended At Edited","description":"Whether `effective_ended_at` is a clinician edit rather than `ended_at`."}},"type":"object","required":["id","status","mode","started_at","ended_at","created_at","updated_at","local_timezone","artifacts","effective_started_at","effective_started_at_edited","effective_ended_at","effective_ended_at_edited"],"title":"SessionResponse"},"SessionStatus":{"type":"string","enum":["in-progress","in-review","completed","cancelled","failed"],"title":"SessionStatus"},"StructuredFieldValue":{"anyOf":[{"type":"string"},{"type":"boolean"},{"items":{"type":"string"},"type":"array"},{"additionalProperties":true,"type":"object"},{"items":{"additionalProperties":true,"type":"object"},"type":"array"}]},"StructuredNote":{"properties":{"schema_version":{"type":"integer","const":1,"title":"Schema Version"},"template_id":{"type":"string","maxLength":64,"title":"Template Id"},"template_version":{"type":"string","maxLength":32,"title":"Template Version"},"values":{"additionalProperties":{"$ref":"#/components/schemas/StructuredNoteValue"},"type":"object","maxProperties":1000,"title":"Values"},"review":{"$ref":"#/components/schemas/StructuredNoteReview"}},"additionalProperties":false,"type":"object","required":["schema_version","template_id","template_version"],"title":"StructuredNote","description":"The canonical AMD structured-note envelope (design §2.3) — the only note\nrepresentation `PUT /sessions/{id}/note` accepts.\n\nA write is a **complete-document replacement**, not a JSON merge: the client resends\nevery value on each write, changing only what it means to change. The full document is\nvalidated against the pinned template from the phase-71 registry before the CAS update\n(`validate_structured_note`)."},"StructuredNoteReview":{"properties":{"confirmed_sections":{"items":{"type":"string"},"type":"array","maxItems":200,"title":"Confirmed Sections"},"acknowledgments":{"items":{"type":"string"},"type":"array","maxItems":200,"title":"Acknowledgments"},"amd_confirmed":{"type":"boolean","title":"Amd Confirmed","default":false}},"additionalProperties":false,"type":"object","title":"StructuredNoteReview","description":"Provider review/attestation state (design §2.3). `confirmed_sections` names the\ntemplate section ids the provider has confirmed; `amd_confirmed` is the finalize gate\n(evaluated by phase 75). `acknowledgments` is the (currently empty) list of dismissed\nsafety/quality acknowledgments."},"StructuredNoteValue":{"properties":{"value":{"$ref":"#/components/schemas/StructuredFieldValue"},"rationale":{"anyOf":[{"type":"string","maxLength":20000},{"type":"null"}],"title":"Rationale"},"source":{"$ref":"#/components/schemas/NoteValueSource"}},"additionalProperties":false,"type":"object","required":["value","source"],"title":"StructuredNoteValue","description":"One entry of `structured.values`: the field value plus its provenance and an\noptional short rationale (design §2.3 payload)."},"SummaryReadResponse":{"properties":{"generation_status":{"$ref":"#/components/schemas/GenerationReadStatus"},"error":{"anyOf":[{"$ref":"#/components/schemas/ErrorDetail"},{"type":"null"}]},"session_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Session Id"},"summary":{"anyOf":[{"type":"string","maxLength":10000},{"type":"null"}],"title":"Summary"},"generated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Generated At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["generation_status"],"title":"SummaryReadResponse"},"SummaryResponse":{"properties":{"session_id":{"type":"string","format":"uuid","title":"Session Id"},"summary":{"type":"string","maxLength":10000,"title":"Summary"},"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["session_id","summary","generated_at","updated_at"],"title":"SummaryResponse"},"TicketResponse":{"properties":{"ticket":{"type":"string","title":"Ticket"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"}},"type":"object","required":["ticket","expires_at"],"title":"TicketResponse"},"TranscriptFinalizedEvent":{"properties":{},"type":"object","title":"TranscriptFinalizedEvent","description":"`transcript_finalized` SSE frame payload: emitted once, with no body, when the transcript is done."},"TranscriptResponse":{"properties":{"session_id":{"type":"string","format":"uuid","title":"Session Id"},"segments":{"items":{"$ref":"#/components/schemas/TranscriptSegment"},"type":"array","maxItems":100000,"title":"Segments"}},"type":"object","required":["session_id","segments"],"title":"TranscriptResponse"},"TranscriptSegment":{"properties":{"speaker":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Speaker"},"text":{"type":"string","maxLength":100000,"title":"Text"},"start_ms":{"type":"integer","minimum":0.0,"title":"Start Ms"},"end_ms":{"type":"integer","minimum":0.0,"title":"End Ms"}},"type":"object","required":["text","start_ms","end_ms"],"title":"TranscriptSegment"},"TranscriptSegmentEvent":{"properties":{"ordinal":{"type":"integer","title":"Ordinal"},"speaker":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Speaker"},"text":{"type":"string","title":"Text"},"timestamp":{"type":"string","maxLength":64,"title":"Timestamp"}},"type":"object","required":["ordinal","text","timestamp"],"title":"TranscriptSegmentEvent","description":"`transcript_segment` / `interim_transcript` SSE frame payload — one transcript utterance.\n\n`transcript_segment` frames are finalized; `interim_transcript` frames are the not-yet-final\nhypothesis for the same `ordinal` (identical shape). Clients dedupe/replace by `ordinal`."},"UpdateChecklistRequest":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ChecklistItemToggle"},"type":"array","maxItems":100,"minItems":1,"title":"Items"}},"type":"object","required":["items"],"title":"UpdateChecklistRequest","description":"Body of `PATCH /sessions/{id}/checklist` (V340): manual per-item toggles."},"UpdateNoteRequest":{"properties":{"base_version":{"type":"integer","minimum":1.0,"title":"Base Version"},"structured":{"anyOf":[{"$ref":"#/components/schemas/StructuredNote"},{"type":"null"}]}},"type":"object","required":["base_version"],"title":"UpdateNoteRequest","description":"Body of `PUT /sessions/{id}/note` — versioned structured-note autosave (design §4.2).\n\nThe write is a **complete structured-document replacement**: send the full `structured`\nenvelope (every value) on each write, not a partial patch. `base_version` is the version\nthe client last read; a stale value loses the compare-and-set and returns\n409 version_conflict."},"UpdateNoteResponse":{"properties":{"version":{"type":"integer","minimum":1.0,"title":"Version"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["version","updated_at"],"title":"UpdateNoteResponse","description":"200 body for a successful `PUT /sessions/{id}/note`: the new version + write time."},"UpdateSessionRequest":{"properties":{"external_appointment_id":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"External Appointment Id"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"first_name":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Last Name"},"visit_type":{"anyOf":[{"$ref":"#/components/schemas/VisitType"},{"type":"null"}]},"note_template":{"anyOf":[{"$ref":"#/components/schemas/NoteTemplate"},{"type":"null"}]},"effective_started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Effective Started At","description":"The visit's actual start (timezone-aware). `null` resets it to the recorded `started_at`. Must not be in the future, at or after the session's (effective) end, or more than 12 hours before the session was created. Rejected once the session is terminal."},"effective_ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Effective Ended At","description":"The visit's actual end (timezone-aware). `null` resets it to the recorded `ended_at`. Only once the session has ended; must be after the (effective) start, not in the future, and at most 12 hours after the start. Rejected once the session is terminal."}},"type":"object","title":"UpdateSessionRequest","description":"Mutable fields for `PATCH /sessions/{id}`. Only fields present in the body are updated.\n\nA session's `mode` is fixed at create — it is deliberately NOT a field here, so PATCH cannot flip a\nsession to zoom (which would mint a bot-less Zoom session that never went through the saga — the\n`5dca2633` failure class). A Zoom session is created via `POST /v1/{workspace_id}/zoom/sessions`.\n`external_appointment_id` is explicitly nullable — sending `null` clears the link — so the route\ndistinguishes \"field omitted\" (leave as-is) from \"field set to null\" via `exclude_unset`."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VisitType":{"type":"string","enum":["psych-intake","psych-follow-up","therapy-intake","therapy-follow-up"]},"WritebackStatus":{"type":"string","enum":["succeeded","pending","disabled","not_attempted","skipped_unlinked"]},"ZoomAuthorizeResponse":{"properties":{"authorize_url":{"type":"string","maxLength":2048,"title":"Authorize Url"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"}},"type":"object","required":["authorize_url","expires_at"],"title":"ZoomAuthorizeResponse","description":"Response of `POST /zoom/oauth/authorize`.\n\nThe browser navigates the top-level window to `authorize_url` (it cannot carry\nthe in-memory Bearer header on a redirect, so the single-use server-held state\nembedded in the URL is the credential the unauthenticated callback trusts).\n`expires_at` is when that state's short TTL lapses."},"ZoomBotControlResponse":{"properties":{"bot_status":{"type":"string","maxLength":64,"title":"Bot Status"}},"type":"object","required":["bot_status"],"title":"ZoomBotControlResponse","description":"Response of `POST /sessions/{id}/zoom/pause|resume`: the bot's status after the proxied\ncontrol-plane command. The live status transition also arrives over the event stream (phase 06);\nthis is the synchronous ack."},"ZoomConnectionResponse":{"properties":{"connected":{"type":"boolean","title":"Connected"},"zoom_email":{"anyOf":[{"type":"string","maxLength":320},{"type":"null"}],"title":"Zoom Email"},"connected_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Connected At"},"reconnect_required":{"type":"boolean","title":"Reconnect Required","default":false}},"type":"object","required":["connected"],"title":"ZoomConnectionResponse","description":"Response of `GET /zoom/connection`. NEVER carries token material.\n\nDeliberately holds only a boolean plus non-sensitive display fields; the\nencrypted access/refresh tokens live only in `scribe.zoom_connections` and are\nresolved server-side (phase 05) to dispatch a bot, never returned to a browser.\n\n`reconnect_required` is true when Zoom rejected the stored refresh token (revoked/\nexpired), so the poll heals into a terminal state the UX can act on: the provider\nis still `connected` on record, but must re-run the OAuth connect before a Zoom\nstart will succeed."},"ZoomDisclosureRequest":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"audio_key":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Audio Key"}},"type":"object","required":["enabled"],"title":"ZoomDisclosureRequest","description":"Disclosure config for a Zoom capture bot (SPEC §6.1 P3).\n\n`enabled` gates whether the bot plays a recording-disclosure clip on join; `audio_key` names the\nclip when enabled. Passed through server-side to the control plane's bot dispatch — the browser\nnever talks to the control plane directly."},"ZoomSessionEndResponse":{"properties":{"status":{"type":"string","const":"draining","title":"Status"}},"type":"object","required":["status"],"title":"ZoomSessionEndResponse","description":"Response of `DELETE /sessions/{id}/zoom`: acknowledges that the drain + internal zoom-finalize\nis underway. The session flips to `in-review` asynchronously (reaper backstop)."},"ZoomSessionEvent":{"properties":{"event":{"type":"string","enum":["bot_status","transcript_segment","interim_transcript","transcript_finalized","ping"],"title":"Event"},"data":{"anyOf":[{"$ref":"#/components/schemas/BotStatusEvent"},{"$ref":"#/components/schemas/TranscriptSegmentEvent"},{"$ref":"#/components/schemas/TranscriptFinalizedEvent"},{"additionalProperties":true,"type":"object"}],"title":"Data"}},"type":"object","required":["event","data"],"title":"ZoomSessionEvent","description":"One frame on the `GET /sessions/{id}/events` SSE stream (documents the wire contract for the SDK).\n\nEach frame is delivered as `event: <event>\\ndata: <json>\\n\\n`; `ping` carries an empty `{}` body\nand is a keepalive only. The stream is header-authenticated `fetch` streaming (not `EventSource`),\nreplays recent events on reconnect via `Last-Event-ID`, and closes after a terminal `bot_status`."},"ZoomSessionRequest":{"properties":{"meeting_link":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Meeting Link"},"disclosure":{"$ref":"#/components/schemas/ZoomDisclosureRequest"},"external_appointment_id":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"External Appointment Id"},"external_id":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"External Id"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"first_name":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Last Name"},"visit_type":{"anyOf":[{"$ref":"#/components/schemas/VisitType"},{"type":"null"}]},"note_template":{"anyOf":[{"$ref":"#/components/schemas/NoteTemplate"},{"type":"null"}]},"timezone":{"type":"string","enum":["Africa/Abidjan","Africa/Accra","Africa/Addis_Ababa","Africa/Algiers","Africa/Asmara","Africa/Asmera","Africa/Bamako","Africa/Bangui","Africa/Banjul","Africa/Bissau","Africa/Blantyre","Africa/Brazzaville","Africa/Bujumbura","Africa/Cairo","Africa/Casablanca","Africa/Ceuta","Africa/Conakry","Africa/Dakar","Africa/Dar_es_Salaam","Africa/Djibouti","Africa/Douala","Africa/El_Aaiun","Africa/Freetown","Africa/Gaborone","Africa/Harare","Africa/Johannesburg","Africa/Juba","Africa/Kampala","Africa/Khartoum","Africa/Kigali","Africa/Kinshasa","Africa/Lagos","Africa/Libreville","Africa/Lome","Africa/Luanda","Africa/Lubumbashi","Africa/Lusaka","Africa/Malabo","Africa/Maputo","Africa/Maseru","Africa/Mbabane","Africa/Mogadishu","Africa/Monrovia","Africa/Nairobi","Africa/Ndjamena","Africa/Niamey","Africa/Nouakchott","Africa/Ouagadougou","Africa/Porto-Novo","Africa/Sao_Tome","Africa/Timbuktu","Africa/Tripoli","Africa/Tunis","Africa/Windhoek","America/Adak","America/Anchorage","America/Anguilla","America/Antigua","America/Araguaina","America/Argentina/Buenos_Aires","America/Argentina/Catamarca","America/Argentina/ComodRivadavia","America/Argentina/Cordoba","America/Argentina/Jujuy","America/Argentina/La_Rioja","America/Argentina/Mendoza","America/Argentina/Rio_Gallegos","America/Argentina/Salta","America/Argentina/San_Juan","America/Argentina/San_Luis","America/Argentina/Tucuman","America/Argentina/Ushuaia","America/Aruba","America/Asuncion","America/Atikokan","America/Atka","America/Bahia","America/Bahia_Banderas","America/Barbados","America/Belem","America/Belize","America/Blanc-Sablon","America/Boa_Vista","America/Bogota","America/Boise","America/Buenos_Aires","America/Cambridge_Bay","America/Campo_Grande","America/Cancun","America/Caracas","America/Catamarca","America/Cayenne","America/Cayman","America/Chicago","America/Chihuahua","America/Ciudad_Juarez","America/Coral_Harbour","America/Cordoba","America/Costa_Rica","America/Coyhaique","America/Creston","America/Cuiaba","America/Curacao","America/Danmarkshavn","America/Dawson","America/Dawson_Creek","America/Denver","America/Detroit","America/Dominica","America/Edmonton","America/Eirunepe","America/El_Salvador","America/Ensenada","America/Fort_Nelson","America/Fort_Wayne","America/Fortaleza","America/Glace_Bay","America/Godthab","America/Goose_Bay","America/Grand_Turk","America/Grenada","America/Guadeloupe","America/Guatemala","America/Guayaquil","America/Guyana","America/Halifax","America/Havana","America/Hermosillo","America/Indiana/Indianapolis","America/Indiana/Knox","America/Indiana/Marengo","America/Indiana/Petersburg","America/Indiana/Tell_City","America/Indiana/Vevay","America/Indiana/Vincennes","America/Indiana/Winamac","America/Indianapolis","America/Inuvik","America/Iqaluit","America/Jamaica","America/Jujuy","America/Juneau","America/Kentucky/Louisville","America/Kentucky/Monticello","America/Knox_IN","America/Kralendijk","America/La_Paz","America/Lima","America/Los_Angeles","America/Louisville","America/Lower_Princes","America/Maceio","America/Managua","America/Manaus","America/Marigot","America/Martinique","America/Matamoros","America/Mazatlan","America/Mendoza","America/Menominee","America/Merida","America/Metlakatla","America/Mexico_City","America/Miquelon","America/Moncton","America/Monterrey","America/Montevideo","America/Montreal","America/Montserrat","America/Nassau","America/New_York","America/Nipigon","America/Nome","America/Noronha","America/North_Dakota/Beulah","America/North_Dakota/Center","America/North_Dakota/New_Salem","America/Nuuk","America/Ojinaga","America/Panama","America/Pangnirtung","America/Paramaribo","America/Phoenix","America/Port-au-Prince","America/Port_of_Spain","America/Porto_Acre","America/Porto_Velho","America/Puerto_Rico","America/Punta_Arenas","America/Rainy_River","America/Rankin_Inlet","America/Recife","America/Regina","America/Resolute","America/Rio_Branco","America/Rosario","America/Santa_Isabel","America/Santarem","America/Santiago","America/Santo_Domingo","America/Sao_Paulo","America/Scoresbysund","America/Shiprock","America/Sitka","America/St_Barthelemy","America/St_Johns","America/St_Kitts","America/St_Lucia","America/St_Thomas","America/St_Vincent","America/Swift_Current","America/Tegucigalpa","America/Thule","America/Thunder_Bay","America/Tijuana","America/Toronto","America/Tortola","America/Vancouver","America/Virgin","America/Whitehorse","America/Winnipeg","America/Yakutat","America/Yellowknife","Antarctica/Casey","Antarctica/Davis","Antarctica/DumontDUrville","Antarctica/Macquarie","Antarctica/Mawson","Antarctica/McMurdo","Antarctica/Palmer","Antarctica/Rothera","Antarctica/South_Pole","Antarctica/Syowa","Antarctica/Troll","Antarctica/Vostok","Arctic/Longyearbyen","Asia/Aden","Asia/Almaty","Asia/Amman","Asia/Anadyr","Asia/Aqtau","Asia/Aqtobe","Asia/Ashgabat","Asia/Ashkhabad","Asia/Atyrau","Asia/Baghdad","Asia/Bahrain","Asia/Baku","Asia/Bangkok","Asia/Barnaul","Asia/Beirut","Asia/Bishkek","Asia/Brunei","Asia/Calcutta","Asia/Chita","Asia/Choibalsan","Asia/Chongqing","Asia/Chungking","Asia/Colombo","Asia/Dacca","Asia/Damascus","Asia/Dhaka","Asia/Dili","Asia/Dubai","Asia/Dushanbe","Asia/Famagusta","Asia/Gaza","Asia/Harbin","Asia/Hebron","Asia/Ho_Chi_Minh","Asia/Hong_Kong","Asia/Hovd","Asia/Irkutsk","Asia/Istanbul","Asia/Jakarta","Asia/Jayapura","Asia/Jerusalem","Asia/Kabul","Asia/Kamchatka","Asia/Karachi","Asia/Kashgar","Asia/Kathmandu","Asia/Katmandu","Asia/Khandyga","Asia/Kolkata","Asia/Krasnoyarsk","Asia/Kuala_Lumpur","Asia/Kuching","Asia/Kuwait","Asia/Macao","Asia/Macau","Asia/Magadan","Asia/Makassar","Asia/Manila","Asia/Muscat","Asia/Nicosia","Asia/Novokuznetsk","Asia/Novosibirsk","Asia/Omsk","Asia/Oral","Asia/Phnom_Penh","Asia/Pontianak","Asia/Pyongyang","Asia/Qatar","Asia/Qostanay","Asia/Qyzylorda","Asia/Rangoon","Asia/Riyadh","Asia/Saigon","Asia/Sakhalin","Asia/Samarkand","Asia/Seoul","Asia/Shanghai","Asia/Singapore","Asia/Srednekolymsk","Asia/Taipei","Asia/Tashkent","Asia/Tbilisi","Asia/Tehran","Asia/Tel_Aviv","Asia/Thimbu","Asia/Thimphu","Asia/Tokyo","Asia/Tomsk","Asia/Ujung_Pandang","Asia/Ulaanbaatar","Asia/Ulan_Bator","Asia/Urumqi","Asia/Ust-Nera","Asia/Vientiane","Asia/Vladivostok","Asia/Yakutsk","Asia/Yangon","Asia/Yekaterinburg","Asia/Yerevan","Atlantic/Azores","Atlantic/Bermuda","Atlantic/Canary","Atlantic/Cape_Verde","Atlantic/Faeroe","Atlantic/Faroe","Atlantic/Jan_Mayen","Atlantic/Madeira","Atlantic/Reykjavik","Atlantic/South_Georgia","Atlantic/St_Helena","Atlantic/Stanley","Australia/ACT","Australia/Adelaide","Australia/Brisbane","Australia/Broken_Hill","Australia/Canberra","Australia/Currie","Australia/Darwin","Australia/Eucla","Australia/Hobart","Australia/LHI","Australia/Lindeman","Australia/Lord_Howe","Australia/Melbourne","Australia/NSW","Australia/North","Australia/Perth","Australia/Queensland","Australia/South","Australia/Sydney","Australia/Tasmania","Australia/Victoria","Australia/West","Australia/Yancowinna","Brazil/Acre","Brazil/DeNoronha","Brazil/East","Brazil/West","CET","CST6CDT","Canada/Atlantic","Canada/Central","Canada/Eastern","Canada/Mountain","Canada/Newfoundland","Canada/Pacific","Canada/Saskatchewan","Canada/Yukon","Chile/Continental","Chile/EasterIsland","Cuba","EET","EST","EST5EDT","Egypt","Eire","Etc/GMT","Etc/GMT+0","Etc/GMT+1","Etc/GMT+10","Etc/GMT+11","Etc/GMT+12","Etc/GMT+2","Etc/GMT+3","Etc/GMT+4","Etc/GMT+5","Etc/GMT+6","Etc/GMT+7","Etc/GMT+8","Etc/GMT+9","Etc/GMT-0","Etc/GMT-1","Etc/GMT-10","Etc/GMT-11","Etc/GMT-12","Etc/GMT-13","Etc/GMT-14","Etc/GMT-2","Etc/GMT-3","Etc/GMT-4","Etc/GMT-5","Etc/GMT-6","Etc/GMT-7","Etc/GMT-8","Etc/GMT-9","Etc/GMT0","Etc/Greenwich","Etc/UCT","Etc/UTC","Etc/Universal","Etc/Zulu","Europe/Amsterdam","Europe/Andorra","Europe/Astrakhan","Europe/Athens","Europe/Belfast","Europe/Belgrade","Europe/Berlin","Europe/Bratislava","Europe/Brussels","Europe/Bucharest","Europe/Budapest","Europe/Busingen","Europe/Chisinau","Europe/Copenhagen","Europe/Dublin","Europe/Gibraltar","Europe/Guernsey","Europe/Helsinki","Europe/Isle_of_Man","Europe/Istanbul","Europe/Jersey","Europe/Kaliningrad","Europe/Kiev","Europe/Kirov","Europe/Kyiv","Europe/Lisbon","Europe/Ljubljana","Europe/London","Europe/Luxembourg","Europe/Madrid","Europe/Malta","Europe/Mariehamn","Europe/Minsk","Europe/Monaco","Europe/Moscow","Europe/Nicosia","Europe/Oslo","Europe/Paris","Europe/Podgorica","Europe/Prague","Europe/Riga","Europe/Rome","Europe/Samara","Europe/San_Marino","Europe/Sarajevo","Europe/Saratov","Europe/Simferopol","Europe/Skopje","Europe/Sofia","Europe/Stockholm","Europe/Tallinn","Europe/Tirane","Europe/Tiraspol","Europe/Ulyanovsk","Europe/Uzhgorod","Europe/Vaduz","Europe/Vatican","Europe/Vienna","Europe/Vilnius","Europe/Volgograd","Europe/Warsaw","Europe/Zagreb","Europe/Zaporozhye","Europe/Zurich","Factory","GB","GB-Eire","GMT","GMT+0","GMT-0","GMT0","Greenwich","HST","Hongkong","Iceland","Indian/Antananarivo","Indian/Chagos","Indian/Christmas","Indian/Cocos","Indian/Comoro","Indian/Kerguelen","Indian/Mahe","Indian/Maldives","Indian/Mauritius","Indian/Mayotte","Indian/Reunion","Iran","Israel","Jamaica","Japan","Kwajalein","Libya","MET","MST","MST7MDT","Mexico/BajaNorte","Mexico/BajaSur","Mexico/General","NZ","NZ-CHAT","Navajo","PRC","PST8PDT","Pacific/Apia","Pacific/Auckland","Pacific/Bougainville","Pacific/Chatham","Pacific/Chuuk","Pacific/Easter","Pacific/Efate","Pacific/Enderbury","Pacific/Fakaofo","Pacific/Fiji","Pacific/Funafuti","Pacific/Galapagos","Pacific/Gambier","Pacific/Guadalcanal","Pacific/Guam","Pacific/Honolulu","Pacific/Johnston","Pacific/Kanton","Pacific/Kiritimati","Pacific/Kosrae","Pacific/Kwajalein","Pacific/Majuro","Pacific/Marquesas","Pacific/Midway","Pacific/Nauru","Pacific/Niue","Pacific/Norfolk","Pacific/Noumea","Pacific/Pago_Pago","Pacific/Palau","Pacific/Pitcairn","Pacific/Pohnpei","Pacific/Ponape","Pacific/Port_Moresby","Pacific/Rarotonga","Pacific/Saipan","Pacific/Samoa","Pacific/Tahiti","Pacific/Tarawa","Pacific/Tongatapu","Pacific/Truk","Pacific/Wake","Pacific/Wallis","Pacific/Yap","Poland","Portugal","ROC","ROK","Singapore","Turkey","UCT","US/Alaska","US/Aleutian","US/Arizona","US/Central","US/East-Indiana","US/Eastern","US/Hawaii","US/Indiana-Starke","US/Michigan","US/Mountain","US/Pacific","US/Samoa","UTC","Universal","W-SU","WET","Zulu","localtime"],"minLength":1,"title":"Timezone"}},"type":"object","required":["meeting_link","disclosure","timezone"],"title":"ZoomSessionRequest","description":"Body of `POST /zoom/sessions` — the whole Zoom capture saga behind one call.\n\nThe browser hands only a `meeting_link` + disclosure choice (never a `zoomAccessToken`): the\nScribe API creates the session, resolves the provider's STORED Zoom token, and dispatches the bot\nserver-side. `external_id` is the per-attempt idempotency key (same semantics as\n`CreateSessionRequest`)."},"ZoomSessionResponse":{"properties":{"session":{"$ref":"#/components/schemas/SessionResponse"},"bot_id":{"type":"string","maxLength":256,"title":"Bot Id"}},"type":"object","required":["session","bot_id"],"title":"ZoomSessionResponse","description":"Response of `POST /zoom/sessions`: the created (`mode=zoom`, `in-progress`) session plus the\nid of the dispatched control-plane bot the live stream is bound to."}}}}