openapi: 3.1.0
info:
  title: Braver API2
  version: 0.1.0
  description: >-
    Next-generation Braver REST API. It mirrors the durable, database-backed
    behavior of the AppSync API with consistent resource routes, camelCase
    fields, and canonical Braver resource IDs.


    ## Conventions


    **List responses** always return `{ count, data, page, pageSize }`.


    **Pagination:** `page` (1-based, default `1`) and `pageSize` (default `50`,
    max `100`; `limit` is accepted as an alias).


    **Sorting:** `sort` takes comma-separated camelCase fields; prefix a field
    with `-` for descending, for example `sort=lastName,-createdAt`.


    **Filtering:** date ranges use `From`/`To` suffixes (`createdAtFrom`,
    `startsAtTo`); list filters use plural camelCase names with comma-separated
    values (`userIds=a,b,c`); `search` performs broad resource search and
    `Contains` suffixes match single fields. Soft-deleted rows are excluded by
    default; pass `includeArchived=true` to include them or
    `archived=true|false` to filter explicitly.


    **Mutations** return a predictable action result with `action`, `status`,
    and, when there is a single target, `id`, instead of AppSync-style bare
    booleans.


    **Errors** return `{ statusCode, error, message }` with conventional HTTP
    status codes.


    ## Authentication


    Staff and patient requests authenticate with a Cognito bearer JWT. Braver
    users can access staff routes; patient users can access only patient-scoped
    routes for their linked patient record. In local development, dev-auth
    headers can be enabled with `ALLOW_DEV_AUTH=true`.
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Cognito bearer JWT. In local development, verification can be
        disabled for API2-only role context.
    devRoleHeader:
      type: apiKey
      in: header
      name: x-braver-dev-role
      description: Development-only role header when ALLOW_DEV_AUTH=true. Use
        braverUser or patient.
  schemas:
    BraverPlatformEvent:
      type: object
      required:
        - event_id
        - event
        - created_at
        - user_id
        - actor_type
        - actor_user_id
        - actor_patient_id
        - patient_id
        - org_slug
        - data
      additionalProperties: true
      properties:
        event_id:
          type: string
          format: uuid
          description: Unique event identifier generated when the event is published.
        event: &a2
          type: string
          enum:
            - appointment.created
            - appointment.updated
            - appointment.canceled
            - appointment.attended
            - appointment.attendance_recorded
            - patient.created
            - patient.updated
            - patient.archived
            - patient_category.created
            - patient_category.updated
            - patient_category.archived
            - core_fear.created
            - core_fear.updated
            - core_fear.deleted
            - situation.created
            - situation.updated
            - situation.deleted
            - specific_fear.created
            - specific_fear.updated
            - specific_fear.deleted
            - escape.created
            - escape.updated
            - escape.deleted
            - challenge.created
            - challenge.updated
            - challenge.deleted
            - challenges_weight.updated
            - challenges_tags.updated
            - challenge_attempt.created
            - challenge_attempt.updated
            - challenge_attempt.deleted
            - challenge_content.created
            - challenge_content.updated
            - challenge_content.deleted
            - patient_note.created
            - patient_note.updated
            - patient_note.deleted
            - patient_upload.created
            - patient_upload.deleted
            - patient_file.created
            - patient_file.updated
            - patient_file.deleted
            - file_review.created
            - file_review.updated
            - file_review.deleted
            - insurance_review.created
            - insurance_review.updated
            - insurance_review.completed
            - treatment_plan.updated
            - tag.created
            - tag.updated
            - tag.deleted
            - user.created
            - user.updated
            - user.calendar_sync_enabled
            - user.calendar_sync_disabled
            - treatment_note.created
            - treatment_note.updated
            - treatment_note.deleted
            - treatment_note.finalized
            - user.task_created
            - user.task_completed
            - user.task_reassigned
            - approved_treatment_note.created
            - approved_treatment_note.updated
            - approved_treatment_note.deleted
            - approved_treatment_note.reprocess_claim
            - insurance.created
            - insurance.updated
            - insurance.deleted
            - family.created
            - family.deleted
            - family_member.created
            - family_member.deleted
            - family_member_role.updated
            - outreach.sent
            - referral_source_type.created
            - referral_source_type.updated
            - referral_source.created
            - referral_source.updated
            - patient_eligibility.created
            - patient_eligibility.updated
            - intakeq_form.submission
            - form_instance.submission
            - assessment_form_response.created
            - assessment_form_response.updated
            - assessment_form_response.archived
            - homework_assignment.created
            - homework_assignment.updated
            - homework_assignment.deleted
            - team.created
            - team.updated
            - team.deleted
            - team_member.created
            - team_member.deleted
            - episode_of_care.created
            - episode_of_care.updated
            - episode_of_care.deleted
            - queue_item.created
            - queue_item.accepted
            - queue_item.rejected
            - location.created
            - location.updated
            - location.deleted
            - setting.created
            - setting.updated
            - setting.deleted
            - automation.created
            - automation.updated
            - automation.archived
            - automation.enabled_updated
            - automation_workflow.queued
            - diagnosis_code.enabled_updated
            - diagnosis_synonym.enabled_updated
            - email_template.created
            - email_template.updated
            - email_template.archived
            - email.sent
            - appointment_recording.created
            - appointment_recording.updated
            - appointment_recording.deleted
            - ai_prompt_template.created
            - ai_prompt_template.updated
            - ai_prompt_template.archived
            - ai_processing.completed
            - ai_processing.failed
            - ai_result.applied_to_note
            - transcription.started
            - transcription.completed
            - transcription.failed
          description: Canonical Braver platform event type.
        created_at:
          type: integer
          description: Unix timestamp in milliseconds when the event was published.
          examples:
            - 1792736100000
        user_id:
          anyOf:
            - type: string
              format: uuid
            - type: "null"
          description: Backward-compatible alias for actor_user_id.
        actor_type:
          anyOf:
            - type: string
              enum:
                - user
                - patient
            - type: "null"
          description: Entity type that triggered the event, when known.
        actor_user_id:
          anyOf:
            - type: string
              format: uuid
            - type: "null"
          description: Braver user actor, when the event was triggered by staff.
        actor_patient_id:
          anyOf:
            - type: string
              format: uuid
            - type: "null"
          description: Patient actor, when the event was triggered by a patient.
        patient_id:
          anyOf:
            - type: string
              format: uuid
            - type: "null"
          description: Subject patient for patient-scoped events, analytics, and routing.
        org_slug:
          type: string
          description: Organization slug associated with the event.
          examples:
            - braver
        data: &a1
          type: object
          additionalProperties: true
          description: Event-specific payload. Examples are representative and may include
            additional fields as producers evolve.
    BraverPlatformEventData: *a1
    BraverPlatformEventType: *a2
  examples:
    PlatformEvent_appointment_created:
      summary: appointment.created
      value: &a11
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: appointment.created
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a10
          appointment_id: 5f5f7952-9f4a-44f6-a636-7cb507a20a6e
          internal_appointment_id: 5f5f7952-9f4a-44f6-a636-7cb507a20a6e
          cliniko_appointment_id: "920155118282738479"
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          appointment_name: Individual Therapy
          starts_at: 2026-06-23T14:15:00.000Z
          ends_at: 2026-06-23T14:45:00.000Z
          is_group: false
          split_brvus: false
          practitioner_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
          secondary_practitioner_id: null
    PlatformEvent_appointment_updated:
      summary: appointment.updated
      value: &a13
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: appointment.updated
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a12
          appointment_id: 5f5f7952-9f4a-44f6-a636-7cb507a20a6e
          internal_appointment_id: 5f5f7952-9f4a-44f6-a636-7cb507a20a6e
          cliniko_appointment_id: "920155118282738479"
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          appointment_name: Individual Therapy
          starts_at: 2026-06-23T14:15:00.000Z
          ends_at: 2026-06-23T14:45:00.000Z
          is_group: false
          updated_fields:
            - starts_at
            - ends_at
            - appointment_type_id
          appointment_type_id: individual-therapy
          appointment_type_name: Individual Therapy
    PlatformEvent_appointment_canceled:
      summary: appointment.canceled
      value: &a15
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: appointment.canceled
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a14
          appointment_id: 5f5f7952-9f4a-44f6-a636-7cb507a20a6e
          internal_appointment_id: 5f5f7952-9f4a-44f6-a636-7cb507a20a6e
          cliniko_appointment_id: "920155118282738479"
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          appointment_name: Individual Therapy
          starts_at: 2026-06-23T14:15:00.000Z
          ends_at: 2026-06-23T14:45:00.000Z
          is_group: false
          canceled_at: 2026-06-23T14:15:00.000Z
          cancellation_reason: Patient canceled
          updated_fields:
            - canceled_at
    PlatformEvent_appointment_attended:
      summary: appointment.attended
      value: &a17
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: appointment.attended
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a16
          appointment_id: 5f5f7952-9f4a-44f6-a636-7cb507a20a6e
          internal_appointment_id: 5f5f7952-9f4a-44f6-a636-7cb507a20a6e
          cliniko_appointment_id: "920155118282738479"
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          appointment_name: Individual Therapy
          starts_at: 2026-06-23T14:15:00.000Z
          ends_at: 2026-06-23T14:45:00.000Z
          is_group: false
          arrival_status: true
          arrival_status_code: ARRIVED
          date_of_service: 2026-06-23
    PlatformEvent_appointment_attendance_recorded:
      summary: appointment.attendance_recorded
      value: &a19
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: appointment.attendance_recorded
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a18
          appointment_id: 5f5f7952-9f4a-44f6-a636-7cb507a20a6e
          internal_appointment_id: 5f5f7952-9f4a-44f6-a636-7cb507a20a6e
          cliniko_appointment_id: "920155118282738479"
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          appointment_name: Individual Therapy
          starts_at: 2026-06-23T14:15:00.000Z
          ends_at: 2026-06-23T14:45:00.000Z
          is_group: false
          arrival_status: false
          arrival_status_code: NOT_ARRIVED
    PlatformEvent_patient_created:
      summary: patient.created
      value: &a21
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: patient.created
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a20
          id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          external_patient_id: "816580436556777631"
          first_name: Alex
          last_name: Rivera
          preferred_first_name: Alex
          date_of_birth: 2012-05-07
          email: alex.patient@example.com
          category_id: active
    PlatformEvent_patient_updated:
      summary: patient.updated
      value: &a23
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: patient.updated
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a22
          id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          external_patient_id: "816580436556777631"
          first_name: Alex
          last_name: Rivera
          preferred_first_name: Alex
          date_of_birth: 2012-05-07
          email: alex.patient@example.com
          category_id: active
          updated_fields: &a3
            - name
    PlatformEvent_patient_archived:
      summary: patient.archived
      value: &a25
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: patient.archived
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a24
          id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          external_patient_id: "816580436556777631"
          first_name: Alex
          last_name: Rivera
          preferred_first_name: Alex
          date_of_birth: 2012-05-07
          email: alex.patient@example.com
          category_id: active
          archived_at: 2026-06-23T14:15:00.000Z
    PlatformEvent_patient_category_created:
      summary: patient_category.created
      value: &a27
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: patient_category.created
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: null
        org_slug: braver
        data: &a26
          id: active
          text: Active
    PlatformEvent_patient_category_updated:
      summary: patient_category.updated
      value: &a29
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: patient_category.updated
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: null
        org_slug: braver
        data: &a28
          id: active
          text: Active
          updated_fields: *a3
    PlatformEvent_patient_category_archived:
      summary: patient_category.archived
      value: &a31
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: patient_category.archived
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: null
        org_slug: braver
        data: &a30
          id: active
          text: Active
          archived_at: 2026-06-23T14:15:00.000Z
    PlatformEvent_core_fear_created:
      summary: core_fear.created
      value: &a33
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: core_fear.created
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a32
          id: 57dc6963-963b-410a-9ea6-34722ccb634e
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          core_fear: Feeling unsafe away from home
          text: Feeling unsafe away from home
    PlatformEvent_core_fear_updated:
      summary: core_fear.updated
      value: &a35
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: core_fear.updated
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a34
          id: 57dc6963-963b-410a-9ea6-34722ccb634e
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          core_fear: Feeling unsafe away from home
          text: Feeling unsafe away from home
          updated_fields: *a3
    PlatformEvent_core_fear_deleted:
      summary: core_fear.deleted
      value: &a37
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: core_fear.deleted
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a36
          id: 57dc6963-963b-410a-9ea6-34722ccb634e
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          core_fear: Feeling unsafe away from home
          text: Feeling unsafe away from home
    PlatformEvent_situation_created:
      summary: situation.created
      value: &a39
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: situation.created
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a38
          id: f9d31929-8f38-4211-bb35-6f913e92374f
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          text: Ordering food at a restaurant
    PlatformEvent_situation_updated:
      summary: situation.updated
      value: &a41
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: situation.updated
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a40
          id: f9d31929-8f38-4211-bb35-6f913e92374f
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          text: Ordering food at a restaurant
          updated_fields: *a3
    PlatformEvent_situation_deleted:
      summary: situation.deleted
      value: &a43
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: situation.deleted
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a42
          id: f9d31929-8f38-4211-bb35-6f913e92374f
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          text: Ordering food at a restaurant
    PlatformEvent_specific_fear_created:
      summary: specific_fear.created
      value: &a45
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: specific_fear.created
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a44
          id: 679acfc2-e899-41bf-904f-2b386efb6d7b
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          core_fear_id: 57dc6963-963b-410a-9ea6-34722ccb634e
          situation_id: f9d31929-8f38-4211-bb35-6f913e92374f
          text: Being judged while ordering
    PlatformEvent_specific_fear_updated:
      summary: specific_fear.updated
      value: &a47
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: specific_fear.updated
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a46
          id: 679acfc2-e899-41bf-904f-2b386efb6d7b
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          core_fear_id: 57dc6963-963b-410a-9ea6-34722ccb634e
          situation_id: f9d31929-8f38-4211-bb35-6f913e92374f
          text: Being judged while ordering
          updated_fields: *a3
    PlatformEvent_specific_fear_deleted:
      summary: specific_fear.deleted
      value: &a49
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: specific_fear.deleted
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a48
          id: 679acfc2-e899-41bf-904f-2b386efb6d7b
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          core_fear_id: 57dc6963-963b-410a-9ea6-34722ccb634e
          situation_id: f9d31929-8f38-4211-bb35-6f913e92374f
          text: Being judged while ordering
    PlatformEvent_escape_created:
      summary: escape.created
      value: &a51
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: escape.created
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a50
          id: b4e2d360-2e1d-4339-8f58-9405683c8ce2
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          text: Leaving before ordering
    PlatformEvent_escape_updated:
      summary: escape.updated
      value: &a53
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: escape.updated
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a52
          id: b4e2d360-2e1d-4339-8f58-9405683c8ce2
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          text: Leaving before ordering
          updated_fields: *a3
    PlatformEvent_escape_deleted:
      summary: escape.deleted
      value: &a55
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: escape.deleted
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a54
          id: b4e2d360-2e1d-4339-8f58-9405683c8ce2
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          text: Leaving before ordering
    PlatformEvent_challenge_created:
      summary: challenge.created
      value: &a57
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: challenge.created
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a56
          id: bfcb0f75-34b0-4dd3-bb7f-c3bb7fe3117a
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          situation_id: f9d31929-8f38-4211-bb35-6f913e92374f
          specific_fear_id: 679acfc2-e899-41bf-904f-2b386efb6d7b
          escape_id: b4e2d360-2e1d-4339-8f58-9405683c8ce2
          text: Order a snack and stay for five minutes
    PlatformEvent_challenge_updated:
      summary: challenge.updated
      value: &a59
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: challenge.updated
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a58
          id: bfcb0f75-34b0-4dd3-bb7f-c3bb7fe3117a
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          situation_id: f9d31929-8f38-4211-bb35-6f913e92374f
          specific_fear_id: 679acfc2-e899-41bf-904f-2b386efb6d7b
          escape_id: b4e2d360-2e1d-4339-8f58-9405683c8ce2
          text: Order a snack and stay for five minutes
          updated_fields: *a3
    PlatformEvent_challenge_deleted:
      summary: challenge.deleted
      value: &a61
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: challenge.deleted
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a60
          id: bfcb0f75-34b0-4dd3-bb7f-c3bb7fe3117a
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          situation_id: f9d31929-8f38-4211-bb35-6f913e92374f
          specific_fear_id: 679acfc2-e899-41bf-904f-2b386efb6d7b
          escape_id: b4e2d360-2e1d-4339-8f58-9405683c8ce2
          text: Order a snack and stay for five minutes
    PlatformEvent_challenges_weight_updated:
      summary: challenges_weight.updated
      value: &a63
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: challenges_weight.updated
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a62
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          challenge_ids:
            - bfcb0f75-34b0-4dd3-bb7f-c3bb7fe3117a
          weights:
            - challenge_id: bfcb0f75-34b0-4dd3-bb7f-c3bb7fe3117a
              weight: 10
          updated_fields: *a3
    PlatformEvent_challenges_tags_updated:
      summary: challenges_tags.updated
      value: &a65
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: challenges_tags.updated
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a64
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          challenge_id: bfcb0f75-34b0-4dd3-bb7f-c3bb7fe3117a
          tag_ids:
            - 7f0f62be-a59c-4764-9ecb-18ee1b27cb6c
          updated_fields: *a3
    PlatformEvent_challenge_attempt_created:
      summary: challenge_attempt.created
      value: &a67
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: challenge_attempt.created
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a66
          id: 28d624e7-08f4-4ca7-b847-1a97484ea257
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          challenge_id: bfcb0f75-34b0-4dd3-bb7f-c3bb7fe3117a
          attempt: &a4
            started_at: 2026-06-23T14:15:00.000Z
            ended_at: 2026-06-23T14:45:00.000Z
            starting_temperature: 7
            ending_temperature: 4
    PlatformEvent_challenge_attempt_updated:
      summary: challenge_attempt.updated
      value: &a69
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: challenge_attempt.updated
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a68
          id: 28d624e7-08f4-4ca7-b847-1a97484ea257
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          challenge_id: bfcb0f75-34b0-4dd3-bb7f-c3bb7fe3117a
          attempt: *a4
          updated_fields: *a3
    PlatformEvent_challenge_attempt_deleted:
      summary: challenge_attempt.deleted
      value: &a71
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: challenge_attempt.deleted
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a70
          id: 28d624e7-08f4-4ca7-b847-1a97484ea257
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          challenge_id: bfcb0f75-34b0-4dd3-bb7f-c3bb7fe3117a
          attempt: *a4
    PlatformEvent_challenge_content_created:
      summary: challenge_content.created
      value: &a73
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: challenge_content.created
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: null
        org_slug: braver
        data: &a72
          id: 5786db35-7a6d-4182-8728-f5714dd7102d
          title: Exposure planning worksheet
          content_type: worksheet
          tag_ids: &a5
            - exposures
            - planning
    PlatformEvent_challenge_content_updated:
      summary: challenge_content.updated
      value: &a75
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: challenge_content.updated
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: null
        org_slug: braver
        data: &a74
          id: 5786db35-7a6d-4182-8728-f5714dd7102d
          title: Exposure planning worksheet
          content_type: worksheet
          tag_ids: *a5
          updated_fields: *a3
    PlatformEvent_challenge_content_deleted:
      summary: challenge_content.deleted
      value: &a77
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: challenge_content.deleted
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: null
        org_slug: braver
        data: &a76
          id: 5786db35-7a6d-4182-8728-f5714dd7102d
          title: Exposure planning worksheet
          content_type: worksheet
          tag_ids: *a5
    PlatformEvent_patient_note_created:
      summary: patient_note.created
      value: &a79
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: patient_note.created
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a78
          id: 9afeaa9e-e3a8-4ec6-84f9-568ac46142fb
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          text: Care-team note text
    PlatformEvent_patient_note_updated:
      summary: patient_note.updated
      value: &a81
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: patient_note.updated
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a80
          id: 9afeaa9e-e3a8-4ec6-84f9-568ac46142fb
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          text: Care-team note text
          updated_fields: *a3
    PlatformEvent_patient_note_deleted:
      summary: patient_note.deleted
      value: &a83
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: patient_note.deleted
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a82
          id: 9afeaa9e-e3a8-4ec6-84f9-568ac46142fb
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          text: Care-team note text
    PlatformEvent_patient_upload_created:
      summary: patient_upload.created
      value: &a85
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: patient_upload.created
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: null
        org_slug: braver
        data: &a84
          id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          file_name: avatar.jpg
          type: patient_avatar
    PlatformEvent_patient_upload_deleted:
      summary: patient_upload.deleted
      value: &a87
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: patient_upload.deleted
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: null
        org_slug: braver
        data: &a86
          id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          file_name: avatar.jpg
          type: patient_avatar
    PlatformEvent_patient_file_created:
      summary: patient_file.created
      value: &a89
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: patient_file.created
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a88
          id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          file_id: ad3c4fe2-ec35-4c4e-b6e2-a1647e574d9b
          filename: intake-form.pdf
    PlatformEvent_patient_file_updated:
      summary: patient_file.updated
      value: &a91
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: patient_file.updated
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a90
          id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          file_id: ad3c4fe2-ec35-4c4e-b6e2-a1647e574d9b
          filename: intake-form.pdf
          updated_fields: *a3
          action: content_replaced
    PlatformEvent_patient_file_deleted:
      summary: patient_file.deleted
      value: &a93
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: patient_file.deleted
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a92
          id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          file_id: ad3c4fe2-ec35-4c4e-b6e2-a1647e574d9b
          filename: intake-form.pdf
    PlatformEvent_file_review_created:
      summary: file_review.created
      value: &a95
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: file_review.created
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a94
          file_id: ad3c4fe2-ec35-4c4e-b6e2-a1647e574d9b
          file_reviewer_id: c0ba8d4d-6b1c-4509-89e5-e7c0d29d70bb
          reviewer_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
    PlatformEvent_file_review_updated:
      summary: file_review.updated
      value: &a97
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: file_review.updated
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a96
          file_id: ad3c4fe2-ec35-4c4e-b6e2-a1647e574d9b
          file_reviewer_id: c0ba8d4d-6b1c-4509-89e5-e7c0d29d70bb
          reviewer_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          updated_fields: *a3
    PlatformEvent_file_review_deleted:
      summary: file_review.deleted
      value: &a99
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: file_review.deleted
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a98
          file_id: ad3c4fe2-ec35-4c4e-b6e2-a1647e574d9b
          file_reviewer_id: c0ba8d4d-6b1c-4509-89e5-e7c0d29d70bb
          reviewer_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
    PlatformEvent_insurance_review_created:
      summary: insurance_review.created
      value: &a101
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: insurance_review.created
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a100
          insurance_review_id: 3bc67864-00f9-467d-9e6b-e9d4d2909186
          insurance_id: 39d30d47-0b56-49c5-8dbf-dfd1b43edac0
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
    PlatformEvent_insurance_review_updated:
      summary: insurance_review.updated
      value: &a103
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: insurance_review.updated
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a102
          insurance_review_id: 3bc67864-00f9-467d-9e6b-e9d4d2909186
          insurance_id: 39d30d47-0b56-49c5-8dbf-dfd1b43edac0
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          updated_fields: *a3
    PlatformEvent_insurance_review_completed:
      summary: insurance_review.completed
      value: &a105
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: insurance_review.completed
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a104
          insurance_review_id: 3bc67864-00f9-467d-9e6b-e9d4d2909186
          insurance_id: 39d30d47-0b56-49c5-8dbf-dfd1b43edac0
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          status: completed
    PlatformEvent_treatment_plan_updated:
      summary: treatment_plan.updated
      value: &a107
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: treatment_plan.updated
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a106
          id: cf68161f-b2ee-4b88-b34d-fe7ad9b4960d
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          text: Updated treatment plan text
          updated_fields: *a3
    PlatformEvent_tag_created:
      summary: tag.created
      value: &a109
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: tag.created
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a108
          id: 7f0f62be-a59c-4764-9ecb-18ee1b27cb6c
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          tag: Food exposure
    PlatformEvent_tag_updated:
      summary: tag.updated
      value: &a111
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: tag.updated
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a110
          id: 7f0f62be-a59c-4764-9ecb-18ee1b27cb6c
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          tag: Food exposure
          updated_fields: *a3
    PlatformEvent_tag_deleted:
      summary: tag.deleted
      value: &a113
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: tag.deleted
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a112
          id: 7f0f62be-a59c-4764-9ecb-18ee1b27cb6c
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          tag: Food exposure
    PlatformEvent_user_created:
      summary: user.created
      value: &a115
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: user.created
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: null
        org_slug: braver
        data: &a114
          id: 8f3a3ec9-77b0-4306-9692-6d7707008861
          user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
          first_name: Jamie
          last_name: Morgan
          email: jamie.morgan@example.com
    PlatformEvent_user_updated:
      summary: user.updated
      value: &a117
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: user.updated
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: null
        org_slug: braver
        data: &a116
          id: 8f3a3ec9-77b0-4306-9692-6d7707008861
          user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
          first_name: Jamie
          last_name: Morgan
          email: jamie.morgan@example.com
          updated_fields: *a3
    PlatformEvent_user_calendar_sync_enabled:
      summary: user.calendar_sync_enabled
      value: &a119
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: user.calendar_sync_enabled
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: null
        org_slug: braver
        data: &a118
          id: 8f3a3ec9-77b0-4306-9692-6d7707008861
          user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
          first_name: Jamie
          last_name: Morgan
          email: jamie.morgan@example.com
          calendar_sync_enabled: true
    PlatformEvent_user_calendar_sync_disabled:
      summary: user.calendar_sync_disabled
      value: &a121
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: user.calendar_sync_disabled
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: null
        org_slug: braver
        data: &a120
          id: 8f3a3ec9-77b0-4306-9692-6d7707008861
          user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
          first_name: Jamie
          last_name: Morgan
          email: jamie.morgan@example.com
          calendar_sync_enabled: false
    PlatformEvent_treatment_note_created:
      summary: treatment_note.created
      value: &a123
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: treatment_note.created
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a122
          id: 4ee64e1b-e9fb-4bff-80b9-9aa96272b853
          treatment_note_id: 4ee64e1b-e9fb-4bff-80b9-9aa96272b853
          internal_treatment_note_id: 4ee64e1b-e9fb-4bff-80b9-9aa96272b853
          cliniko_treatment_note_id: "182738479"
          appointment_id: 5f5f7952-9f4a-44f6-a636-7cb507a20a6e
          internal_appointment_id: 5f5f7952-9f4a-44f6-a636-7cb507a20a6e
          cliniko_appointment_id: "920155118282738479"
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
          draft: true
    PlatformEvent_treatment_note_updated:
      summary: treatment_note.updated
      value: &a125
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: treatment_note.updated
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a124
          id: 4ee64e1b-e9fb-4bff-80b9-9aa96272b853
          treatment_note_id: 4ee64e1b-e9fb-4bff-80b9-9aa96272b853
          internal_treatment_note_id: 4ee64e1b-e9fb-4bff-80b9-9aa96272b853
          cliniko_treatment_note_id: "182738479"
          appointment_id: 5f5f7952-9f4a-44f6-a636-7cb507a20a6e
          internal_appointment_id: 5f5f7952-9f4a-44f6-a636-7cb507a20a6e
          cliniko_appointment_id: "920155118282738479"
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
          draft: true
          updated_fields: *a3
    PlatformEvent_treatment_note_deleted:
      summary: treatment_note.deleted
      value: &a127
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: treatment_note.deleted
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a126
          id: 4ee64e1b-e9fb-4bff-80b9-9aa96272b853
          treatment_note_id: 4ee64e1b-e9fb-4bff-80b9-9aa96272b853
          internal_treatment_note_id: 4ee64e1b-e9fb-4bff-80b9-9aa96272b853
          cliniko_treatment_note_id: "182738479"
          appointment_id: 5f5f7952-9f4a-44f6-a636-7cb507a20a6e
          internal_appointment_id: 5f5f7952-9f4a-44f6-a636-7cb507a20a6e
          cliniko_appointment_id: "920155118282738479"
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
          draft: true
    PlatformEvent_treatment_note_finalized:
      summary: treatment_note.finalized
      value: &a129
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: treatment_note.finalized
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a128
          id: 4ee64e1b-e9fb-4bff-80b9-9aa96272b853
          treatment_note_id: 4ee64e1b-e9fb-4bff-80b9-9aa96272b853
          internal_treatment_note_id: 4ee64e1b-e9fb-4bff-80b9-9aa96272b853
          cliniko_treatment_note_id: "182738479"
          appointment_id: 5f5f7952-9f4a-44f6-a636-7cb507a20a6e
          internal_appointment_id: 5f5f7952-9f4a-44f6-a636-7cb507a20a6e
          cliniko_appointment_id: "920155118282738479"
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
          draft: false
          first_finalized_at: 2026-06-23T14:15:00.000Z
    PlatformEvent_user_task_created:
      summary: user.task_created
      value: &a131
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: user.task_created
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a130
          id: bb5d347e-c876-4ebe-b2d0-ce553ce352db
          user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
          first_name: Jamie
          last_name: Morgan
          email: jamie.morgan@example.com
          type: patient_follow_up
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          title: Follow up with family
    PlatformEvent_user_task_completed:
      summary: user.task_completed
      value: &a133
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: user.task_completed
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a132
          id: bb5d347e-c876-4ebe-b2d0-ce553ce352db
          user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
          first_name: Jamie
          last_name: Morgan
          email: jamie.morgan@example.com
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          status: completed
    PlatformEvent_user_task_reassigned:
      summary: user.task_reassigned
      value: &a135
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: user.task_reassigned
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: null
        org_slug: braver
        data: &a134
          id: bb5d347e-c876-4ebe-b2d0-ce553ce352db
          user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
          first_name: Jamie
          last_name: Morgan
          email: jamie.morgan@example.com
    PlatformEvent_approved_treatment_note_created:
      summary: approved_treatment_note.created
      value: &a137
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: approved_treatment_note.created
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a136
          id: bbaaf9c4-6a81-4307-b0c8-7ba58c3e3018
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          appointment_id: 5f5f7952-9f4a-44f6-a636-7cb507a20a6e
          treatment_note_id: 4ee64e1b-e9fb-4bff-80b9-9aa96272b853
          date_of_service: 2026-06-23
          primary_billing_code: "90834"
    PlatformEvent_approved_treatment_note_updated:
      summary: approved_treatment_note.updated
      value: &a139
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: approved_treatment_note.updated
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a138
          id: bbaaf9c4-6a81-4307-b0c8-7ba58c3e3018
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          appointment_id: 5f5f7952-9f4a-44f6-a636-7cb507a20a6e
          treatment_note_id: 4ee64e1b-e9fb-4bff-80b9-9aa96272b853
          date_of_service: 2026-06-23
          primary_billing_code: "90834"
          updated_fields: *a3
    PlatformEvent_approved_treatment_note_deleted:
      summary: approved_treatment_note.deleted
      value: &a141
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: approved_treatment_note.deleted
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a140
          id: bbaaf9c4-6a81-4307-b0c8-7ba58c3e3018
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          appointment_id: 5f5f7952-9f4a-44f6-a636-7cb507a20a6e
          treatment_note_id: 4ee64e1b-e9fb-4bff-80b9-9aa96272b853
          date_of_service: 2026-06-23
          primary_billing_code: "90834"
    PlatformEvent_approved_treatment_note_reprocess_claim:
      summary: approved_treatment_note.reprocess_claim
      value: &a143
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: approved_treatment_note.reprocess_claim
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a142
          id: bbaaf9c4-6a81-4307-b0c8-7ba58c3e3018
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          appointment_id: 5f5f7952-9f4a-44f6-a636-7cb507a20a6e
          treatment_note_id: 4ee64e1b-e9fb-4bff-80b9-9aa96272b853
          date_of_service: 2026-06-23
          primary_billing_code: "90834"
          requested_at: 2026-06-23T14:15:00.000Z
    PlatformEvent_insurance_created:
      summary: insurance.created
      value: &a145
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: insurance.created
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a144
          id: 39d30d47-0b56-49c5-8dbf-dfd1b43edac0
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          provider_name: Example Health
          member_id: EXAMPLE123
    PlatformEvent_insurance_updated:
      summary: insurance.updated
      value: &a147
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: insurance.updated
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a146
          id: 39d30d47-0b56-49c5-8dbf-dfd1b43edac0
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          provider_name: Example Health
          member_id: EXAMPLE123
          updated_fields: *a3
    PlatformEvent_insurance_deleted:
      summary: insurance.deleted
      value: &a149
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: insurance.deleted
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a148
          id: 39d30d47-0b56-49c5-8dbf-dfd1b43edac0
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          provider_name: Example Health
          member_id: EXAMPLE123
    PlatformEvent_family_created:
      summary: family.created
      value: &a151
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: family.created
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: null
        org_slug: braver
        data: &a150
          id: 4155f211-62ce-474e-88f4-605060906e6b
          name: Rivera Family
    PlatformEvent_family_deleted:
      summary: family.deleted
      value: &a153
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: family.deleted
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: null
        org_slug: braver
        data: &a152
          id: 4155f211-62ce-474e-88f4-605060906e6b
          name: Rivera Family
    PlatformEvent_family_member_created:
      summary: family_member.created
      value: &a155
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: family_member.created
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a154
          id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          family_id: 4155f211-62ce-474e-88f4-605060906e6b
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          role: child
    PlatformEvent_family_member_deleted:
      summary: family_member.deleted
      value: &a157
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: family_member.deleted
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a156
          id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          family_id: 4155f211-62ce-474e-88f4-605060906e6b
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          role: child
    PlatformEvent_family_member_role_updated:
      summary: family_member_role.updated
      value: &a159
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: family_member_role.updated
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a158
          familyMemberId: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          family_id: 4155f211-62ce-474e-88f4-605060906e6b
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          role: guardian
          updated_fields: *a3
    PlatformEvent_outreach_sent:
      summary: outreach.sent
      value: &a161
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: outreach.sent
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a160
          schedule_name: appointment-reminder
          outreach_instance_group_id: 2026-06-23-am
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          participant_patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          outreach_type: sms
          outreach_event_id: 613f1408-4d59-4d48-9bd3-6a5c5f701a66
          sent_at: 2026-06-23T14:15:00.000Z
    PlatformEvent_referral_source_type_created:
      summary: referral_source_type.created
      value: &a163
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: referral_source_type.created
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: null
        org_slug: braver
        data: &a162
          id: clinician-referral
          referral_source_type: &a6
            name: Clinician referral
    PlatformEvent_referral_source_type_updated:
      summary: referral_source_type.updated
      value: &a165
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: referral_source_type.updated
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: null
        org_slug: braver
        data: &a164
          id: clinician-referral
          referral_source_type: *a6
          updated_fields: *a3
    PlatformEvent_referral_source_created:
      summary: referral_source.created
      value: &a167
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: referral_source.created
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: null
        org_slug: braver
        data: &a166
          id: 2b4a4faf-8ea5-46f9-b9f1-357b1d2299e8
          referral_source: &a7
            name: Pediatric practice
            referral_source_type_id: clinician-referral
    PlatformEvent_referral_source_updated:
      summary: referral_source.updated
      value: &a169
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: referral_source.updated
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: null
        org_slug: braver
        data: &a168
          id: 2b4a4faf-8ea5-46f9-b9f1-357b1d2299e8
          referral_source: *a7
          updated_fields: *a3
    PlatformEvent_patient_eligibility_created:
      summary: patient_eligibility.created
      value: &a171
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: patient_eligibility.created
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a170
          patient_eligibility_id: 890e84d8-e679-4095-8d95-e873060013df
          insurance_id: 39d30d47-0b56-49c5-8dbf-dfd1b43edac0
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          status: active
    PlatformEvent_patient_eligibility_updated:
      summary: patient_eligibility.updated
      value: &a173
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: patient_eligibility.updated
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a172
          patient_eligibility_id: 890e84d8-e679-4095-8d95-e873060013df
          insurance_id: 39d30d47-0b56-49c5-8dbf-dfd1b43edac0
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          status: active
          updated_fields: *a3
    PlatformEvent_intakeq_form_submission:
      summary: intakeq_form.submission
      value: &a175
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: intakeq_form.submission
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a174
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          intakeq_form_id: IQ-12345
          form_name: New patient intake
          submitted_at: 2026-06-23T14:15:00.000Z
    PlatformEvent_form_instance_submission:
      summary: form_instance.submission
      value: &a177
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: form_instance.submission
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a176
          id: de42009b-7db2-4eaa-8b8d-02f24c768f7c
          form_instance_id: de42009b-7db2-4eaa-8b8d-02f24c768f7c
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          form_template_id: program-application
          form_template_slug: program-application
          system_form_category: program-application
          submitted_at: 2026-06-23T14:15:00.000Z
    PlatformEvent_assessment_form_response_created:
      summary: assessment_form_response.created
      value: &a179
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: assessment_form_response.created
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a178
          id: 102ddf21-fcd8-478c-8d41-adc772ec4e20
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          form_template_id: suds-check-in
          completed_at: 2026-06-23T14:15:00.000Z
    PlatformEvent_assessment_form_response_updated:
      summary: assessment_form_response.updated
      value: &a181
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: assessment_form_response.updated
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a180
          id: 102ddf21-fcd8-478c-8d41-adc772ec4e20
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          form_template_id: suds-check-in
          completed_at: 2026-06-23T14:15:00.000Z
          updated_fields: *a3
    PlatformEvent_assessment_form_response_archived:
      summary: assessment_form_response.archived
      value: &a183
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: assessment_form_response.archived
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a182
          id: 102ddf21-fcd8-478c-8d41-adc772ec4e20
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          form_template_id: suds-check-in
          completed_at: 2026-06-23T14:15:00.000Z
          archived_at: 2026-06-23T14:15:00.000Z
    PlatformEvent_homework_assignment_created:
      summary: homework_assignment.created
      value: &a185
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: homework_assignment.created
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a184
          id: f88e4207-3fc4-451d-83f3-14f05c7f73f5
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          challenge_id: bfcb0f75-34b0-4dd3-bb7f-c3bb7fe3117a
          text: Practice the exposure twice this week
          created_by_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
    PlatformEvent_homework_assignment_updated:
      summary: homework_assignment.updated
      value: &a187
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: homework_assignment.updated
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a186
          id: f88e4207-3fc4-451d-83f3-14f05c7f73f5
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          challenge_id: bfcb0f75-34b0-4dd3-bb7f-c3bb7fe3117a
          text: Practice the exposure twice this week
          created_by_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
          updated_fields: *a3
    PlatformEvent_homework_assignment_deleted:
      summary: homework_assignment.deleted
      value: &a189
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: homework_assignment.deleted
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a188
          id: f88e4207-3fc4-451d-83f3-14f05c7f73f5
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          challenge_id: bfcb0f75-34b0-4dd3-bb7f-c3bb7fe3117a
          text: Practice the exposure twice this week
          created_by_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
    PlatformEvent_team_created:
      summary: team.created
      value: &a191
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: team.created
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: null
        org_slug: braver
        data: &a190
          id: 688b9902-3313-449d-8547-0f62ca53ee4f
          name: Exposure Team
          color: "#2563eb"
          is_external: false
    PlatformEvent_team_updated:
      summary: team.updated
      value: &a193
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: team.updated
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: null
        org_slug: braver
        data: &a192
          id: 688b9902-3313-449d-8547-0f62ca53ee4f
          name: Exposure Team
          color: "#2563eb"
          is_external: false
          updated_fields: *a3
    PlatformEvent_team_deleted:
      summary: team.deleted
      value: &a195
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: team.deleted
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: null
        org_slug: braver
        data: &a194
          id: 688b9902-3313-449d-8547-0f62ca53ee4f
          name: Exposure Team
          color: "#2563eb"
          is_external: false
    PlatformEvent_team_member_created:
      summary: team_member.created
      value: &a197
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: team_member.created
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: null
        org_slug: braver
        data: &a196
          id: 5cb1ad3b-8f3f-45cf-bbb5-64d5d447e9a9
          team_id: 688b9902-3313-449d-8547-0f62ca53ee4f
          user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
    PlatformEvent_team_member_deleted:
      summary: team_member.deleted
      value: &a199
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: team_member.deleted
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: null
        org_slug: braver
        data: &a198
          id: 5cb1ad3b-8f3f-45cf-bbb5-64d5d447e9a9
          team_id: 688b9902-3313-449d-8547-0f62ca53ee4f
          user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
    PlatformEvent_episode_of_care_created:
      summary: episode_of_care.created
      value: &a201
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: episode_of_care.created
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a200
          id: ae936036-d7ad-48a6-bd6a-c10637175ba3
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          team_id: 688b9902-3313-449d-8547-0f62ca53ee4f
          status: active
    PlatformEvent_episode_of_care_updated:
      summary: episode_of_care.updated
      value: &a203
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: episode_of_care.updated
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a202
          id: ae936036-d7ad-48a6-bd6a-c10637175ba3
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          team_id: 688b9902-3313-449d-8547-0f62ca53ee4f
          status: active
          updated_fields: *a3
    PlatformEvent_episode_of_care_deleted:
      summary: episode_of_care.deleted
      value: &a205
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: episode_of_care.deleted
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a204
          id: ae936036-d7ad-48a6-bd6a-c10637175ba3
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          team_id: 688b9902-3313-449d-8547-0f62ca53ee4f
          status: active
    PlatformEvent_queue_item_created:
      summary: queue_item.created
      value: &a207
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: queue_item.created
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a206
          id: 94101f35-7969-4c34-9f7f-f985991f1aad
          team_id: 688b9902-3313-449d-8547-0f62ca53ee4f
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          episode_of_care_id: ae936036-d7ad-48a6-bd6a-c10637175ba3
    PlatformEvent_queue_item_accepted:
      summary: queue_item.accepted
      value: &a209
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: queue_item.accepted
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a208
          id: 94101f35-7969-4c34-9f7f-f985991f1aad
          team_id: 688b9902-3313-449d-8547-0f62ca53ee4f
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          episode_of_care_id: ae936036-d7ad-48a6-bd6a-c10637175ba3
          status: accepted
    PlatformEvent_queue_item_rejected:
      summary: queue_item.rejected
      value: &a211
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: queue_item.rejected
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a210
          id: 94101f35-7969-4c34-9f7f-f985991f1aad
          team_id: 688b9902-3313-449d-8547-0f62ca53ee4f
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          episode_of_care_id: ae936036-d7ad-48a6-bd6a-c10637175ba3
          status: rejected
          rejection_reason: Referred to another team
    PlatformEvent_location_created:
      summary: location.created
      value: &a213
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: location.created
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: null
        org_slug: braver
        data: &a212
          id: d4ed15df-0734-4aae-a0e9-fb9e56a1922f
          name: Norwood
          address_1: 100 Main Street
          city: Norwood
          state: MA
    PlatformEvent_location_updated:
      summary: location.updated
      value: &a215
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: location.updated
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: null
        org_slug: braver
        data: &a214
          id: d4ed15df-0734-4aae-a0e9-fb9e56a1922f
          name: Norwood
          address_1: 100 Main Street
          city: Norwood
          state: MA
          updated_fields: *a3
    PlatformEvent_location_deleted:
      summary: location.deleted
      value: &a217
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: location.deleted
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: null
        org_slug: braver
        data: &a216
          id: d4ed15df-0734-4aae-a0e9-fb9e56a1922f
          name: Norwood
          address_1: 100 Main Street
          city: Norwood
          state: MA
    PlatformEvent_setting_created:
      summary: setting.created
      value: &a219
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: setting.created
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: null
        org_slug: braver
        data: &a218
          id: default-appointment-reminder
          name: appointment_reminders.enabled
          value: true
    PlatformEvent_setting_updated:
      summary: setting.updated
      value: &a221
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: setting.updated
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: null
        org_slug: braver
        data: &a220
          id: default-appointment-reminder
          name: appointment_reminders.enabled
          value: true
          updated_fields: *a3
    PlatformEvent_setting_deleted:
      summary: setting.deleted
      value: &a223
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: setting.deleted
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: null
        org_slug: braver
        data: &a222
          id: default-appointment-reminder
          name: appointment_reminders.enabled
          value: true
    PlatformEvent_automation_created:
      summary: automation.created
      value: &a225
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: automation.created
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: null
        org_slug: braver
        data: &a224
          id: 12c60a8e-7b20-4d9d-b7dd-f546bd9e46b6
          name: Appointment follow-up
          trigger_type: appointment.attended
          enabled: true
    PlatformEvent_automation_updated:
      summary: automation.updated
      value: &a227
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: automation.updated
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: null
        org_slug: braver
        data: &a226
          id: 12c60a8e-7b20-4d9d-b7dd-f546bd9e46b6
          name: Appointment follow-up
          trigger_type: appointment.attended
          enabled: true
          updated_fields: *a3
    PlatformEvent_automation_archived:
      summary: automation.archived
      value: &a229
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: automation.archived
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: null
        org_slug: braver
        data: &a228
          id: 12c60a8e-7b20-4d9d-b7dd-f546bd9e46b6
          name: Appointment follow-up
          trigger_type: appointment.attended
          enabled: true
          archived_at: 2026-06-23T14:15:00.000Z
    PlatformEvent_automation_enabled_updated:
      summary: automation.enabled_updated
      value: &a231
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: automation.enabled_updated
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: null
        org_slug: braver
        data: &a230
          id: 12c60a8e-7b20-4d9d-b7dd-f546bd9e46b6
          name: Appointment follow-up
          trigger_type: appointment.attended
          enabled: true
    PlatformEvent_automation_workflow_queued:
      summary: automation_workflow.queued
      value: &a233
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: automation_workflow.queued
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: null
        org_slug: braver
        data: &a232
          id: a3cf02b9-44de-4dbe-ad4e-52fa9e870c83
          automation_id: 12c60a8e-7b20-4d9d-b7dd-f546bd9e46b6
          queued_at: 2026-06-23T14:15:00.000Z
    PlatformEvent_diagnosis_code_enabled_updated:
      summary: diagnosis_code.enabled_updated
      value: &a235
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: diagnosis_code.enabled_updated
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: null
        org_slug: braver
        data: &a234
          id: f40298
          code: F40.298
          enabled: true
    PlatformEvent_diagnosis_synonym_enabled_updated:
      summary: diagnosis_synonym.enabled_updated
      value: &a237
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: diagnosis_synonym.enabled_updated
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: null
        org_slug: braver
        data: &a236
          id: emetophobia
          diagnosis_code_id: f40298
          enabled: true
    PlatformEvent_email_template_created:
      summary: email_template.created
      value: &a239
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: email_template.created
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: null
        org_slug: braver
        data: &a238
          id: welcome-email
          name: Welcome email
          subject: Welcome to Braver
    PlatformEvent_email_template_updated:
      summary: email_template.updated
      value: &a241
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: email_template.updated
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: null
        org_slug: braver
        data: &a240
          id: welcome-email
          name: Welcome email
          subject: Welcome to Braver
          updated_fields: *a3
    PlatformEvent_email_template_archived:
      summary: email_template.archived
      value: &a243
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: email_template.archived
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: null
        org_slug: braver
        data: &a242
          id: welcome-email
          name: Welcome email
          subject: Welcome to Braver
          archived_at: 2026-06-23T14:15:00.000Z
    PlatformEvent_email_sent:
      summary: email.sent
      value: &a245
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: email.sent
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
        org_slug: braver
        data: &a244
          id: b6ef6d55-296a-4b5d-a4dc-fbf1685dddb9
          patient_id: 2c7a9b9f-bb7d-4f25-a3ac-524c2a8d3e33
          to: alex.patient@example.com
          subject: Welcome to Braver
          sent_at: 2026-06-23T14:15:00.000Z
          provider_message_id: provider-message-123
    PlatformEvent_appointment_recording_created:
      summary: appointment_recording.created
      value: &a247
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: appointment_recording.created
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: null
        org_slug: braver
        data: &a246
          id: 46694414-17f3-4065-9b8f-6d9944ebca07
          appointment_id: 5f5f7952-9f4a-44f6-a636-7cb507a20a6e
          source: upload
          status: uploaded
    PlatformEvent_appointment_recording_updated:
      summary: appointment_recording.updated
      value: &a249
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: appointment_recording.updated
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: null
        org_slug: braver
        data: &a248
          id: 46694414-17f3-4065-9b8f-6d9944ebca07
          appointment_id: 5f5f7952-9f4a-44f6-a636-7cb507a20a6e
          source: upload
          status: uploaded
          updated_fields: *a3
    PlatformEvent_appointment_recording_deleted:
      summary: appointment_recording.deleted
      value: &a251
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: appointment_recording.deleted
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: null
        org_slug: braver
        data: &a250
          id: 46694414-17f3-4065-9b8f-6d9944ebca07
          appointment_id: 5f5f7952-9f4a-44f6-a636-7cb507a20a6e
          source: upload
          status: uploaded
    PlatformEvent_ai_prompt_template_created:
      summary: ai_prompt_template.created
      value: &a253
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: ai_prompt_template.created
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: null
        org_slug: braver
        data: &a252
          id: note-summarizer
          name: Treatment note summarizer
    PlatformEvent_ai_prompt_template_updated:
      summary: ai_prompt_template.updated
      value: &a255
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: ai_prompt_template.updated
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: null
        org_slug: braver
        data: &a254
          id: note-summarizer
          name: Treatment note summarizer
          updated_fields: *a3
    PlatformEvent_ai_prompt_template_archived:
      summary: ai_prompt_template.archived
      value: &a257
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: ai_prompt_template.archived
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: null
        org_slug: braver
        data: &a256
          id: note-summarizer
          name: Treatment note summarizer
          archived_at: 2026-06-23T14:15:00.000Z
    PlatformEvent_ai_processing_completed:
      summary: ai_processing.completed
      value: &a259
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: ai_processing.completed
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: null
        org_slug: braver
        data: &a258
          id: a97b7d02-e433-4cc4-ba49-12d8f9d2229e
          transcript_id: 52701883-0d67-429b-a8b9-61402e93c308
          status: completed
    PlatformEvent_ai_processing_failed:
      summary: ai_processing.failed
      value: &a261
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: ai_processing.failed
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: null
        org_slug: braver
        data: &a260
          id: a97b7d02-e433-4cc4-ba49-12d8f9d2229e
          transcript_id: 52701883-0d67-429b-a8b9-61402e93c308
          status: failed
          error: Example processing error
    PlatformEvent_ai_result_applied_to_note:
      summary: ai_result.applied_to_note
      value: &a263
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: ai_result.applied_to_note
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: null
        org_slug: braver
        data: &a262
          ai_processing_result_id: a97b7d02-e433-4cc4-ba49-12d8f9d2229e
          treatment_note_id: 4ee64e1b-e9fb-4bff-80b9-9aa96272b853
          cliniko_treatment_note_id: "182738479"
    PlatformEvent_transcription_started:
      summary: transcription.started
      value: &a265
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: transcription.started
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: null
        org_slug: braver
        data: &a264
          recording_id: 46694414-17f3-4065-9b8f-6d9944ebca07
          transcript_id: 52701883-0d67-429b-a8b9-61402e93c308
          status: started
    PlatformEvent_transcription_completed:
      summary: transcription.completed
      value: &a267
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: transcription.completed
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: null
        org_slug: braver
        data: &a266
          recording_id: 46694414-17f3-4065-9b8f-6d9944ebca07
          transcript_id: 52701883-0d67-429b-a8b9-61402e93c308
          status: completed
          text_length: 4231
          prompt_tokens: 238
          completion_tokens: 1192
    PlatformEvent_transcription_failed:
      summary: transcription.failed
      value: &a269
        event_id: 256337c2-3134-4cc4-a0c3-84e53b264d66
        event: transcription.failed
        created_at: 1792736100000
        user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_type: user
        actor_user_id: 8f3a3ec9-77b0-4306-9692-6d7707008861
        actor_patient_id: null
        patient_id: null
        org_slug: braver
        data: &a268
          recording_id: 46694414-17f3-4065-9b8f-6d9944ebca07
          transcript_id: 52701883-0d67-429b-a8b9-61402e93c308
          status: failed
          error: Transcript job failed
paths:
  /health:
    get:
      operationId: getHealth
      summary: Health check
      tags:
        - system
      security: []
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                  - bindHost
                  - databaseConfigured
                properties:
                  status:
                    type: string
                    enum:
                      - ok
                  bindHost:
                    type: string
                  databaseConfigured:
                    type: boolean
  /v1/local-events:
    get:
      operationId: getLocalEvents
      summary: List local event outbox entries
      tags:
        - realtime
      security: &a8
        - bearerAuth: []
        - devRoleHeader: []
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - count
                  - maxEvents
                  - events
                additionalProperties: true
                properties:
                  count:
                    type: integer
                    minimum: 0
                  maxEvents:
                    type: integer
                    minimum: 1
                  events:
                    type: array
                    items:
                      type: object
                      required:
                        - eventId
                        - event
                        - createdAt
                        - orgSlug
                        - data
                      additionalProperties: true
                      properties:
                        eventId:
                          type: string
                        event:
                          type: string
                        createdAt:
                          type: number
                        actorType:
                          anyOf:
                            - type: string
                              enum:
                                - user
                                - patient
                            - type: "null"
                        actorUserId:
                          anyOf:
                            - type: string
                            - type: "null"
                        actorPatientId:
                          anyOf:
                            - type: string
                            - type: "null"
                        patientId:
                          anyOf:
                            - type: string
                            - type: "null"
                        orgSlug:
                          type: string
                        data: {}
    delete:
      operationId: deleteLocalEvents
      summary: Clear local event outbox
      tags:
        - realtime
      security: *a8
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - action
                  - status
                additionalProperties: true
                properties:
                  action:
                    type: string
                    enum:
                      - clear
                  status:
                    type: string
                    enum:
                      - cleared
                  id:
                    type: string
                    minLength: 1
                  cleared:
                    type: boolean
                    enum:
                      - true
  /v1/me:
    get:
      operationId: getMe
      summary: Get me
      tags:
        - staff
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/diagnosis-codes:
    get:
      operationId: getDiagnosisCodes
      summary: List diagnosis codes
      tags:
        - settings
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/diagnosis-codes/search:
    get:
      operationId: getDiagnosisCodesSearch
      summary: Get diagnosis code search
      tags:
        - settings
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/diagnosis-codes/{code}:
    get:
      operationId: getDiagnosisCodesByCode
      summary: Get diagnosis code
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: code
          required: true
      responses:
        "200":
          description: Default Response
  /v1/diagnosis-codes/{code}/enabled:
    patch:
      operationId: patchDiagnosisCodesByCodeEnabled
      summary: Update diagnosis code enabled
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: code
          required: true
      responses:
        "200":
          description: Default Response
  /v1/diagnosis-synonyms/{synonymId}/enabled:
    patch:
      operationId: patchDiagnosisSynonymsBySynonymIdEnabled
      summary: Update diagnosis synonym enabled
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: synonymId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/me/patients:
    get:
      operationId: getMePatients
      summary: List me patients
      tags:
        - patients
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/patients:
    get:
      operationId: getPatients
      summary: List patients
      tags:
        - patients
      security: *a8
      responses:
        "200":
          description: Default Response
    post:
      operationId: postPatients
      summary: Create patient
      tags:
        - patients
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/patients/search:
    get:
      operationId: getPatientsSearch
      summary: Get patient search
      tags:
        - patients
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/patients/search/advanced:
    get:
      operationId: getPatientsSearchAdvanced
      summary: Get patient search advanced
      tags:
        - patients
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/patients/duplicate:
    get:
      operationId: getPatientsDuplicate
      summary: Get patient duplicate
      tags:
        - patients
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/patients/{patientId}:
    get:
      operationId: getPatientsByPatientId
      summary: Get patient
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
    patch:
      operationId: patchPatientsByPatientId
      summary: Update patient
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
    delete:
      operationId: deletePatientsByPatientId
      summary: Delete patient
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/patients/{patientId}/portal-access:
    get:
      operationId: getPatientsByPatientIdPortalAccess
      summary: Get patient portal access
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
    post:
      operationId: postPatientsByPatientIdPortalAccess
      summary: Create patient portal access
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/patients/{patientId}/portal-access/{sub}/disable:
    post:
      operationId: postPatientsByPatientIdPortalAccessBySubDisable
      summary: Disable patient portal access
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
        - schema:
            type: string
          in: path
          name: sub
          required: true
      responses:
        "200":
          description: Default Response
  /v1/patients/{patientId}/portal-access/{sub}/enable:
    post:
      operationId: postPatientsByPatientIdPortalAccessBySubEnable
      summary: Enable patient portal access
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
        - schema:
            type: string
          in: path
          name: sub
          required: true
      responses:
        "200":
          description: Default Response
  /v1/patients/{patientId}/portal-access/{sub}/password-reset:
    post:
      operationId: postPatientsByPatientIdPortalAccessBySubPasswordReset
      summary: Password reset patient portal access
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
        - schema:
            type: string
          in: path
          name: sub
          required: true
      responses:
        "200":
          description: Default Response
  /v1/patients/{patientId}/portal-access/{sub}/verification-email:
    post:
      operationId: postPatientsByPatientIdPortalAccessBySubVerificationEmail
      summary: Verification email patient portal access
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
        - schema:
            type: string
          in: path
          name: sub
          required: true
      responses:
        "200":
          description: Default Response
  /v1/patients/{patientId}/portal-access/{sub}:
    delete:
      operationId: deletePatientsByPatientIdPortalAccessBySub
      summary: Delete patient portal access
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
        - schema:
            type: string
          in: path
          name: sub
          required: true
      responses:
        "200":
          description: Default Response
  /v1/patients/{patientId}/avatar:
    put:
      operationId: putPatientsByPatientIdAvatar
      summary: Replace patient avatar
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/patient-categories:
    get:
      operationId: getPatientCategories
      summary: List patient categories
      tags:
        - patients
      security: *a8
      responses:
        "200":
          description: Default Response
    post:
      operationId: postPatientCategories
      summary: Create patient category
      tags:
        - patients
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/patient-categories/{categoryId}:
    patch:
      operationId: patchPatientCategoriesByCategoryId
      summary: Update patient category
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: categoryId
          required: true
      responses:
        "200":
          description: Default Response
    delete:
      operationId: deletePatientCategoriesByCategoryId
      summary: Delete patient category
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: categoryId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/patients/{patientId}/notes:
    get:
      operationId: getPatientsByPatientIdNotes
      summary: List patient notes
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
    post:
      operationId: postPatientsByPatientIdNotes
      summary: Create patient note
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/patient-notes/{noteId}:
    patch:
      operationId: patchPatientNotesByNoteId
      summary: Update patient note
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: noteId
          required: true
      responses:
        "200":
          description: Default Response
    delete:
      operationId: deletePatientNotesByNoteId
      summary: Delete patient note
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: noteId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/patients/{patientId}/treatment-plan:
    get:
      operationId: getPatientsByPatientIdTreatmentPlan
      summary: Get patient treatment plan
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
    put:
      operationId: putPatientsByPatientIdTreatmentPlan
      summary: Replace patient treatment plan
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/patients/{patientId}/availability:
    get:
      operationId: getPatientsByPatientIdAvailability
      summary: Get patient availability
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
    put:
      operationId: putPatientsByPatientIdAvailability
      summary: Replace patient availability
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/patients/{patientId}/addresses:
    get:
      operationId: getPatientsByPatientIdAddresses
      summary: List patient addresses
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
    put:
      operationId: putPatientsByPatientIdAddresses
      summary: Replace patient address
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/patients/{patientId}/secondary-diagnoses:
    get:
      operationId: getPatientsByPatientIdSecondaryDiagnoses
      summary: List patient secondary diagnoses
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
    put:
      operationId: putPatientsByPatientIdSecondaryDiagnoses
      summary: Replace patient secondary diagnos
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/patients/{patientId}/contacts:
    get:
      operationId: getPatientsByPatientIdContacts
      summary: List patient contacts
      tags:
        - patients
      description: Care-team and provider contacts for one patient, ordered with
        care-coordinating contacts first.
      parameters:
        - schema:
            type: integer
            minimum: 1
          in: query
          name: page
          required: false
        - schema:
            type: integer
            minimum: 1
            maximum: 100
          in: query
          name: pageSize
          required: false
        - schema:
            type: integer
            minimum: 1
            maximum: 100
          in: query
          name: limit
          required: false
        - schema:
            type: string
          in: query
          name: sort
          required: false
          description: "Comma-separated sort fields. Allowed fields: ."
        - schema:
            type: boolean
          in: query
          name: includeArchived
          required: false
        - schema:
            type: boolean
          in: query
          name: archived
          required: false
        - schema:
            type: string
          in: query
          name: search
          required: false
        - schema:
            type: string
            minLength: 1
          in: path
          name: patientId
          required: true
      security: *a8
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - count
                  - data
                  - page
                  - pageSize
                additionalProperties: true
                properties:
                  count:
                    type: integer
                    minimum: 0
                  data:
                    type: array
                    items:
                      type: object
                      required:
                        - id
                        - patientId
                      additionalProperties: true
                      properties:
                        id:
                          type: string
                          minLength: 1
                        patientId:
                          type: string
                          minLength: 1
                        contactType:
                          anyOf:
                            - type: string
                            - type: "null"
                        name:
                          anyOf:
                            - type: string
                            - type: "null"
                        organizationName:
                          anyOf:
                            - type: string
                            - type: "null"
                        role:
                          anyOf:
                            - type: string
                            - type: "null"
                        specialty:
                          anyOf:
                            - type: string
                            - type: "null"
                        phoneNumber:
                          anyOf:
                            - type: string
                            - type: "null"
                        faxNumber:
                          anyOf:
                            - type: string
                            - type: "null"
                        email:
                          anyOf:
                            - type: string
                            - type: "null"
                        addressLine1:
                          anyOf:
                            - type: string
                            - type: "null"
                        addressLine2:
                          anyOf:
                            - type: string
                            - type: "null"
                        city:
                          anyOf:
                            - type: string
                            - type: "null"
                        state:
                          anyOf:
                            - type: string
                            - type: "null"
                        postalCode:
                          anyOf:
                            - type: string
                            - type: "null"
                        notes:
                          anyOf:
                            - type: string
                            - type: "null"
                        coordinatesCare:
                          type: boolean
                        source:
                          anyOf:
                            - type: string
                            - type: "null"
                        sourceId:
                          anyOf:
                            - type: string
                            - type: "null"
                        npi:
                          anyOf:
                            - type: string
                            - type: "null"
                        providerCredential:
                          anyOf:
                            - type: string
                            - type: "null"
                        createdAt:
                          anyOf:
                            - type: string
                              format: date-time
                            - type: "null"
                        updatedAt:
                          anyOf:
                            - type: string
                              format: date-time
                            - type: "null"
                  page:
                    type: integer
                    minimum: 1
                  pageSize:
                    type: integer
                    minimum: 1
    post:
      operationId: postPatientsByPatientIdContacts
      summary: Create patient contact
      tags:
        - patients
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
              properties:
                id:
                  type: string
                  minLength: 1
                contactType:
                  anyOf:
                    - type: string
                    - type: "null"
                name:
                  anyOf:
                    - type: string
                    - type: "null"
                organizationName:
                  anyOf:
                    - type: string
                    - type: "null"
                role:
                  anyOf:
                    - type: string
                    - type: "null"
                specialty:
                  anyOf:
                    - type: string
                    - type: "null"
                phoneNumber:
                  anyOf:
                    - type: string
                    - type: "null"
                faxNumber:
                  anyOf:
                    - type: string
                    - type: "null"
                email:
                  anyOf:
                    - type: string
                    - type: "null"
                addressLine1:
                  anyOf:
                    - type: string
                    - type: "null"
                addressLine2:
                  anyOf:
                    - type: string
                    - type: "null"
                city:
                  anyOf:
                    - type: string
                    - type: "null"
                state:
                  anyOf:
                    - type: string
                    - type: "null"
                postalCode:
                  anyOf:
                    - type: string
                    - type: "null"
                notes:
                  anyOf:
                    - type: string
                    - type: "null"
                coordinatesCare:
                  type: boolean
                source:
                  anyOf:
                    - type: string
                    - type: "null"
                sourceId:
                  anyOf:
                    - type: string
                    - type: "null"
                npi:
                  anyOf:
                    - type: string
                    - type: "null"
                providerCredential:
                  anyOf:
                    - type: string
                    - type: "null"
      parameters:
        - schema:
            type: string
            minLength: 1
          in: path
          name: patientId
          required: true
      security: *a8
      responses:
        "201":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - id
                  - patientId
                additionalProperties: true
                properties:
                  id:
                    type: string
                    minLength: 1
                  patientId:
                    type: string
                    minLength: 1
                  contactType:
                    anyOf:
                      - type: string
                      - type: "null"
                  name:
                    anyOf:
                      - type: string
                      - type: "null"
                  organizationName:
                    anyOf:
                      - type: string
                      - type: "null"
                  role:
                    anyOf:
                      - type: string
                      - type: "null"
                  specialty:
                    anyOf:
                      - type: string
                      - type: "null"
                  phoneNumber:
                    anyOf:
                      - type: string
                      - type: "null"
                  faxNumber:
                    anyOf:
                      - type: string
                      - type: "null"
                  email:
                    anyOf:
                      - type: string
                      - type: "null"
                  addressLine1:
                    anyOf:
                      - type: string
                      - type: "null"
                  addressLine2:
                    anyOf:
                      - type: string
                      - type: "null"
                  city:
                    anyOf:
                      - type: string
                      - type: "null"
                  state:
                    anyOf:
                      - type: string
                      - type: "null"
                  postalCode:
                    anyOf:
                      - type: string
                      - type: "null"
                  notes:
                    anyOf:
                      - type: string
                      - type: "null"
                  coordinatesCare:
                    type: boolean
                  source:
                    anyOf:
                      - type: string
                      - type: "null"
                  sourceId:
                    anyOf:
                      - type: string
                      - type: "null"
                  npi:
                    anyOf:
                      - type: string
                      - type: "null"
                  providerCredential:
                    anyOf:
                      - type: string
                      - type: "null"
                  createdAt:
                    anyOf:
                      - type: string
                        format: date-time
                      - type: "null"
                  updatedAt:
                    anyOf:
                      - type: string
                        format: date-time
                      - type: "null"
  /v1/patient-contacts/{contactId}:
    get:
      operationId: getPatientContactsByContactId
      summary: Get patient contact
      tags:
        - patients
      parameters:
        - schema:
            type: string
            minLength: 1
          in: path
          name: contactId
          required: true
      security: *a8
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - id
                  - patientId
                additionalProperties: true
                properties:
                  id:
                    type: string
                    minLength: 1
                  patientId:
                    type: string
                    minLength: 1
                  contactType:
                    anyOf:
                      - type: string
                      - type: "null"
                  name:
                    anyOf:
                      - type: string
                      - type: "null"
                  organizationName:
                    anyOf:
                      - type: string
                      - type: "null"
                  role:
                    anyOf:
                      - type: string
                      - type: "null"
                  specialty:
                    anyOf:
                      - type: string
                      - type: "null"
                  phoneNumber:
                    anyOf:
                      - type: string
                      - type: "null"
                  faxNumber:
                    anyOf:
                      - type: string
                      - type: "null"
                  email:
                    anyOf:
                      - type: string
                      - type: "null"
                  addressLine1:
                    anyOf:
                      - type: string
                      - type: "null"
                  addressLine2:
                    anyOf:
                      - type: string
                      - type: "null"
                  city:
                    anyOf:
                      - type: string
                      - type: "null"
                  state:
                    anyOf:
                      - type: string
                      - type: "null"
                  postalCode:
                    anyOf:
                      - type: string
                      - type: "null"
                  notes:
                    anyOf:
                      - type: string
                      - type: "null"
                  coordinatesCare:
                    type: boolean
                  source:
                    anyOf:
                      - type: string
                      - type: "null"
                  sourceId:
                    anyOf:
                      - type: string
                      - type: "null"
                  npi:
                    anyOf:
                      - type: string
                      - type: "null"
                  providerCredential:
                    anyOf:
                      - type: string
                      - type: "null"
                  createdAt:
                    anyOf:
                      - type: string
                        format: date-time
                      - type: "null"
                  updatedAt:
                    anyOf:
                      - type: string
                        format: date-time
                      - type: "null"
    patch:
      operationId: patchPatientContactsByContactId
      summary: Update patient contact
      tags:
        - patients
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
              properties:
                id:
                  type: string
                  minLength: 1
                contactType:
                  anyOf:
                    - type: string
                    - type: "null"
                name:
                  anyOf:
                    - type: string
                    - type: "null"
                organizationName:
                  anyOf:
                    - type: string
                    - type: "null"
                role:
                  anyOf:
                    - type: string
                    - type: "null"
                specialty:
                  anyOf:
                    - type: string
                    - type: "null"
                phoneNumber:
                  anyOf:
                    - type: string
                    - type: "null"
                faxNumber:
                  anyOf:
                    - type: string
                    - type: "null"
                email:
                  anyOf:
                    - type: string
                    - type: "null"
                addressLine1:
                  anyOf:
                    - type: string
                    - type: "null"
                addressLine2:
                  anyOf:
                    - type: string
                    - type: "null"
                city:
                  anyOf:
                    - type: string
                    - type: "null"
                state:
                  anyOf:
                    - type: string
                    - type: "null"
                postalCode:
                  anyOf:
                    - type: string
                    - type: "null"
                notes:
                  anyOf:
                    - type: string
                    - type: "null"
                coordinatesCare:
                  type: boolean
                source:
                  anyOf:
                    - type: string
                    - type: "null"
                sourceId:
                  anyOf:
                    - type: string
                    - type: "null"
                npi:
                  anyOf:
                    - type: string
                    - type: "null"
                providerCredential:
                  anyOf:
                    - type: string
                    - type: "null"
      parameters:
        - schema:
            type: string
            minLength: 1
          in: path
          name: contactId
          required: true
      security: *a8
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - id
                  - patientId
                additionalProperties: true
                properties:
                  id:
                    type: string
                    minLength: 1
                  patientId:
                    type: string
                    minLength: 1
                  contactType:
                    anyOf:
                      - type: string
                      - type: "null"
                  name:
                    anyOf:
                      - type: string
                      - type: "null"
                  organizationName:
                    anyOf:
                      - type: string
                      - type: "null"
                  role:
                    anyOf:
                      - type: string
                      - type: "null"
                  specialty:
                    anyOf:
                      - type: string
                      - type: "null"
                  phoneNumber:
                    anyOf:
                      - type: string
                      - type: "null"
                  faxNumber:
                    anyOf:
                      - type: string
                      - type: "null"
                  email:
                    anyOf:
                      - type: string
                      - type: "null"
                  addressLine1:
                    anyOf:
                      - type: string
                      - type: "null"
                  addressLine2:
                    anyOf:
                      - type: string
                      - type: "null"
                  city:
                    anyOf:
                      - type: string
                      - type: "null"
                  state:
                    anyOf:
                      - type: string
                      - type: "null"
                  postalCode:
                    anyOf:
                      - type: string
                      - type: "null"
                  notes:
                    anyOf:
                      - type: string
                      - type: "null"
                  coordinatesCare:
                    type: boolean
                  source:
                    anyOf:
                      - type: string
                      - type: "null"
                  sourceId:
                    anyOf:
                      - type: string
                      - type: "null"
                  npi:
                    anyOf:
                      - type: string
                      - type: "null"
                  providerCredential:
                    anyOf:
                      - type: string
                      - type: "null"
                  createdAt:
                    anyOf:
                      - type: string
                        format: date-time
                      - type: "null"
                  updatedAt:
                    anyOf:
                      - type: string
                        format: date-time
                      - type: "null"
    delete:
      operationId: deletePatientContactsByContactId
      summary: Delete patient contact
      tags:
        - patients
      parameters:
        - schema:
            type: string
            minLength: 1
          in: path
          name: contactId
          required: true
      security: *a8
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - action
                  - status
                additionalProperties: true
                properties:
                  action:
                    type: string
                    enum:
                      - delete
                  status:
                    type: string
                    enum:
                      - deleted
                  id:
                    type: string
                    minLength: 1
  /v1/referral-source-types/{typeId}:
    get:
      operationId: getReferralSourceTypesByTypeId
      summary: Get referral source type
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: typeId
          required: true
      responses:
        "200":
          description: Default Response
    patch:
      operationId: patchReferralSourceTypesByTypeId
      summary: Update referral source type
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: typeId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/referral-source-types:
    post:
      operationId: postReferralSourceTypes
      summary: Create referral source type
      tags:
        - settings
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/patients/{patientId}/referral-source:
    get:
      operationId: getPatientsByPatientIdReferralSource
      summary: Get patient referral source
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/referral-sources/{sourceId}:
    get:
      operationId: getReferralSourcesBySourceId
      summary: Get referral source
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: sourceId
          required: true
      responses:
        "200":
          description: Default Response
    patch:
      operationId: patchReferralSourcesBySourceId
      summary: Update referral source
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: sourceId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/referral-sources:
    post:
      operationId: postReferralSources
      summary: Create referral source
      tags:
        - settings
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/patients/{patientId}/files:
    get:
      operationId: getPatientsByPatientIdFiles
      summary: List patient files
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
    post:
      operationId: postPatientsByPatientIdFiles
      summary: Create patient file
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/patients/{patientId}/files/upload-url:
    post:
      operationId: postPatientsByPatientIdFilesUploadUrl
      summary: Create patient file upload url
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/patient-files/{fileId}:
    get:
      operationId: getPatientFilesByFileId
      summary: Get patient file
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: fileId
          required: true
      responses:
        "200":
          description: Default Response
    patch:
      operationId: patchPatientFilesByFileId
      summary: Update patient file
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: fileId
          required: true
      responses:
        "200":
          description: Default Response
    delete:
      operationId: deletePatientFilesByFileId
      summary: Delete patient file
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: fileId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/patient-files/{fileId}/download-url:
    get:
      operationId: getPatientFilesByFileIdDownloadUrl
      summary: Get patient file download url
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: fileId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/patient-files/{fileId}/content:
    put:
      operationId: putPatientFilesByFileIdContent
      summary: Replace patient file content
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: fileId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/file-reviewers:
    get:
      operationId: getFileReviewers
      summary: List file reviewers
      tags:
        - settings
      security: *a8
      responses:
        "200":
          description: Default Response
    post:
      operationId: postFileReviewers
      summary: Create file reviewer
      tags:
        - settings
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/file-reviewers/{reviewerId}:
    get:
      operationId: getFileReviewersByReviewerId
      summary: Get file reviewer
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: reviewerId
          required: true
      responses:
        "200":
          description: Default Response
    patch:
      operationId: patchFileReviewersByReviewerId
      summary: Update file reviewer
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: reviewerId
          required: true
      responses:
        "200":
          description: Default Response
    delete:
      operationId: deleteFileReviewersByReviewerId
      summary: Delete file reviewer
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: reviewerId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/inbox-items:
    get:
      operationId: getInboxItems
      summary: List inbox items
      tags:
        - settings
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/inbox-items/{inboxItemId}:
    get:
      operationId: getInboxItemsByInboxItemId
      summary: Get inbox item
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: inboxItemId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/inbox-items/{inboxItemId}/download-url:
    get:
      operationId: getInboxItemsByInboxItemIdDownloadUrl
      summary: Get inbox item download url
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: inboxItemId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/inbox-items/{inboxItemId}/assign:
    post:
      operationId: postInboxItemsByInboxItemIdAssign
      summary: Assign inbox item
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: inboxItemId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/inbox-items/{inboxItemId}/archive:
    patch:
      operationId: patchInboxItemsByInboxItemIdArchive
      summary: Archive inbox item
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: inboxItemId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/inbox-items/{inboxItemId}/unarchive:
    patch:
      operationId: patchInboxItemsByInboxItemIdUnarchive
      summary: Unarchive inbox item
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: inboxItemId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/sent-faxes:
    get:
      operationId: getSentFaxes
      summary: List sent faxes
      tags:
        - settings
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/faxes/upload-url:
    post:
      operationId: postFaxesUploadUrl
      summary: Create faxe upload url
      tags:
        - settings
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/patients/{patientId}/insurances:
    get:
      operationId: getPatientsByPatientIdInsurances
      summary: List patient insurances
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
    post:
      operationId: postPatientsByPatientIdInsurances
      summary: Create patient insurance
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/insurances/{insuranceId}/front-image/download-url:
    get:
      operationId: getInsurancesByInsuranceIdFrontImageDownloadUrl
      summary: Get insurance front image download url
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: insuranceId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/insurances/{insuranceId}/back-image/download-url:
    get:
      operationId: getInsurancesByInsuranceIdBackImageDownloadUrl
      summary: Get insurance back image download url
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: insuranceId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/insurances/{insuranceId}:
    get:
      operationId: getInsurancesByInsuranceId
      summary: Get insurance
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: insuranceId
          required: true
      responses:
        "200":
          description: Default Response
    patch:
      operationId: patchInsurancesByInsuranceId
      summary: Update insurance
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: insuranceId
          required: true
      responses:
        "200":
          description: Default Response
    delete:
      operationId: deleteInsurancesByInsuranceId
      summary: Delete insurance
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: insuranceId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/insurance-reviews:
    get:
      operationId: getInsuranceReviews
      summary: List insurance reviews
      tags:
        - settings
      security: *a8
      responses:
        "200":
          description: Default Response
    post:
      operationId: postInsuranceReviews
      summary: Create insurance review
      tags:
        - settings
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/insurance-reviews/{reviewId}:
    get:
      operationId: getInsuranceReviewsByReviewId
      summary: Get insurance review
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: reviewId
          required: true
      responses:
        "200":
          description: Default Response
    patch:
      operationId: patchInsuranceReviewsByReviewId
      summary: Update insurance review
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: reviewId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/insurance-reviews/{reviewId}/complete:
    patch:
      operationId: patchInsuranceReviewsByReviewIdComplete
      summary: Complete insurance review
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: reviewId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/insurances/{insuranceId}/eligibility:
    get:
      operationId: getInsurancesByInsuranceIdEligibility
      summary: Get insurance eligibility
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: insuranceId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/eligibility-checks:
    get:
      operationId: getEligibilityChecks
      summary: List eligibility checks
      tags:
        - settings
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/integrations/{key}:
    get:
      operationId: getIntegrationsByKey
      summary: Get integration
      tags:
        - integrations
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: key
          required: true
      responses:
        "200":
          description: Default Response
    put:
      operationId: putIntegrationsByKey
      summary: Replace integration
      tags:
        - integrations
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: key
          required: true
      responses:
        "200":
          description: Default Response
  /v1/patients/{patientId}/episodes-of-care:
    get:
      operationId: getPatientsByPatientIdEpisodesOfCare
      summary: Get patient episodes of care
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
    post:
      operationId: postPatientsByPatientIdEpisodesOfCare
      summary: Create patient episodes of care
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/episodes-of-care/{episodeOfCareId}:
    patch:
      operationId: patchEpisodesOfCareByEpisodeOfCareId
      summary: Update episodes of care
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: episodeOfCareId
          required: true
      responses:
        "200":
          description: Default Response
    delete:
      operationId: deleteEpisodesOfCareByEpisodeOfCareId
      summary: Delete episodes of care
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: episodeOfCareId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/episodes-of-care/requested:
    get:
      operationId: getEpisodesOfCareRequested
      summary: Get episodes of care requested
      tags:
        - settings
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/episodes-of-care/upcoming-discharges:
    get:
      operationId: getEpisodesOfCareUpcomingDischarges
      summary: List episodes of care upcoming discharges
      tags:
        - settings
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/teams/{teamId}/queue-items:
    get:
      operationId: getTeamsByTeamIdQueueItems
      summary: List team queue items
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: teamId
          required: true
      responses:
        "200":
          description: Default Response
    post:
      operationId: postTeamsByTeamIdQueueItems
      summary: Create team queue item
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: teamId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/queue-items/{queueItemId}:
    get:
      operationId: getQueueItemsByQueueItemId
      summary: Get queue item
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: queueItemId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/queue-items/{queueItemId}/accept:
    patch:
      operationId: patchQueueItemsByQueueItemIdAccept
      summary: Accept queue item
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: queueItemId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/queue-items/{queueItemId}/reject:
    patch:
      operationId: patchQueueItemsByQueueItemIdReject
      summary: Reject queue item
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: queueItemId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/patients/{patientId}/family:
    get:
      operationId: getPatientsByPatientIdFamily
      summary: Get patient family
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
    post:
      operationId: postPatientsByPatientIdFamily
      summary: Create patient family
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/families/{familyId}:
    get:
      operationId: getFamiliesByFamilyId
      summary: Get family
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: familyId
          required: true
      responses:
        "200":
          description: Default Response
    patch:
      operationId: patchFamiliesByFamilyId
      summary: Update family
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: familyId
          required: true
      responses:
        "200":
          description: Default Response
    delete:
      operationId: deleteFamiliesByFamilyId
      summary: Delete family
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: familyId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/families/{familyId}/members:
    post:
      operationId: postFamiliesByFamilyIdMembers
      summary: Create family member
      tags:
        - staff
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: familyId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/family-members/{familyMemberId}:
    patch:
      operationId: patchFamilyMembersByFamilyMemberId
      summary: Update family member
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: familyMemberId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/families/{familyId}/members/{patientId}:
    delete:
      operationId: deleteFamiliesByFamilyIdMembersByPatientId
      summary: Delete family member
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: familyId
          required: true
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/families/relationships:
    put:
      operationId: putFamiliesRelationships
      summary: Replace family relationship
      tags:
        - settings
      security: *a8
      responses:
        "200":
          description: Default Response
    delete:
      operationId: deleteFamiliesRelationships
      summary: Delete family relationship
      tags:
        - settings
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/assessment-review-families:
    get:
      operationId: getAssessmentReviewFamilies
      summary: List assessment review families
      tags:
        - settings
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/assessment-reviews/{assessmentId}:
    patch:
      operationId: patchAssessmentReviewsByAssessmentId
      summary: Update assessment review
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: assessmentId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/form-templates:
    get:
      operationId: getFormTemplates
      summary: List form templates
      tags:
        - forms
      security: *a8
      responses:
        "200":
          description: Default Response
    post:
      operationId: postFormTemplates
      summary: Create form template
      tags:
        - forms
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/form-templates/{templateId}:
    get:
      operationId: getFormTemplatesByTemplateId
      summary: Get form template
      tags:
        - forms
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: templateId
          required: true
      responses:
        "200":
          description: Default Response
    patch:
      operationId: patchFormTemplatesByTemplateId
      summary: Update form template
      tags:
        - forms
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: templateId
          required: true
      responses:
        "200":
          description: Default Response
    delete:
      operationId: deleteFormTemplatesByTemplateId
      summary: Delete form template
      tags:
        - forms
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: templateId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/form-instances:
    get:
      operationId: getFormInstances
      summary: List form instances
      tags:
        - forms
      security: *a8
      responses:
        "200":
          description: Default Response
    post:
      operationId: postFormInstances
      summary: Create form instance
      tags:
        - forms
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/form-metrics:
    get:
      operationId: getFormMetrics
      summary: List form metrics
      tags:
        - forms
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/patients/{patientId}/form-instances:
    get:
      operationId: getPatientsByPatientIdFormInstances
      summary: List patient form instances
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/form-instances/{instanceId}:
    get:
      operationId: getFormInstancesByInstanceId
      summary: Get form instance
      tags:
        - forms
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: instanceId
          required: true
      responses:
        "200":
          description: Default Response
    patch:
      operationId: patchFormInstancesByInstanceId
      summary: Update form instance
      tags:
        - forms
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: instanceId
          required: true
      responses:
        "200":
          description: Default Response
    delete:
      operationId: deleteFormInstancesByInstanceId
      summary: Delete form instance
      tags:
        - forms
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: instanceId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/form-instances/{instanceId}/reminder:
    patch:
      operationId: patchFormInstancesByInstanceIdReminder
      summary: Update form instance reminder
      tags:
        - forms
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: instanceId
          required: true
      responses:
        "200":
          description: Default Response
    post:
      operationId: postFormInstancesByInstanceIdReminder
      summary: Create form instance reminder
      tags:
        - forms
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: instanceId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/email-templates:
    get:
      operationId: getEmailTemplates
      summary: List email templates
      tags:
        - settings
      security: *a8
      responses:
        "200":
          description: Default Response
    post:
      operationId: postEmailTemplates
      summary: Create email template
      tags:
        - settings
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/email-templates/{templateId}:
    get:
      operationId: getEmailTemplatesByTemplateId
      summary: Get email template
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: templateId
          required: true
      responses:
        "200":
          description: Default Response
    patch:
      operationId: patchEmailTemplatesByTemplateId
      summary: Update email template
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: templateId
          required: true
      responses:
        "200":
          description: Default Response
    delete:
      operationId: deleteEmailTemplatesByTemplateId
      summary: Delete email template
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: templateId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/letter-templates:
    get:
      operationId: getLetterTemplates
      summary: List letter templates
      tags:
        - settings
      security: *a8
      responses:
        "200":
          description: Default Response
    post:
      operationId: postLetterTemplates
      summary: Create letter template
      tags:
        - settings
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/letter-templates/{templateId}:
    get:
      operationId: getLetterTemplatesByTemplateId
      summary: Get letter template
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: templateId
          required: true
      responses:
        "200":
          description: Default Response
    patch:
      operationId: patchLetterTemplatesByTemplateId
      summary: Update letter template
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: templateId
          required: true
      responses:
        "200":
          description: Default Response
    delete:
      operationId: deleteLetterTemplatesByTemplateId
      summary: Delete letter template
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: templateId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/patient-emails:
    get:
      operationId: getPatientEmails
      summary: List patient emails
      tags:
        - patients
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/patients/{patientId}/emails:
    get:
      operationId: getPatientsByPatientIdEmails
      summary: List patient emails
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/patients/{patientId}/stripe-invoices:
    get:
      operationId: getPatientsByPatientIdStripeInvoices
      summary: List patient stripe invoices
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/patients/{patientId}/billable-encounters:
    get:
      operationId: getPatientsByPatientIdBillableEncounters
      summary: List patient billable encounters
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/nps/metrics:
    get:
      operationId: getNpsMetrics
      summary: List nps metrics
      tags:
        - staff
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/patients/{patientId}/nps-surveys:
    post:
      operationId: postPatientsByPatientIdNpsSurveys
      summary: Create patient nps survey
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/nps/surveys:
    post:
      operationId: postNpsSurveys
      summary: Create np survey
      tags:
        - forms
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/nps/dispatch-due:
    post:
      operationId: postNpsDispatchDue
      summary: Dispatch due np
      tags:
        - forms
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/nps/responses:
    post:
      operationId: postNpsResponses
      summary: Create np respons
      tags:
        - forms
      security: &a9 []
      responses:
        "200":
          description: Default Response
  /v1/data-export-jobs:
    get:
      operationId: getDataExportJobs
      summary: List data export jobs
      tags:
        - integrations
      security: *a8
      responses:
        "200":
          description: Default Response
    post:
      operationId: postDataExportJobs
      summary: Create data export job
      tags:
        - integrations
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/data-export-jobs/{jobId}/generate:
    post:
      operationId: postDataExportJobsByJobIdGenerate
      summary: Generate data export job
      tags:
        - integrations
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: jobId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/data-export-jobs/{jobId}/download-url:
    get:
      operationId: getDataExportJobsByJobIdDownloadUrl
      summary: Get data export job download url
      tags:
        - integrations
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: jobId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/data-export-jobs/{jobId}:
    get:
      operationId: getDataExportJobsByJobId
      summary: Get data export job
      tags:
        - integrations
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: jobId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/organization-features/available:
    get:
      operationId: getOrganizationFeaturesAvailable
      summary: Get organization feature available
      tags:
        - organization
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/organization-features:
    get:
      operationId: getOrganizationFeatures
      summary: List organization features
      tags:
        - organization
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/organizations/{organizationId}/features:
    get:
      operationId: getOrganizationsByOrganizationIdFeatures
      summary: List organization features
      tags:
        - organization
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: organizationId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/organizations:
    get:
      operationId: getOrganizations
      summary: List organizations
      tags:
        - organization
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/organizations/{organizationId}/features/{featureName}:
    patch:
      operationId: patchOrganizationsByOrganizationIdFeaturesByFeatureName
      summary: Update organization feature
      tags:
        - organization
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: organizationId
          required: true
        - schema:
            type: string
          in: path
          name: featureName
          required: true
      responses:
        "200":
          description: Default Response
  /v1/outreach-events:
    get:
      operationId: getOutreachEvents
      summary: List outreach events
      tags:
        - forms
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/patients/{patientId}/outreach-events:
    get:
      operationId: getPatientsByPatientIdOutreachEvents
      summary: List patient outreach events
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
    post:
      operationId: postPatientsByPatientIdOutreachEvents
      summary: Create patient outreach event
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/patients/{patientId}/outreach-schedules:
    get:
      operationId: getPatientsByPatientIdOutreachSchedules
      summary: List patient outreach schedules
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
    post:
      operationId: postPatientsByPatientIdOutreachSchedules
      summary: Create patient outreach schedule
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/outreach-schedules/{scheduleId}:
    delete:
      operationId: deleteOutreachSchedulesByScheduleId
      summary: Delete outreach schedule
      tags:
        - forms
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: scheduleId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/session/magic:
    get:
      operationId: getSessionMagic
      summary: Get session magic
      tags:
        - settings
      security: *a9
      responses:
        "200":
          description: Default Response
    post:
      operationId: postSessionMagic
      summary: Create session magic
      tags:
        - settings
      security: *a9
      responses:
        "200":
          description: Default Response
  /v1/appointments/{appointmentId}/virtual-session-reminder:
    post:
      operationId: postAppointmentsByAppointmentIdVirtualSessionReminder
      summary: Create appointment virtual session reminder
      tags:
        - appointments
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: appointmentId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/patients/{patientId}/instant-appointment:
    post:
      operationId: postPatientsByPatientIdInstantAppointment
      summary: Create patient instant appointment
      tags:
        - appointments
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/braver-sessions:
    post:
      operationId: postBraverSessions
      summary: Create braver session
      tags:
        - settings
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/appointments/{appointmentId}/braver-session/ensure:
    post:
      operationId: postAppointmentsByAppointmentIdBraverSessionEnsure
      summary: Ensure appointment braver session
      tags:
        - appointments
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: appointmentId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/braver-sessions/{sessionId}:
    get:
      operationId: getBraverSessionsBySessionId
      summary: Get braver session
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: sessionId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/appointments/{appointmentId}/braver-session:
    get:
      operationId: getAppointmentsByAppointmentIdBraverSession
      summary: Get appointment braver session
      tags:
        - appointments
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: appointmentId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/me/braver-sessions:
    get:
      operationId: getMeBraverSessions
      summary: List me braver sessions
      tags:
        - staff
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/braver-sessions/{sessionId}/magic-links:
    post:
      operationId: postBraverSessionsBySessionIdMagicLinks
      summary: Create braver session magic link
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: sessionId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/braver-sessions/{sessionId}/start:
    patch:
      operationId: patchBraverSessionsBySessionIdStart
      summary: Start braver session
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: sessionId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/braver-sessions/{sessionId}/end:
    patch:
      operationId: patchBraverSessionsBySessionIdEnd
      summary: End braver session
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: sessionId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/braver-sessions/{sessionId}/events:
    post:
      operationId: postBraverSessionsBySessionIdEvents
      summary: Create braver session event
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: sessionId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/braver-sessions/{sessionId}/waiting-room-messages:
    post:
      operationId: postBraverSessionsBySessionIdWaitingRoomMessages
      summary: Create braver session waiting room message
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: sessionId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/braver-sessions/{sessionId}/chat-messages:
    post:
      operationId: postBraverSessionsBySessionIdChatMessages
      summary: Create braver session chat message
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: sessionId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/braver-sessions/{sessionId}/audio/start:
    patch:
      operationId: patchBraverSessionsBySessionIdAudioStart
      summary: Start braver session audio
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: sessionId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/braver-sessions/{sessionId}/video/start:
    patch:
      operationId: patchBraverSessionsBySessionIdVideoStart
      summary: Start braver session video
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: sessionId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/me/voice-sample/upload-url:
    post:
      operationId: postMeVoiceSampleUploadUrl
      summary: Create me voice sample upload url
      tags:
        - staff
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/me/voice-sample/confirm:
    post:
      operationId: postMeVoiceSampleConfirm
      summary: Confirm me voice sample
      tags:
        - staff
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/me/voice-sample/download-url:
    get:
      operationId: getMeVoiceSampleDownloadUrl
      summary: Get me voice sample download url
      tags:
        - staff
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/me/voice-sample:
    delete:
      operationId: deleteMeVoiceSample
      summary: Delete me voice sample
      tags:
        - staff
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/users:
    get:
      operationId: getUsers
      summary: List users
      tags:
        - staff
      security: *a8
      responses:
        "200":
          description: Default Response
    post:
      operationId: postUsers
      summary: Create user
      tags:
        - staff
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/users/{userId}:
    get:
      operationId: getUsersByUserId
      summary: Get user
      tags:
        - staff
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: userId
          required: true
      responses:
        "200":
          description: Default Response
    patch:
      operationId: patchUsersByUserId
      summary: Update user
      tags:
        - staff
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: userId
          required: true
      responses:
        "200":
          description: Default Response
    delete:
      operationId: deleteUsersByUserId
      summary: Delete user
      tags:
        - staff
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: userId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/users/{userId}/google-calendar-sync:
    patch:
      operationId: patchUsersByUserIdGoogleCalendarSync
      summary: Update user google calendar sync
      tags:
        - staff
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: userId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/users/{userId}/availability:
    get:
      operationId: getUsersByUserIdAvailability
      summary: Get user availability
      tags:
        - staff
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: userId
          required: true
      responses:
        "200":
          description: Default Response
    put:
      operationId: putUsersByUserIdAvailability
      summary: Replace user availability
      tags:
        - staff
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: userId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/users/{userId}/appointment-types:
    get:
      operationId: getUsersByUserIdAppointmentTypes
      summary: List user appointment types
      tags:
        - appointments
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: userId
          required: true
      responses:
        "200":
          description: Default Response
    put:
      operationId: putUsersByUserIdAppointmentTypes
      summary: Replace user appointment type
      tags:
        - appointments
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: userId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/locations:
    get:
      operationId: getLocations
      summary: List locations
      tags:
        - settings
      parameters:
        - schema:
            type: integer
            minimum: 1
          in: query
          name: page
          required: false
        - schema:
            type: integer
            minimum: 1
            maximum: 100
          in: query
          name: pageSize
          required: false
        - schema:
            type: integer
            minimum: 1
            maximum: 100
          in: query
          name: limit
          required: false
        - schema:
            type: string
          in: query
          name: sort
          required: false
          description: "Comma-separated sort fields. Allowed fields: name, city, state,
            createdAt, updatedAt."
        - schema:
            type: boolean
          in: query
          name: includeArchived
          required: false
        - schema:
            type: boolean
          in: query
          name: archived
          required: false
        - schema:
            type: string
          in: query
          name: search
          required: false
        - schema:
            type: string
          in: query
          name: city
          required: false
        - schema:
            type: string
          in: query
          name: state
          required: false
        - schema:
            type: string
          in: query
          name: zipCode
          required: false
      security: *a8
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - count
                  - data
                  - page
                  - pageSize
                additionalProperties: true
                properties:
                  count:
                    type: integer
                    minimum: 0
                  data:
                    type: array
                    items:
                      type: object
                      required:
                        - id
                      additionalProperties: true
                      properties:
                        id:
                          type: string
                          minLength: 1
                        name:
                          anyOf:
                            - type: string
                            - type: "null"
                        displayName:
                          anyOf:
                            - type: string
                            - type: "null"
                        address1:
                          anyOf:
                            - type: string
                            - type: "null"
                        address2:
                          anyOf:
                            - type: string
                            - type: "null"
                        city:
                          anyOf:
                            - type: string
                            - type: "null"
                        state:
                          anyOf:
                            - type: string
                            - type: "null"
                        zipCode:
                          anyOf:
                            - type: string
                            - type: "null"
                        latitude:
                          anyOf:
                            - type: number
                            - type: "null"
                        longitude:
                          anyOf:
                            - type: number
                            - type: "null"
                        isolines: {}
                        createdAt:
                          anyOf:
                            - type: string
                              format: date-time
                            - type: "null"
                        updatedAt:
                          anyOf:
                            - type: string
                              format: date-time
                            - type: "null"
                        archivedAt:
                          anyOf:
                            - type: string
                              format: date-time
                            - type: "null"
                  page:
                    type: integer
                    minimum: 1
                  pageSize:
                    type: integer
                    minimum: 1
    post:
      operationId: postLocations
      summary: Create location
      tags:
        - settings
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
              additionalProperties: true
              properties:
                id:
                  type: string
                  minLength: 1
                name:
                  type: string
                  minLength: 1
                displayName:
                  anyOf:
                    - type: string
                    - type: "null"
                address1:
                  anyOf:
                    - type: string
                    - type: "null"
                address2:
                  anyOf:
                    - type: string
                    - type: "null"
                city:
                  anyOf:
                    - type: string
                    - type: "null"
                state:
                  anyOf:
                    - type: string
                    - type: "null"
                zipCode:
                  anyOf:
                    - type: string
                    - type: "null"
                latitude:
                  anyOf:
                    - type: number
                    - type: "null"
                longitude:
                  anyOf:
                    - type: number
                    - type: "null"
                createdByUserId:
                  anyOf:
                    - type: string
                    - type: "null"
                updatedByUserId:
                  anyOf:
                    - type: string
                    - type: "null"
      security: *a8
      responses:
        "201":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - id
                additionalProperties: true
                properties:
                  id:
                    type: string
                    minLength: 1
                  name:
                    anyOf:
                      - type: string
                      - type: "null"
                  displayName:
                    anyOf:
                      - type: string
                      - type: "null"
                  address1:
                    anyOf:
                      - type: string
                      - type: "null"
                  address2:
                    anyOf:
                      - type: string
                      - type: "null"
                  city:
                    anyOf:
                      - type: string
                      - type: "null"
                  state:
                    anyOf:
                      - type: string
                      - type: "null"
                  zipCode:
                    anyOf:
                      - type: string
                      - type: "null"
                  latitude:
                    anyOf:
                      - type: number
                      - type: "null"
                  longitude:
                    anyOf:
                      - type: number
                      - type: "null"
                  isolines: {}
                  createdAt:
                    anyOf:
                      - type: string
                        format: date-time
                      - type: "null"
                  updatedAt:
                    anyOf:
                      - type: string
                        format: date-time
                      - type: "null"
                  archivedAt:
                    anyOf:
                      - type: string
                        format: date-time
                      - type: "null"
  /v1/locations/{locationId}:
    get:
      operationId: getLocationsByLocationId
      summary: Get location
      tags:
        - settings
      parameters:
        - schema:
            type: string
            minLength: 1
          in: path
          name: locationId
          required: true
      security: *a8
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - id
                additionalProperties: true
                properties:
                  id:
                    type: string
                    minLength: 1
                  name:
                    anyOf:
                      - type: string
                      - type: "null"
                  displayName:
                    anyOf:
                      - type: string
                      - type: "null"
                  address1:
                    anyOf:
                      - type: string
                      - type: "null"
                  address2:
                    anyOf:
                      - type: string
                      - type: "null"
                  city:
                    anyOf:
                      - type: string
                      - type: "null"
                  state:
                    anyOf:
                      - type: string
                      - type: "null"
                  zipCode:
                    anyOf:
                      - type: string
                      - type: "null"
                  latitude:
                    anyOf:
                      - type: number
                      - type: "null"
                  longitude:
                    anyOf:
                      - type: number
                      - type: "null"
                  isolines: {}
                  createdAt:
                    anyOf:
                      - type: string
                        format: date-time
                      - type: "null"
                  updatedAt:
                    anyOf:
                      - type: string
                        format: date-time
                      - type: "null"
                  archivedAt:
                    anyOf:
                      - type: string
                        format: date-time
                      - type: "null"
    patch:
      operationId: patchLocationsByLocationId
      summary: Update location
      tags:
        - settings
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: []
              additionalProperties: true
              properties:
                id:
                  type: string
                  minLength: 1
                name:
                  type: string
                  minLength: 1
                displayName:
                  anyOf:
                    - type: string
                    - type: "null"
                address1:
                  anyOf:
                    - type: string
                    - type: "null"
                address2:
                  anyOf:
                    - type: string
                    - type: "null"
                city:
                  anyOf:
                    - type: string
                    - type: "null"
                state:
                  anyOf:
                    - type: string
                    - type: "null"
                zipCode:
                  anyOf:
                    - type: string
                    - type: "null"
                latitude:
                  anyOf:
                    - type: number
                    - type: "null"
                longitude:
                  anyOf:
                    - type: number
                    - type: "null"
                createdByUserId:
                  anyOf:
                    - type: string
                    - type: "null"
                updatedByUserId:
                  anyOf:
                    - type: string
                    - type: "null"
      parameters:
        - schema:
            type: string
            minLength: 1
          in: path
          name: locationId
          required: true
      security: *a8
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - id
                additionalProperties: true
                properties:
                  id:
                    type: string
                    minLength: 1
                  name:
                    anyOf:
                      - type: string
                      - type: "null"
                  displayName:
                    anyOf:
                      - type: string
                      - type: "null"
                  address1:
                    anyOf:
                      - type: string
                      - type: "null"
                  address2:
                    anyOf:
                      - type: string
                      - type: "null"
                  city:
                    anyOf:
                      - type: string
                      - type: "null"
                  state:
                    anyOf:
                      - type: string
                      - type: "null"
                  zipCode:
                    anyOf:
                      - type: string
                      - type: "null"
                  latitude:
                    anyOf:
                      - type: number
                      - type: "null"
                  longitude:
                    anyOf:
                      - type: number
                      - type: "null"
                  isolines: {}
                  createdAt:
                    anyOf:
                      - type: string
                        format: date-time
                      - type: "null"
                  updatedAt:
                    anyOf:
                      - type: string
                        format: date-time
                      - type: "null"
                  archivedAt:
                    anyOf:
                      - type: string
                        format: date-time
                      - type: "null"
    delete:
      operationId: deleteLocationsByLocationId
      summary: Archive location
      tags:
        - settings
      parameters:
        - schema:
            type: string
            minLength: 1
          in: path
          name: locationId
          required: true
      security: *a8
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - action
                  - status
                additionalProperties: true
                properties:
                  action:
                    type: string
                    enum:
                      - archive
                  status:
                    type: string
                    enum:
                      - archived
                  id:
                    type: string
                    minLength: 1
                  archived:
                    type: boolean
                    enum:
                      - true
  /v1/organization-branding/upload-url:
    post:
      operationId: postOrganizationBrandingUploadUrl
      summary: Create organization branding upload URL
      tags:
        - settings
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - contentType
              additionalProperties: true
              properties:
                filename:
                  type: string
                contentType:
                  type: string
                  enum:
                    - image/png
                    - image/jpeg
                    - image/svg+xml
                    - image/webp
      security: *a8
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - bucket
                  - key
                additionalProperties: true
                properties:
                  uploadUrl:
                    type: string
                    format: uri
                  downloadUrl:
                    type: string
                    format: uri
                  uploadId:
                    type: string
                    minLength: 1
                  bucket:
                    type: string
                  key:
                    type: string
  /v1/organization-branding/download-url:
    post:
      operationId: postOrganizationBrandingDownloadUrl
      summary: Create organization branding download URL
      tags:
        - settings
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - uploadId
                - contentType
              additionalProperties: true
              properties:
                uploadId:
                  type: string
                  minLength: 1
                filename:
                  type: string
                contentType:
                  type: string
                  enum:
                    - image/png
                    - image/jpeg
                    - image/svg+xml
                    - image/webp
                key:
                  type: string
      security: *a8
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - bucket
                  - key
                additionalProperties: true
                properties:
                  uploadUrl:
                    type: string
                    format: uri
                  downloadUrl:
                    type: string
                    format: uri
                  uploadId:
                    type: string
                    minLength: 1
                  bucket:
                    type: string
                  key:
                    type: string
  /v1/settings:
    get:
      operationId: getSettings
      summary: List settings
      tags:
        - settings
      parameters:
        - schema:
            type: integer
            minimum: 1
          in: query
          name: page
          required: false
        - schema:
            type: integer
            minimum: 1
            maximum: 100
          in: query
          name: pageSize
          required: false
        - schema:
            type: integer
            minimum: 1
            maximum: 100
          in: query
          name: limit
          required: false
        - schema:
            type: string
          in: query
          name: sort
          required: false
          description: "Comma-separated sort fields. Allowed fields: name, createdAt,
            updatedAt."
        - schema:
            type: boolean
          in: query
          name: includeArchived
          required: false
        - schema:
            type: boolean
          in: query
          name: archived
          required: false
        - schema:
            type: string
          in: query
          name: search
          required: false
        - schema:
            type: string
          in: query
          name: name
          required: false
      security: *a8
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - count
                  - data
                  - page
                  - pageSize
                additionalProperties: true
                properties:
                  count:
                    type: integer
                    minimum: 0
                  data:
                    type: array
                    items:
                      type: object
                      required:
                        - id
                        - name
                        - value
                      additionalProperties: true
                      properties:
                        id:
                          type: string
                          minLength: 1
                        name:
                          type: string
                        value: {}
                        createdAt:
                          anyOf:
                            - type: string
                              format: date-time
                            - type: "null"
                        updatedAt:
                          anyOf:
                            - type: string
                              format: date-time
                            - type: "null"
                  page:
                    type: integer
                    minimum: 1
                  pageSize:
                    type: integer
                    minimum: 1
    post:
      operationId: postSettings
      summary: Create setting
      tags:
        - settings
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
                - value
              additionalProperties: true
              properties:
                id:
                  type: string
                  minLength: 1
                name:
                  type: string
                  minLength: 1
                value: {}
                createdByUserId:
                  anyOf:
                    - type: string
                    - type: "null"
                updatedByUserId:
                  anyOf:
                    - type: string
                    - type: "null"
      security: *a8
      responses:
        "201":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - id
                  - name
                  - value
                additionalProperties: true
                properties:
                  id:
                    type: string
                    minLength: 1
                  name:
                    type: string
                  value: {}
                  createdAt:
                    anyOf:
                      - type: string
                        format: date-time
                      - type: "null"
                  updatedAt:
                    anyOf:
                      - type: string
                        format: date-time
                      - type: "null"
  /v1/settings/{settingId}:
    get:
      operationId: getSettingsBySettingId
      summary: Get setting
      tags:
        - settings
      parameters:
        - schema:
            type: string
            minLength: 1
          in: path
          name: settingId
          required: true
      security: *a8
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - id
                  - name
                  - value
                additionalProperties: true
                properties:
                  id:
                    type: string
                    minLength: 1
                  name:
                    type: string
                  value: {}
                  createdAt:
                    anyOf:
                      - type: string
                        format: date-time
                      - type: "null"
                  updatedAt:
                    anyOf:
                      - type: string
                        format: date-time
                      - type: "null"
    patch:
      operationId: patchSettingsBySettingId
      summary: Update setting
      tags:
        - settings
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: []
              additionalProperties: true
              properties:
                id:
                  type: string
                  minLength: 1
                name:
                  type: string
                  minLength: 1
                value: {}
                createdByUserId:
                  anyOf:
                    - type: string
                    - type: "null"
                updatedByUserId:
                  anyOf:
                    - type: string
                    - type: "null"
      parameters:
        - schema:
            type: string
            minLength: 1
          in: path
          name: settingId
          required: true
      security: *a8
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - id
                  - name
                  - value
                additionalProperties: true
                properties:
                  id:
                    type: string
                    minLength: 1
                  name:
                    type: string
                  value: {}
                  createdAt:
                    anyOf:
                      - type: string
                        format: date-time
                      - type: "null"
                  updatedAt:
                    anyOf:
                      - type: string
                        format: date-time
                      - type: "null"
    delete:
      operationId: deleteSettingsBySettingId
      summary: Delete setting
      tags:
        - settings
      parameters:
        - schema:
            type: string
            minLength: 1
          in: path
          name: settingId
          required: true
      security: *a8
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - action
                  - status
                additionalProperties: true
                properties:
                  action:
                    type: string
                    enum:
                      - delete
                  status:
                    type: string
                    enum:
                      - deleted
                  id:
                    type: string
                    minLength: 1
                  deleted:
                    type: boolean
                    enum:
                      - true
  /v1/automations/catalog:
    get:
      operationId: getAutomationsCatalog
      summary: Get automation catalog
      tags:
        - settings
      description: Available automation trigger and action definitions with per-item
        config schemas.
      security: *a8
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - triggers
                  - actions
                additionalProperties: true
                properties:
                  triggers:
                    type: array
                    items: {}
                  actions:
                    type: array
                    items: {}
  /v1/automations:
    get:
      operationId: getAutomations
      summary: List automations
      tags:
        - settings
      description: Automations with batched workflow metrics, ordered by name.
      parameters:
        - schema:
            type: integer
            minimum: 1
          in: query
          name: page
          required: false
        - schema:
            type: integer
            minimum: 1
            maximum: 100
          in: query
          name: pageSize
          required: false
        - schema:
            type: integer
            minimum: 1
            maximum: 100
          in: query
          name: limit
          required: false
        - schema:
            type: string
          in: query
          name: sort
          required: false
          description: "Comma-separated sort fields. Allowed fields: ."
        - schema:
            type: boolean
          in: query
          name: includeArchived
          required: false
        - schema:
            type: boolean
          in: query
          name: archived
          required: false
        - schema:
            type: string
          in: query
          name: search
          required: false
      security: *a8
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - count
                  - data
                  - page
                  - pageSize
                additionalProperties: true
                properties:
                  count:
                    type: integer
                    minimum: 0
                  data:
                    type: array
                    items:
                      type: object
                      required:
                        - id
                        - name
                        - enabled
                        - triggerType
                      additionalProperties: true
                      properties:
                        id:
                          type: string
                          minLength: 1
                        name:
                          type: string
                        description:
                          anyOf:
                            - type: string
                            - type: "null"
                        enabled:
                          type: boolean
                        triggerType:
                          type: string
                        triggerConfig: {}
                        definition: {}
                        archivedAt:
                          anyOf:
                            - type: string
                              format: date-time
                            - type: "null"
                        lastWorkflowAt:
                          anyOf:
                            - type: string
                              format: date-time
                            - type: "null"
                        metrics:
                          type: object
                          required:
                            - totalWorkflows
                            - completedWorkflows
                            - failedWorkflows
                            - queuedWorkflows
                          additionalProperties: true
                          properties:
                            totalWorkflows:
                              type: integer
                              minimum: 0
                            completedWorkflows:
                              type: integer
                              minimum: 0
                            failedWorkflows:
                              type: integer
                              minimum: 0
                            queuedWorkflows:
                              type: integer
                              minimum: 0
                            lastWorkflowAt:
                              anyOf:
                                - type: string
                                  format: date-time
                                - type: "null"
                            workflowsLast7Days:
                              type: integer
                              minimum: 0
                            dailyWorkflows:
                              type: array
                              items:
                                type: object
                                required:
                                  - date
                                  - count
                                properties:
                                  date:
                                    type: string
                                  count:
                                    type: integer
                                    minimum: 0
                        createdAt:
                          anyOf:
                            - type: string
                              format: date-time
                            - type: "null"
                        updatedAt:
                          anyOf:
                            - type: string
                              format: date-time
                            - type: "null"
                  page:
                    type: integer
                    minimum: 1
                  pageSize:
                    type: integer
                    minimum: 1
    post:
      operationId: postAutomations
      summary: Create automation
      tags:
        - settings
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
              properties:
                id:
                  type: string
                  minLength: 1
                name:
                  type: string
                  minLength: 1
                description:
                  anyOf:
                    - type: string
                    - type: "null"
                enabled:
                  type: boolean
                triggerType:
                  type: string
                  description: "Supported triggers: appointment.attended,
                    appointment.attendance_recorded, appointment.created,
                    appointment.canceled, treatment_note.finalized,
                    patient.created, form_instance.submission."
                triggerConfig: {}
                definition: {}
      security: *a8
      responses:
        "201":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - id
                  - name
                  - enabled
                  - triggerType
                additionalProperties: true
                properties:
                  id:
                    type: string
                    minLength: 1
                  name:
                    type: string
                  description:
                    anyOf:
                      - type: string
                      - type: "null"
                  enabled:
                    type: boolean
                  triggerType:
                    type: string
                  triggerConfig: {}
                  definition: {}
                  archivedAt:
                    anyOf:
                      - type: string
                        format: date-time
                      - type: "null"
                  lastWorkflowAt:
                    anyOf:
                      - type: string
                        format: date-time
                      - type: "null"
                  metrics:
                    type: object
                    required:
                      - totalWorkflows
                      - completedWorkflows
                      - failedWorkflows
                      - queuedWorkflows
                    additionalProperties: true
                    properties:
                      totalWorkflows:
                        type: integer
                        minimum: 0
                      completedWorkflows:
                        type: integer
                        minimum: 0
                      failedWorkflows:
                        type: integer
                        minimum: 0
                      queuedWorkflows:
                        type: integer
                        minimum: 0
                      lastWorkflowAt:
                        anyOf:
                          - type: string
                            format: date-time
                          - type: "null"
                      workflowsLast7Days:
                        type: integer
                        minimum: 0
                      dailyWorkflows:
                        type: array
                        items:
                          type: object
                          required:
                            - date
                            - count
                          properties:
                            date:
                              type: string
                            count:
                              type: integer
                              minimum: 0
                  createdAt:
                    anyOf:
                      - type: string
                        format: date-time
                      - type: "null"
                  updatedAt:
                    anyOf:
                      - type: string
                        format: date-time
                      - type: "null"
  /v1/automations/{automationId}:
    get:
      operationId: getAutomationsByAutomationId
      summary: Get automation
      tags:
        - settings
      parameters:
        - schema:
            type: string
            minLength: 1
          in: path
          name: automationId
          required: true
      security: *a8
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - id
                  - name
                  - enabled
                  - triggerType
                additionalProperties: true
                properties:
                  id:
                    type: string
                    minLength: 1
                  name:
                    type: string
                  description:
                    anyOf:
                      - type: string
                      - type: "null"
                  enabled:
                    type: boolean
                  triggerType:
                    type: string
                  triggerConfig: {}
                  definition: {}
                  archivedAt:
                    anyOf:
                      - type: string
                        format: date-time
                      - type: "null"
                  lastWorkflowAt:
                    anyOf:
                      - type: string
                        format: date-time
                      - type: "null"
                  metrics:
                    type: object
                    required:
                      - totalWorkflows
                      - completedWorkflows
                      - failedWorkflows
                      - queuedWorkflows
                    additionalProperties: true
                    properties:
                      totalWorkflows:
                        type: integer
                        minimum: 0
                      completedWorkflows:
                        type: integer
                        minimum: 0
                      failedWorkflows:
                        type: integer
                        minimum: 0
                      queuedWorkflows:
                        type: integer
                        minimum: 0
                      lastWorkflowAt:
                        anyOf:
                          - type: string
                            format: date-time
                          - type: "null"
                      workflowsLast7Days:
                        type: integer
                        minimum: 0
                      dailyWorkflows:
                        type: array
                        items:
                          type: object
                          required:
                            - date
                            - count
                          properties:
                            date:
                              type: string
                            count:
                              type: integer
                              minimum: 0
                  createdAt:
                    anyOf:
                      - type: string
                        format: date-time
                      - type: "null"
                  updatedAt:
                    anyOf:
                      - type: string
                        format: date-time
                      - type: "null"
    patch:
      operationId: patchAutomationsByAutomationId
      summary: Update automation
      tags:
        - settings
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
              properties:
                id:
                  type: string
                  minLength: 1
                name:
                  type: string
                  minLength: 1
                description:
                  anyOf:
                    - type: string
                    - type: "null"
                enabled:
                  type: boolean
                triggerType:
                  type: string
                  description: "Supported triggers: appointment.attended,
                    appointment.attendance_recorded, appointment.created,
                    appointment.canceled, treatment_note.finalized,
                    patient.created, form_instance.submission."
                triggerConfig: {}
                definition: {}
      parameters:
        - schema:
            type: string
            minLength: 1
          in: path
          name: automationId
          required: true
      security: *a8
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - id
                  - name
                  - enabled
                  - triggerType
                additionalProperties: true
                properties:
                  id:
                    type: string
                    minLength: 1
                  name:
                    type: string
                  description:
                    anyOf:
                      - type: string
                      - type: "null"
                  enabled:
                    type: boolean
                  triggerType:
                    type: string
                  triggerConfig: {}
                  definition: {}
                  archivedAt:
                    anyOf:
                      - type: string
                        format: date-time
                      - type: "null"
                  lastWorkflowAt:
                    anyOf:
                      - type: string
                        format: date-time
                      - type: "null"
                  metrics:
                    type: object
                    required:
                      - totalWorkflows
                      - completedWorkflows
                      - failedWorkflows
                      - queuedWorkflows
                    additionalProperties: true
                    properties:
                      totalWorkflows:
                        type: integer
                        minimum: 0
                      completedWorkflows:
                        type: integer
                        minimum: 0
                      failedWorkflows:
                        type: integer
                        minimum: 0
                      queuedWorkflows:
                        type: integer
                        minimum: 0
                      lastWorkflowAt:
                        anyOf:
                          - type: string
                            format: date-time
                          - type: "null"
                      workflowsLast7Days:
                        type: integer
                        minimum: 0
                      dailyWorkflows:
                        type: array
                        items:
                          type: object
                          required:
                            - date
                            - count
                          properties:
                            date:
                              type: string
                            count:
                              type: integer
                              minimum: 0
                  createdAt:
                    anyOf:
                      - type: string
                        format: date-time
                      - type: "null"
                  updatedAt:
                    anyOf:
                      - type: string
                        format: date-time
                      - type: "null"
    delete:
      operationId: deleteAutomationsByAutomationId
      summary: Archive automation
      tags:
        - settings
      parameters:
        - schema:
            type: string
            minLength: 1
          in: path
          name: automationId
          required: true
      security: *a8
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - action
                  - status
                additionalProperties: true
                properties:
                  action:
                    type: string
                    enum:
                      - archive
                  status:
                    type: string
                    enum:
                      - archived
                  id:
                    type: string
                    minLength: 1
  /v1/automations/{automationId}/enabled:
    patch:
      operationId: patchAutomationsByAutomationIdEnabled
      summary: Enable or disable automation
      tags:
        - settings
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - enabled
              additionalProperties: true
              properties:
                enabled:
                  type: boolean
      parameters:
        - schema:
            type: string
            minLength: 1
          in: path
          name: automationId
          required: true
      security: *a8
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - id
                  - name
                  - enabled
                  - triggerType
                additionalProperties: true
                properties:
                  id:
                    type: string
                    minLength: 1
                  name:
                    type: string
                  description:
                    anyOf:
                      - type: string
                      - type: "null"
                  enabled:
                    type: boolean
                  triggerType:
                    type: string
                  triggerConfig: {}
                  definition: {}
                  archivedAt:
                    anyOf:
                      - type: string
                        format: date-time
                      - type: "null"
                  lastWorkflowAt:
                    anyOf:
                      - type: string
                        format: date-time
                      - type: "null"
                  metrics:
                    type: object
                    required:
                      - totalWorkflows
                      - completedWorkflows
                      - failedWorkflows
                      - queuedWorkflows
                    additionalProperties: true
                    properties:
                      totalWorkflows:
                        type: integer
                        minimum: 0
                      completedWorkflows:
                        type: integer
                        minimum: 0
                      failedWorkflows:
                        type: integer
                        minimum: 0
                      queuedWorkflows:
                        type: integer
                        minimum: 0
                      lastWorkflowAt:
                        anyOf:
                          - type: string
                            format: date-time
                          - type: "null"
                      workflowsLast7Days:
                        type: integer
                        minimum: 0
                      dailyWorkflows:
                        type: array
                        items:
                          type: object
                          required:
                            - date
                            - count
                          properties:
                            date:
                              type: string
                            count:
                              type: integer
                              minimum: 0
                  createdAt:
                    anyOf:
                      - type: string
                        format: date-time
                      - type: "null"
                  updatedAt:
                    anyOf:
                      - type: string
                        format: date-time
                      - type: "null"
  /v1/automation-workflows:
    get:
      operationId: getAutomationWorkflows
      summary: List automation workflows
      tags:
        - settings
      description: Automation workflow execution history, newest first. Filter with
        automationId or a comma-separated status list.
      parameters:
        - schema:
            type: integer
            minimum: 1
          in: query
          name: page
          required: false
        - schema:
            type: integer
            minimum: 1
            maximum: 100
          in: query
          name: pageSize
          required: false
        - schema:
            type: integer
            minimum: 1
            maximum: 100
          in: query
          name: limit
          required: false
        - schema:
            type: string
          in: query
          name: sort
          required: false
          description: "Comma-separated sort fields. Allowed fields: ."
        - schema:
            type: boolean
          in: query
          name: includeArchived
          required: false
        - schema:
            type: boolean
          in: query
          name: archived
          required: false
        - schema:
            type: string
          in: query
          name: search
          required: false
        - schema:
            type: string
            minLength: 1
          in: query
          name: automationId
          required: false
        - schema:
            type: string
          in: query
          name: status
          required: false
      security: *a8
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - count
                  - data
                  - page
                  - pageSize
                additionalProperties: true
                properties:
                  count:
                    type: integer
                    minimum: 0
                  data:
                    type: array
                    items:
                      type: object
                      required:
                        - id
                        - automationId
                        - eventType
                        - status
                      additionalProperties: true
                      properties:
                        id:
                          type: string
                          minLength: 1
                        automationId:
                          type: string
                          minLength: 1
                        eventType:
                          type: string
                        eventPayload: {}
                        status:
                          type: string
                        currentStep:
                          anyOf:
                            - type: string
                            - type: "null"
                        actionType:
                          anyOf:
                            - type: string
                            - type: "null"
                        input: {}
                        output: {}
                        errorMessage:
                          anyOf:
                            - type: string
                            - type: "null"
                        scheduledFor:
                          anyOf:
                            - type: string
                              format: date-time
                            - type: "null"
                        startedAt:
                          anyOf:
                            - type: string
                              format: date-time
                            - type: "null"
                        completedAt:
                          anyOf:
                            - type: string
                              format: date-time
                            - type: "null"
                        patientId:
                          anyOf:
                            - type: string
                            - type: "null"
                        appointmentId:
                          anyOf:
                            - type: string
                            - type: "null"
                        createdAt:
                          anyOf:
                            - type: string
                              format: date-time
                            - type: "null"
                        updatedAt:
                          anyOf:
                            - type: string
                              format: date-time
                            - type: "null"
                  page:
                    type: integer
                    minimum: 1
                  pageSize:
                    type: integer
                    minimum: 1
  /v1/automations/{automationId}/workflows:
    get:
      operationId: getAutomationsByAutomationIdWorkflows
      summary: List automation workflows
      tags:
        - settings
      parameters:
        - schema:
            type: integer
            minimum: 1
          in: query
          name: page
          required: false
        - schema:
            type: integer
            minimum: 1
            maximum: 100
          in: query
          name: pageSize
          required: false
        - schema:
            type: integer
            minimum: 1
            maximum: 100
          in: query
          name: limit
          required: false
        - schema:
            type: string
          in: query
          name: sort
          required: false
          description: "Comma-separated sort fields. Allowed fields: ."
        - schema:
            type: boolean
          in: query
          name: includeArchived
          required: false
        - schema:
            type: boolean
          in: query
          name: archived
          required: false
        - schema:
            type: string
          in: query
          name: search
          required: false
        - schema:
            type: string
          in: query
          name: status
          required: false
        - schema:
            type: string
            minLength: 1
          in: path
          name: automationId
          required: true
      security: *a8
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - count
                  - data
                  - page
                  - pageSize
                additionalProperties: true
                properties:
                  count:
                    type: integer
                    minimum: 0
                  data:
                    type: array
                    items:
                      type: object
                      required:
                        - id
                        - automationId
                        - eventType
                        - status
                      additionalProperties: true
                      properties:
                        id:
                          type: string
                          minLength: 1
                        automationId:
                          type: string
                          minLength: 1
                        eventType:
                          type: string
                        eventPayload: {}
                        status:
                          type: string
                        currentStep:
                          anyOf:
                            - type: string
                            - type: "null"
                        actionType:
                          anyOf:
                            - type: string
                            - type: "null"
                        input: {}
                        output: {}
                        errorMessage:
                          anyOf:
                            - type: string
                            - type: "null"
                        scheduledFor:
                          anyOf:
                            - type: string
                              format: date-time
                            - type: "null"
                        startedAt:
                          anyOf:
                            - type: string
                              format: date-time
                            - type: "null"
                        completedAt:
                          anyOf:
                            - type: string
                              format: date-time
                            - type: "null"
                        patientId:
                          anyOf:
                            - type: string
                            - type: "null"
                        appointmentId:
                          anyOf:
                            - type: string
                            - type: "null"
                        createdAt:
                          anyOf:
                            - type: string
                              format: date-time
                            - type: "null"
                        updatedAt:
                          anyOf:
                            - type: string
                              format: date-time
                            - type: "null"
                  page:
                    type: integer
                    minimum: 1
                  pageSize:
                    type: integer
                    minimum: 1
  /v1/teams:
    get:
      operationId: getTeams
      summary: List teams
      tags:
        - settings
      security: *a8
      responses:
        "200":
          description: Default Response
    post:
      operationId: postTeams
      summary: Create team
      tags:
        - settings
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/teams/{teamId}:
    get:
      operationId: getTeamsByTeamId
      summary: Get team
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: teamId
          required: true
      responses:
        "200":
          description: Default Response
    patch:
      operationId: patchTeamsByTeamId
      summary: Update team
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: teamId
          required: true
      responses:
        "200":
          description: Default Response
    delete:
      operationId: deleteTeamsByTeamId
      summary: Delete team
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: teamId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/teams/{teamId}/members:
    post:
      operationId: postTeamsByTeamIdMembers
      summary: Create team member
      tags:
        - staff
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: teamId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/teams/{teamId}/members/{userId}:
    delete:
      operationId: deleteTeamsByTeamIdMembersByUserId
      summary: Delete team member
      tags:
        - staff
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: teamId
          required: true
        - schema:
            type: string
          in: path
          name: userId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/measure-definitions:
    get:
      operationId: getMeasureDefinitions
      summary: List measure definitions
      tags:
        - staff
      security: *a8
      responses:
        "200":
          description: Default Response
    post:
      operationId: postMeasureDefinitions
      summary: Create measure definition
      tags:
        - staff
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/measure-definitions/{measureDefinitionId}:
    get:
      operationId: getMeasureDefinitionsByMeasureDefinitionId
      summary: Get measure definition
      tags:
        - staff
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: measureDefinitionId
          required: true
      responses:
        "200":
          description: Default Response
    patch:
      operationId: patchMeasureDefinitionsByMeasureDefinitionId
      summary: Update measure definition
      tags:
        - staff
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: measureDefinitionId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/measure-definitions/{measureDefinitionId}/archive:
    patch:
      operationId: patchMeasureDefinitionsByMeasureDefinitionIdArchive
      summary: Archive measure definition
      tags:
        - staff
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: measureDefinitionId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/measure-definitions/{measureDefinitionId}/unarchive:
    patch:
      operationId: patchMeasureDefinitionsByMeasureDefinitionIdUnarchive
      summary: Unarchive measure definition
      tags:
        - staff
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: measureDefinitionId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/patients/{patientId}/growth-chart-data:
    get:
      operationId: getPatientsByPatientIdGrowthChartData
      summary: Get patient growth chart data
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/patients/{patientId}/growth-chart-data/{measureCode}:
    get:
      operationId: getPatientsByPatientIdGrowthChartDataByMeasureCode
      summary: Get patient growth chart data
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
        - schema:
            type: string
          in: path
          name: measureCode
          required: true
      responses:
        "200":
          description: Default Response
  /v1/patients/{patientId}/measures:
    get:
      operationId: getPatientsByPatientIdMeasures
      summary: List patient measures
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
    post:
      operationId: postPatientsByPatientIdMeasures
      summary: Create patient measure
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/patient-measures/{patientMeasureId}:
    get:
      operationId: getPatientMeasuresByPatientMeasureId
      summary: Get patient measure
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientMeasureId
          required: true
      responses:
        "200":
          description: Default Response
    patch:
      operationId: patchPatientMeasuresByPatientMeasureId
      summary: Update patient measure
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientMeasureId
          required: true
      responses:
        "200":
          description: Default Response
    delete:
      operationId: deletePatientMeasuresByPatientMeasureId
      summary: Delete patient measure
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientMeasureId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/patients/{patientId}/top-problems:
    get:
      operationId: getPatientsByPatientIdTopProblems
      summary: List patient top problems
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
    put:
      operationId: putPatientsByPatientIdTopProblems
      summary: Replace patient top problem
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/top-problems/{topProblemId}:
    delete:
      operationId: deleteTopProblemsByTopProblemId
      summary: Delete top problem
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: topProblemId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/patients/{patientId}/pins:
    get:
      operationId: getPatientsByPatientIdPins
      summary: List patient pins
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
    post:
      operationId: postPatientsByPatientIdPins
      summary: Create patient pin
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/patient-pins/{patientPinId}:
    delete:
      operationId: deletePatientPinsByPatientPinId
      summary: Delete patient pin
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientPinId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/patients/{patientId}/pins/order:
    put:
      operationId: putPatientsByPatientIdPinsOrder
      summary: Replace patient pin order
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/patients/{patientId}/clinical-global-impressions:
    get:
      operationId: getPatientsByPatientIdClinicalGlobalImpressions
      summary: List patient clinical global impressions
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/patients/{patientId}/appointment-history:
    get:
      operationId: getPatientsByPatientIdAppointmentHistory
      summary: Get patient appointment history
      tags:
        - appointments
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/appointment-operations-metrics:
    get:
      operationId: getAppointmentOperationsMetrics
      summary: List appointment operations metrics
      tags:
        - appointments
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/appointment-slots:
    get:
      operationId: getAppointmentSlots
      summary: List appointment slots
      tags:
        - appointments
      security: *a8
      responses:
        "200":
          description: Default Response
    post:
      operationId: postAppointmentSlots
      summary: Create appointment slot
      tags:
        - appointments
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/appointment-slots/{slotId}:
    get:
      operationId: getAppointmentSlotsBySlotId
      summary: Get appointment slot
      tags:
        - appointments
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: slotId
          required: true
      responses:
        "200":
          description: Default Response
    patch:
      operationId: patchAppointmentSlotsBySlotId
      summary: Update appointment slot
      tags:
        - appointments
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: slotId
          required: true
      responses:
        "200":
          description: Default Response
    delete:
      operationId: deleteAppointmentSlotsBySlotId
      summary: Delete appointment slot
      tags:
        - appointments
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: slotId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/appointment-types:
    get:
      operationId: getAppointmentTypes
      summary: List appointment types
      tags:
        - appointments
      parameters:
        - schema:
            type: integer
            minimum: 1
          in: query
          name: page
          required: false
        - schema:
            type: integer
            minimum: 1
            maximum: 100
          in: query
          name: pageSize
          required: false
        - schema:
            type: integer
            minimum: 1
            maximum: 100
          in: query
          name: limit
          required: false
        - schema:
            type: string
          in: query
          name: sort
          required: false
          description: "Comma-separated sort fields. Allowed fields: name, category,
            durationInMinutes, maxAttendees, createdAt, updatedAt."
        - schema:
            type: boolean
          in: query
          name: includeArchived
          required: false
        - schema:
            type: boolean
          in: query
          name: archived
          required: false
        - schema:
            type: string
          in: query
          name: search
          required: false
        - schema:
            type: string
          in: query
          name: category
          required: false
      security: *a8
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - count
                  - data
                  - page
                  - pageSize
                additionalProperties: true
                properties:
                  count:
                    type: integer
                    minimum: 0
                  data:
                    type: array
                    items:
                      type: object
                      required:
                        - id
                      additionalProperties: true
                      properties:
                        id:
                          type: string
                          minLength: 1
                        name:
                          anyOf:
                            - type: string
                            - type: "null"
                        description:
                          anyOf:
                            - type: string
                            - type: "null"
                        durationInMinutes:
                          anyOf:
                            - type: integer
                            - type: "null"
                        maxAttendees:
                          anyOf:
                            - type: integer
                            - type: "null"
                        color:
                          anyOf:
                            - type: string
                            - type: "null"
                        category:
                          anyOf:
                            - type: string
                            - type: "null"
                        communicationConfig: {}
                        defaultLocationKind:
                          anyOf:
                            - type: string
                            - type: "null"
                        defaultLocationId:
                          anyOf:
                            - type: string
                            - type: "null"
                        defaultLocation:
                          anyOf:
                            - type: object
                              required:
                                - id
                              additionalProperties: true
                              properties:
                                id:
                                  type: string
                                  minLength: 1
                                name:
                                  anyOf:
                                    - type: string
                                    - type: "null"
                                displayName:
                                  anyOf:
                                    - type: string
                                    - type: "null"
                                address1:
                                  anyOf:
                                    - type: string
                                    - type: "null"
                                address2:
                                  anyOf:
                                    - type: string
                                    - type: "null"
                                city:
                                  anyOf:
                                    - type: string
                                    - type: "null"
                                state:
                                  anyOf:
                                    - type: string
                                    - type: "null"
                                zipCode:
                                  anyOf:
                                    - type: string
                                    - type: "null"
                                latitude:
                                  anyOf:
                                    - type: number
                                    - type: "null"
                                longitude:
                                  anyOf:
                                    - type: number
                                    - type: "null"
                                isolines: {}
                            - type: "null"
                        defaultTreatmentNoteTemplateId:
                          anyOf:
                            - type: string
                            - type: "null"
                        createdAt:
                          anyOf:
                            - type: string
                              format: date-time
                            - type: "null"
                        updatedAt:
                          anyOf:
                            - type: string
                              format: date-time
                            - type: "null"
                        archivedAt:
                          anyOf:
                            - type: string
                              format: date-time
                            - type: "null"
                  page:
                    type: integer
                    minimum: 1
                  pageSize:
                    type: integer
                    minimum: 1
    post:
      operationId: postAppointmentTypes
      summary: Create appointment type
      tags:
        - appointments
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
              additionalProperties: true
              properties:
                id:
                  type: string
                  minLength: 1
                name:
                  type: string
                  minLength: 1
                description:
                  anyOf:
                    - type: string
                    - type: "null"
                durationInMinutes:
                  anyOf:
                    - type: integer
                    - type: "null"
                maxAttendees:
                  anyOf:
                    - type: integer
                    - type: "null"
                color:
                  anyOf:
                    - type: string
                    - type: "null"
                category:
                  anyOf:
                    - type: string
                    - type: "null"
                communicationConfig: {}
                defaultLocationKind:
                  anyOf:
                    - type: string
                    - type: "null"
                defaultLocationId:
                  anyOf:
                    - type: string
                    - type: "null"
                defaultTreatmentNoteTemplateId:
                  anyOf:
                    - type: string
                    - type: "null"
                createdByUserId:
                  anyOf:
                    - type: string
                    - type: "null"
                updatedByUserId:
                  anyOf:
                    - type: string
                    - type: "null"
      security: *a8
      responses:
        "201":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - id
                additionalProperties: true
                properties:
                  id:
                    type: string
                    minLength: 1
                  name:
                    anyOf:
                      - type: string
                      - type: "null"
                  description:
                    anyOf:
                      - type: string
                      - type: "null"
                  durationInMinutes:
                    anyOf:
                      - type: integer
                      - type: "null"
                  maxAttendees:
                    anyOf:
                      - type: integer
                      - type: "null"
                  color:
                    anyOf:
                      - type: string
                      - type: "null"
                  category:
                    anyOf:
                      - type: string
                      - type: "null"
                  communicationConfig: {}
                  defaultLocationKind:
                    anyOf:
                      - type: string
                      - type: "null"
                  defaultLocationId:
                    anyOf:
                      - type: string
                      - type: "null"
                  defaultLocation:
                    anyOf:
                      - type: object
                        required:
                          - id
                        additionalProperties: true
                        properties:
                          id:
                            type: string
                            minLength: 1
                          name:
                            anyOf:
                              - type: string
                              - type: "null"
                          displayName:
                            anyOf:
                              - type: string
                              - type: "null"
                          address1:
                            anyOf:
                              - type: string
                              - type: "null"
                          address2:
                            anyOf:
                              - type: string
                              - type: "null"
                          city:
                            anyOf:
                              - type: string
                              - type: "null"
                          state:
                            anyOf:
                              - type: string
                              - type: "null"
                          zipCode:
                            anyOf:
                              - type: string
                              - type: "null"
                          latitude:
                            anyOf:
                              - type: number
                              - type: "null"
                          longitude:
                            anyOf:
                              - type: number
                              - type: "null"
                          isolines: {}
                      - type: "null"
                  defaultTreatmentNoteTemplateId:
                    anyOf:
                      - type: string
                      - type: "null"
                  createdAt:
                    anyOf:
                      - type: string
                        format: date-time
                      - type: "null"
                  updatedAt:
                    anyOf:
                      - type: string
                        format: date-time
                      - type: "null"
                  archivedAt:
                    anyOf:
                      - type: string
                        format: date-time
                      - type: "null"
  /v1/appointment-types/{appointmentTypeId}:
    get:
      operationId: getAppointmentTypesByAppointmentTypeId
      summary: Get appointment type
      tags:
        - appointments
      parameters:
        - schema:
            type: string
            minLength: 1
          in: path
          name: appointmentTypeId
          required: true
      security: *a8
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - id
                additionalProperties: true
                properties:
                  id:
                    type: string
                    minLength: 1
                  name:
                    anyOf:
                      - type: string
                      - type: "null"
                  description:
                    anyOf:
                      - type: string
                      - type: "null"
                  durationInMinutes:
                    anyOf:
                      - type: integer
                      - type: "null"
                  maxAttendees:
                    anyOf:
                      - type: integer
                      - type: "null"
                  color:
                    anyOf:
                      - type: string
                      - type: "null"
                  category:
                    anyOf:
                      - type: string
                      - type: "null"
                  communicationConfig: {}
                  defaultLocationKind:
                    anyOf:
                      - type: string
                      - type: "null"
                  defaultLocationId:
                    anyOf:
                      - type: string
                      - type: "null"
                  defaultLocation:
                    anyOf:
                      - type: object
                        required:
                          - id
                        additionalProperties: true
                        properties:
                          id:
                            type: string
                            minLength: 1
                          name:
                            anyOf:
                              - type: string
                              - type: "null"
                          displayName:
                            anyOf:
                              - type: string
                              - type: "null"
                          address1:
                            anyOf:
                              - type: string
                              - type: "null"
                          address2:
                            anyOf:
                              - type: string
                              - type: "null"
                          city:
                            anyOf:
                              - type: string
                              - type: "null"
                          state:
                            anyOf:
                              - type: string
                              - type: "null"
                          zipCode:
                            anyOf:
                              - type: string
                              - type: "null"
                          latitude:
                            anyOf:
                              - type: number
                              - type: "null"
                          longitude:
                            anyOf:
                              - type: number
                              - type: "null"
                          isolines: {}
                      - type: "null"
                  defaultTreatmentNoteTemplateId:
                    anyOf:
                      - type: string
                      - type: "null"
                  createdAt:
                    anyOf:
                      - type: string
                        format: date-time
                      - type: "null"
                  updatedAt:
                    anyOf:
                      - type: string
                        format: date-time
                      - type: "null"
                  archivedAt:
                    anyOf:
                      - type: string
                        format: date-time
                      - type: "null"
    patch:
      operationId: patchAppointmentTypesByAppointmentTypeId
      summary: Update appointment type
      tags:
        - appointments
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: []
              additionalProperties: true
              properties:
                id:
                  type: string
                  minLength: 1
                name:
                  type: string
                  minLength: 1
                description:
                  anyOf:
                    - type: string
                    - type: "null"
                durationInMinutes:
                  anyOf:
                    - type: integer
                    - type: "null"
                maxAttendees:
                  anyOf:
                    - type: integer
                    - type: "null"
                color:
                  anyOf:
                    - type: string
                    - type: "null"
                category:
                  anyOf:
                    - type: string
                    - type: "null"
                communicationConfig: {}
                defaultLocationKind:
                  anyOf:
                    - type: string
                    - type: "null"
                defaultLocationId:
                  anyOf:
                    - type: string
                    - type: "null"
                defaultTreatmentNoteTemplateId:
                  anyOf:
                    - type: string
                    - type: "null"
                createdByUserId:
                  anyOf:
                    - type: string
                    - type: "null"
                updatedByUserId:
                  anyOf:
                    - type: string
                    - type: "null"
      parameters:
        - schema:
            type: string
            minLength: 1
          in: path
          name: appointmentTypeId
          required: true
      security: *a8
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - id
                additionalProperties: true
                properties:
                  id:
                    type: string
                    minLength: 1
                  name:
                    anyOf:
                      - type: string
                      - type: "null"
                  description:
                    anyOf:
                      - type: string
                      - type: "null"
                  durationInMinutes:
                    anyOf:
                      - type: integer
                      - type: "null"
                  maxAttendees:
                    anyOf:
                      - type: integer
                      - type: "null"
                  color:
                    anyOf:
                      - type: string
                      - type: "null"
                  category:
                    anyOf:
                      - type: string
                      - type: "null"
                  communicationConfig: {}
                  defaultLocationKind:
                    anyOf:
                      - type: string
                      - type: "null"
                  defaultLocationId:
                    anyOf:
                      - type: string
                      - type: "null"
                  defaultLocation:
                    anyOf:
                      - type: object
                        required:
                          - id
                        additionalProperties: true
                        properties:
                          id:
                            type: string
                            minLength: 1
                          name:
                            anyOf:
                              - type: string
                              - type: "null"
                          displayName:
                            anyOf:
                              - type: string
                              - type: "null"
                          address1:
                            anyOf:
                              - type: string
                              - type: "null"
                          address2:
                            anyOf:
                              - type: string
                              - type: "null"
                          city:
                            anyOf:
                              - type: string
                              - type: "null"
                          state:
                            anyOf:
                              - type: string
                              - type: "null"
                          zipCode:
                            anyOf:
                              - type: string
                              - type: "null"
                          latitude:
                            anyOf:
                              - type: number
                              - type: "null"
                          longitude:
                            anyOf:
                              - type: number
                              - type: "null"
                          isolines: {}
                      - type: "null"
                  defaultTreatmentNoteTemplateId:
                    anyOf:
                      - type: string
                      - type: "null"
                  createdAt:
                    anyOf:
                      - type: string
                        format: date-time
                      - type: "null"
                  updatedAt:
                    anyOf:
                      - type: string
                        format: date-time
                      - type: "null"
                  archivedAt:
                    anyOf:
                      - type: string
                        format: date-time
                      - type: "null"
    delete:
      operationId: deleteAppointmentTypesByAppointmentTypeId
      summary: Archive appointment type
      tags:
        - appointments
      parameters:
        - schema:
            type: string
            minLength: 1
          in: path
          name: appointmentTypeId
          required: true
      security: *a8
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - action
                  - status
                additionalProperties: true
                properties:
                  action:
                    type: string
                    enum:
                      - archive
                  status:
                    type: string
                    enum:
                      - archived
                  id:
                    type: string
                    minLength: 1
                  archived:
                    type: boolean
                    enum:
                      - true
  /v1/appointments:
    get:
      operationId: getAppointments
      summary: List appointments
      tags:
        - appointments
      security: *a8
      responses:
        "200":
          description: Default Response
    post:
      operationId: postAppointments
      summary: Create appointment
      tags:
        - appointments
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/patients/{patientId}/appointments:
    get:
      operationId: getPatientsByPatientIdAppointments
      summary: List patient appointments
      tags:
        - appointments
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/patients/{patientId}/canceled-appointments:
    get:
      operationId: getPatientsByPatientIdCanceledAppointments
      summary: List patient canceled appointments
      tags:
        - appointments
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/patients/{patientId}/appointments/{appointmentId}/cancel:
    patch:
      operationId: patchPatientsByPatientIdAppointmentsByAppointmentIdCancel
      summary: Cancel patient appointment
      tags:
        - appointments
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
        - schema:
            type: string
          in: path
          name: appointmentId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/appointments/{appointmentId}:
    get:
      operationId: getAppointmentsByAppointmentId
      summary: Get appointment
      tags:
        - appointments
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: appointmentId
          required: true
      responses:
        "200":
          description: Default Response
    patch:
      operationId: patchAppointmentsByAppointmentId
      summary: Update appointment
      tags:
        - appointments
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: appointmentId
          required: true
      responses:
        "200":
          description: Default Response
    delete:
      operationId: deleteAppointmentsByAppointmentId
      summary: Delete appointment
      tags:
        - appointments
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: appointmentId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/appointments/{appointmentId}/cancel:
    patch:
      operationId: patchAppointmentsByAppointmentIdCancel
      summary: Cancel appointment
      tags:
        - appointments
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: appointmentId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/appointments/{appointmentId}/uncancel:
    patch:
      operationId: patchAppointmentsByAppointmentIdUncancel
      summary: Uncancel appointment
      tags:
        - appointments
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: appointmentId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/appointments/{appointmentId}/reassign:
    patch:
      operationId: patchAppointmentsByAppointmentIdReassign
      summary: Reassign appointment
      tags:
        - appointments
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: appointmentId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/appointment-attendees:
    post:
      operationId: postAppointmentAttendees
      summary: Create appointment attendee
      tags:
        - appointments
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/appointments/{appointmentId}/attendees:
    post:
      operationId: postAppointmentsByAppointmentIdAttendees
      summary: Create appointment attendee
      tags:
        - appointments
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: appointmentId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/appointment-attendees/{attendeeId}:
    patch:
      operationId: patchAppointmentAttendeesByAttendeeId
      summary: Update appointment attendee
      tags:
        - appointments
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: attendeeId
          required: true
      responses:
        "200":
          description: Default Response
    delete:
      operationId: deleteAppointmentAttendeesByAttendeeId
      summary: Delete appointment attendee
      tags:
        - appointments
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: attendeeId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/appointment-attendees/archive:
    post:
      operationId: postAppointmentAttendeesArchive
      summary: Archive appointment attendee
      tags:
        - appointments
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/appointment-attendees/{attendeeId}/cancel:
    patch:
      operationId: patchAppointmentAttendeesByAttendeeIdCancel
      summary: Cancel appointment attendee
      tags:
        - appointments
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: attendeeId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/appointment-attendees/cancel:
    post:
      operationId: postAppointmentAttendeesCancel
      summary: Cancel appointment attendee
      tags:
        - appointments
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/appointment-attendees/{attendeeId}/uncancel:
    patch:
      operationId: patchAppointmentAttendeesByAttendeeIdUncancel
      summary: Uncancel appointment attendee
      tags:
        - appointments
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: attendeeId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/appointment-attendees/uncancel:
    post:
      operationId: postAppointmentAttendeesUncancel
      summary: Uncancel appointment attendee
      tags:
        - appointments
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/unavailable-blocks:
    get:
      operationId: getUnavailableBlocks
      summary: List unavailable blocks
      tags:
        - settings
      security: *a8
      responses:
        "200":
          description: Default Response
    post:
      operationId: postUnavailableBlocks
      summary: Create unavailable block
      tags:
        - settings
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/users/{userId}/unavailable-blocks:
    get:
      operationId: getUsersByUserIdUnavailableBlocks
      summary: List user unavailable blocks
      tags:
        - staff
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: userId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/unavailable-blocks/{unavailableBlockId}:
    get:
      operationId: getUnavailableBlocksByUnavailableBlockId
      summary: Get unavailable block
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: unavailableBlockId
          required: true
      responses:
        "200":
          description: Default Response
    patch:
      operationId: patchUnavailableBlocksByUnavailableBlockId
      summary: Update unavailable block
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: unavailableBlockId
          required: true
      responses:
        "200":
          description: Default Response
    delete:
      operationId: deleteUnavailableBlocksByUnavailableBlockId
      summary: Delete unavailable block
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: unavailableBlockId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/tasks:
    get:
      operationId: getTasks
      summary: List tasks
      tags:
        - tasks
      security: *a8
      responses:
        "200":
          description: Default Response
    post:
      operationId: postTasks
      summary: Create task
      tags:
        - tasks
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/tasks/reconcile:
    post:
      operationId: postTasksReconcile
      summary: Reconcile task
      tags:
        - tasks
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/tasks/stats:
    get:
      operationId: getTasksStats
      summary: List tasks stats
      tags:
        - tasks
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/tasks/{taskId}:
    get:
      operationId: getTasksByTaskId
      summary: Get task
      tags:
        - tasks
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: taskId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/tasks/{taskId}/complete:
    patch:
      operationId: patchTasksByTaskIdComplete
      summary: Complete task
      tags:
        - tasks
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: taskId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/tasks/{taskId}/reassign:
    patch:
      operationId: patchTasksByTaskIdReassign
      summary: Reassign task
      tags:
        - tasks
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: taskId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/homework-assignments:
    get:
      operationId: getHomeworkAssignments
      summary: List homework assignments
      tags:
        - settings
      security: *a8
      responses:
        "200":
          description: Default Response
    post:
      operationId: postHomeworkAssignments
      summary: Create homework assignment
      tags:
        - settings
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/patients/{patientId}/homework-assignments:
    get:
      operationId: getPatientsByPatientIdHomeworkAssignments
      summary: List patient homework assignments
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/homework-assignments/{assignmentId}:
    get:
      operationId: getHomeworkAssignmentsByAssignmentId
      summary: Get homework assignment
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: assignmentId
          required: true
      responses:
        "200":
          description: Default Response
    patch:
      operationId: patchHomeworkAssignmentsByAssignmentId
      summary: Update homework assignment
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: assignmentId
          required: true
      responses:
        "200":
          description: Default Response
    delete:
      operationId: deleteHomeworkAssignmentsByAssignmentId
      summary: Delete homework assignment
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: assignmentId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/treatment-note-templates:
    get:
      operationId: getTreatmentNoteTemplates
      summary: List treatment note templates
      tags:
        - treatment
      security: *a8
      responses:
        "200":
          description: Default Response
    post:
      operationId: postTreatmentNoteTemplates
      summary: Create treatment note template
      tags:
        - treatment
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/treatment-note-templates/{templateId}:
    get:
      operationId: getTreatmentNoteTemplatesByTemplateId
      summary: Get treatment note template
      tags:
        - treatment
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: templateId
          required: true
      responses:
        "200":
          description: Default Response
    patch:
      operationId: patchTreatmentNoteTemplatesByTemplateId
      summary: Update treatment note template
      tags:
        - treatment
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: templateId
          required: true
      responses:
        "200":
          description: Default Response
    delete:
      operationId: deleteTreatmentNoteTemplatesByTemplateId
      summary: Delete treatment note template
      tags:
        - treatment
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: templateId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/treatment-note-rulesets:
    get:
      operationId: getTreatmentNoteRulesets
      summary: List treatment note rulesets
      tags:
        - treatment
      security: *a8
      responses:
        "200":
          description: Default Response
    post:
      operationId: postTreatmentNoteRulesets
      summary: Create treatment note ruleset
      tags:
        - treatment
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/treatment-note-rulesets/{rulesetId}:
    get:
      operationId: getTreatmentNoteRulesetsByRulesetId
      summary: Get treatment note ruleset
      tags:
        - treatment
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: rulesetId
          required: true
      responses:
        "200":
          description: Default Response
    patch:
      operationId: patchTreatmentNoteRulesetsByRulesetId
      summary: Update treatment note ruleset
      tags:
        - treatment
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: rulesetId
          required: true
      responses:
        "200":
          description: Default Response
    delete:
      operationId: deleteTreatmentNoteRulesetsByRulesetId
      summary: Delete treatment note ruleset
      tags:
        - treatment
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: rulesetId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/treatment-notes:
    get:
      operationId: getTreatmentNotes
      summary: List treatment notes
      tags:
        - treatment
      security: *a8
      responses:
        "200":
          description: Default Response
    post:
      operationId: postTreatmentNotes
      summary: Create treatment note
      tags:
        - treatment
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/patients/{patientId}/recent-treatment-notes:
    get:
      operationId: getPatientsByPatientIdRecentTreatmentNotes
      summary: List patient recent treatment notes
      tags:
        - treatment
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/treatment-notes/{noteId}:
    get:
      operationId: getTreatmentNotesByNoteId
      summary: Get treatment note
      tags:
        - treatment
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: noteId
          required: true
      responses:
        "200":
          description: Default Response
    patch:
      operationId: patchTreatmentNotesByNoteId
      summary: Update treatment note
      tags:
        - treatment
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: noteId
          required: true
      responses:
        "200":
          description: Default Response
    delete:
      operationId: deleteTreatmentNotesByNoteId
      summary: Delete treatment note
      tags:
        - treatment
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: noteId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/treatment-notes/{noteId}/first-finalized-at:
    patch:
      operationId: patchTreatmentNotesByNoteIdFirstFinalizedAt
      summary: Update treatment note first finalized at
      tags:
        - treatment
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: noteId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/treatment-notes/{noteId}/reset:
    patch:
      operationId: patchTreatmentNotesByNoteIdReset
      summary: Reset treatment note
      tags:
        - treatment
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: noteId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/treatment-notes/{noteId}/history:
    get:
      operationId: getTreatmentNotesByNoteIdHistory
      summary: Get treatment note history
      tags:
        - treatment
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: noteId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/treatment-note-versions/{versionId}:
    get:
      operationId: getTreatmentNoteVersionsByVersionId
      summary: Get treatment note version
      tags:
        - treatment
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: versionId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/treatment-notes/{noteId}/versions/{versionId}/restore:
    patch:
      operationId: patchTreatmentNotesByNoteIdVersionsByVersionIdRestore
      summary: Restore treatment note version
      tags:
        - treatment
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: noteId
          required: true
        - schema:
            type: string
          in: path
          name: versionId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/treatment-notes/{noteId}/addon-values:
    get:
      operationId: getTreatmentNotesByNoteIdAddonValues
      summary: List treatment note addon values
      tags:
        - treatment
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: noteId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/note-addon-options:
    get:
      operationId: getNoteAddonOptions
      summary: List note addon options
      tags:
        - settings
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/note-addon-fields:
    get:
      operationId: getNoteAddonFields
      summary: List note addon fields
      tags:
        - settings
      security: *a8
      responses:
        "200":
          description: Default Response
    post:
      operationId: postNoteAddonFields
      summary: Create note addon field
      tags:
        - settings
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/note-addon-fields/{fieldId}:
    patch:
      operationId: patchNoteAddonFieldsByFieldId
      summary: Update note addon field
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: fieldId
          required: true
      responses:
        "200":
          description: Default Response
    delete:
      operationId: deleteNoteAddonFieldsByFieldId
      summary: Delete note addon field
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: fieldId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/approved-treatment-notes:
    get:
      operationId: getApprovedTreatmentNotes
      summary: List approved treatment notes
      tags:
        - treatment
      security: *a8
      responses:
        "200":
          description: Default Response
    post:
      operationId: postApprovedTreatmentNotes
      summary: Create approved treatment note
      tags:
        - treatment
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/staged-treatment-notes:
    get:
      operationId: getStagedTreatmentNotes
      summary: List staged treatment notes
      tags:
        - treatment
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/candid-submissions/submitted:
    get:
      operationId: getCandidSubmissionsSubmitted
      summary: Get candid submission submitted
      tags:
        - settings
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/candid-submissions/failed:
    get:
      operationId: getCandidSubmissionsFailed
      summary: Get candid submission failed
      tags:
        - settings
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/approved-treatment-notes/{approvedNoteId}:
    get:
      operationId: getApprovedTreatmentNotesByApprovedNoteId
      summary: Get approved treatment note
      tags:
        - treatment
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: approvedNoteId
          required: true
      responses:
        "200":
          description: Default Response
    patch:
      operationId: patchApprovedTreatmentNotesByApprovedNoteId
      summary: Update approved treatment note
      tags:
        - treatment
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: approvedNoteId
          required: true
      responses:
        "200":
          description: Default Response
    delete:
      operationId: deleteApprovedTreatmentNotesByApprovedNoteId
      summary: Delete approved treatment note
      tags:
        - treatment
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: approvedNoteId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/brvu/manual-awards:
    get:
      operationId: getBrvuManualAwards
      summary: List brvu manual awards
      tags:
        - brvu
      security: *a8
      responses:
        "200":
          description: Default Response
    post:
      operationId: postBrvuManualAwards
      summary: Create brvu manual award
      tags:
        - brvu
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/brvu/manual-awards/{awardId}:
    delete:
      operationId: deleteBrvuManualAwardsByAwardId
      summary: Delete brvu manual award
      tags:
        - brvu
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: awardId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/brvu/report:
    get:
      operationId: getBrvuReport
      summary: Get brvu report
      tags:
        - brvu
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/brvu/appointments:
    get:
      operationId: getBrvuAppointments
      summary: List brvu appointments
      tags:
        - appointments
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/brvu/users:
    get:
      operationId: getBrvuUsers
      summary: List brvu users
      tags:
        - staff
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/ai-prompt-templates:
    get:
      operationId: getAiPromptTemplates
      summary: List ai prompt templates
      tags:
        - ai
      parameters:
        - schema:
            anyOf:
              - type: boolean
              - type: string
          in: query
          name: includeArchived
          required: false
      security: *a8
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  additionalProperties: true
                  properties:
                    id:
                      type: string
                      minLength: 1
                    userId:
                      type: string
                      minLength: 1
                    name:
                      type: string
                      minLength: 1
                    description:
                      anyOf:
                        - type: string
                          minLength: 1
                        - type: "null"
                    promptContent:
                      type: string
                      minLength: 1
                    isSystem:
                      type: boolean
                    archivedAt:
                      anyOf:
                        - type: string
                          minLength: 1
                        - type: "null"
                    createdAt:
                      anyOf:
                        - type: string
                          minLength: 1
                        - type: "null"
                    updatedAt:
                      anyOf:
                        - type: string
                          minLength: 1
                        - type: "null"
                    contextFiles:
                      type: array
                      items:
                        type: object
                        additionalProperties: true
                        properties:
                          id:
                            type: string
                            minLength: 1
                          promptTemplateId:
                            type: string
                            minLength: 1
                          fileName:
                            type: string
                            minLength: 1
                          fileType:
                            anyOf:
                              - type: string
                                minLength: 1
                              - type: "null"
                          fileSizeBytes:
                            anyOf:
                              - type: integer
                                minimum: 0
                              - type: "null"
                          createdAt:
                            anyOf:
                              - type: string
                                minLength: 1
                              - type: "null"
                          updatedAt:
                            anyOf:
                              - type: string
                                minLength: 1
                              - type: "null"
                        required:
                          - id
                          - promptTemplateId
                          - fileName
                          - createdAt
                          - updatedAt
                  required:
                    - id
                    - userId
                    - name
                    - promptContent
                    - createdAt
                    - updatedAt
                    - contextFiles
    post:
      operationId: postAiPromptTemplates
      summary: Create ai prompt template
      tags:
        - ai
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
              anyOf:
                - type: object
                  additionalProperties: true
                  properties:
                    id:
                      type: string
                      minLength: 1
                    name:
                      type: string
                      minLength: 1
                    description:
                      anyOf:
                        - type: string
                          minLength: 1
                        - type: "null"
                    promptContent:
                      type: string
                      minLength: 1
                  required:
                    - name
                    - promptContent
                - type: object
                  additionalProperties: true
                  properties:
                    input:
                      type: object
                      additionalProperties: true
                      properties:
                        id:
                          type: string
                          minLength: 1
                        name:
                          type: string
                          minLength: 1
                        description:
                          anyOf:
                            - type: string
                              minLength: 1
                            - type: "null"
                        promptContent:
                          type: string
                          minLength: 1
                      required:
                        - name
                        - promptContent
                  required:
                    - input
      security: *a8
      responses:
        "201":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                properties:
                  id:
                    type: string
                    minLength: 1
                  userId:
                    type: string
                    minLength: 1
                  name:
                    type: string
                    minLength: 1
                  description:
                    anyOf:
                      - type: string
                        minLength: 1
                      - type: "null"
                  promptContent:
                    type: string
                    minLength: 1
                  isSystem:
                    type: boolean
                  archivedAt:
                    anyOf:
                      - type: string
                        minLength: 1
                      - type: "null"
                  createdAt:
                    anyOf:
                      - type: string
                        minLength: 1
                      - type: "null"
                  updatedAt:
                    anyOf:
                      - type: string
                        minLength: 1
                      - type: "null"
                  contextFiles:
                    type: array
                    items:
                      type: object
                      additionalProperties: true
                      properties:
                        id:
                          type: string
                          minLength: 1
                        promptTemplateId:
                          type: string
                          minLength: 1
                        fileName:
                          type: string
                          minLength: 1
                        fileType:
                          anyOf:
                            - type: string
                              minLength: 1
                            - type: "null"
                        fileSizeBytes:
                          anyOf:
                            - type: integer
                              minimum: 0
                            - type: "null"
                        createdAt:
                          anyOf:
                            - type: string
                              minLength: 1
                            - type: "null"
                        updatedAt:
                          anyOf:
                            - type: string
                              minLength: 1
                            - type: "null"
                      required:
                        - id
                        - promptTemplateId
                        - fileName
                        - createdAt
                        - updatedAt
                required:
                  - id
                  - userId
                  - name
                  - promptContent
                  - createdAt
                  - updatedAt
                  - contextFiles
  /v1/ai-prompt-templates/{templateId}/context-files/upload-url:
    post:
      operationId: postAiPromptTemplatesByTemplateIdContextFilesUploadUrl
      summary: Create ai prompt template context file upload url
      tags:
        - ai
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
              anyOf:
                - type: object
                  additionalProperties: true
                  properties:
                    id:
                      type: string
                      minLength: 1
                    fileName:
                      type: string
                      minLength: 1
                    filename:
                      type: string
                      minLength: 1
                    contentType:
                      anyOf:
                        - type: string
                          minLength: 1
                        - type: "null"
                    fileType:
                      anyOf:
                        - type: string
                          minLength: 1
                        - type: "null"
                    fileSizeBytes:
                      anyOf:
                        - type: integer
                          minimum: 0
                        - type: "null"
                    uploadId:
                      type: string
                      minLength: 1
                      pattern: ^[A-Za-z0-9_-]+$
                    bucket:
                      anyOf:
                        - type: string
                          minLength: 1
                        - type: "null"
                    s3Bucket:
                      anyOf:
                        - type: string
                          minLength: 1
                        - type: "null"
                    key:
                      anyOf:
                        - type: string
                          minLength: 1
                        - type: "null"
                    s3Key:
                      anyOf:
                        - type: string
                          minLength: 1
                        - type: "null"
                    extractedText:
                      anyOf:
                        - type: string
                          minLength: 1
                        - type: "null"
                  allOf:
                    - anyOf:
                        - required:
                            - fileName
                        - required:
                            - filename
                    - anyOf:
                        - required:
                            - contentType
                        - required:
                            - fileType
                - type: object
                  additionalProperties: true
                  properties:
                    contextFile:
                      type: object
                      additionalProperties: true
                      properties:
                        id:
                          type: string
                          minLength: 1
                        fileName:
                          type: string
                          minLength: 1
                        filename:
                          type: string
                          minLength: 1
                        contentType:
                          anyOf:
                            - type: string
                              minLength: 1
                            - type: "null"
                        fileType:
                          anyOf:
                            - type: string
                              minLength: 1
                            - type: "null"
                        fileSizeBytes:
                          anyOf:
                            - type: integer
                              minimum: 0
                            - type: "null"
                        uploadId:
                          type: string
                          minLength: 1
                          pattern: ^[A-Za-z0-9_-]+$
                        bucket:
                          anyOf:
                            - type: string
                              minLength: 1
                            - type: "null"
                        s3Bucket:
                          anyOf:
                            - type: string
                              minLength: 1
                            - type: "null"
                        key:
                          anyOf:
                            - type: string
                              minLength: 1
                            - type: "null"
                        s3Key:
                          anyOf:
                            - type: string
                              minLength: 1
                            - type: "null"
                        extractedText:
                          anyOf:
                            - type: string
                              minLength: 1
                            - type: "null"
                      allOf:
                        - anyOf:
                            - required:
                                - fileName
                            - required:
                                - filename
                        - anyOf:
                            - required:
                                - contentType
                            - required:
                                - fileType
                  required:
                    - contextFile
                - type: object
                  additionalProperties: true
                  properties:
                    input:
                      type: object
                      additionalProperties: true
                      properties:
                        id:
                          type: string
                          minLength: 1
                        fileName:
                          type: string
                          minLength: 1
                        filename:
                          type: string
                          minLength: 1
                        contentType:
                          anyOf:
                            - type: string
                              minLength: 1
                            - type: "null"
                        fileType:
                          anyOf:
                            - type: string
                              minLength: 1
                            - type: "null"
                        fileSizeBytes:
                          anyOf:
                            - type: integer
                              minimum: 0
                            - type: "null"
                        uploadId:
                          type: string
                          minLength: 1
                          pattern: ^[A-Za-z0-9_-]+$
                        bucket:
                          anyOf:
                            - type: string
                              minLength: 1
                            - type: "null"
                        s3Bucket:
                          anyOf:
                            - type: string
                              minLength: 1
                            - type: "null"
                        key:
                          anyOf:
                            - type: string
                              minLength: 1
                            - type: "null"
                        s3Key:
                          anyOf:
                            - type: string
                              minLength: 1
                            - type: "null"
                        extractedText:
                          anyOf:
                            - type: string
                              minLength: 1
                            - type: "null"
                      allOf:
                        - anyOf:
                            - required:
                                - fileName
                            - required:
                                - filename
                        - anyOf:
                            - required:
                                - contentType
                            - required:
                                - fileType
                  required:
                    - input
      parameters:
        - schema:
            type: string
            minLength: 1
          in: path
          name: templateId
          required: true
      security: *a8
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                properties:
                  uploadUrl:
                    type: string
                    minLength: 1
                  uploadId:
                    type: string
                    minLength: 1
                  bucket:
                    type: string
                    minLength: 1
                  key:
                    type: string
                    minLength: 1
                  promptTemplateId:
                    type: string
                    minLength: 1
                required:
                  - uploadUrl
                  - uploadId
                  - bucket
                  - key
                  - promptTemplateId
  /v1/ai-prompt-templates/{templateId}/context-files:
    post:
      operationId: postAiPromptTemplatesByTemplateIdContextFiles
      summary: Create ai prompt template context file
      tags:
        - ai
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
              anyOf:
                - type: object
                  additionalProperties: true
                  properties:
                    id:
                      type: string
                      minLength: 1
                    fileName:
                      type: string
                      minLength: 1
                    filename:
                      type: string
                      minLength: 1
                    contentType:
                      anyOf:
                        - type: string
                          minLength: 1
                        - type: "null"
                    fileType:
                      anyOf:
                        - type: string
                          minLength: 1
                        - type: "null"
                    fileSizeBytes:
                      anyOf:
                        - type: integer
                          minimum: 0
                        - type: "null"
                    uploadId:
                      type: string
                      minLength: 1
                      pattern: ^[A-Za-z0-9_-]+$
                    bucket:
                      anyOf:
                        - type: string
                          minLength: 1
                        - type: "null"
                    s3Bucket:
                      anyOf:
                        - type: string
                          minLength: 1
                        - type: "null"
                    key:
                      anyOf:
                        - type: string
                          minLength: 1
                        - type: "null"
                    s3Key:
                      anyOf:
                        - type: string
                          minLength: 1
                        - type: "null"
                    extractedText:
                      anyOf:
                        - type: string
                          minLength: 1
                        - type: "null"
                  anyOf:
                    - required:
                        - fileName
                    - required:
                        - filename
                - type: object
                  additionalProperties: true
                  properties:
                    contextFile:
                      type: object
                      additionalProperties: true
                      properties:
                        id:
                          type: string
                          minLength: 1
                        fileName:
                          type: string
                          minLength: 1
                        filename:
                          type: string
                          minLength: 1
                        contentType:
                          anyOf:
                            - type: string
                              minLength: 1
                            - type: "null"
                        fileType:
                          anyOf:
                            - type: string
                              minLength: 1
                            - type: "null"
                        fileSizeBytes:
                          anyOf:
                            - type: integer
                              minimum: 0
                            - type: "null"
                        uploadId:
                          type: string
                          minLength: 1
                          pattern: ^[A-Za-z0-9_-]+$
                        bucket:
                          anyOf:
                            - type: string
                              minLength: 1
                            - type: "null"
                        s3Bucket:
                          anyOf:
                            - type: string
                              minLength: 1
                            - type: "null"
                        key:
                          anyOf:
                            - type: string
                              minLength: 1
                            - type: "null"
                        s3Key:
                          anyOf:
                            - type: string
                              minLength: 1
                            - type: "null"
                        extractedText:
                          anyOf:
                            - type: string
                              minLength: 1
                            - type: "null"
                      anyOf:
                        - required:
                            - fileName
                        - required:
                            - filename
                  required:
                    - contextFile
                - type: object
                  additionalProperties: true
                  properties:
                    input:
                      type: object
                      additionalProperties: true
                      properties:
                        id:
                          type: string
                          minLength: 1
                        fileName:
                          type: string
                          minLength: 1
                        filename:
                          type: string
                          minLength: 1
                        contentType:
                          anyOf:
                            - type: string
                              minLength: 1
                            - type: "null"
                        fileType:
                          anyOf:
                            - type: string
                              minLength: 1
                            - type: "null"
                        fileSizeBytes:
                          anyOf:
                            - type: integer
                              minimum: 0
                            - type: "null"
                        uploadId:
                          type: string
                          minLength: 1
                          pattern: ^[A-Za-z0-9_-]+$
                        bucket:
                          anyOf:
                            - type: string
                              minLength: 1
                            - type: "null"
                        s3Bucket:
                          anyOf:
                            - type: string
                              minLength: 1
                            - type: "null"
                        key:
                          anyOf:
                            - type: string
                              minLength: 1
                            - type: "null"
                        s3Key:
                          anyOf:
                            - type: string
                              minLength: 1
                            - type: "null"
                        extractedText:
                          anyOf:
                            - type: string
                              minLength: 1
                            - type: "null"
                      anyOf:
                        - required:
                            - fileName
                        - required:
                            - filename
                  required:
                    - input
      parameters:
        - schema:
            type: string
            minLength: 1
          in: path
          name: templateId
          required: true
      security: *a8
      responses:
        "201":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                properties:
                  id:
                    type: string
                    minLength: 1
                  promptTemplateId:
                    type: string
                    minLength: 1
                  fileName:
                    type: string
                    minLength: 1
                  fileType:
                    anyOf:
                      - type: string
                        minLength: 1
                      - type: "null"
                  fileSizeBytes:
                    anyOf:
                      - type: integer
                        minimum: 0
                      - type: "null"
                  createdAt:
                    anyOf:
                      - type: string
                        minLength: 1
                      - type: "null"
                  updatedAt:
                    anyOf:
                      - type: string
                        minLength: 1
                      - type: "null"
                required:
                  - id
                  - promptTemplateId
                  - fileName
                  - createdAt
                  - updatedAt
  /v1/ai-context-files/{fileId}/download-url:
    get:
      operationId: getAiContextFilesByFileIdDownloadUrl
      summary: Get ai context file download url
      tags:
        - ai
      parameters:
        - schema:
            type: string
            minLength: 1
          in: path
          name: fileId
          required: true
      security: *a8
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                properties:
                  downloadUrl:
                    type: string
                    minLength: 1
                  bucket:
                    type: string
                    minLength: 1
                  key:
                    type: string
                    minLength: 1
                  contextFileId:
                    type: string
                    minLength: 1
                required:
                  - downloadUrl
                  - bucket
                  - key
                  - contextFileId
  /v1/ai-context-files/{fileId}/extract-text:
    post:
      operationId: postAiContextFilesByFileIdExtractText
      summary: Extract text ai context file
      tags:
        - ai
      parameters:
        - schema:
            type: string
            minLength: 1
          in: path
          name: fileId
          required: true
      security: *a8
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                properties:
                  contextFile:
                    type: object
                    additionalProperties: true
                    properties:
                      id:
                        type: string
                        minLength: 1
                      promptTemplateId:
                        type: string
                        minLength: 1
                      fileName:
                        type: string
                        minLength: 1
                      fileType:
                        anyOf:
                          - type: string
                            minLength: 1
                          - type: "null"
                      fileSizeBytes:
                        anyOf:
                          - type: integer
                            minimum: 0
                          - type: "null"
                      createdAt:
                        anyOf:
                          - type: string
                            minLength: 1
                          - type: "null"
                      updatedAt:
                        anyOf:
                          - type: string
                            minLength: 1
                          - type: "null"
                    required:
                      - id
                      - promptTemplateId
                      - fileName
                      - createdAt
                      - updatedAt
                  extractedText:
                    anyOf:
                      - type: string
                        minLength: 1
                      - type: "null"
                  extractedTextLength:
                    type: integer
                    minimum: 0
                  sourceContentType:
                    anyOf:
                      - type: string
                        minLength: 1
                      - type: "null"
                required:
                  - contextFile
                  - extractedTextLength
  /v1/ai-context-files/{fileId}:
    patch:
      operationId: patchAiContextFilesByFileId
      summary: Update ai context file
      tags:
        - ai
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
              anyOf:
                - type: object
                  additionalProperties: true
                  properties:
                    id:
                      type: string
                      minLength: 1
                    fileName:
                      type: string
                      minLength: 1
                    filename:
                      type: string
                      minLength: 1
                    contentType:
                      anyOf:
                        - type: string
                          minLength: 1
                        - type: "null"
                    fileType:
                      anyOf:
                        - type: string
                          minLength: 1
                        - type: "null"
                    fileSizeBytes:
                      anyOf:
                        - type: integer
                          minimum: 0
                        - type: "null"
                    uploadId:
                      type: string
                      minLength: 1
                      pattern: ^[A-Za-z0-9_-]+$
                    bucket:
                      anyOf:
                        - type: string
                          minLength: 1
                        - type: "null"
                    s3Bucket:
                      anyOf:
                        - type: string
                          minLength: 1
                        - type: "null"
                    key:
                      anyOf:
                        - type: string
                          minLength: 1
                        - type: "null"
                    s3Key:
                      anyOf:
                        - type: string
                          minLength: 1
                        - type: "null"
                    extractedText:
                      anyOf:
                        - type: string
                          minLength: 1
                        - type: "null"
                  anyOf:
                    - required:
                        - fileName
                    - required:
                        - filename
                    - required:
                        - contentType
                    - required:
                        - fileType
                    - required:
                        - fileSizeBytes
                    - required:
                        - bucket
                    - required:
                        - s3Bucket
                    - required:
                        - key
                    - required:
                        - s3Key
                    - required:
                        - extractedText
                - type: object
                  additionalProperties: true
                  properties:
                    contextFile:
                      type: object
                      additionalProperties: true
                      properties:
                        id:
                          type: string
                          minLength: 1
                        fileName:
                          type: string
                          minLength: 1
                        filename:
                          type: string
                          minLength: 1
                        contentType:
                          anyOf:
                            - type: string
                              minLength: 1
                            - type: "null"
                        fileType:
                          anyOf:
                            - type: string
                              minLength: 1
                            - type: "null"
                        fileSizeBytes:
                          anyOf:
                            - type: integer
                              minimum: 0
                            - type: "null"
                        uploadId:
                          type: string
                          minLength: 1
                          pattern: ^[A-Za-z0-9_-]+$
                        bucket:
                          anyOf:
                            - type: string
                              minLength: 1
                            - type: "null"
                        s3Bucket:
                          anyOf:
                            - type: string
                              minLength: 1
                            - type: "null"
                        key:
                          anyOf:
                            - type: string
                              minLength: 1
                            - type: "null"
                        s3Key:
                          anyOf:
                            - type: string
                              minLength: 1
                            - type: "null"
                        extractedText:
                          anyOf:
                            - type: string
                              minLength: 1
                            - type: "null"
                      anyOf:
                        - required:
                            - fileName
                        - required:
                            - filename
                        - required:
                            - contentType
                        - required:
                            - fileType
                        - required:
                            - fileSizeBytes
                        - required:
                            - bucket
                        - required:
                            - s3Bucket
                        - required:
                            - key
                        - required:
                            - s3Key
                        - required:
                            - extractedText
                  required:
                    - contextFile
                - type: object
                  additionalProperties: true
                  properties:
                    input:
                      type: object
                      additionalProperties: true
                      properties:
                        id:
                          type: string
                          minLength: 1
                        fileName:
                          type: string
                          minLength: 1
                        filename:
                          type: string
                          minLength: 1
                        contentType:
                          anyOf:
                            - type: string
                              minLength: 1
                            - type: "null"
                        fileType:
                          anyOf:
                            - type: string
                              minLength: 1
                            - type: "null"
                        fileSizeBytes:
                          anyOf:
                            - type: integer
                              minimum: 0
                            - type: "null"
                        uploadId:
                          type: string
                          minLength: 1
                          pattern: ^[A-Za-z0-9_-]+$
                        bucket:
                          anyOf:
                            - type: string
                              minLength: 1
                            - type: "null"
                        s3Bucket:
                          anyOf:
                            - type: string
                              minLength: 1
                            - type: "null"
                        key:
                          anyOf:
                            - type: string
                              minLength: 1
                            - type: "null"
                        s3Key:
                          anyOf:
                            - type: string
                              minLength: 1
                            - type: "null"
                        extractedText:
                          anyOf:
                            - type: string
                              minLength: 1
                            - type: "null"
                      anyOf:
                        - required:
                            - fileName
                        - required:
                            - filename
                        - required:
                            - contentType
                        - required:
                            - fileType
                        - required:
                            - fileSizeBytes
                        - required:
                            - bucket
                        - required:
                            - s3Bucket
                        - required:
                            - key
                        - required:
                            - s3Key
                        - required:
                            - extractedText
                  required:
                    - input
      parameters:
        - schema:
            type: string
            minLength: 1
          in: path
          name: fileId
          required: true
      security: *a8
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                properties:
                  id:
                    type: string
                    minLength: 1
                  promptTemplateId:
                    type: string
                    minLength: 1
                  fileName:
                    type: string
                    minLength: 1
                  fileType:
                    anyOf:
                      - type: string
                        minLength: 1
                      - type: "null"
                  fileSizeBytes:
                    anyOf:
                      - type: integer
                        minimum: 0
                      - type: "null"
                  createdAt:
                    anyOf:
                      - type: string
                        minLength: 1
                      - type: "null"
                  updatedAt:
                    anyOf:
                      - type: string
                        minLength: 1
                      - type: "null"
                required:
                  - id
                  - promptTemplateId
                  - fileName
                  - createdAt
                  - updatedAt
    delete:
      operationId: deleteAiContextFilesByFileId
      summary: Delete ai context file
      tags:
        - ai
      parameters:
        - schema:
            type: string
            minLength: 1
          in: path
          name: fileId
          required: true
      security: *a8
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                properties:
                  deleted:
                    type: boolean
                  id:
                    type: string
                    minLength: 1
                  s3DeletedExternally:
                    type: boolean
                required:
                  - deleted
                  - id
                  - s3DeletedExternally
  /v1/ai-prompt-templates/{templateId}:
    get:
      operationId: getAiPromptTemplatesByTemplateId
      summary: Get ai prompt template
      tags:
        - ai
      parameters:
        - schema:
            type: string
            minLength: 1
          in: path
          name: templateId
          required: true
      security: *a8
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                properties:
                  id:
                    type: string
                    minLength: 1
                  userId:
                    type: string
                    minLength: 1
                  name:
                    type: string
                    minLength: 1
                  description:
                    anyOf:
                      - type: string
                        minLength: 1
                      - type: "null"
                  promptContent:
                    type: string
                    minLength: 1
                  isSystem:
                    type: boolean
                  archivedAt:
                    anyOf:
                      - type: string
                        minLength: 1
                      - type: "null"
                  createdAt:
                    anyOf:
                      - type: string
                        minLength: 1
                      - type: "null"
                  updatedAt:
                    anyOf:
                      - type: string
                        minLength: 1
                      - type: "null"
                  contextFiles:
                    type: array
                    items:
                      type: object
                      additionalProperties: true
                      properties:
                        id:
                          type: string
                          minLength: 1
                        promptTemplateId:
                          type: string
                          minLength: 1
                        fileName:
                          type: string
                          minLength: 1
                        fileType:
                          anyOf:
                            - type: string
                              minLength: 1
                            - type: "null"
                        fileSizeBytes:
                          anyOf:
                            - type: integer
                              minimum: 0
                            - type: "null"
                        createdAt:
                          anyOf:
                            - type: string
                              minLength: 1
                            - type: "null"
                        updatedAt:
                          anyOf:
                            - type: string
                              minLength: 1
                            - type: "null"
                      required:
                        - id
                        - promptTemplateId
                        - fileName
                        - createdAt
                        - updatedAt
                required:
                  - id
                  - userId
                  - name
                  - promptContent
                  - createdAt
                  - updatedAt
                  - contextFiles
    patch:
      operationId: patchAiPromptTemplatesByTemplateId
      summary: Update ai prompt template
      tags:
        - ai
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
              anyOf:
                - type: object
                  additionalProperties: true
                  properties:
                    name:
                      type: string
                      minLength: 1
                    description:
                      anyOf:
                        - type: string
                          minLength: 1
                        - type: "null"
                    promptContent:
                      type: string
                      minLength: 1
                  anyOf:
                    - required:
                        - name
                    - required:
                        - description
                    - required:
                        - promptContent
                - type: object
                  additionalProperties: true
                  properties:
                    input:
                      type: object
                      additionalProperties: true
                      properties:
                        name:
                          type: string
                          minLength: 1
                        description:
                          anyOf:
                            - type: string
                              minLength: 1
                            - type: "null"
                        promptContent:
                          type: string
                          minLength: 1
                      anyOf:
                        - required:
                            - name
                        - required:
                            - description
                        - required:
                            - promptContent
                  required:
                    - input
      parameters:
        - schema:
            type: string
            minLength: 1
          in: path
          name: templateId
          required: true
      security: *a8
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                properties:
                  id:
                    type: string
                    minLength: 1
                  userId:
                    type: string
                    minLength: 1
                  name:
                    type: string
                    minLength: 1
                  description:
                    anyOf:
                      - type: string
                        minLength: 1
                      - type: "null"
                  promptContent:
                    type: string
                    minLength: 1
                  isSystem:
                    type: boolean
                  archivedAt:
                    anyOf:
                      - type: string
                        minLength: 1
                      - type: "null"
                  createdAt:
                    anyOf:
                      - type: string
                        minLength: 1
                      - type: "null"
                  updatedAt:
                    anyOf:
                      - type: string
                        minLength: 1
                      - type: "null"
                  contextFiles:
                    type: array
                    items:
                      type: object
                      additionalProperties: true
                      properties:
                        id:
                          type: string
                          minLength: 1
                        promptTemplateId:
                          type: string
                          minLength: 1
                        fileName:
                          type: string
                          minLength: 1
                        fileType:
                          anyOf:
                            - type: string
                              minLength: 1
                            - type: "null"
                        fileSizeBytes:
                          anyOf:
                            - type: integer
                              minimum: 0
                            - type: "null"
                        createdAt:
                          anyOf:
                            - type: string
                              minLength: 1
                            - type: "null"
                        updatedAt:
                          anyOf:
                            - type: string
                              minLength: 1
                            - type: "null"
                      required:
                        - id
                        - promptTemplateId
                        - fileName
                        - createdAt
                        - updatedAt
                required:
                  - id
                  - userId
                  - name
                  - promptContent
                  - createdAt
                  - updatedAt
                  - contextFiles
    delete:
      operationId: deleteAiPromptTemplatesByTemplateId
      summary: Delete ai prompt template
      tags:
        - ai
      parameters:
        - schema:
            type: string
            minLength: 1
          in: path
          name: templateId
          required: true
      security: *a8
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                properties:
                  action:
                    type: string
                    minLength: 1
                  archived:
                    type: boolean
                  id:
                    type: string
                    minLength: 1
                  status:
                    type: string
                    minLength: 1
                required:
                  - action
                  - archived
                  - id
                  - status
  /v1/ai-processing-results/run:
    post:
      operationId: postAiProcessingResultsRun
      summary: Run ai processing result
      tags:
        - ai
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/ai-processing-results:
    get:
      operationId: getAiProcessingResults
      summary: List ai processing results
      tags:
        - ai
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/appointment-transcripts/{transcriptId}/ai-processing-results:
    get:
      operationId: getAppointmentTranscriptsByTranscriptIdAiProcessingResults
      summary: List appointment transcript ai processing results
      tags:
        - appointments
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: transcriptId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/ai-processing-results/{resultId}:
    get:
      operationId: getAiProcessingResultsByResultId
      summary: Get ai processing result
      tags:
        - ai
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: resultId
          required: true
      responses:
        "200":
          description: Default Response
    patch:
      operationId: patchAiProcessingResultsByResultId
      summary: Update ai processing result
      tags:
        - ai
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: resultId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/ai-processing-results/{resultId}/treatment-note-preview:
    post:
      operationId: postAiProcessingResultsByResultIdTreatmentNotePreview
      summary: Create ai processing result treatment note preview
      tags:
        - treatment
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: resultId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/ai-processing-results/{resultId}/apply-to-treatment-note:
    post:
      operationId: postAiProcessingResultsByResultIdApplyToTreatmentNote
      summary: Create ai processing result apply to treatment note
      tags:
        - treatment
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: resultId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/sms-attachments/upload-url:
    post:
      operationId: postSmsAttachmentsUploadUrl
      summary: Create sms attachment upload url
      tags:
        - settings
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/sms-messages/{messageId}/attachments/{attachmentId}/download-url:
    get:
      operationId: getSmsMessagesByMessageIdAttachmentsByAttachmentIdDownloadUrl
      summary: Get sms message attachment download url
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: messageId
          required: true
        - schema:
            type: string
          in: path
          name: attachmentId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/managed-phone-numbers:
    get:
      operationId: getManagedPhoneNumbers
      summary: List managed phone numbers
      tags:
        - communications
      security: *a8
      responses:
        "200":
          description: Default Response
    post:
      operationId: postManagedPhoneNumbers
      summary: Create managed phone number
      tags:
        - communications
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/managed-phone-numbers/search:
    get:
      operationId: getManagedPhoneNumbersSearch
      summary: Get managed phone number search
      tags:
        - communications
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/managed-phone-numbers/request:
    post:
      operationId: postManagedPhoneNumbersRequest
      summary: Request managed phone number
      tags:
        - communications
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/voice-sms-settings:
    get:
      operationId: getVoiceSmsSettings
      summary: List voice sms settings
      tags:
        - settings
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/voice-sms-settings/campaign:
    patch:
      operationId: patchVoiceSmsSettingsCampaign
      summary: Update voice sms setting campaign
      tags:
        - settings
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/managed-phone-numbers/{managedPhoneNumberId}/assign:
    patch:
      operationId: patchManagedPhoneNumbersByManagedPhoneNumberIdAssign
      summary: Assign managed phone number
      tags:
        - communications
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: managedPhoneNumberId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/managed-phone-numbers/{managedPhoneNumberId}/unassign:
    patch:
      operationId: patchManagedPhoneNumbersByManagedPhoneNumberIdUnassign
      summary: Unassign managed phone number
      tags:
        - communications
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: managedPhoneNumberId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/patients/{patientId}/appointment-communications:
    get:
      operationId: getPatientsByPatientIdAppointmentCommunications
      summary: List patient appointment communications
      tags:
        - appointments
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/conversations/mine:
    get:
      operationId: getConversationsMine
      summary: Get conversation mine
      tags:
        - communications
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/conversations/{conversationId}:
    get:
      operationId: getConversationsByConversationId
      summary: Get conversation
      tags:
        - communications
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: conversationId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/patients/{patientId}/conversations:
    get:
      operationId: getPatientsByPatientIdConversations
      summary: List patient conversations
      tags:
        - communications
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/conversations/{conversationId}/read:
    patch:
      operationId: patchConversationsByConversationIdRead
      summary: Read conversation
      tags:
        - communications
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: conversationId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/conversations/{conversationId}/messages/statuses:
    get:
      operationId: getConversationsByConversationIdMessagesStatuses
      summary: List conversation messages statuses
      tags:
        - communications
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: conversationId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/conversations/{conversationId}/messages:
    post:
      operationId: postConversationsByConversationIdMessages
      summary: Create conversation message
      tags:
        - communications
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: conversationId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/patients/{patientId}/messages:
    post:
      operationId: postPatientsByPatientIdMessages
      summary: Create patient message
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/softphone-token:
    post:
      operationId: postSoftphoneToken
      summary: Create softphone token
      tags:
        - communications
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/telnyx/voice-test-token:
    post:
      operationId: postTelnyxVoiceTestToken
      summary: Create telnyx voice test token
      tags:
        - communications
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/phone-calls:
    post:
      operationId: postPhoneCalls
      summary: Create phone call
      tags:
        - communications
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/phone-calls/{phoneCallId}:
    get:
      operationId: getPhoneCallsByPhoneCallId
      summary: Get phone call
      tags:
        - communications
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: phoneCallId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/phone-calls/{phoneCallId}/end:
    patch:
      operationId: patchPhoneCallsByPhoneCallIdEnd
      summary: End phone call
      tags:
        - communications
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: phoneCallId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/phone-calls/{phoneCallId}/refresh:
    patch:
      operationId: patchPhoneCallsByPhoneCallIdRefresh
      summary: Update phone call refresh
      tags:
        - communications
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: phoneCallId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/communication-voicemails:
    get:
      operationId: getCommunicationVoicemails
      summary: List communication voicemails
      tags:
        - settings
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/communication-voicemails/{voicemailId}/listened:
    patch:
      operationId: patchCommunicationVoicemailsByVoicemailIdListened
      summary: Update communication voicemail listened
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: voicemailId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/communication-voicemails/{voicemailId}/unread:
    patch:
      operationId: patchCommunicationVoicemailsByVoicemailIdUnread
      summary: Update communication voicemail unread
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: voicemailId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/appointment-recordings:
    get:
      operationId: getAppointmentRecordings
      summary: List appointment recordings
      tags:
        - appointments
      security: *a8
      responses:
        "200":
          description: Default Response
    post:
      operationId: postAppointmentRecordings
      summary: Create appointment recording
      tags:
        - appointments
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/appointment-recordings/{recordingId}/upload-url:
    post:
      operationId: postAppointmentRecordingsByRecordingIdUploadUrl
      summary: Create appointment recording upload url
      tags:
        - appointments
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: recordingId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/appointment-recordings/{recordingId}/confirm-upload:
    post:
      operationId: postAppointmentRecordingsByRecordingIdConfirmUpload
      summary: Create appointment recording confirm upload
      tags:
        - appointments
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: recordingId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/appointment-recordings/{recordingId}:
    get:
      operationId: getAppointmentRecordingsByRecordingId
      summary: Get appointment recording
      tags:
        - appointments
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: recordingId
          required: true
      responses:
        "200":
          description: Default Response
    patch:
      operationId: patchAppointmentRecordingsByRecordingId
      summary: Update appointment recording
      tags:
        - appointments
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: recordingId
          required: true
      responses:
        "200":
          description: Default Response
    delete:
      operationId: deleteAppointmentRecordingsByRecordingId
      summary: Delete appointment recording
      tags:
        - appointments
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: recordingId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/appointment-recordings/{recordingId}/status:
    patch:
      operationId: patchAppointmentRecordingsByRecordingIdStatus
      summary: Update appointment recording statu
      tags:
        - appointments
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: recordingId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/challenges:
    get:
      operationId: getChallenges
      summary: List challenges
      tags:
        - challenges
      security: *a8
      responses:
        "200":
          description: Default Response
    post:
      operationId: postChallenges
      summary: Create challenge
      tags:
        - challenges
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/patients/{patientId}/challenges:
    get:
      operationId: getPatientsByPatientIdChallenges
      summary: List patient challenges
      tags:
        - challenges
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
    post:
      operationId: postPatientsByPatientIdChallenges
      summary: Create patient challenge
      tags:
        - challenges
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/challenges/weights:
    patch:
      operationId: patchChallengesWeights
      summary: Update challenge weight
      tags:
        - challenges
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/challenges/tags:
    patch:
      operationId: patchChallengesTags
      summary: Update challenge tag
      tags:
        - challenges
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/challenges/{challengeId}:
    get:
      operationId: getChallengesByChallengeId
      summary: Get challenge
      tags:
        - challenges
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: challengeId
          required: true
      responses:
        "200":
          description: Default Response
    patch:
      operationId: patchChallengesByChallengeId
      summary: Update challenge
      tags:
        - challenges
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: challengeId
          required: true
      responses:
        "200":
          description: Default Response
    delete:
      operationId: deleteChallengesByChallengeId
      summary: Delete challenge
      tags:
        - challenges
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: challengeId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/challenge-content:
    get:
      operationId: getChallengeContent
      summary: Get challenge content
      tags:
        - challenges
      security: *a8
      responses:
        "200":
          description: Default Response
    post:
      operationId: postChallengeContent
      summary: Create challenge content
      tags:
        - challenges
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/challenge-content/upload-url:
    post:
      operationId: postChallengeContentUploadUrl
      summary: Create challenge content upload url
      tags:
        - challenges
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/challenge-content/search:
    get:
      operationId: getChallengeContentSearch
      summary: Get challenge content search
      tags:
        - challenges
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/challenge-content/tags:
    get:
      operationId: getChallengeContentTags
      summary: List challenge content tags
      tags:
        - challenges
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/challenge-content/{contentId}/download-url:
    get:
      operationId: getChallengeContentByContentIdDownloadUrl
      summary: Get challenge content download url
      tags:
        - challenges
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: contentId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/challenge-content/{contentId}:
    get:
      operationId: getChallengeContentByContentId
      summary: Get challenge content
      tags:
        - challenges
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: contentId
          required: true
      responses:
        "200":
          description: Default Response
    patch:
      operationId: patchChallengeContentByContentId
      summary: Update challenge content
      tags:
        - challenges
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: contentId
          required: true
      responses:
        "200":
          description: Default Response
    delete:
      operationId: deleteChallengeContentByContentId
      summary: Delete challenge content
      tags:
        - challenges
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: contentId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/challenge-content/{contentId}/like:
    post:
      operationId: postChallengeContentByContentIdLike
      summary: Like challenge content
      tags:
        - challenges
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: contentId
          required: true
      responses:
        "200":
          description: Default Response
    delete:
      operationId: deleteChallengeContentByContentIdLike
      summary: Like challenge content
      tags:
        - challenges
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: contentId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/patients/{patientId}/core-fears:
    get:
      operationId: getPatientsByPatientIdCoreFears
      summary: List patient core fears
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
    post:
      operationId: postPatientsByPatientIdCoreFears
      summary: Create patient core fear
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/core-fears/{coreFearId}:
    patch:
      operationId: patchCoreFearsByCoreFearId
      summary: Update core fear
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: coreFearId
          required: true
      responses:
        "200":
          description: Default Response
    delete:
      operationId: deleteCoreFearsByCoreFearId
      summary: Delete core fear
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: coreFearId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/patients/{patientId}/situations:
    get:
      operationId: getPatientsByPatientIdSituations
      summary: List patient situations
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
    post:
      operationId: postPatientsByPatientIdSituations
      summary: Create patient situation
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/situations/{situationId}:
    patch:
      operationId: patchSituationsBySituationId
      summary: Update situation
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: situationId
          required: true
      responses:
        "200":
          description: Default Response
    delete:
      operationId: deleteSituationsBySituationId
      summary: Delete situation
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: situationId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/patients/{patientId}/specific-fears:
    get:
      operationId: getPatientsByPatientIdSpecificFears
      summary: List patient specific fears
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
    post:
      operationId: postPatientsByPatientIdSpecificFears
      summary: Create patient specific fear
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/specific-fears/{specificFearId}:
    patch:
      operationId: patchSpecificFearsBySpecificFearId
      summary: Update specific fear
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: specificFearId
          required: true
      responses:
        "200":
          description: Default Response
    delete:
      operationId: deleteSpecificFearsBySpecificFearId
      summary: Delete specific fear
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: specificFearId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/patients/{patientId}/escapes:
    get:
      operationId: getPatientsByPatientIdEscapes
      summary: List patient escapes
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
    post:
      operationId: postPatientsByPatientIdEscapes
      summary: Create patient escape
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/escapes/{escapeId}:
    patch:
      operationId: patchEscapesByEscapeId
      summary: Update escape
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: escapeId
          required: true
      responses:
        "200":
          description: Default Response
    delete:
      operationId: deleteEscapesByEscapeId
      summary: Delete escape
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: escapeId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/patients/{patientId}/tags:
    get:
      operationId: getPatientsByPatientIdTags
      summary: List patient tags
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
    post:
      operationId: postPatientsByPatientIdTags
      summary: Create patient tag
      tags:
        - patients
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/tags/{tagId}:
    patch:
      operationId: patchTagsByTagId
      summary: Update tag
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: tagId
          required: true
      responses:
        "200":
          description: Default Response
    delete:
      operationId: deleteTagsByTagId
      summary: Delete tag
      tags:
        - settings
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: tagId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/challenge-attempts:
    get:
      operationId: getChallengeAttempts
      summary: List challenge attempts
      tags:
        - challenges
      security: *a8
      responses:
        "200":
          description: Default Response
    post:
      operationId: postChallengeAttempts
      summary: Create challenge attempt
      tags:
        - challenges
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/patients/{patientId}/challenge-attempts:
    get:
      operationId: getPatientsByPatientIdChallengeAttempts
      summary: List patient challenge attempts
      tags:
        - challenges
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/challenges/{challengeId}/attempts:
    get:
      operationId: getChallengesByChallengeIdAttempts
      summary: List challenge attempts
      tags:
        - challenges
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: challengeId
          required: true
      responses:
        "200":
          description: Default Response
    post:
      operationId: postChallengesByChallengeIdAttempts
      summary: Create challenge attempt
      tags:
        - challenges
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: challengeId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/challenges/{challengeId}/attempts/count:
    get:
      operationId: getChallengesByChallengeIdAttemptsCount
      summary: Get challenge attempt count
      tags:
        - challenges
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: challengeId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/challenges/{challengeId}/attempts/summary:
    get:
      operationId: getChallengesByChallengeIdAttemptsSummary
      summary: Get challenge attempt summary
      tags:
        - challenges
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: challengeId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/challenge-attempts/{attemptId}:
    get:
      operationId: getChallengeAttemptsByAttemptId
      summary: Get challenge attempt
      tags:
        - challenges
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: attemptId
          required: true
      responses:
        "200":
          description: Default Response
    patch:
      operationId: patchChallengeAttemptsByAttemptId
      summary: Update challenge attempt
      tags:
        - challenges
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: attemptId
          required: true
      responses:
        "200":
          description: Default Response
    delete:
      operationId: deleteChallengeAttemptsByAttemptId
      summary: Delete challenge attempt
      tags:
        - challenges
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: attemptId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/challenge-attempts/{attemptId}/events:
    post:
      operationId: postChallengeAttemptsByAttemptIdEvents
      summary: Create challenge attempt event
      tags:
        - challenges
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: attemptId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/challenger/usage:
    get:
      operationId: getChallengerUsage
      summary: Get challenger usage
      tags:
        - challenges
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/patients/{patientId}/challenge-activity:
    get:
      operationId: getPatientsByPatientIdChallengeActivity
      summary: Get patient challenge activity
      tags:
        - challenges
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: patientId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/ad-hoc-challenge-sessions:
    post:
      operationId: postAdHocChallengeSessions
      summary: Create ad hoc challenge session
      tags:
        - challenges
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/ad-hoc-challenge-sessions/me/running:
    get:
      operationId: getAdHocChallengeSessionsMeRunning
      summary: Get ad hoc challenge session me running
      tags:
        - challenges
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/ad-hoc-challenge-attempts/me/running:
    get:
      operationId: getAdHocChallengeAttemptsMeRunning
      summary: Get ad hoc challenge attempt me running
      tags:
        - challenges
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/ad-hoc-challenge-sessions/{sessionToken}:
    get:
      operationId: getAdHocChallengeSessionsBySessionToken
      summary: Get ad hoc challenge session
      tags:
        - challenges
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: sessionToken
          required: true
      responses:
        "200":
          description: Default Response
  /v1/ad-hoc-challenge-sessions/{sessionToken}/heartbeat:
    post:
      operationId: postAdHocChallengeSessionsBySessionTokenHeartbeat
      summary: Create ad hoc challenge session heartbeat
      tags:
        - challenges
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: sessionToken
          required: true
      responses:
        "200":
          description: Default Response
  /v1/ad-hoc-challenge-sessions/{sessionToken}/heartbeat/realtime:
    post:
      operationId: postAdHocChallengeSessionsBySessionTokenHeartbeatRealtime
      summary: Create ad hoc challenge session heartbeat realtime
      tags:
        - challenges
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: sessionToken
          required: true
      responses:
        "200":
          description: Default Response
  /v1/ad-hoc-challenge-sessions/{sessionToken}/participants/{participantKey}:
    delete:
      operationId: deleteAdHocChallengeSessionsBySessionTokenParticipantsByParticipantKey
      summary: Delete ad hoc challenge session participant
      tags:
        - challenges
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: sessionToken
          required: true
        - schema:
            type: string
          in: path
          name: participantKey
          required: true
      responses:
        "200":
          description: Default Response
  /v1/ad-hoc-challenge-sessions/{sessionToken}/participants/{participantKey}/realtime:
    delete:
      operationId: deleteAdHocChallengeSessionsBySessionTokenParticipantsByParticipantKeyRealtime
      summary: Delete ad hoc challenge session participant realtime
      tags:
        - challenges
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: sessionToken
          required: true
        - schema:
            type: string
          in: path
          name: participantKey
          required: true
      responses:
        "200":
          description: Default Response
  /v1/ad-hoc-challenge-sessions/{sessionToken}/attempts:
    post:
      operationId: postAdHocChallengeSessionsBySessionTokenAttempts
      summary: Create ad hoc challenge session attempt
      tags:
        - challenges
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: sessionToken
          required: true
      responses:
        "200":
          description: Default Response
  /v1/ad-hoc-challenge-attempts:
    post:
      operationId: postAdHocChallengeAttempts
      summary: Create ad hoc challenge attempt
      tags:
        - challenges
      security: *a8
      responses:
        "200":
          description: Default Response
  /v1/ad-hoc-challenge-attempts/{attemptId}:
    get:
      operationId: getAdHocChallengeAttemptsByAttemptId
      summary: Get ad hoc challenge attempt
      tags:
        - challenges
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: attemptId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/ad-hoc-challenge-attempts/{attemptId}/events:
    post:
      operationId: postAdHocChallengeAttemptsByAttemptIdEvents
      summary: Create ad hoc challenge attempt event
      tags:
        - challenges
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: attemptId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/ad-hoc-challenge-attempts/{attemptId}/end:
    patch:
      operationId: patchAdHocChallengeAttemptsByAttemptIdEnd
      summary: End ad hoc challenge attempt
      tags:
        - challenges
      security: *a8
      parameters:
        - schema:
            type: string
          in: path
          name: attemptId
          required: true
      responses:
        "200":
          description: Default Response
  /v1/telnyx/messaging/webhook:
    post:
      operationId: postTelnyxMessagingWebhook
      summary: Create telnyx messaging webhook
      tags:
        - communications
      security: *a9
      responses:
        "200":
          description: Default Response
  /v1/telnyx/voice/webhook:
    post:
      operationId: postTelnyxVoiceWebhook
      summary: Create telnyx voice webhook
      tags:
        - communications
      security: *a9
      responses:
        "200":
          description: Default Response
  /v1/telnyx/webhook:
    post:
      operationId: postTelnyxWebhook
      summary: Create telnyx webhook
      tags:
        - communications
      security: *a9
      responses:
        "200":
          description: Default Response
  /v1/realtime:
    get:
      tags:
        - realtime
      operationId: getRealtime
      summary: Realtime websocket
      description: Authenticated websocket for API2 local mutation fanout. Clients
        connect with bearer auth or local dev auth headers, then send JSON ping,
        subscribe, and unsubscribe messages.
      security: *a8
      x-websocket: true
      responses:
        "101":
          description: WebSocket upgrade accepted.
        "401":
          description: Authentication failed.
servers:
  - url: /
    description: Current API2 origin
tags:
  - name: system
    description: Health checks and service metadata.
  - name: ai
    description: AI processing, prompt-template, and context-file metadata.
  - name: appointments
    description: Appointment scheduling, attendance, reminders, slots, and history.
  - name: billing
    description: Local invoice, billable encounter, and patient billing reads.
  - name: brvu
    description: BRVU report, credit, manual-award, and metric surfaces.
  - name: challenges
    description: Challenge hierarchy, content, attempts, and Challenger reporting.
  - name: communications
    description: SMS, voice, conversation, managed-number, and Telnyx webhook surfaces.
  - name: forms
    description: Form templates, instances, reminders, metrics, and outreach artifacts.
  - name: integrations
    description: Local integration configuration and secret-presence metadata.
  - name: organization
    description: Organization feature and admin-database-backed organization routes.
  - name: patients
    description: Patient profiles, portal access, files, insurance, measures, and care data.
  - name: realtime
    description: Websocket connection and in-process local event subscriptions.
  - name: settings
    description: Local settings, locations, teams, queues, and operational metadata.
  - name: staff
    description: Staff users, availability, appointment mappings, and user-scoped settings.
  - name: tasks
    description: Task queue reads, mutations, reconciliation, and task statistics.
  - name: treatment
    description: Treatment-note templates, rulesets, notes, approvals, and note effects.
  - name: events
    description: Kinesis platform events emitted by Braver. Each event is
      represented as an OpenAPI webhook with a sample stream envelope and
      event-specific data payload.
    x-displayName: Platform Events
webhooks:
  appointment.created:
    post:
      tags:
        - events
      summary: Appointment Created
      operationId: platformEventAppointmentCreated
      description: >-
        Emitted when appointment created.


        Representative data fields: `appointment_id`, `appointment_name`,
        `cliniko_appointment_id`, `ends_at`, `internal_appointment_id`,
        `is_group`, `patient_id`, `practitioner_id`,
        `secondary_practitioner_id`, `split_brvus`, `starts_at`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - appointment.created
                    data:
                      type: object
                      additionalProperties: true
                      example: *a10
            examples:
              PlatformEvent_appointment_created:
                summary: appointment.created
                value: *a11
      responses:
        2XX:
          description: Consumer acknowledged the event.
  appointment.updated:
    post:
      tags:
        - events
      summary: Appointment Updated
      operationId: platformEventAppointmentUpdated
      description: >-
        Emitted when appointment updated.


        Representative data fields: `appointment_id`, `appointment_name`,
        `appointment_type_id`, `appointment_type_name`,
        `cliniko_appointment_id`, `ends_at`, `internal_appointment_id`,
        `is_group`, `patient_id`, `starts_at`, `updated_fields`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - appointment.updated
                    data:
                      type: object
                      additionalProperties: true
                      example: *a12
            examples:
              PlatformEvent_appointment_updated:
                summary: appointment.updated
                value: *a13
      responses:
        2XX:
          description: Consumer acknowledged the event.
  appointment.canceled:
    post:
      tags:
        - events
      summary: Appointment Canceled
      operationId: platformEventAppointmentCanceled
      description: >-
        Emitted when appointment canceled.


        Representative data fields: `appointment_id`, `appointment_name`,
        `canceled_at`, `cancellation_reason`, `cliniko_appointment_id`,
        `ends_at`, `internal_appointment_id`, `is_group`, `patient_id`,
        `starts_at`, `updated_fields`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - appointment.canceled
                    data:
                      type: object
                      additionalProperties: true
                      example: *a14
            examples:
              PlatformEvent_appointment_canceled:
                summary: appointment.canceled
                value: *a15
      responses:
        2XX:
          description: Consumer acknowledged the event.
  appointment.attended:
    post:
      tags:
        - events
      summary: Appointment Attended
      operationId: platformEventAppointmentAttended
      description: >-
        Emitted when appointment attended.


        Representative data fields: `appointment_id`, `appointment_name`,
        `arrival_status`, `arrival_status_code`, `cliniko_appointment_id`,
        `date_of_service`, `ends_at`, `internal_appointment_id`, `is_group`,
        `patient_id`, `starts_at`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - appointment.attended
                    data:
                      type: object
                      additionalProperties: true
                      example: *a16
            examples:
              PlatformEvent_appointment_attended:
                summary: appointment.attended
                value: *a17
      responses:
        2XX:
          description: Consumer acknowledged the event.
  appointment.attendance_recorded:
    post:
      tags:
        - events
      summary: Appointment Attendance Recorded
      operationId: platformEventAppointmentAttendanceRecorded
      description: >-
        Emitted when appointment attendance recorded.


        Representative data fields: `appointment_id`, `appointment_name`,
        `arrival_status`, `arrival_status_code`, `cliniko_appointment_id`,
        `ends_at`, `internal_appointment_id`, `is_group`, `patient_id`,
        `starts_at`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - appointment.attendance_recorded
                    data:
                      type: object
                      additionalProperties: true
                      example: *a18
            examples:
              PlatformEvent_appointment_attendance_recorded:
                summary: appointment.attendance_recorded
                value: *a19
      responses:
        2XX:
          description: Consumer acknowledged the event.
  patient.created:
    post:
      tags:
        - events
      summary: Patient Created
      operationId: platformEventPatientCreated
      description: >-
        Emitted when patient created.


        Representative data fields: `category_id`, `date_of_birth`, `email`,
        `external_patient_id`, `first_name`, `id`, `last_name`, `patient_id`,
        `preferred_first_name`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - patient.created
                    data:
                      type: object
                      additionalProperties: true
                      example: *a20
            examples:
              PlatformEvent_patient_created:
                summary: patient.created
                value: *a21
      responses:
        2XX:
          description: Consumer acknowledged the event.
  patient.updated:
    post:
      tags:
        - events
      summary: Patient Updated
      operationId: platformEventPatientUpdated
      description: >-
        Emitted when patient updated.


        Representative data fields: `category_id`, `date_of_birth`, `email`,
        `external_patient_id`, `first_name`, `id`, `last_name`, `patient_id`,
        `preferred_first_name`, `updated_fields`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - patient.updated
                    data:
                      type: object
                      additionalProperties: true
                      example: *a22
            examples:
              PlatformEvent_patient_updated:
                summary: patient.updated
                value: *a23
      responses:
        2XX:
          description: Consumer acknowledged the event.
  patient.archived:
    post:
      tags:
        - events
      summary: Patient Archived
      operationId: platformEventPatientArchived
      description: >-
        Emitted when patient archived.


        Representative data fields: `archived_at`, `category_id`,
        `date_of_birth`, `email`, `external_patient_id`, `first_name`, `id`,
        `last_name`, `patient_id`, `preferred_first_name`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - patient.archived
                    data:
                      type: object
                      additionalProperties: true
                      example: *a24
            examples:
              PlatformEvent_patient_archived:
                summary: patient.archived
                value: *a25
      responses:
        2XX:
          description: Consumer acknowledged the event.
  patient_category.created:
    post:
      tags:
        - events
      summary: Patient Category Created
      operationId: platformEventPatientCategoryCreated
      description: >-
        Emitted when patient category created.


        Representative data fields: `id`, `text`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - patient_category.created
                    data:
                      type: object
                      additionalProperties: true
                      example: *a26
            examples:
              PlatformEvent_patient_category_created:
                summary: patient_category.created
                value: *a27
      responses:
        2XX:
          description: Consumer acknowledged the event.
  patient_category.updated:
    post:
      tags:
        - events
      summary: Patient Category Updated
      operationId: platformEventPatientCategoryUpdated
      description: >-
        Emitted when patient category updated.


        Representative data fields: `id`, `text`, `updated_fields`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - patient_category.updated
                    data:
                      type: object
                      additionalProperties: true
                      example: *a28
            examples:
              PlatformEvent_patient_category_updated:
                summary: patient_category.updated
                value: *a29
      responses:
        2XX:
          description: Consumer acknowledged the event.
  patient_category.archived:
    post:
      tags:
        - events
      summary: Patient Category Archived
      operationId: platformEventPatientCategoryArchived
      description: >-
        Emitted when patient category archived.


        Representative data fields: `archived_at`, `id`, `text`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - patient_category.archived
                    data:
                      type: object
                      additionalProperties: true
                      example: *a30
            examples:
              PlatformEvent_patient_category_archived:
                summary: patient_category.archived
                value: *a31
      responses:
        2XX:
          description: Consumer acknowledged the event.
  core_fear.created:
    post:
      tags:
        - events
      summary: Core Fear Created
      operationId: platformEventCoreFearCreated
      description: >-
        Emitted when core fear created.


        Representative data fields: `core_fear`, `id`, `patient_id`, `text`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - core_fear.created
                    data:
                      type: object
                      additionalProperties: true
                      example: *a32
            examples:
              PlatformEvent_core_fear_created:
                summary: core_fear.created
                value: *a33
      responses:
        2XX:
          description: Consumer acknowledged the event.
  core_fear.updated:
    post:
      tags:
        - events
      summary: Core Fear Updated
      operationId: platformEventCoreFearUpdated
      description: >-
        Emitted when core fear updated.


        Representative data fields: `core_fear`, `id`, `patient_id`, `text`,
        `updated_fields`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - core_fear.updated
                    data:
                      type: object
                      additionalProperties: true
                      example: *a34
            examples:
              PlatformEvent_core_fear_updated:
                summary: core_fear.updated
                value: *a35
      responses:
        2XX:
          description: Consumer acknowledged the event.
  core_fear.deleted:
    post:
      tags:
        - events
      summary: Core Fear Deleted
      operationId: platformEventCoreFearDeleted
      description: >-
        Emitted when core fear deleted.


        Representative data fields: `core_fear`, `id`, `patient_id`, `text`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - core_fear.deleted
                    data:
                      type: object
                      additionalProperties: true
                      example: *a36
            examples:
              PlatformEvent_core_fear_deleted:
                summary: core_fear.deleted
                value: *a37
      responses:
        2XX:
          description: Consumer acknowledged the event.
  situation.created:
    post:
      tags:
        - events
      summary: Situation Created
      operationId: platformEventSituationCreated
      description: >-
        Emitted when situation created.


        Representative data fields: `id`, `patient_id`, `text`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - situation.created
                    data:
                      type: object
                      additionalProperties: true
                      example: *a38
            examples:
              PlatformEvent_situation_created:
                summary: situation.created
                value: *a39
      responses:
        2XX:
          description: Consumer acknowledged the event.
  situation.updated:
    post:
      tags:
        - events
      summary: Situation Updated
      operationId: platformEventSituationUpdated
      description: >-
        Emitted when situation updated.


        Representative data fields: `id`, `patient_id`, `text`,
        `updated_fields`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - situation.updated
                    data:
                      type: object
                      additionalProperties: true
                      example: *a40
            examples:
              PlatformEvent_situation_updated:
                summary: situation.updated
                value: *a41
      responses:
        2XX:
          description: Consumer acknowledged the event.
  situation.deleted:
    post:
      tags:
        - events
      summary: Situation Deleted
      operationId: platformEventSituationDeleted
      description: >-
        Emitted when situation deleted.


        Representative data fields: `id`, `patient_id`, `text`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - situation.deleted
                    data:
                      type: object
                      additionalProperties: true
                      example: *a42
            examples:
              PlatformEvent_situation_deleted:
                summary: situation.deleted
                value: *a43
      responses:
        2XX:
          description: Consumer acknowledged the event.
  specific_fear.created:
    post:
      tags:
        - events
      summary: Specific Fear Created
      operationId: platformEventSpecificFearCreated
      description: >-
        Emitted when specific fear created.


        Representative data fields: `core_fear_id`, `id`, `patient_id`,
        `situation_id`, `text`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - specific_fear.created
                    data:
                      type: object
                      additionalProperties: true
                      example: *a44
            examples:
              PlatformEvent_specific_fear_created:
                summary: specific_fear.created
                value: *a45
      responses:
        2XX:
          description: Consumer acknowledged the event.
  specific_fear.updated:
    post:
      tags:
        - events
      summary: Specific Fear Updated
      operationId: platformEventSpecificFearUpdated
      description: >-
        Emitted when specific fear updated.


        Representative data fields: `core_fear_id`, `id`, `patient_id`,
        `situation_id`, `text`, `updated_fields`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - specific_fear.updated
                    data:
                      type: object
                      additionalProperties: true
                      example: *a46
            examples:
              PlatformEvent_specific_fear_updated:
                summary: specific_fear.updated
                value: *a47
      responses:
        2XX:
          description: Consumer acknowledged the event.
  specific_fear.deleted:
    post:
      tags:
        - events
      summary: Specific Fear Deleted
      operationId: platformEventSpecificFearDeleted
      description: >-
        Emitted when specific fear deleted.


        Representative data fields: `core_fear_id`, `id`, `patient_id`,
        `situation_id`, `text`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - specific_fear.deleted
                    data:
                      type: object
                      additionalProperties: true
                      example: *a48
            examples:
              PlatformEvent_specific_fear_deleted:
                summary: specific_fear.deleted
                value: *a49
      responses:
        2XX:
          description: Consumer acknowledged the event.
  escape.created:
    post:
      tags:
        - events
      summary: Escape Created
      operationId: platformEventEscapeCreated
      description: >-
        Emitted when escape created.


        Representative data fields: `id`, `patient_id`, `text`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - escape.created
                    data:
                      type: object
                      additionalProperties: true
                      example: *a50
            examples:
              PlatformEvent_escape_created:
                summary: escape.created
                value: *a51
      responses:
        2XX:
          description: Consumer acknowledged the event.
  escape.updated:
    post:
      tags:
        - events
      summary: Escape Updated
      operationId: platformEventEscapeUpdated
      description: >-
        Emitted when escape updated.


        Representative data fields: `id`, `patient_id`, `text`,
        `updated_fields`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - escape.updated
                    data:
                      type: object
                      additionalProperties: true
                      example: *a52
            examples:
              PlatformEvent_escape_updated:
                summary: escape.updated
                value: *a53
      responses:
        2XX:
          description: Consumer acknowledged the event.
  escape.deleted:
    post:
      tags:
        - events
      summary: Escape Deleted
      operationId: platformEventEscapeDeleted
      description: >-
        Emitted when escape deleted.


        Representative data fields: `id`, `patient_id`, `text`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - escape.deleted
                    data:
                      type: object
                      additionalProperties: true
                      example: *a54
            examples:
              PlatformEvent_escape_deleted:
                summary: escape.deleted
                value: *a55
      responses:
        2XX:
          description: Consumer acknowledged the event.
  challenge.created:
    post:
      tags:
        - events
      summary: Challenge Created
      operationId: platformEventChallengeCreated
      description: >-
        Emitted when challenge created.


        Representative data fields: `escape_id`, `id`, `patient_id`,
        `situation_id`, `specific_fear_id`, `text`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - challenge.created
                    data:
                      type: object
                      additionalProperties: true
                      example: *a56
            examples:
              PlatformEvent_challenge_created:
                summary: challenge.created
                value: *a57
      responses:
        2XX:
          description: Consumer acknowledged the event.
  challenge.updated:
    post:
      tags:
        - events
      summary: Challenge Updated
      operationId: platformEventChallengeUpdated
      description: >-
        Emitted when challenge updated.


        Representative data fields: `escape_id`, `id`, `patient_id`,
        `situation_id`, `specific_fear_id`, `text`, `updated_fields`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - challenge.updated
                    data:
                      type: object
                      additionalProperties: true
                      example: *a58
            examples:
              PlatformEvent_challenge_updated:
                summary: challenge.updated
                value: *a59
      responses:
        2XX:
          description: Consumer acknowledged the event.
  challenge.deleted:
    post:
      tags:
        - events
      summary: Challenge Deleted
      operationId: platformEventChallengeDeleted
      description: >-
        Emitted when challenge deleted.


        Representative data fields: `escape_id`, `id`, `patient_id`,
        `situation_id`, `specific_fear_id`, `text`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - challenge.deleted
                    data:
                      type: object
                      additionalProperties: true
                      example: *a60
            examples:
              PlatformEvent_challenge_deleted:
                summary: challenge.deleted
                value: *a61
      responses:
        2XX:
          description: Consumer acknowledged the event.
  challenges_weight.updated:
    post:
      tags:
        - events
      summary: Challenges Weight Updated
      operationId: platformEventChallengesWeightUpdated
      description: >-
        Emitted when challenges weight updated.


        Representative data fields: `challenge_ids`, `patient_id`,
        `updated_fields`, `weights`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - challenges_weight.updated
                    data:
                      type: object
                      additionalProperties: true
                      example: *a62
            examples:
              PlatformEvent_challenges_weight_updated:
                summary: challenges_weight.updated
                value: *a63
      responses:
        2XX:
          description: Consumer acknowledged the event.
  challenges_tags.updated:
    post:
      tags:
        - events
      summary: Challenges Tags Updated
      operationId: platformEventChallengesTagsUpdated
      description: >-
        Emitted when challenges tags updated.


        Representative data fields: `challenge_id`, `patient_id`, `tag_ids`,
        `updated_fields`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - challenges_tags.updated
                    data:
                      type: object
                      additionalProperties: true
                      example: *a64
            examples:
              PlatformEvent_challenges_tags_updated:
                summary: challenges_tags.updated
                value: *a65
      responses:
        2XX:
          description: Consumer acknowledged the event.
  challenge_attempt.created:
    post:
      tags:
        - events
      summary: Challenge Attempt Created
      operationId: platformEventChallengeAttemptCreated
      description: >-
        Emitted when challenge attempt created.


        Representative data fields: `attempt`, `challenge_id`, `id`,
        `patient_id`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - challenge_attempt.created
                    data:
                      type: object
                      additionalProperties: true
                      example: *a66
            examples:
              PlatformEvent_challenge_attempt_created:
                summary: challenge_attempt.created
                value: *a67
      responses:
        2XX:
          description: Consumer acknowledged the event.
  challenge_attempt.updated:
    post:
      tags:
        - events
      summary: Challenge Attempt Updated
      operationId: platformEventChallengeAttemptUpdated
      description: >-
        Emitted when challenge attempt updated.


        Representative data fields: `attempt`, `challenge_id`, `id`,
        `patient_id`, `updated_fields`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - challenge_attempt.updated
                    data:
                      type: object
                      additionalProperties: true
                      example: *a68
            examples:
              PlatformEvent_challenge_attempt_updated:
                summary: challenge_attempt.updated
                value: *a69
      responses:
        2XX:
          description: Consumer acknowledged the event.
  challenge_attempt.deleted:
    post:
      tags:
        - events
      summary: Challenge Attempt Deleted
      operationId: platformEventChallengeAttemptDeleted
      description: >-
        Emitted when challenge attempt deleted.


        Representative data fields: `attempt`, `challenge_id`, `id`,
        `patient_id`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - challenge_attempt.deleted
                    data:
                      type: object
                      additionalProperties: true
                      example: *a70
            examples:
              PlatformEvent_challenge_attempt_deleted:
                summary: challenge_attempt.deleted
                value: *a71
      responses:
        2XX:
          description: Consumer acknowledged the event.
  challenge_content.created:
    post:
      tags:
        - events
      summary: Challenge Content Created
      operationId: platformEventChallengeContentCreated
      description: >-
        Emitted when challenge content created.


        Representative data fields: `content_type`, `id`, `tag_ids`, `title`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - challenge_content.created
                    data:
                      type: object
                      additionalProperties: true
                      example: *a72
            examples:
              PlatformEvent_challenge_content_created:
                summary: challenge_content.created
                value: *a73
      responses:
        2XX:
          description: Consumer acknowledged the event.
  challenge_content.updated:
    post:
      tags:
        - events
      summary: Challenge Content Updated
      operationId: platformEventChallengeContentUpdated
      description: >-
        Emitted when challenge content updated.


        Representative data fields: `content_type`, `id`, `tag_ids`, `title`,
        `updated_fields`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - challenge_content.updated
                    data:
                      type: object
                      additionalProperties: true
                      example: *a74
            examples:
              PlatformEvent_challenge_content_updated:
                summary: challenge_content.updated
                value: *a75
      responses:
        2XX:
          description: Consumer acknowledged the event.
  challenge_content.deleted:
    post:
      tags:
        - events
      summary: Challenge Content Deleted
      operationId: platformEventChallengeContentDeleted
      description: >-
        Emitted when challenge content deleted.


        Representative data fields: `content_type`, `id`, `tag_ids`, `title`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - challenge_content.deleted
                    data:
                      type: object
                      additionalProperties: true
                      example: *a76
            examples:
              PlatformEvent_challenge_content_deleted:
                summary: challenge_content.deleted
                value: *a77
      responses:
        2XX:
          description: Consumer acknowledged the event.
  patient_note.created:
    post:
      tags:
        - events
      summary: Patient Note Created
      operationId: platformEventPatientNoteCreated
      description: >-
        Emitted when patient note created.


        Representative data fields: `id`, `patient_id`, `text`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - patient_note.created
                    data:
                      type: object
                      additionalProperties: true
                      example: *a78
            examples:
              PlatformEvent_patient_note_created:
                summary: patient_note.created
                value: *a79
      responses:
        2XX:
          description: Consumer acknowledged the event.
  patient_note.updated:
    post:
      tags:
        - events
      summary: Patient Note Updated
      operationId: platformEventPatientNoteUpdated
      description: >-
        Emitted when patient note updated.


        Representative data fields: `id`, `patient_id`, `text`,
        `updated_fields`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - patient_note.updated
                    data:
                      type: object
                      additionalProperties: true
                      example: *a80
            examples:
              PlatformEvent_patient_note_updated:
                summary: patient_note.updated
                value: *a81
      responses:
        2XX:
          description: Consumer acknowledged the event.
  patient_note.deleted:
    post:
      tags:
        - events
      summary: Patient Note Deleted
      operationId: platformEventPatientNoteDeleted
      description: >-
        Emitted when patient note deleted.


        Representative data fields: `id`, `patient_id`, `text`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - patient_note.deleted
                    data:
                      type: object
                      additionalProperties: true
                      example: *a82
            examples:
              PlatformEvent_patient_note_deleted:
                summary: patient_note.deleted
                value: *a83
      responses:
        2XX:
          description: Consumer acknowledged the event.
  patient_upload.created:
    post:
      tags:
        - events
      summary: Patient Upload Created
      operationId: platformEventPatientUploadCreated
      description: >-
        Emitted when patient upload created.


        Representative data fields: `file_name`, `id`, `type`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - patient_upload.created
                    data:
                      type: object
                      additionalProperties: true
                      example: *a84
            examples:
              PlatformEvent_patient_upload_created:
                summary: patient_upload.created
                value: *a85
      responses:
        2XX:
          description: Consumer acknowledged the event.
  patient_upload.deleted:
    post:
      tags:
        - events
      summary: Patient Upload Deleted
      operationId: platformEventPatientUploadDeleted
      description: >-
        Emitted when patient upload deleted.


        Representative data fields: `file_name`, `id`, `type`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - patient_upload.deleted
                    data:
                      type: object
                      additionalProperties: true
                      example: *a86
            examples:
              PlatformEvent_patient_upload_deleted:
                summary: patient_upload.deleted
                value: *a87
      responses:
        2XX:
          description: Consumer acknowledged the event.
  patient_file.created:
    post:
      tags:
        - events
      summary: Patient File Created
      operationId: platformEventPatientFileCreated
      description: >-
        Emitted when patient file created.


        Representative data fields: `file_id`, `filename`, `id`, `patient_id`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - patient_file.created
                    data:
                      type: object
                      additionalProperties: true
                      example: *a88
            examples:
              PlatformEvent_patient_file_created:
                summary: patient_file.created
                value: *a89
      responses:
        2XX:
          description: Consumer acknowledged the event.
  patient_file.updated:
    post:
      tags:
        - events
      summary: Patient File Updated
      operationId: platformEventPatientFileUpdated
      description: >-
        Emitted when patient file updated.


        Representative data fields: `action`, `file_id`, `filename`, `id`,
        `patient_id`, `updated_fields`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - patient_file.updated
                    data:
                      type: object
                      additionalProperties: true
                      example: *a90
            examples:
              PlatformEvent_patient_file_updated:
                summary: patient_file.updated
                value: *a91
      responses:
        2XX:
          description: Consumer acknowledged the event.
  patient_file.deleted:
    post:
      tags:
        - events
      summary: Patient File Deleted
      operationId: platformEventPatientFileDeleted
      description: >-
        Emitted when patient file deleted.


        Representative data fields: `file_id`, `filename`, `id`, `patient_id`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - patient_file.deleted
                    data:
                      type: object
                      additionalProperties: true
                      example: *a92
            examples:
              PlatformEvent_patient_file_deleted:
                summary: patient_file.deleted
                value: *a93
      responses:
        2XX:
          description: Consumer acknowledged the event.
  file_review.created:
    post:
      tags:
        - events
      summary: File Review Created
      operationId: platformEventFileReviewCreated
      description: >-
        Emitted when file review created.


        Representative data fields: `file_id`, `file_reviewer_id`, `patient_id`,
        `reviewer_user_id`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - file_review.created
                    data:
                      type: object
                      additionalProperties: true
                      example: *a94
            examples:
              PlatformEvent_file_review_created:
                summary: file_review.created
                value: *a95
      responses:
        2XX:
          description: Consumer acknowledged the event.
  file_review.updated:
    post:
      tags:
        - events
      summary: File Review Updated
      operationId: platformEventFileReviewUpdated
      description: >-
        Emitted when file review updated.


        Representative data fields: `file_id`, `file_reviewer_id`, `patient_id`,
        `reviewer_user_id`, `updated_fields`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - file_review.updated
                    data:
                      type: object
                      additionalProperties: true
                      example: *a96
            examples:
              PlatformEvent_file_review_updated:
                summary: file_review.updated
                value: *a97
      responses:
        2XX:
          description: Consumer acknowledged the event.
  file_review.deleted:
    post:
      tags:
        - events
      summary: File Review Deleted
      operationId: platformEventFileReviewDeleted
      description: >-
        Emitted when file review deleted.


        Representative data fields: `file_id`, `file_reviewer_id`, `patient_id`,
        `reviewer_user_id`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - file_review.deleted
                    data:
                      type: object
                      additionalProperties: true
                      example: *a98
            examples:
              PlatformEvent_file_review_deleted:
                summary: file_review.deleted
                value: *a99
      responses:
        2XX:
          description: Consumer acknowledged the event.
  insurance_review.created:
    post:
      tags:
        - events
      summary: Insurance Review Created
      operationId: platformEventInsuranceReviewCreated
      description: >-
        Emitted when insurance review created.


        Representative data fields: `insurance_id`, `insurance_review_id`,
        `patient_id`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - insurance_review.created
                    data:
                      type: object
                      additionalProperties: true
                      example: *a100
            examples:
              PlatformEvent_insurance_review_created:
                summary: insurance_review.created
                value: *a101
      responses:
        2XX:
          description: Consumer acknowledged the event.
  insurance_review.updated:
    post:
      tags:
        - events
      summary: Insurance Review Updated
      operationId: platformEventInsuranceReviewUpdated
      description: >-
        Emitted when insurance review updated.


        Representative data fields: `insurance_id`, `insurance_review_id`,
        `patient_id`, `updated_fields`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - insurance_review.updated
                    data:
                      type: object
                      additionalProperties: true
                      example: *a102
            examples:
              PlatformEvent_insurance_review_updated:
                summary: insurance_review.updated
                value: *a103
      responses:
        2XX:
          description: Consumer acknowledged the event.
  insurance_review.completed:
    post:
      tags:
        - events
      summary: Insurance Review Completed
      operationId: platformEventInsuranceReviewCompleted
      description: >-
        Emitted when insurance review completed.


        Representative data fields: `insurance_id`, `insurance_review_id`,
        `patient_id`, `status`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - insurance_review.completed
                    data:
                      type: object
                      additionalProperties: true
                      example: *a104
            examples:
              PlatformEvent_insurance_review_completed:
                summary: insurance_review.completed
                value: *a105
      responses:
        2XX:
          description: Consumer acknowledged the event.
  treatment_plan.updated:
    post:
      tags:
        - events
      summary: Treatment Plan Updated
      operationId: platformEventTreatmentPlanUpdated
      description: >-
        Emitted when treatment plan updated.


        Representative data fields: `id`, `patient_id`, `text`,
        `updated_fields`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - treatment_plan.updated
                    data:
                      type: object
                      additionalProperties: true
                      example: *a106
            examples:
              PlatformEvent_treatment_plan_updated:
                summary: treatment_plan.updated
                value: *a107
      responses:
        2XX:
          description: Consumer acknowledged the event.
  tag.created:
    post:
      tags:
        - events
      summary: Tag Created
      operationId: platformEventTagCreated
      description: >-
        Emitted when tag created.


        Representative data fields: `id`, `patient_id`, `tag`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - tag.created
                    data:
                      type: object
                      additionalProperties: true
                      example: *a108
            examples:
              PlatformEvent_tag_created:
                summary: tag.created
                value: *a109
      responses:
        2XX:
          description: Consumer acknowledged the event.
  tag.updated:
    post:
      tags:
        - events
      summary: Tag Updated
      operationId: platformEventTagUpdated
      description: >-
        Emitted when tag updated.


        Representative data fields: `id`, `patient_id`, `tag`, `updated_fields`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - tag.updated
                    data:
                      type: object
                      additionalProperties: true
                      example: *a110
            examples:
              PlatformEvent_tag_updated:
                summary: tag.updated
                value: *a111
      responses:
        2XX:
          description: Consumer acknowledged the event.
  tag.deleted:
    post:
      tags:
        - events
      summary: Tag Deleted
      operationId: platformEventTagDeleted
      description: >-
        Emitted when tag deleted.


        Representative data fields: `id`, `patient_id`, `tag`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - tag.deleted
                    data:
                      type: object
                      additionalProperties: true
                      example: *a112
            examples:
              PlatformEvent_tag_deleted:
                summary: tag.deleted
                value: *a113
      responses:
        2XX:
          description: Consumer acknowledged the event.
  user.created:
    post:
      tags:
        - events
      summary: User Created
      operationId: platformEventUserCreated
      description: >-
        Emitted when user created.


        Representative data fields: `email`, `first_name`, `id`, `last_name`,
        `user_id`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - user.created
                    data:
                      type: object
                      additionalProperties: true
                      example: *a114
            examples:
              PlatformEvent_user_created:
                summary: user.created
                value: *a115
      responses:
        2XX:
          description: Consumer acknowledged the event.
  user.updated:
    post:
      tags:
        - events
      summary: User Updated
      operationId: platformEventUserUpdated
      description: >-
        Emitted when user updated.


        Representative data fields: `email`, `first_name`, `id`, `last_name`,
        `updated_fields`, `user_id`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - user.updated
                    data:
                      type: object
                      additionalProperties: true
                      example: *a116
            examples:
              PlatformEvent_user_updated:
                summary: user.updated
                value: *a117
      responses:
        2XX:
          description: Consumer acknowledged the event.
  user.calendar_sync_enabled:
    post:
      tags:
        - events
      summary: User Calendar Sync Enabled
      operationId: platformEventUserCalendarSyncEnabled
      description: >-
        Emitted when user calendar sync enabled.


        Representative data fields: `calendar_sync_enabled`, `email`,
        `first_name`, `id`, `last_name`, `user_id`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - user.calendar_sync_enabled
                    data:
                      type: object
                      additionalProperties: true
                      example: *a118
            examples:
              PlatformEvent_user_calendar_sync_enabled:
                summary: user.calendar_sync_enabled
                value: *a119
      responses:
        2XX:
          description: Consumer acknowledged the event.
  user.calendar_sync_disabled:
    post:
      tags:
        - events
      summary: User Calendar Sync Disabled
      operationId: platformEventUserCalendarSyncDisabled
      description: >-
        Emitted when user calendar sync disabled.


        Representative data fields: `calendar_sync_enabled`, `email`,
        `first_name`, `id`, `last_name`, `user_id`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - user.calendar_sync_disabled
                    data:
                      type: object
                      additionalProperties: true
                      example: *a120
            examples:
              PlatformEvent_user_calendar_sync_disabled:
                summary: user.calendar_sync_disabled
                value: *a121
      responses:
        2XX:
          description: Consumer acknowledged the event.
  treatment_note.created:
    post:
      tags:
        - events
      summary: Treatment Note Created
      operationId: platformEventTreatmentNoteCreated
      description: >-
        Emitted when treatment note created.


        Representative data fields: `appointment_id`, `cliniko_appointment_id`,
        `cliniko_treatment_note_id`, `draft`, `id`, `internal_appointment_id`,
        `internal_treatment_note_id`, `patient_id`, `treatment_note_id`,
        `user_id`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - treatment_note.created
                    data:
                      type: object
                      additionalProperties: true
                      example: *a122
            examples:
              PlatformEvent_treatment_note_created:
                summary: treatment_note.created
                value: *a123
      responses:
        2XX:
          description: Consumer acknowledged the event.
  treatment_note.updated:
    post:
      tags:
        - events
      summary: Treatment Note Updated
      operationId: platformEventTreatmentNoteUpdated
      description: >-
        Emitted when treatment note updated.


        Representative data fields: `appointment_id`, `cliniko_appointment_id`,
        `cliniko_treatment_note_id`, `draft`, `id`, `internal_appointment_id`,
        `internal_treatment_note_id`, `patient_id`, `treatment_note_id`,
        `updated_fields`, `user_id`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - treatment_note.updated
                    data:
                      type: object
                      additionalProperties: true
                      example: *a124
            examples:
              PlatformEvent_treatment_note_updated:
                summary: treatment_note.updated
                value: *a125
      responses:
        2XX:
          description: Consumer acknowledged the event.
  treatment_note.deleted:
    post:
      tags:
        - events
      summary: Treatment Note Deleted
      operationId: platformEventTreatmentNoteDeleted
      description: >-
        Emitted when treatment note deleted.


        Representative data fields: `appointment_id`, `cliniko_appointment_id`,
        `cliniko_treatment_note_id`, `draft`, `id`, `internal_appointment_id`,
        `internal_treatment_note_id`, `patient_id`, `treatment_note_id`,
        `user_id`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - treatment_note.deleted
                    data:
                      type: object
                      additionalProperties: true
                      example: *a126
            examples:
              PlatformEvent_treatment_note_deleted:
                summary: treatment_note.deleted
                value: *a127
      responses:
        2XX:
          description: Consumer acknowledged the event.
  treatment_note.finalized:
    post:
      tags:
        - events
      summary: Treatment Note Finalized
      operationId: platformEventTreatmentNoteFinalized
      description: >-
        Emitted when treatment note finalized.


        Representative data fields: `appointment_id`, `cliniko_appointment_id`,
        `cliniko_treatment_note_id`, `draft`, `first_finalized_at`, `id`,
        `internal_appointment_id`, `internal_treatment_note_id`, `patient_id`,
        `treatment_note_id`, `user_id`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - treatment_note.finalized
                    data:
                      type: object
                      additionalProperties: true
                      example: *a128
            examples:
              PlatformEvent_treatment_note_finalized:
                summary: treatment_note.finalized
                value: *a129
      responses:
        2XX:
          description: Consumer acknowledged the event.
  user.task_created:
    post:
      tags:
        - events
      summary: User Task Created
      operationId: platformEventUserTaskCreated
      description: >-
        Emitted when user task created.


        Representative data fields: `email`, `first_name`, `id`, `last_name`,
        `patient_id`, `title`, `type`, `user_id`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - user.task_created
                    data:
                      type: object
                      additionalProperties: true
                      example: *a130
            examples:
              PlatformEvent_user_task_created:
                summary: user.task_created
                value: *a131
      responses:
        2XX:
          description: Consumer acknowledged the event.
  user.task_completed:
    post:
      tags:
        - events
      summary: User Task Completed
      operationId: platformEventUserTaskCompleted
      description: >-
        Emitted when user task completed.


        Representative data fields: `email`, `first_name`, `id`, `last_name`,
        `patient_id`, `status`, `user_id`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - user.task_completed
                    data:
                      type: object
                      additionalProperties: true
                      example: *a132
            examples:
              PlatformEvent_user_task_completed:
                summary: user.task_completed
                value: *a133
      responses:
        2XX:
          description: Consumer acknowledged the event.
  user.task_reassigned:
    post:
      tags:
        - events
      summary: User Task Reassigned
      operationId: platformEventUserTaskReassigned
      description: >-
        Emitted when user task reassigned.


        Representative data fields: `email`, `first_name`, `id`, `last_name`,
        `user_id`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - user.task_reassigned
                    data:
                      type: object
                      additionalProperties: true
                      example: *a134
            examples:
              PlatformEvent_user_task_reassigned:
                summary: user.task_reassigned
                value: *a135
      responses:
        2XX:
          description: Consumer acknowledged the event.
  approved_treatment_note.created:
    post:
      tags:
        - events
      summary: Approved Treatment Note Created
      operationId: platformEventApprovedTreatmentNoteCreated
      description: >-
        Emitted when approved treatment note created.


        Representative data fields: `appointment_id`, `date_of_service`, `id`,
        `patient_id`, `primary_billing_code`, `treatment_note_id`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - approved_treatment_note.created
                    data:
                      type: object
                      additionalProperties: true
                      example: *a136
            examples:
              PlatformEvent_approved_treatment_note_created:
                summary: approved_treatment_note.created
                value: *a137
      responses:
        2XX:
          description: Consumer acknowledged the event.
  approved_treatment_note.updated:
    post:
      tags:
        - events
      summary: Approved Treatment Note Updated
      operationId: platformEventApprovedTreatmentNoteUpdated
      description: >-
        Emitted when approved treatment note updated.


        Representative data fields: `appointment_id`, `date_of_service`, `id`,
        `patient_id`, `primary_billing_code`, `treatment_note_id`,
        `updated_fields`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - approved_treatment_note.updated
                    data:
                      type: object
                      additionalProperties: true
                      example: *a138
            examples:
              PlatformEvent_approved_treatment_note_updated:
                summary: approved_treatment_note.updated
                value: *a139
      responses:
        2XX:
          description: Consumer acknowledged the event.
  approved_treatment_note.deleted:
    post:
      tags:
        - events
      summary: Approved Treatment Note Deleted
      operationId: platformEventApprovedTreatmentNoteDeleted
      description: >-
        Emitted when approved treatment note deleted.


        Representative data fields: `appointment_id`, `date_of_service`, `id`,
        `patient_id`, `primary_billing_code`, `treatment_note_id`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - approved_treatment_note.deleted
                    data:
                      type: object
                      additionalProperties: true
                      example: *a140
            examples:
              PlatformEvent_approved_treatment_note_deleted:
                summary: approved_treatment_note.deleted
                value: *a141
      responses:
        2XX:
          description: Consumer acknowledged the event.
  approved_treatment_note.reprocess_claim:
    post:
      tags:
        - events
      summary: Approved Treatment Note Reprocess Claim
      operationId: platformEventApprovedTreatmentNoteReprocessClaim
      description: >-
        Emitted when approved treatment note reprocess claim.


        Representative data fields: `appointment_id`, `date_of_service`, `id`,
        `patient_id`, `primary_billing_code`, `requested_at`,
        `treatment_note_id`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - approved_treatment_note.reprocess_claim
                    data:
                      type: object
                      additionalProperties: true
                      example: *a142
            examples:
              PlatformEvent_approved_treatment_note_reprocess_claim:
                summary: approved_treatment_note.reprocess_claim
                value: *a143
      responses:
        2XX:
          description: Consumer acknowledged the event.
  insurance.created:
    post:
      tags:
        - events
      summary: Insurance Created
      operationId: platformEventInsuranceCreated
      description: >-
        Emitted when insurance created.


        Representative data fields: `id`, `member_id`, `patient_id`,
        `provider_name`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - insurance.created
                    data:
                      type: object
                      additionalProperties: true
                      example: *a144
            examples:
              PlatformEvent_insurance_created:
                summary: insurance.created
                value: *a145
      responses:
        2XX:
          description: Consumer acknowledged the event.
  insurance.updated:
    post:
      tags:
        - events
      summary: Insurance Updated
      operationId: platformEventInsuranceUpdated
      description: >-
        Emitted when insurance updated.


        Representative data fields: `id`, `member_id`, `patient_id`,
        `provider_name`, `updated_fields`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - insurance.updated
                    data:
                      type: object
                      additionalProperties: true
                      example: *a146
            examples:
              PlatformEvent_insurance_updated:
                summary: insurance.updated
                value: *a147
      responses:
        2XX:
          description: Consumer acknowledged the event.
  insurance.deleted:
    post:
      tags:
        - events
      summary: Insurance Deleted
      operationId: platformEventInsuranceDeleted
      description: >-
        Emitted when insurance deleted.


        Representative data fields: `id`, `member_id`, `patient_id`,
        `provider_name`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - insurance.deleted
                    data:
                      type: object
                      additionalProperties: true
                      example: *a148
            examples:
              PlatformEvent_insurance_deleted:
                summary: insurance.deleted
                value: *a149
      responses:
        2XX:
          description: Consumer acknowledged the event.
  family.created:
    post:
      tags:
        - events
      summary: Family Created
      operationId: platformEventFamilyCreated
      description: >-
        Emitted when family created.


        Representative data fields: `id`, `name`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - family.created
                    data:
                      type: object
                      additionalProperties: true
                      example: *a150
            examples:
              PlatformEvent_family_created:
                summary: family.created
                value: *a151
      responses:
        2XX:
          description: Consumer acknowledged the event.
  family.deleted:
    post:
      tags:
        - events
      summary: Family Deleted
      operationId: platformEventFamilyDeleted
      description: >-
        Emitted when family deleted.


        Representative data fields: `id`, `name`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - family.deleted
                    data:
                      type: object
                      additionalProperties: true
                      example: *a152
            examples:
              PlatformEvent_family_deleted:
                summary: family.deleted
                value: *a153
      responses:
        2XX:
          description: Consumer acknowledged the event.
  family_member.created:
    post:
      tags:
        - events
      summary: Family Member Created
      operationId: platformEventFamilyMemberCreated
      description: >-
        Emitted when family member created.


        Representative data fields: `family_id`, `id`, `patient_id`, `role`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - family_member.created
                    data:
                      type: object
                      additionalProperties: true
                      example: *a154
            examples:
              PlatformEvent_family_member_created:
                summary: family_member.created
                value: *a155
      responses:
        2XX:
          description: Consumer acknowledged the event.
  family_member.deleted:
    post:
      tags:
        - events
      summary: Family Member Deleted
      operationId: platformEventFamilyMemberDeleted
      description: >-
        Emitted when family member deleted.


        Representative data fields: `family_id`, `id`, `patient_id`, `role`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - family_member.deleted
                    data:
                      type: object
                      additionalProperties: true
                      example: *a156
            examples:
              PlatformEvent_family_member_deleted:
                summary: family_member.deleted
                value: *a157
      responses:
        2XX:
          description: Consumer acknowledged the event.
  family_member_role.updated:
    post:
      tags:
        - events
      summary: Family Member Role Updated
      operationId: platformEventFamilyMemberRoleUpdated
      description: >-
        Emitted when family member role updated.


        Representative data fields: `familyMemberId`, `family_id`, `patient_id`,
        `role`, `updated_fields`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - family_member_role.updated
                    data:
                      type: object
                      additionalProperties: true
                      example: *a158
            examples:
              PlatformEvent_family_member_role_updated:
                summary: family_member_role.updated
                value: *a159
      responses:
        2XX:
          description: Consumer acknowledged the event.
  outreach.sent:
    post:
      tags:
        - events
      summary: Outreach Sent
      operationId: platformEventOutreachSent
      description: >-
        Emitted when outreach sent.


        Representative data fields: `outreach_event_id`,
        `outreach_instance_group_id`, `outreach_type`, `participant_patient_id`,
        `patient_id`, `schedule_name`, `sent_at`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - outreach.sent
                    data:
                      type: object
                      additionalProperties: true
                      example: *a160
            examples:
              PlatformEvent_outreach_sent:
                summary: outreach.sent
                value: *a161
      responses:
        2XX:
          description: Consumer acknowledged the event.
  referral_source_type.created:
    post:
      tags:
        - events
      summary: Referral Source Type Created
      operationId: platformEventReferralSourceTypeCreated
      description: >-
        Emitted when referral source type created.


        Representative data fields: `id`, `referral_source_type`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - referral_source_type.created
                    data:
                      type: object
                      additionalProperties: true
                      example: *a162
            examples:
              PlatformEvent_referral_source_type_created:
                summary: referral_source_type.created
                value: *a163
      responses:
        2XX:
          description: Consumer acknowledged the event.
  referral_source_type.updated:
    post:
      tags:
        - events
      summary: Referral Source Type Updated
      operationId: platformEventReferralSourceTypeUpdated
      description: >-
        Emitted when referral source type updated.


        Representative data fields: `id`, `referral_source_type`,
        `updated_fields`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - referral_source_type.updated
                    data:
                      type: object
                      additionalProperties: true
                      example: *a164
            examples:
              PlatformEvent_referral_source_type_updated:
                summary: referral_source_type.updated
                value: *a165
      responses:
        2XX:
          description: Consumer acknowledged the event.
  referral_source.created:
    post:
      tags:
        - events
      summary: Referral Source Created
      operationId: platformEventReferralSourceCreated
      description: >-
        Emitted when referral source created.


        Representative data fields: `id`, `referral_source`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - referral_source.created
                    data:
                      type: object
                      additionalProperties: true
                      example: *a166
            examples:
              PlatformEvent_referral_source_created:
                summary: referral_source.created
                value: *a167
      responses:
        2XX:
          description: Consumer acknowledged the event.
  referral_source.updated:
    post:
      tags:
        - events
      summary: Referral Source Updated
      operationId: platformEventReferralSourceUpdated
      description: >-
        Emitted when referral source updated.


        Representative data fields: `id`, `referral_source`, `updated_fields`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - referral_source.updated
                    data:
                      type: object
                      additionalProperties: true
                      example: *a168
            examples:
              PlatformEvent_referral_source_updated:
                summary: referral_source.updated
                value: *a169
      responses:
        2XX:
          description: Consumer acknowledged the event.
  patient_eligibility.created:
    post:
      tags:
        - events
      summary: Patient Eligibility Created
      operationId: platformEventPatientEligibilityCreated
      description: >-
        Emitted when patient eligibility created.


        Representative data fields: `insurance_id`, `patient_eligibility_id`,
        `patient_id`, `status`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - patient_eligibility.created
                    data:
                      type: object
                      additionalProperties: true
                      example: *a170
            examples:
              PlatformEvent_patient_eligibility_created:
                summary: patient_eligibility.created
                value: *a171
      responses:
        2XX:
          description: Consumer acknowledged the event.
  patient_eligibility.updated:
    post:
      tags:
        - events
      summary: Patient Eligibility Updated
      operationId: platformEventPatientEligibilityUpdated
      description: >-
        Emitted when patient eligibility updated.


        Representative data fields: `insurance_id`, `patient_eligibility_id`,
        `patient_id`, `status`, `updated_fields`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - patient_eligibility.updated
                    data:
                      type: object
                      additionalProperties: true
                      example: *a172
            examples:
              PlatformEvent_patient_eligibility_updated:
                summary: patient_eligibility.updated
                value: *a173
      responses:
        2XX:
          description: Consumer acknowledged the event.
  intakeq_form.submission:
    post:
      tags:
        - events
      summary: Intakeq Form Submission
      operationId: platformEventIntakeqFormSubmission
      description: >-
        Emitted when intakeq form submission.


        Representative data fields: `form_name`, `intakeq_form_id`,
        `patient_id`, `submitted_at`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - intakeq_form.submission
                    data:
                      type: object
                      additionalProperties: true
                      example: *a174
            examples:
              PlatformEvent_intakeq_form_submission:
                summary: intakeq_form.submission
                value: *a175
      responses:
        2XX:
          description: Consumer acknowledged the event.
  form_instance.submission:
    post:
      tags:
        - events
      summary: Form Instance Submission
      operationId: platformEventFormInstanceSubmission
      description: >-
        Emitted when form instance submission.


        Representative data fields: `form_instance_id`, `form_template_id`,
        `form_template_slug`, `id`, `patient_id`, `submitted_at`,
        `system_form_category`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - form_instance.submission
                    data:
                      type: object
                      additionalProperties: true
                      example: *a176
            examples:
              PlatformEvent_form_instance_submission:
                summary: form_instance.submission
                value: *a177
      responses:
        2XX:
          description: Consumer acknowledged the event.
  assessment_form_response.created:
    post:
      tags:
        - events
      summary: Assessment Form Response Created
      operationId: platformEventAssessmentFormResponseCreated
      description: >-
        Emitted when assessment form response created.


        Representative data fields: `completed_at`, `form_template_id`, `id`,
        `patient_id`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - assessment_form_response.created
                    data:
                      type: object
                      additionalProperties: true
                      example: *a178
            examples:
              PlatformEvent_assessment_form_response_created:
                summary: assessment_form_response.created
                value: *a179
      responses:
        2XX:
          description: Consumer acknowledged the event.
  assessment_form_response.updated:
    post:
      tags:
        - events
      summary: Assessment Form Response Updated
      operationId: platformEventAssessmentFormResponseUpdated
      description: >-
        Emitted when assessment form response updated.


        Representative data fields: `completed_at`, `form_template_id`, `id`,
        `patient_id`, `updated_fields`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - assessment_form_response.updated
                    data:
                      type: object
                      additionalProperties: true
                      example: *a180
            examples:
              PlatformEvent_assessment_form_response_updated:
                summary: assessment_form_response.updated
                value: *a181
      responses:
        2XX:
          description: Consumer acknowledged the event.
  assessment_form_response.archived:
    post:
      tags:
        - events
      summary: Assessment Form Response Archived
      operationId: platformEventAssessmentFormResponseArchived
      description: >-
        Emitted when assessment form response archived.


        Representative data fields: `archived_at`, `completed_at`,
        `form_template_id`, `id`, `patient_id`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - assessment_form_response.archived
                    data:
                      type: object
                      additionalProperties: true
                      example: *a182
            examples:
              PlatformEvent_assessment_form_response_archived:
                summary: assessment_form_response.archived
                value: *a183
      responses:
        2XX:
          description: Consumer acknowledged the event.
  homework_assignment.created:
    post:
      tags:
        - events
      summary: Homework Assignment Created
      operationId: platformEventHomeworkAssignmentCreated
      description: >-
        Emitted when homework assignment created.


        Representative data fields: `challenge_id`, `created_by_user_id`, `id`,
        `patient_id`, `text`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - homework_assignment.created
                    data:
                      type: object
                      additionalProperties: true
                      example: *a184
            examples:
              PlatformEvent_homework_assignment_created:
                summary: homework_assignment.created
                value: *a185
      responses:
        2XX:
          description: Consumer acknowledged the event.
  homework_assignment.updated:
    post:
      tags:
        - events
      summary: Homework Assignment Updated
      operationId: platformEventHomeworkAssignmentUpdated
      description: >-
        Emitted when homework assignment updated.


        Representative data fields: `challenge_id`, `created_by_user_id`, `id`,
        `patient_id`, `text`, `updated_fields`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - homework_assignment.updated
                    data:
                      type: object
                      additionalProperties: true
                      example: *a186
            examples:
              PlatformEvent_homework_assignment_updated:
                summary: homework_assignment.updated
                value: *a187
      responses:
        2XX:
          description: Consumer acknowledged the event.
  homework_assignment.deleted:
    post:
      tags:
        - events
      summary: Homework Assignment Deleted
      operationId: platformEventHomeworkAssignmentDeleted
      description: >-
        Emitted when homework assignment deleted.


        Representative data fields: `challenge_id`, `created_by_user_id`, `id`,
        `patient_id`, `text`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - homework_assignment.deleted
                    data:
                      type: object
                      additionalProperties: true
                      example: *a188
            examples:
              PlatformEvent_homework_assignment_deleted:
                summary: homework_assignment.deleted
                value: *a189
      responses:
        2XX:
          description: Consumer acknowledged the event.
  team.created:
    post:
      tags:
        - events
      summary: Team Created
      operationId: platformEventTeamCreated
      description: >-
        Emitted when team created.


        Representative data fields: `color`, `id`, `is_external`, `name`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - team.created
                    data:
                      type: object
                      additionalProperties: true
                      example: *a190
            examples:
              PlatformEvent_team_created:
                summary: team.created
                value: *a191
      responses:
        2XX:
          description: Consumer acknowledged the event.
  team.updated:
    post:
      tags:
        - events
      summary: Team Updated
      operationId: platformEventTeamUpdated
      description: >-
        Emitted when team updated.


        Representative data fields: `color`, `id`, `is_external`, `name`,
        `updated_fields`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - team.updated
                    data:
                      type: object
                      additionalProperties: true
                      example: *a192
            examples:
              PlatformEvent_team_updated:
                summary: team.updated
                value: *a193
      responses:
        2XX:
          description: Consumer acknowledged the event.
  team.deleted:
    post:
      tags:
        - events
      summary: Team Deleted
      operationId: platformEventTeamDeleted
      description: >-
        Emitted when team deleted.


        Representative data fields: `color`, `id`, `is_external`, `name`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - team.deleted
                    data:
                      type: object
                      additionalProperties: true
                      example: *a194
            examples:
              PlatformEvent_team_deleted:
                summary: team.deleted
                value: *a195
      responses:
        2XX:
          description: Consumer acknowledged the event.
  team_member.created:
    post:
      tags:
        - events
      summary: Team Member Created
      operationId: platformEventTeamMemberCreated
      description: >-
        Emitted when team member created.


        Representative data fields: `id`, `team_id`, `user_id`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - team_member.created
                    data:
                      type: object
                      additionalProperties: true
                      example: *a196
            examples:
              PlatformEvent_team_member_created:
                summary: team_member.created
                value: *a197
      responses:
        2XX:
          description: Consumer acknowledged the event.
  team_member.deleted:
    post:
      tags:
        - events
      summary: Team Member Deleted
      operationId: platformEventTeamMemberDeleted
      description: >-
        Emitted when team member deleted.


        Representative data fields: `id`, `team_id`, `user_id`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - team_member.deleted
                    data:
                      type: object
                      additionalProperties: true
                      example: *a198
            examples:
              PlatformEvent_team_member_deleted:
                summary: team_member.deleted
                value: *a199
      responses:
        2XX:
          description: Consumer acknowledged the event.
  episode_of_care.created:
    post:
      tags:
        - events
      summary: Episode Of Care Created
      operationId: platformEventEpisodeOfCareCreated
      description: >-
        Emitted when episode of care created.


        Representative data fields: `id`, `patient_id`, `status`, `team_id`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - episode_of_care.created
                    data:
                      type: object
                      additionalProperties: true
                      example: *a200
            examples:
              PlatformEvent_episode_of_care_created:
                summary: episode_of_care.created
                value: *a201
      responses:
        2XX:
          description: Consumer acknowledged the event.
  episode_of_care.updated:
    post:
      tags:
        - events
      summary: Episode Of Care Updated
      operationId: platformEventEpisodeOfCareUpdated
      description: >-
        Emitted when episode of care updated.


        Representative data fields: `id`, `patient_id`, `status`, `team_id`,
        `updated_fields`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - episode_of_care.updated
                    data:
                      type: object
                      additionalProperties: true
                      example: *a202
            examples:
              PlatformEvent_episode_of_care_updated:
                summary: episode_of_care.updated
                value: *a203
      responses:
        2XX:
          description: Consumer acknowledged the event.
  episode_of_care.deleted:
    post:
      tags:
        - events
      summary: Episode Of Care Deleted
      operationId: platformEventEpisodeOfCareDeleted
      description: >-
        Emitted when episode of care deleted.


        Representative data fields: `id`, `patient_id`, `status`, `team_id`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - episode_of_care.deleted
                    data:
                      type: object
                      additionalProperties: true
                      example: *a204
            examples:
              PlatformEvent_episode_of_care_deleted:
                summary: episode_of_care.deleted
                value: *a205
      responses:
        2XX:
          description: Consumer acknowledged the event.
  queue_item.created:
    post:
      tags:
        - events
      summary: Queue Item Created
      operationId: platformEventQueueItemCreated
      description: >-
        Emitted when queue item created.


        Representative data fields: `episode_of_care_id`, `id`, `patient_id`,
        `team_id`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - queue_item.created
                    data:
                      type: object
                      additionalProperties: true
                      example: *a206
            examples:
              PlatformEvent_queue_item_created:
                summary: queue_item.created
                value: *a207
      responses:
        2XX:
          description: Consumer acknowledged the event.
  queue_item.accepted:
    post:
      tags:
        - events
      summary: Queue Item Accepted
      operationId: platformEventQueueItemAccepted
      description: >-
        Emitted when queue item accepted.


        Representative data fields: `episode_of_care_id`, `id`, `patient_id`,
        `status`, `team_id`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - queue_item.accepted
                    data:
                      type: object
                      additionalProperties: true
                      example: *a208
            examples:
              PlatformEvent_queue_item_accepted:
                summary: queue_item.accepted
                value: *a209
      responses:
        2XX:
          description: Consumer acknowledged the event.
  queue_item.rejected:
    post:
      tags:
        - events
      summary: Queue Item Rejected
      operationId: platformEventQueueItemRejected
      description: >-
        Emitted when queue item rejected.


        Representative data fields: `episode_of_care_id`, `id`, `patient_id`,
        `rejection_reason`, `status`, `team_id`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - queue_item.rejected
                    data:
                      type: object
                      additionalProperties: true
                      example: *a210
            examples:
              PlatformEvent_queue_item_rejected:
                summary: queue_item.rejected
                value: *a211
      responses:
        2XX:
          description: Consumer acknowledged the event.
  location.created:
    post:
      tags:
        - events
      summary: Location Created
      operationId: platformEventLocationCreated
      description: >-
        Emitted when location created.


        Representative data fields: `address_1`, `city`, `id`, `name`, `state`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - location.created
                    data:
                      type: object
                      additionalProperties: true
                      example: *a212
            examples:
              PlatformEvent_location_created:
                summary: location.created
                value: *a213
      responses:
        2XX:
          description: Consumer acknowledged the event.
  location.updated:
    post:
      tags:
        - events
      summary: Location Updated
      operationId: platformEventLocationUpdated
      description: >-
        Emitted when location updated.


        Representative data fields: `address_1`, `city`, `id`, `name`, `state`,
        `updated_fields`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - location.updated
                    data:
                      type: object
                      additionalProperties: true
                      example: *a214
            examples:
              PlatformEvent_location_updated:
                summary: location.updated
                value: *a215
      responses:
        2XX:
          description: Consumer acknowledged the event.
  location.deleted:
    post:
      tags:
        - events
      summary: Location Deleted
      operationId: platformEventLocationDeleted
      description: >-
        Emitted when location deleted.


        Representative data fields: `address_1`, `city`, `id`, `name`, `state`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - location.deleted
                    data:
                      type: object
                      additionalProperties: true
                      example: *a216
            examples:
              PlatformEvent_location_deleted:
                summary: location.deleted
                value: *a217
      responses:
        2XX:
          description: Consumer acknowledged the event.
  setting.created:
    post:
      tags:
        - events
      summary: Setting Created
      operationId: platformEventSettingCreated
      description: >-
        Emitted when setting created.


        Representative data fields: `id`, `name`, `value`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - setting.created
                    data:
                      type: object
                      additionalProperties: true
                      example: *a218
            examples:
              PlatformEvent_setting_created:
                summary: setting.created
                value: *a219
      responses:
        2XX:
          description: Consumer acknowledged the event.
  setting.updated:
    post:
      tags:
        - events
      summary: Setting Updated
      operationId: platformEventSettingUpdated
      description: >-
        Emitted when setting updated.


        Representative data fields: `id`, `name`, `updated_fields`, `value`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - setting.updated
                    data:
                      type: object
                      additionalProperties: true
                      example: *a220
            examples:
              PlatformEvent_setting_updated:
                summary: setting.updated
                value: *a221
      responses:
        2XX:
          description: Consumer acknowledged the event.
  setting.deleted:
    post:
      tags:
        - events
      summary: Setting Deleted
      operationId: platformEventSettingDeleted
      description: >-
        Emitted when setting deleted.


        Representative data fields: `id`, `name`, `value`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - setting.deleted
                    data:
                      type: object
                      additionalProperties: true
                      example: *a222
            examples:
              PlatformEvent_setting_deleted:
                summary: setting.deleted
                value: *a223
      responses:
        2XX:
          description: Consumer acknowledged the event.
  automation.created:
    post:
      tags:
        - events
      summary: Automation Created
      operationId: platformEventAutomationCreated
      description: >-
        Emitted when automation created.


        Representative data fields: `enabled`, `id`, `name`, `trigger_type`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - automation.created
                    data:
                      type: object
                      additionalProperties: true
                      example: *a224
            examples:
              PlatformEvent_automation_created:
                summary: automation.created
                value: *a225
      responses:
        2XX:
          description: Consumer acknowledged the event.
  automation.updated:
    post:
      tags:
        - events
      summary: Automation Updated
      operationId: platformEventAutomationUpdated
      description: >-
        Emitted when automation updated.


        Representative data fields: `enabled`, `id`, `name`, `trigger_type`,
        `updated_fields`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - automation.updated
                    data:
                      type: object
                      additionalProperties: true
                      example: *a226
            examples:
              PlatformEvent_automation_updated:
                summary: automation.updated
                value: *a227
      responses:
        2XX:
          description: Consumer acknowledged the event.
  automation.archived:
    post:
      tags:
        - events
      summary: Automation Archived
      operationId: platformEventAutomationArchived
      description: >-
        Emitted when automation archived.


        Representative data fields: `archived_at`, `enabled`, `id`, `name`,
        `trigger_type`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - automation.archived
                    data:
                      type: object
                      additionalProperties: true
                      example: *a228
            examples:
              PlatformEvent_automation_archived:
                summary: automation.archived
                value: *a229
      responses:
        2XX:
          description: Consumer acknowledged the event.
  automation.enabled_updated:
    post:
      tags:
        - events
      summary: Automation Enabled Updated
      operationId: platformEventAutomationEnabledUpdated
      description: >-
        Emitted when automation enabled updated.


        Representative data fields: `enabled`, `id`, `name`, `trigger_type`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - automation.enabled_updated
                    data:
                      type: object
                      additionalProperties: true
                      example: *a230
            examples:
              PlatformEvent_automation_enabled_updated:
                summary: automation.enabled_updated
                value: *a231
      responses:
        2XX:
          description: Consumer acknowledged the event.
  automation_workflow.queued:
    post:
      tags:
        - events
      summary: Automation Workflow Queued
      operationId: platformEventAutomationWorkflowQueued
      description: >-
        Emitted when automation workflow queued.


        Representative data fields: `automation_id`, `id`, `queued_at`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - automation_workflow.queued
                    data:
                      type: object
                      additionalProperties: true
                      example: *a232
            examples:
              PlatformEvent_automation_workflow_queued:
                summary: automation_workflow.queued
                value: *a233
      responses:
        2XX:
          description: Consumer acknowledged the event.
  diagnosis_code.enabled_updated:
    post:
      tags:
        - events
      summary: Diagnosis Code Enabled Updated
      operationId: platformEventDiagnosisCodeEnabledUpdated
      description: >-
        Emitted when diagnosis code enabled updated.


        Representative data fields: `code`, `enabled`, `id`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - diagnosis_code.enabled_updated
                    data:
                      type: object
                      additionalProperties: true
                      example: *a234
            examples:
              PlatformEvent_diagnosis_code_enabled_updated:
                summary: diagnosis_code.enabled_updated
                value: *a235
      responses:
        2XX:
          description: Consumer acknowledged the event.
  diagnosis_synonym.enabled_updated:
    post:
      tags:
        - events
      summary: Diagnosis Synonym Enabled Updated
      operationId: platformEventDiagnosisSynonymEnabledUpdated
      description: >-
        Emitted when diagnosis synonym enabled updated.


        Representative data fields: `diagnosis_code_id`, `enabled`, `id`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - diagnosis_synonym.enabled_updated
                    data:
                      type: object
                      additionalProperties: true
                      example: *a236
            examples:
              PlatformEvent_diagnosis_synonym_enabled_updated:
                summary: diagnosis_synonym.enabled_updated
                value: *a237
      responses:
        2XX:
          description: Consumer acknowledged the event.
  email_template.created:
    post:
      tags:
        - events
      summary: Email Template Created
      operationId: platformEventEmailTemplateCreated
      description: >-
        Emitted when email template created.


        Representative data fields: `id`, `name`, `subject`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - email_template.created
                    data:
                      type: object
                      additionalProperties: true
                      example: *a238
            examples:
              PlatformEvent_email_template_created:
                summary: email_template.created
                value: *a239
      responses:
        2XX:
          description: Consumer acknowledged the event.
  email_template.updated:
    post:
      tags:
        - events
      summary: Email Template Updated
      operationId: platformEventEmailTemplateUpdated
      description: >-
        Emitted when email template updated.


        Representative data fields: `id`, `name`, `subject`, `updated_fields`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - email_template.updated
                    data:
                      type: object
                      additionalProperties: true
                      example: *a240
            examples:
              PlatformEvent_email_template_updated:
                summary: email_template.updated
                value: *a241
      responses:
        2XX:
          description: Consumer acknowledged the event.
  email_template.archived:
    post:
      tags:
        - events
      summary: Email Template Archived
      operationId: platformEventEmailTemplateArchived
      description: >-
        Emitted when email template archived.


        Representative data fields: `archived_at`, `id`, `name`, `subject`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - email_template.archived
                    data:
                      type: object
                      additionalProperties: true
                      example: *a242
            examples:
              PlatformEvent_email_template_archived:
                summary: email_template.archived
                value: *a243
      responses:
        2XX:
          description: Consumer acknowledged the event.
  email.sent:
    post:
      tags:
        - events
      summary: Email Sent
      operationId: platformEventEmailSent
      description: >-
        Emitted when email sent.


        Representative data fields: `id`, `patient_id`, `provider_message_id`,
        `sent_at`, `subject`, `to`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - email.sent
                    data:
                      type: object
                      additionalProperties: true
                      example: *a244
            examples:
              PlatformEvent_email_sent:
                summary: email.sent
                value: *a245
      responses:
        2XX:
          description: Consumer acknowledged the event.
  appointment_recording.created:
    post:
      tags:
        - events
      summary: Appointment Recording Created
      operationId: platformEventAppointmentRecordingCreated
      description: >-
        Emitted when appointment recording created.


        Representative data fields: `appointment_id`, `id`, `source`, `status`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - appointment_recording.created
                    data:
                      type: object
                      additionalProperties: true
                      example: *a246
            examples:
              PlatformEvent_appointment_recording_created:
                summary: appointment_recording.created
                value: *a247
      responses:
        2XX:
          description: Consumer acknowledged the event.
  appointment_recording.updated:
    post:
      tags:
        - events
      summary: Appointment Recording Updated
      operationId: platformEventAppointmentRecordingUpdated
      description: >-
        Emitted when appointment recording updated.


        Representative data fields: `appointment_id`, `id`, `source`, `status`,
        `updated_fields`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - appointment_recording.updated
                    data:
                      type: object
                      additionalProperties: true
                      example: *a248
            examples:
              PlatformEvent_appointment_recording_updated:
                summary: appointment_recording.updated
                value: *a249
      responses:
        2XX:
          description: Consumer acknowledged the event.
  appointment_recording.deleted:
    post:
      tags:
        - events
      summary: Appointment Recording Deleted
      operationId: platformEventAppointmentRecordingDeleted
      description: >-
        Emitted when appointment recording deleted.


        Representative data fields: `appointment_id`, `id`, `source`, `status`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - appointment_recording.deleted
                    data:
                      type: object
                      additionalProperties: true
                      example: *a250
            examples:
              PlatformEvent_appointment_recording_deleted:
                summary: appointment_recording.deleted
                value: *a251
      responses:
        2XX:
          description: Consumer acknowledged the event.
  ai_prompt_template.created:
    post:
      tags:
        - events
      summary: Ai Prompt Template Created
      operationId: platformEventAiPromptTemplateCreated
      description: >-
        Emitted when ai prompt template created.


        Representative data fields: `id`, `name`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - ai_prompt_template.created
                    data:
                      type: object
                      additionalProperties: true
                      example: *a252
            examples:
              PlatformEvent_ai_prompt_template_created:
                summary: ai_prompt_template.created
                value: *a253
      responses:
        2XX:
          description: Consumer acknowledged the event.
  ai_prompt_template.updated:
    post:
      tags:
        - events
      summary: Ai Prompt Template Updated
      operationId: platformEventAiPromptTemplateUpdated
      description: >-
        Emitted when ai prompt template updated.


        Representative data fields: `id`, `name`, `updated_fields`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - ai_prompt_template.updated
                    data:
                      type: object
                      additionalProperties: true
                      example: *a254
            examples:
              PlatformEvent_ai_prompt_template_updated:
                summary: ai_prompt_template.updated
                value: *a255
      responses:
        2XX:
          description: Consumer acknowledged the event.
  ai_prompt_template.archived:
    post:
      tags:
        - events
      summary: Ai Prompt Template Archived
      operationId: platformEventAiPromptTemplateArchived
      description: >-
        Emitted when ai prompt template archived.


        Representative data fields: `archived_at`, `id`, `name`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - ai_prompt_template.archived
                    data:
                      type: object
                      additionalProperties: true
                      example: *a256
            examples:
              PlatformEvent_ai_prompt_template_archived:
                summary: ai_prompt_template.archived
                value: *a257
      responses:
        2XX:
          description: Consumer acknowledged the event.
  ai_processing.completed:
    post:
      tags:
        - events
      summary: Ai Processing Completed
      operationId: platformEventAiProcessingCompleted
      description: >-
        Emitted when ai processing completed.


        Representative data fields: `id`, `status`, `transcript_id`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - ai_processing.completed
                    data:
                      type: object
                      additionalProperties: true
                      example: *a258
            examples:
              PlatformEvent_ai_processing_completed:
                summary: ai_processing.completed
                value: *a259
      responses:
        2XX:
          description: Consumer acknowledged the event.
  ai_processing.failed:
    post:
      tags:
        - events
      summary: Ai Processing Failed
      operationId: platformEventAiProcessingFailed
      description: >-
        Emitted when ai processing failed.


        Representative data fields: `error`, `id`, `status`, `transcript_id`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - ai_processing.failed
                    data:
                      type: object
                      additionalProperties: true
                      example: *a260
            examples:
              PlatformEvent_ai_processing_failed:
                summary: ai_processing.failed
                value: *a261
      responses:
        2XX:
          description: Consumer acknowledged the event.
  ai_result.applied_to_note:
    post:
      tags:
        - events
      summary: Ai Result Applied To Note
      operationId: platformEventAiResultAppliedToNote
      description: >-
        Emitted when ai result applied to note.


        Representative data fields: `ai_processing_result_id`,
        `cliniko_treatment_note_id`, `treatment_note_id`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - ai_result.applied_to_note
                    data:
                      type: object
                      additionalProperties: true
                      example: *a262
            examples:
              PlatformEvent_ai_result_applied_to_note:
                summary: ai_result.applied_to_note
                value: *a263
      responses:
        2XX:
          description: Consumer acknowledged the event.
  transcription.started:
    post:
      tags:
        - events
      summary: Transcription Started
      operationId: platformEventTranscriptionStarted
      description: >-
        Emitted when transcription started.


        Representative data fields: `recording_id`, `status`, `transcript_id`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - transcription.started
                    data:
                      type: object
                      additionalProperties: true
                      example: *a264
            examples:
              PlatformEvent_transcription_started:
                summary: transcription.started
                value: *a265
      responses:
        2XX:
          description: Consumer acknowledged the event.
  transcription.completed:
    post:
      tags:
        - events
      summary: Transcription Completed
      operationId: platformEventTranscriptionCompleted
      description: >-
        Emitted when transcription completed.


        Representative data fields: `completion_tokens`, `prompt_tokens`,
        `recording_id`, `status`, `text_length`, `transcript_id`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - transcription.completed
                    data:
                      type: object
                      additionalProperties: true
                      example: *a266
            examples:
              PlatformEvent_transcription_completed:
                summary: transcription.completed
                value: *a267
      responses:
        2XX:
          description: Consumer acknowledged the event.
  transcription.failed:
    post:
      tags:
        - events
      summary: Transcription Failed
      operationId: platformEventTranscriptionFailed
      description: >-
        Emitted when transcription failed.


        Representative data fields: `error`, `recording_id`, `status`,
        `transcript_id`.

        The stream envelope uses snake_case fields and `created_at` is
        milliseconds since epoch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/BraverPlatformEvent"
                - type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - transcription.failed
                    data:
                      type: object
                      additionalProperties: true
                      example: *a268
            examples:
              PlatformEvent_transcription_failed:
                summary: transcription.failed
                value: *a269
      responses:
        2XX:
          description: Consumer acknowledged the event.
