---
openapi: 3.1.0
info:
  title: API V2 Webhooks
  version: v2
  description: |-
    Outbound webhook deliveries for the Canonical Data Model. Subscribe an
    endpoint to a `canonical.v0.<resource>.*` family (or an exact event name)
    in Settings → Connect → Webhooks. This document is generated from the
    live ApplicationEvent producers and CDM-derived record schemas.

    ## Verifying a delivery

    `Wawa-Signature` carries a unix timestamp and one HMAC-SHA256 digest per
    currently accepted signing secret:

    ```
    Wawa-Signature: t=<timestamp>,v1=<digest>[,v1=<digest>]

    digest = lowercase_hex(HMAC_SHA256(signing_secret, "<timestamp>.<raw request body>"))
    ```

    1. Hash the raw request bytes, before any JSON parsing. Re-serialising the
       body changes the digest.
    2. Compare with a constant-time comparison, not a plain equality check.
    3. Accept the delivery when your secret matches **any** `v1` entry. Every
       delivery is signed once per accepted secret, so there are two during the
       24-hour rotation overlap; a parser that keeps only the last entry starts
       rejecting valid deliveries the moment a secret is rotated.
    4. Reject timestamps outside a tolerance you choose, to bound replay.

    Only trust the body once it verifies, then deduplicate on `Wawa-Event-Id`,
    which repeats across retries and manual resends.

    ## Serving several accounts on one URL

    One URL can receive deliveries from several wawa accounts. Each endpoint
    has its own signing secret, so look the secret up by `Wawa-Endpoint-Id`
    before verifying, and take the verified endpoint as the account identity.
    Record ids and `sequence` are per account, so key stored records and
    ordering state by endpoint id as well as record id.

    ## Catching up after an outage

    A failing delivery is retried for about a week. After five
    consecutive deliveries fail for good, the endpoint disables itself,
    abandons its outstanding deliveries and stops recording new ones. Once
    your receiver is back, enable the endpoint and use **Resend Events** on
    its page in Settings → Connect → Webhooks with the time the outage
    began, up to 30 days back.

    That requeues the endpoint's failed and abandoned deliveries since then,
    with their original bodies, and delivers the events since then that the
    endpoint never received, such as those published while it was disabled.
    A missed event carries the record as it is when resent, under the
    event's original `id` and `sequence`, so keep only the highest
    `sequence` you have seen for each record.

    A missed event is skipped when its record has since been removed
    outright rather than marked `deleted`, because the API no longer
    returns it. Compare the ids you hold with a full list to find those
    records.
servers:
- url: "{defaultHost}"
  variables:
    defaultHost:
      default: https://clinic.wawafertility.com
components:
  schemas:
    WebhookEnvelope:
      type: object
      required:
      - id
      - type
      - sequence
      - occurred_at
      - originating_request_id
      - data
      properties:
        id:
          type: string
          format: uuid
        type:
          type: string
        sequence:
          type: integer
        occurred_at:
          type: string
          format: date-time
        originating_request_id:
          type:
          - string
          - 'null'
        data:
          type: object
          required:
          - record
          properties:
            record:
              type: object
    ConsentRecord:
      title: canonical.v0.consent record
      description: The data.record payload of every canonical.v0.consent.* webhook
        — the resource's current CDM state (as_cdm_json). Generated from the vendored
        CDM DDL; additionalProperties allows view-only columns.
      type: object
      required:
      - id
      properties:
        id:
          type: integer
        patient_id:
          type:
          - integer
          - 'null'
        consent_name:
          type:
          - string
          - 'null'
        cycle_id:
          type:
          - integer
          - 'null'
        issued_by:
          type:
          - integer
          - 'null'
        witnessed_by:
          type:
          - integer
          - 'null'
        consent_type:
          type:
          - string
          - 'null'
        status:
          type:
          - string
          - 'null'
        signing_method:
          type:
          - string
          - 'null'
        issue_date:
          type:
          - string
          - 'null'
          format: date
        expected_submission_date:
          type:
          - string
          - 'null'
          format: date
        signed_at:
          type:
          - string
          - 'null'
          format: date-time
        expires_at:
          type:
          - string
          - 'null'
          format: date-time
        external_document_id:
          type:
          - string
          - 'null'
        signed_document_id:
          type:
          - integer
          - 'null'
        audit_document_id:
          type:
          - integer
          - 'null'
        source_system:
          type:
          - string
          - 'null'
        deleted:
          type:
          - string
          - 'null'
          format: date-time
          description: Soft-delete timestamp; null when the record is live
        created_at:
          type:
          - string
          - 'null'
          format: date-time
        updated_at:
          type:
          - string
          - 'null'
          format: date-time
    EncounterRecord:
      title: canonical.v0.encounter record
      description: The data.record payload of every canonical.v0.encounter.* webhook
        — the resource's current CDM state (as_cdm_json). Generated from the vendored
        CDM DDL; additionalProperties allows view-only columns.
      type: object
      required:
      - id
      properties:
        id:
          type: integer
        patient_id:
          type:
          - integer
          - 'null'
        location_id:
          type:
          - integer
          - 'null'
        scheduler_event_id:
          type:
          - integer
          - 'null'
        cycle_id:
          type:
          - integer
          - 'null'
        mode_of_contact:
          type:
          - string
          - 'null'
        status:
          type:
          - string
          - 'null'
        arrived_at:
          type:
          - string
          - 'null'
          format: date-time
        departed_at:
          type:
          - string
          - 'null'
          format: date-time
        start_at:
          type:
          - string
          - 'null'
          format: date-time
        end_at:
          type:
          - string
          - 'null'
          format: date-time
        source_system:
          type:
          - string
          - 'null'
        deleted:
          type:
          - string
          - 'null'
          format: date-time
          description: Soft-delete timestamp; null when the record is live
        created_at:
          type:
          - string
          - 'null'
          format: date-time
        updated_at:
          type:
          - string
          - 'null'
          format: date-time
    PatientRecord:
      title: canonical.v0.patient record
      description: The data.record payload of every canonical.v0.patient.* webhook
        — the resource's current CDM state (as_cdm_json). Generated from the vendored
        CDM DDL; additionalProperties allows view-only columns.
      type: object
      required:
      - id
      properties:
        id:
          type: integer
        first_name:
          type:
          - string
          - 'null'
        last_name:
          type:
          - string
          - 'null'
        external_identifier:
          type:
          - string
          - 'null'
        title:
          type:
          - string
          - 'null'
        patient_identity_management_id:
          type:
          - string
          - 'null'
        regulatory_reference_number:
          type:
          - string
          - 'null'
        middle_name:
          type:
          - string
          - 'null'
        preferred_name:
          type:
          - string
          - 'null'
        full_legal_name:
          type:
          - string
          - 'null'
        date_of_birth:
          type:
          - string
          - 'null'
          format: date
        email:
          type:
          - string
          - 'null'
        sex_assigned_at_birth:
          type:
          - string
          - 'null'
        gender_identity:
          type:
          - string
          - 'null'
        pronouns:
          type:
          - string
          - 'null'
        ethnicity:
          type:
          - string
          - 'null'
        fathers_ethnicity:
          type:
          - string
          - 'null'
        mothers_ethnicity:
          type:
          - string
          - 'null'
        country_of_birth:
          type:
          - string
          - 'null'
        town_or_city_of_birth:
          type:
          - string
          - 'null'
        nationality:
          type:
          - string
          - 'null'
        religion:
          type:
          - string
          - 'null'
        preferred_language:
          type:
          - string
          - 'null'
        marital_status:
          type:
          - string
          - 'null'
        blood_group:
          type:
          - string
          - 'null'
        rhesus_factor:
          type:
          - string
          - 'null'
        address_line_1:
          type:
          - string
          - 'null'
        address_line_2:
          type:
          - string
          - 'null'
        town_or_city:
          type:
          - string
          - 'null'
        state_or_province:
          type:
          - string
          - 'null'
        postcode:
          type:
          - string
          - 'null'
        country:
          type:
          - string
          - 'null'
        is_donor:
          type:
          - boolean
          - 'null'
        is_deceased:
          type:
          - boolean
          - 'null'
        date_of_death:
          type:
          - string
          - 'null'
          format: date
        is_test_patient:
          type:
          - boolean
          - 'null'
        primary_user_id:
          type:
          - integer
          - 'null'
        brand_id:
          type:
          - integer
          - 'null'
        fund_source_id:
          type:
          - integer
          - 'null'
        metadata:
          type:
          - object
          - 'null'
        initial_contact_at:
          type:
          - string
          - 'null'
          format: date-time
        first_seen_at:
          type:
          - string
          - 'null'
          format: date-time
        app_invitation_last_sent_at:
          type:
          - string
          - 'null'
          format: date-time
        app_invitation_accepted_at:
          type:
          - string
          - 'null'
          format: date-time
        is_app_connected:
          type:
          - boolean
          - 'null'
        registration_status:
          type:
          - string
          - 'null'
        registration_completion_percentage:
          type:
          - integer
          - 'null'
        care_stage:
          type:
          - string
          - 'null'
        source_system:
          type:
          - string
          - 'null'
        deleted:
          type:
          - string
          - 'null'
          format: date-time
          description: Soft-delete timestamp; null when the record is live
        created_at:
          type:
          - string
          - 'null'
          format: date-time
        updated_at:
          type:
          - string
          - 'null'
          format: date-time
        is_portal_connected:
          type: boolean
          description: Whether the patient is connected to the patient portal or app.
            Read-only.
    PatientExternalIdentifierRecord:
      title: canonical.v0.patient_external_identifier record
      description: The data.record payload of every canonical.v0.patient_external_identifier.*
        webhook — the resource's current CDM state (as_cdm_json). Generated from the
        vendored CDM DDL; additionalProperties allows view-only columns.
      type: object
      required:
      - id
      properties:
        id:
          type: integer
        patient_id:
          type:
          - integer
          - 'null'
        identifier_type:
          type:
          - string
          - 'null'
        identifier_value:
          type:
          - string
          - 'null'
        issuing_jurisdiction:
          type:
          - string
          - 'null'
        valid_from:
          type:
          - string
          - 'null'
          format: date
        valid_to:
          type:
          - string
          - 'null'
          format: date
        source_system:
          type:
          - string
          - 'null'
        deleted:
          type:
          - string
          - 'null'
          format: date-time
          description: Soft-delete timestamp; null when the record is live
        created_at:
          type:
          - string
          - 'null'
          format: date-time
        updated_at:
          type:
          - string
          - 'null'
          format: date-time
        primary:
          type: boolean
          description: Whether this is the patient's primary identifier.
    PatientLocationRecord:
      title: canonical.v0.patient_location record
      description: The data.record payload of every canonical.v0.patient_location.*
        webhook — the resource's current CDM state (as_cdm_json). Generated from the
        vendored CDM DDL; additionalProperties allows view-only columns.
      type: object
      required:
      - id
      properties:
        id:
          type: integer
        patient_id:
          type:
          - integer
          - 'null'
        location_id:
          type:
          - integer
          - 'null'
        source_system:
          type:
          - string
          - 'null'
        deleted:
          type:
          - string
          - 'null'
          format: date-time
          description: Soft-delete timestamp; null when the record is live
        created_at:
          type:
          - string
          - 'null'
          format: date-time
        updated_at:
          type:
          - string
          - 'null'
          format: date-time
    PatientPhoneRecord:
      title: canonical.v0.patient_phone record
      description: The data.record payload of every canonical.v0.patient_phone.* webhook
        — the resource's current CDM state (as_cdm_json). Generated from the vendored
        CDM DDL; additionalProperties allows view-only columns.
      type: object
      required:
      - id
      properties:
        id:
          type: integer
        patient_id:
          type:
          - integer
          - 'null'
        phone_type:
          type:
          - string
          - 'null'
        phone_number:
          type:
          - string
          - 'null'
        country_code:
          type:
          - string
          - 'null'
        preferred_at:
          type:
          - string
          - 'null'
          format: date-time
        source_system:
          type:
          - string
          - 'null'
        deleted:
          type:
          - string
          - 'null'
          format: date-time
          description: Soft-delete timestamp; null when the record is live
        created_at:
          type:
          - string
          - 'null'
          format: date-time
        updated_at:
          type:
          - string
          - 'null'
          format: date-time
    PatientRelationshipRecord:
      title: canonical.v0.patient_relationship record
      description: The data.record payload of every canonical.v0.patient_relationship.*
        webhook — the resource's current CDM state (as_cdm_json). Generated from the
        vendored CDM DDL; additionalProperties allows view-only columns.
      type: object
      required:
      - id
      properties:
        id:
          type: integer
        patient_id:
          type:
          - integer
          - 'null'
        related_patient_id:
          type:
          - integer
          - 'null'
        relationship_type:
          type:
          - string
          - 'null'
        same_sex_couple:
          type:
          - boolean
          - 'null'
        active_from:
          type:
          - string
          - 'null'
          format: date
        active_to:
          type:
          - string
          - 'null'
          format: date
        source_system:
          type:
          - string
          - 'null'
        deleted:
          type:
          - string
          - 'null'
          format: date-time
          description: Soft-delete timestamp; null when the record is live
        created_at:
          type:
          - string
          - 'null'
          format: date-time
        updated_at:
          type:
          - string
          - 'null'
          format: date-time
    SchedulerEventRecord:
      title: canonical.v0.scheduler_event record
      description: The data.record payload of every canonical.v0.scheduler_event.*
        webhook — the resource's current CDM state (as_cdm_json). Generated from the
        vendored CDM DDL; additionalProperties allows view-only columns.
      type: object
      required:
      - id
      properties:
        id:
          type: integer
        external_identifier:
          type:
          - string
          - 'null'
        patient_id:
          type:
          - integer
          - 'null'
        scheduler_event_type_id:
          type:
          - integer
          - 'null'
        event_type:
          type:
          - string
          - 'null'
        title:
          type:
          - string
          - 'null'
        start_at:
          type:
          - string
          - 'null'
          format: date-time
        end_at:
          type:
          - string
          - 'null'
          format: date-time
        all_day:
          type:
          - boolean
          - 'null'
        status:
          type:
          - string
          - 'null'
        appointment_status:
          type:
          - string
          - 'null'
        scheduler_event_status_id:
          type:
          - integer
          - 'null'
        location_id:
          type:
          - integer
          - 'null'
        meeting_type:
          type:
          - string
          - 'null'
        booked_online_at:
          type:
          - string
          - 'null'
          format: date-time
        notes:
          type:
          - string
          - 'null'
        internal_notes:
          type:
          - string
          - 'null'
        source_system:
          type:
          - string
          - 'null'
        deleted:
          type:
          - string
          - 'null'
          format: date-time
          description: Soft-delete timestamp; null when the record is live
        created_at:
          type:
          - string
          - 'null'
          format: date-time
        updated_at:
          type:
          - string
          - 'null'
          format: date-time
webhooks:
  canonical.v0.consent.cancelled:
    post:
      operationId: canonical_v0_consent_cancelled
      summary: canonical.v0.consent.cancelled
      description: Delivered when a `canonical.v0.consent.cancelled` event is published.
        Subscribe via the `canonical.v0.consent.*` family (or this exact event name).
      security: []
      parameters:
      - name: Wawa-Signature
        in: header
        required: true
        description: t=<unix timestamp>,v1=<HMAC-SHA256 of `<timestamp>.<raw body>`>.
          One `v1` entry per accepted secret, so two during the 24-hour rotation overlap.
          See this document's description for the verification steps.
        schema:
          type: string
      - name: Wawa-Event-Id
        in: header
        required: true
        description: Stable event UUID; identical to the body `id`.
        schema:
          type: string
      - name: Wawa-Delivery-Id
        in: header
        required: true
        description: Stable UUID for this endpoint's delivery and its retries.
        schema:
          type: string
      - name: Wawa-Endpoint-Id
        in: header
        required: true
        description: Stable UUID of the endpoint this delivery was sent to; identical
          on every retry. Use it to select the signing secret to verify against, and
          to identify which wawa account the delivery came from.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
              - "$ref": "#/components/schemas/WebhookEnvelope"
              - type: object
                properties:
                  type:
                    const: canonical.v0.consent.cancelled
                  data:
                    type: object
                    properties:
                      record:
                        "$ref": "#/components/schemas/ConsentRecord"
                    required:
                    - record
            example:
              id: d1f8c0a2-6b3e-4c5a-9f21-0a1b2c3d4e5f
              type: canonical.v0.consent.cancelled
              sequence: 1
              occurred_at: '2026-07-01T09:00:00.000000Z'
              originating_request_id: req_example
              data:
                record:
                  id: 1
                  patient_id: 1
                  consent_name: example
                  cycle_id: 1
                  issued_by: 1
                  witnessed_by: 1
                  consent_type: example
                  status: example
                  signing_method: example
                  issue_date: '2026-07-01'
                  expected_submission_date: '2026-07-01'
                  signed_at: '2026-07-01T09:00:00.000000Z'
                  expires_at: '2026-07-01T09:00:00.000000Z'
                  external_document_id: example
                  signed_document_id: 1
                  audit_document_id: 1
                  source_system: example
                  deleted: '2026-07-01T09:00:00.000000Z'
                  created_at: '2026-07-01T09:00:00.000000Z'
                  updated_at: '2026-07-01T09:00:00.000000Z'
      responses:
        '200':
          description: Acknowledge with any 2xx. Other statuses, redirects, timeouts,
            and network failures are retried.
  canonical.v0.consent.changes_requested:
    post:
      operationId: canonical_v0_consent_changes_requested
      summary: canonical.v0.consent.changes_requested
      description: Delivered when a `canonical.v0.consent.changes_requested` event
        is published. Subscribe via the `canonical.v0.consent.*` family (or this exact
        event name).
      security: []
      parameters:
      - name: Wawa-Signature
        in: header
        required: true
        description: t=<unix timestamp>,v1=<HMAC-SHA256 of `<timestamp>.<raw body>`>.
          One `v1` entry per accepted secret, so two during the 24-hour rotation overlap.
          See this document's description for the verification steps.
        schema:
          type: string
      - name: Wawa-Event-Id
        in: header
        required: true
        description: Stable event UUID; identical to the body `id`.
        schema:
          type: string
      - name: Wawa-Delivery-Id
        in: header
        required: true
        description: Stable UUID for this endpoint's delivery and its retries.
        schema:
          type: string
      - name: Wawa-Endpoint-Id
        in: header
        required: true
        description: Stable UUID of the endpoint this delivery was sent to; identical
          on every retry. Use it to select the signing secret to verify against, and
          to identify which wawa account the delivery came from.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
              - "$ref": "#/components/schemas/WebhookEnvelope"
              - type: object
                properties:
                  type:
                    const: canonical.v0.consent.changes_requested
                  data:
                    type: object
                    properties:
                      record:
                        "$ref": "#/components/schemas/ConsentRecord"
                    required:
                    - record
            example:
              id: d1f8c0a2-6b3e-4c5a-9f21-0a1b2c3d4e5f
              type: canonical.v0.consent.changes_requested
              sequence: 1
              occurred_at: '2026-07-01T09:00:00.000000Z'
              originating_request_id: req_example
              data:
                record:
                  id: 1
                  patient_id: 1
                  consent_name: example
                  cycle_id: 1
                  issued_by: 1
                  witnessed_by: 1
                  consent_type: example
                  status: example
                  signing_method: example
                  issue_date: '2026-07-01'
                  expected_submission_date: '2026-07-01'
                  signed_at: '2026-07-01T09:00:00.000000Z'
                  expires_at: '2026-07-01T09:00:00.000000Z'
                  external_document_id: example
                  signed_document_id: 1
                  audit_document_id: 1
                  source_system: example
                  deleted: '2026-07-01T09:00:00.000000Z'
                  created_at: '2026-07-01T09:00:00.000000Z'
                  updated_at: '2026-07-01T09:00:00.000000Z'
      responses:
        '200':
          description: Acknowledge with any 2xx. Other statuses, redirects, timeouts,
            and network failures are retried.
  canonical.v0.consent.completed:
    post:
      operationId: canonical_v0_consent_completed
      summary: canonical.v0.consent.completed
      description: Delivered when a `canonical.v0.consent.completed` event is published.
        Subscribe via the `canonical.v0.consent.*` family (or this exact event name).
      security: []
      parameters:
      - name: Wawa-Signature
        in: header
        required: true
        description: t=<unix timestamp>,v1=<HMAC-SHA256 of `<timestamp>.<raw body>`>.
          One `v1` entry per accepted secret, so two during the 24-hour rotation overlap.
          See this document's description for the verification steps.
        schema:
          type: string
      - name: Wawa-Event-Id
        in: header
        required: true
        description: Stable event UUID; identical to the body `id`.
        schema:
          type: string
      - name: Wawa-Delivery-Id
        in: header
        required: true
        description: Stable UUID for this endpoint's delivery and its retries.
        schema:
          type: string
      - name: Wawa-Endpoint-Id
        in: header
        required: true
        description: Stable UUID of the endpoint this delivery was sent to; identical
          on every retry. Use it to select the signing secret to verify against, and
          to identify which wawa account the delivery came from.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
              - "$ref": "#/components/schemas/WebhookEnvelope"
              - type: object
                properties:
                  type:
                    const: canonical.v0.consent.completed
                  data:
                    type: object
                    properties:
                      record:
                        "$ref": "#/components/schemas/ConsentRecord"
                    required:
                    - record
            example:
              id: d1f8c0a2-6b3e-4c5a-9f21-0a1b2c3d4e5f
              type: canonical.v0.consent.completed
              sequence: 1
              occurred_at: '2026-07-01T09:00:00.000000Z'
              originating_request_id: req_example
              data:
                record:
                  id: 1
                  patient_id: 1
                  consent_name: example
                  cycle_id: 1
                  issued_by: 1
                  witnessed_by: 1
                  consent_type: example
                  status: example
                  signing_method: example
                  issue_date: '2026-07-01'
                  expected_submission_date: '2026-07-01'
                  signed_at: '2026-07-01T09:00:00.000000Z'
                  expires_at: '2026-07-01T09:00:00.000000Z'
                  external_document_id: example
                  signed_document_id: 1
                  audit_document_id: 1
                  source_system: example
                  deleted: '2026-07-01T09:00:00.000000Z'
                  created_at: '2026-07-01T09:00:00.000000Z'
                  updated_at: '2026-07-01T09:00:00.000000Z'
      responses:
        '200':
          description: Acknowledge with any 2xx. Other statuses, redirects, timeouts,
            and network failures are retried.
  canonical.v0.consent.sent:
    post:
      operationId: canonical_v0_consent_sent
      summary: canonical.v0.consent.sent
      description: Delivered when a `canonical.v0.consent.sent` event is published.
        Subscribe via the `canonical.v0.consent.*` family (or this exact event name).
      security: []
      parameters:
      - name: Wawa-Signature
        in: header
        required: true
        description: t=<unix timestamp>,v1=<HMAC-SHA256 of `<timestamp>.<raw body>`>.
          One `v1` entry per accepted secret, so two during the 24-hour rotation overlap.
          See this document's description for the verification steps.
        schema:
          type: string
      - name: Wawa-Event-Id
        in: header
        required: true
        description: Stable event UUID; identical to the body `id`.
        schema:
          type: string
      - name: Wawa-Delivery-Id
        in: header
        required: true
        description: Stable UUID for this endpoint's delivery and its retries.
        schema:
          type: string
      - name: Wawa-Endpoint-Id
        in: header
        required: true
        description: Stable UUID of the endpoint this delivery was sent to; identical
          on every retry. Use it to select the signing secret to verify against, and
          to identify which wawa account the delivery came from.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
              - "$ref": "#/components/schemas/WebhookEnvelope"
              - type: object
                properties:
                  type:
                    const: canonical.v0.consent.sent
                  data:
                    type: object
                    properties:
                      record:
                        "$ref": "#/components/schemas/ConsentRecord"
                    required:
                    - record
            example:
              id: d1f8c0a2-6b3e-4c5a-9f21-0a1b2c3d4e5f
              type: canonical.v0.consent.sent
              sequence: 1
              occurred_at: '2026-07-01T09:00:00.000000Z'
              originating_request_id: req_example
              data:
                record:
                  id: 1
                  patient_id: 1
                  consent_name: example
                  cycle_id: 1
                  issued_by: 1
                  witnessed_by: 1
                  consent_type: example
                  status: example
                  signing_method: example
                  issue_date: '2026-07-01'
                  expected_submission_date: '2026-07-01'
                  signed_at: '2026-07-01T09:00:00.000000Z'
                  expires_at: '2026-07-01T09:00:00.000000Z'
                  external_document_id: example
                  signed_document_id: 1
                  audit_document_id: 1
                  source_system: example
                  deleted: '2026-07-01T09:00:00.000000Z'
                  created_at: '2026-07-01T09:00:00.000000Z'
                  updated_at: '2026-07-01T09:00:00.000000Z'
      responses:
        '200':
          description: Acknowledge with any 2xx. Other statuses, redirects, timeouts,
            and network failures are retried.
  canonical.v0.consent.signed:
    post:
      operationId: canonical_v0_consent_signed
      summary: canonical.v0.consent.signed
      description: Delivered when a `canonical.v0.consent.signed` event is published.
        Subscribe via the `canonical.v0.consent.*` family (or this exact event name).
      security: []
      parameters:
      - name: Wawa-Signature
        in: header
        required: true
        description: t=<unix timestamp>,v1=<HMAC-SHA256 of `<timestamp>.<raw body>`>.
          One `v1` entry per accepted secret, so two during the 24-hour rotation overlap.
          See this document's description for the verification steps.
        schema:
          type: string
      - name: Wawa-Event-Id
        in: header
        required: true
        description: Stable event UUID; identical to the body `id`.
        schema:
          type: string
      - name: Wawa-Delivery-Id
        in: header
        required: true
        description: Stable UUID for this endpoint's delivery and its retries.
        schema:
          type: string
      - name: Wawa-Endpoint-Id
        in: header
        required: true
        description: Stable UUID of the endpoint this delivery was sent to; identical
          on every retry. Use it to select the signing secret to verify against, and
          to identify which wawa account the delivery came from.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
              - "$ref": "#/components/schemas/WebhookEnvelope"
              - type: object
                properties:
                  type:
                    const: canonical.v0.consent.signed
                  data:
                    type: object
                    properties:
                      record:
                        "$ref": "#/components/schemas/ConsentRecord"
                    required:
                    - record
            example:
              id: d1f8c0a2-6b3e-4c5a-9f21-0a1b2c3d4e5f
              type: canonical.v0.consent.signed
              sequence: 1
              occurred_at: '2026-07-01T09:00:00.000000Z'
              originating_request_id: req_example
              data:
                record:
                  id: 1
                  patient_id: 1
                  consent_name: example
                  cycle_id: 1
                  issued_by: 1
                  witnessed_by: 1
                  consent_type: example
                  status: example
                  signing_method: example
                  issue_date: '2026-07-01'
                  expected_submission_date: '2026-07-01'
                  signed_at: '2026-07-01T09:00:00.000000Z'
                  expires_at: '2026-07-01T09:00:00.000000Z'
                  external_document_id: example
                  signed_document_id: 1
                  audit_document_id: 1
                  source_system: example
                  deleted: '2026-07-01T09:00:00.000000Z'
                  created_at: '2026-07-01T09:00:00.000000Z'
                  updated_at: '2026-07-01T09:00:00.000000Z'
      responses:
        '200':
          description: Acknowledge with any 2xx. Other statuses, redirects, timeouts,
            and network failures are retried.
  canonical.v0.consent.voided:
    post:
      operationId: canonical_v0_consent_voided
      summary: canonical.v0.consent.voided
      description: Delivered when a `canonical.v0.consent.voided` event is published.
        Subscribe via the `canonical.v0.consent.*` family (or this exact event name).
      security: []
      parameters:
      - name: Wawa-Signature
        in: header
        required: true
        description: t=<unix timestamp>,v1=<HMAC-SHA256 of `<timestamp>.<raw body>`>.
          One `v1` entry per accepted secret, so two during the 24-hour rotation overlap.
          See this document's description for the verification steps.
        schema:
          type: string
      - name: Wawa-Event-Id
        in: header
        required: true
        description: Stable event UUID; identical to the body `id`.
        schema:
          type: string
      - name: Wawa-Delivery-Id
        in: header
        required: true
        description: Stable UUID for this endpoint's delivery and its retries.
        schema:
          type: string
      - name: Wawa-Endpoint-Id
        in: header
        required: true
        description: Stable UUID of the endpoint this delivery was sent to; identical
          on every retry. Use it to select the signing secret to verify against, and
          to identify which wawa account the delivery came from.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
              - "$ref": "#/components/schemas/WebhookEnvelope"
              - type: object
                properties:
                  type:
                    const: canonical.v0.consent.voided
                  data:
                    type: object
                    properties:
                      record:
                        "$ref": "#/components/schemas/ConsentRecord"
                    required:
                    - record
            example:
              id: d1f8c0a2-6b3e-4c5a-9f21-0a1b2c3d4e5f
              type: canonical.v0.consent.voided
              sequence: 1
              occurred_at: '2026-07-01T09:00:00.000000Z'
              originating_request_id: req_example
              data:
                record:
                  id: 1
                  patient_id: 1
                  consent_name: example
                  cycle_id: 1
                  issued_by: 1
                  witnessed_by: 1
                  consent_type: example
                  status: example
                  signing_method: example
                  issue_date: '2026-07-01'
                  expected_submission_date: '2026-07-01'
                  signed_at: '2026-07-01T09:00:00.000000Z'
                  expires_at: '2026-07-01T09:00:00.000000Z'
                  external_document_id: example
                  signed_document_id: 1
                  audit_document_id: 1
                  source_system: example
                  deleted: '2026-07-01T09:00:00.000000Z'
                  created_at: '2026-07-01T09:00:00.000000Z'
                  updated_at: '2026-07-01T09:00:00.000000Z'
      responses:
        '200':
          description: Acknowledge with any 2xx. Other statuses, redirects, timeouts,
            and network failures are retried.
  canonical.v0.encounter.created:
    post:
      operationId: canonical_v0_encounter_created
      summary: canonical.v0.encounter.created
      description: Delivered when a `canonical.v0.encounter.created` event is published.
        Subscribe via the `canonical.v0.encounter.*` family (or this exact event name).
      security: []
      parameters:
      - name: Wawa-Signature
        in: header
        required: true
        description: t=<unix timestamp>,v1=<HMAC-SHA256 of `<timestamp>.<raw body>`>.
          One `v1` entry per accepted secret, so two during the 24-hour rotation overlap.
          See this document's description for the verification steps.
        schema:
          type: string
      - name: Wawa-Event-Id
        in: header
        required: true
        description: Stable event UUID; identical to the body `id`.
        schema:
          type: string
      - name: Wawa-Delivery-Id
        in: header
        required: true
        description: Stable UUID for this endpoint's delivery and its retries.
        schema:
          type: string
      - name: Wawa-Endpoint-Id
        in: header
        required: true
        description: Stable UUID of the endpoint this delivery was sent to; identical
          on every retry. Use it to select the signing secret to verify against, and
          to identify which wawa account the delivery came from.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
              - "$ref": "#/components/schemas/WebhookEnvelope"
              - type: object
                properties:
                  type:
                    const: canonical.v0.encounter.created
                  data:
                    type: object
                    properties:
                      record:
                        "$ref": "#/components/schemas/EncounterRecord"
                    required:
                    - record
            example:
              id: d1f8c0a2-6b3e-4c5a-9f21-0a1b2c3d4e5f
              type: canonical.v0.encounter.created
              sequence: 1
              occurred_at: '2026-07-01T09:00:00.000000Z'
              originating_request_id: req_example
              data:
                record:
                  id: 1
                  patient_id: 1
                  location_id: 1
                  scheduler_event_id: 1
                  cycle_id: 1
                  mode_of_contact: example
                  status: example
                  arrived_at: '2026-07-01T09:00:00.000000Z'
                  departed_at: '2026-07-01T09:00:00.000000Z'
                  start_at: '2026-07-01T09:00:00.000000Z'
                  end_at: '2026-07-01T09:00:00.000000Z'
                  source_system: example
                  deleted: '2026-07-01T09:00:00.000000Z'
                  created_at: '2026-07-01T09:00:00.000000Z'
                  updated_at: '2026-07-01T09:00:00.000000Z'
      responses:
        '200':
          description: Acknowledge with any 2xx. Other statuses, redirects, timeouts,
            and network failures are retried.
  canonical.v0.encounter.deleted:
    post:
      operationId: canonical_v0_encounter_deleted
      summary: canonical.v0.encounter.deleted
      description: Delivered when a `canonical.v0.encounter.deleted` event is published.
        Subscribe via the `canonical.v0.encounter.*` family (or this exact event name).
      security: []
      parameters:
      - name: Wawa-Signature
        in: header
        required: true
        description: t=<unix timestamp>,v1=<HMAC-SHA256 of `<timestamp>.<raw body>`>.
          One `v1` entry per accepted secret, so two during the 24-hour rotation overlap.
          See this document's description for the verification steps.
        schema:
          type: string
      - name: Wawa-Event-Id
        in: header
        required: true
        description: Stable event UUID; identical to the body `id`.
        schema:
          type: string
      - name: Wawa-Delivery-Id
        in: header
        required: true
        description: Stable UUID for this endpoint's delivery and its retries.
        schema:
          type: string
      - name: Wawa-Endpoint-Id
        in: header
        required: true
        description: Stable UUID of the endpoint this delivery was sent to; identical
          on every retry. Use it to select the signing secret to verify against, and
          to identify which wawa account the delivery came from.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
              - "$ref": "#/components/schemas/WebhookEnvelope"
              - type: object
                properties:
                  type:
                    const: canonical.v0.encounter.deleted
                  data:
                    type: object
                    properties:
                      record:
                        "$ref": "#/components/schemas/EncounterRecord"
                    required:
                    - record
            example:
              id: d1f8c0a2-6b3e-4c5a-9f21-0a1b2c3d4e5f
              type: canonical.v0.encounter.deleted
              sequence: 1
              occurred_at: '2026-07-01T09:00:00.000000Z'
              originating_request_id: req_example
              data:
                record:
                  id: 1
                  patient_id: 1
                  location_id: 1
                  scheduler_event_id: 1
                  cycle_id: 1
                  mode_of_contact: example
                  status: example
                  arrived_at: '2026-07-01T09:00:00.000000Z'
                  departed_at: '2026-07-01T09:00:00.000000Z'
                  start_at: '2026-07-01T09:00:00.000000Z'
                  end_at: '2026-07-01T09:00:00.000000Z'
                  source_system: example
                  deleted: '2026-07-01T09:00:00.000000Z'
                  created_at: '2026-07-01T09:00:00.000000Z'
                  updated_at: '2026-07-01T09:00:00.000000Z'
      responses:
        '200':
          description: Acknowledge with any 2xx. Other statuses, redirects, timeouts,
            and network failures are retried.
  canonical.v0.encounter.updated:
    post:
      operationId: canonical_v0_encounter_updated
      summary: canonical.v0.encounter.updated
      description: Delivered when a `canonical.v0.encounter.updated` event is published.
        Subscribe via the `canonical.v0.encounter.*` family (or this exact event name).
      security: []
      parameters:
      - name: Wawa-Signature
        in: header
        required: true
        description: t=<unix timestamp>,v1=<HMAC-SHA256 of `<timestamp>.<raw body>`>.
          One `v1` entry per accepted secret, so two during the 24-hour rotation overlap.
          See this document's description for the verification steps.
        schema:
          type: string
      - name: Wawa-Event-Id
        in: header
        required: true
        description: Stable event UUID; identical to the body `id`.
        schema:
          type: string
      - name: Wawa-Delivery-Id
        in: header
        required: true
        description: Stable UUID for this endpoint's delivery and its retries.
        schema:
          type: string
      - name: Wawa-Endpoint-Id
        in: header
        required: true
        description: Stable UUID of the endpoint this delivery was sent to; identical
          on every retry. Use it to select the signing secret to verify against, and
          to identify which wawa account the delivery came from.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
              - "$ref": "#/components/schemas/WebhookEnvelope"
              - type: object
                properties:
                  type:
                    const: canonical.v0.encounter.updated
                  data:
                    type: object
                    properties:
                      record:
                        "$ref": "#/components/schemas/EncounterRecord"
                    required:
                    - record
            example:
              id: d1f8c0a2-6b3e-4c5a-9f21-0a1b2c3d4e5f
              type: canonical.v0.encounter.updated
              sequence: 1
              occurred_at: '2026-07-01T09:00:00.000000Z'
              originating_request_id: req_example
              data:
                record:
                  id: 1
                  patient_id: 1
                  location_id: 1
                  scheduler_event_id: 1
                  cycle_id: 1
                  mode_of_contact: example
                  status: example
                  arrived_at: '2026-07-01T09:00:00.000000Z'
                  departed_at: '2026-07-01T09:00:00.000000Z'
                  start_at: '2026-07-01T09:00:00.000000Z'
                  end_at: '2026-07-01T09:00:00.000000Z'
                  source_system: example
                  deleted: '2026-07-01T09:00:00.000000Z'
                  created_at: '2026-07-01T09:00:00.000000Z'
                  updated_at: '2026-07-01T09:00:00.000000Z'
      responses:
        '200':
          description: Acknowledge with any 2xx. Other statuses, redirects, timeouts,
            and network failures are retried.
  canonical.v0.patient.connected:
    post:
      operationId: canonical_v0_patient_connected
      summary: canonical.v0.patient.connected
      description: Delivered when a `canonical.v0.patient.connected` event is published.
        Subscribe via the `canonical.v0.patient.*` family (or this exact event name).
      security: []
      parameters:
      - name: Wawa-Signature
        in: header
        required: true
        description: t=<unix timestamp>,v1=<HMAC-SHA256 of `<timestamp>.<raw body>`>.
          One `v1` entry per accepted secret, so two during the 24-hour rotation overlap.
          See this document's description for the verification steps.
        schema:
          type: string
      - name: Wawa-Event-Id
        in: header
        required: true
        description: Stable event UUID; identical to the body `id`.
        schema:
          type: string
      - name: Wawa-Delivery-Id
        in: header
        required: true
        description: Stable UUID for this endpoint's delivery and its retries.
        schema:
          type: string
      - name: Wawa-Endpoint-Id
        in: header
        required: true
        description: Stable UUID of the endpoint this delivery was sent to; identical
          on every retry. Use it to select the signing secret to verify against, and
          to identify which wawa account the delivery came from.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
              - "$ref": "#/components/schemas/WebhookEnvelope"
              - type: object
                properties:
                  type:
                    const: canonical.v0.patient.connected
                  data:
                    type: object
                    properties:
                      record:
                        "$ref": "#/components/schemas/PatientRecord"
                    required:
                    - record
            example:
              id: d1f8c0a2-6b3e-4c5a-9f21-0a1b2c3d4e5f
              type: canonical.v0.patient.connected
              sequence: 1
              occurred_at: '2026-07-01T09:00:00.000000Z'
              originating_request_id: req_example
              data:
                record:
                  id: 1
                  first_name: example
                  last_name: example
                  external_identifier: example
                  title: example
                  patient_identity_management_id: example
                  regulatory_reference_number: example
                  middle_name: example
                  preferred_name: example
                  full_legal_name: example
                  date_of_birth: '2026-07-01'
                  email: example
                  sex_assigned_at_birth: example
                  gender_identity: example
                  pronouns: example
                  ethnicity: example
                  fathers_ethnicity: example
                  mothers_ethnicity: example
                  country_of_birth: example
                  town_or_city_of_birth: example
                  nationality: example
                  religion: example
                  preferred_language: example
                  marital_status: example
                  blood_group: example
                  rhesus_factor: example
                  address_line_1: example
                  address_line_2: example
                  town_or_city: example
                  state_or_province: example
                  postcode: example
                  country: example
                  is_donor: true
                  is_deceased: true
                  date_of_death: '2026-07-01'
                  is_test_patient: true
                  primary_user_id: 1
                  brand_id: 1
                  fund_source_id: 1
                  metadata: {}
                  initial_contact_at: '2026-07-01T09:00:00.000000Z'
                  first_seen_at: '2026-07-01T09:00:00.000000Z'
                  app_invitation_last_sent_at: '2026-07-01T09:00:00.000000Z'
                  app_invitation_accepted_at: '2026-07-01T09:00:00.000000Z'
                  is_app_connected: true
                  registration_status: example
                  registration_completion_percentage: 1
                  care_stage: example
                  source_system: example
                  deleted: '2026-07-01T09:00:00.000000Z'
                  created_at: '2026-07-01T09:00:00.000000Z'
                  updated_at: '2026-07-01T09:00:00.000000Z'
                  is_portal_connected: true
      responses:
        '200':
          description: Acknowledge with any 2xx. Other statuses, redirects, timeouts,
            and network failures are retried.
  canonical.v0.patient.created:
    post:
      operationId: canonical_v0_patient_created
      summary: canonical.v0.patient.created
      description: Delivered when a `canonical.v0.patient.created` event is published.
        Subscribe via the `canonical.v0.patient.*` family (or this exact event name).
      security: []
      parameters:
      - name: Wawa-Signature
        in: header
        required: true
        description: t=<unix timestamp>,v1=<HMAC-SHA256 of `<timestamp>.<raw body>`>.
          One `v1` entry per accepted secret, so two during the 24-hour rotation overlap.
          See this document's description for the verification steps.
        schema:
          type: string
      - name: Wawa-Event-Id
        in: header
        required: true
        description: Stable event UUID; identical to the body `id`.
        schema:
          type: string
      - name: Wawa-Delivery-Id
        in: header
        required: true
        description: Stable UUID for this endpoint's delivery and its retries.
        schema:
          type: string
      - name: Wawa-Endpoint-Id
        in: header
        required: true
        description: Stable UUID of the endpoint this delivery was sent to; identical
          on every retry. Use it to select the signing secret to verify against, and
          to identify which wawa account the delivery came from.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
              - "$ref": "#/components/schemas/WebhookEnvelope"
              - type: object
                properties:
                  type:
                    const: canonical.v0.patient.created
                  data:
                    type: object
                    properties:
                      record:
                        "$ref": "#/components/schemas/PatientRecord"
                    required:
                    - record
            example:
              id: d1f8c0a2-6b3e-4c5a-9f21-0a1b2c3d4e5f
              type: canonical.v0.patient.created
              sequence: 1
              occurred_at: '2026-07-01T09:00:00.000000Z'
              originating_request_id: req_example
              data:
                record:
                  id: 1
                  first_name: example
                  last_name: example
                  external_identifier: example
                  title: example
                  patient_identity_management_id: example
                  regulatory_reference_number: example
                  middle_name: example
                  preferred_name: example
                  full_legal_name: example
                  date_of_birth: '2026-07-01'
                  email: example
                  sex_assigned_at_birth: example
                  gender_identity: example
                  pronouns: example
                  ethnicity: example
                  fathers_ethnicity: example
                  mothers_ethnicity: example
                  country_of_birth: example
                  town_or_city_of_birth: example
                  nationality: example
                  religion: example
                  preferred_language: example
                  marital_status: example
                  blood_group: example
                  rhesus_factor: example
                  address_line_1: example
                  address_line_2: example
                  town_or_city: example
                  state_or_province: example
                  postcode: example
                  country: example
                  is_donor: true
                  is_deceased: true
                  date_of_death: '2026-07-01'
                  is_test_patient: true
                  primary_user_id: 1
                  brand_id: 1
                  fund_source_id: 1
                  metadata: {}
                  initial_contact_at: '2026-07-01T09:00:00.000000Z'
                  first_seen_at: '2026-07-01T09:00:00.000000Z'
                  app_invitation_last_sent_at: '2026-07-01T09:00:00.000000Z'
                  app_invitation_accepted_at: '2026-07-01T09:00:00.000000Z'
                  is_app_connected: true
                  registration_status: example
                  registration_completion_percentage: 1
                  care_stage: example
                  source_system: example
                  deleted: '2026-07-01T09:00:00.000000Z'
                  created_at: '2026-07-01T09:00:00.000000Z'
                  updated_at: '2026-07-01T09:00:00.000000Z'
                  is_portal_connected: true
      responses:
        '200':
          description: Acknowledge with any 2xx. Other statuses, redirects, timeouts,
            and network failures are retried.
  canonical.v0.patient.demographics_updated:
    post:
      operationId: canonical_v0_patient_demographics_updated
      summary: canonical.v0.patient.demographics_updated
      description: Delivered when a `canonical.v0.patient.demographics_updated` event
        is published. Subscribe via the `canonical.v0.patient.*` family (or this exact
        event name).
      security: []
      parameters:
      - name: Wawa-Signature
        in: header
        required: true
        description: t=<unix timestamp>,v1=<HMAC-SHA256 of `<timestamp>.<raw body>`>.
          One `v1` entry per accepted secret, so two during the 24-hour rotation overlap.
          See this document's description for the verification steps.
        schema:
          type: string
      - name: Wawa-Event-Id
        in: header
        required: true
        description: Stable event UUID; identical to the body `id`.
        schema:
          type: string
      - name: Wawa-Delivery-Id
        in: header
        required: true
        description: Stable UUID for this endpoint's delivery and its retries.
        schema:
          type: string
      - name: Wawa-Endpoint-Id
        in: header
        required: true
        description: Stable UUID of the endpoint this delivery was sent to; identical
          on every retry. Use it to select the signing secret to verify against, and
          to identify which wawa account the delivery came from.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
              - "$ref": "#/components/schemas/WebhookEnvelope"
              - type: object
                properties:
                  type:
                    const: canonical.v0.patient.demographics_updated
                  data:
                    type: object
                    properties:
                      record:
                        "$ref": "#/components/schemas/PatientRecord"
                    required:
                    - record
            example:
              id: d1f8c0a2-6b3e-4c5a-9f21-0a1b2c3d4e5f
              type: canonical.v0.patient.demographics_updated
              sequence: 1
              occurred_at: '2026-07-01T09:00:00.000000Z'
              originating_request_id: req_example
              data:
                record:
                  id: 1
                  first_name: example
                  last_name: example
                  external_identifier: example
                  title: example
                  patient_identity_management_id: example
                  regulatory_reference_number: example
                  middle_name: example
                  preferred_name: example
                  full_legal_name: example
                  date_of_birth: '2026-07-01'
                  email: example
                  sex_assigned_at_birth: example
                  gender_identity: example
                  pronouns: example
                  ethnicity: example
                  fathers_ethnicity: example
                  mothers_ethnicity: example
                  country_of_birth: example
                  town_or_city_of_birth: example
                  nationality: example
                  religion: example
                  preferred_language: example
                  marital_status: example
                  blood_group: example
                  rhesus_factor: example
                  address_line_1: example
                  address_line_2: example
                  town_or_city: example
                  state_or_province: example
                  postcode: example
                  country: example
                  is_donor: true
                  is_deceased: true
                  date_of_death: '2026-07-01'
                  is_test_patient: true
                  primary_user_id: 1
                  brand_id: 1
                  fund_source_id: 1
                  metadata: {}
                  initial_contact_at: '2026-07-01T09:00:00.000000Z'
                  first_seen_at: '2026-07-01T09:00:00.000000Z'
                  app_invitation_last_sent_at: '2026-07-01T09:00:00.000000Z'
                  app_invitation_accepted_at: '2026-07-01T09:00:00.000000Z'
                  is_app_connected: true
                  registration_status: example
                  registration_completion_percentage: 1
                  care_stage: example
                  source_system: example
                  deleted: '2026-07-01T09:00:00.000000Z'
                  created_at: '2026-07-01T09:00:00.000000Z'
                  updated_at: '2026-07-01T09:00:00.000000Z'
                  is_portal_connected: true
      responses:
        '200':
          description: Acknowledge with any 2xx. Other statuses, redirects, timeouts,
            and network failures are retried.
  canonical.v0.patient.disconnected:
    post:
      operationId: canonical_v0_patient_disconnected
      summary: canonical.v0.patient.disconnected
      description: Delivered when a `canonical.v0.patient.disconnected` event is published.
        Subscribe via the `canonical.v0.patient.*` family (or this exact event name).
      security: []
      parameters:
      - name: Wawa-Signature
        in: header
        required: true
        description: t=<unix timestamp>,v1=<HMAC-SHA256 of `<timestamp>.<raw body>`>.
          One `v1` entry per accepted secret, so two during the 24-hour rotation overlap.
          See this document's description for the verification steps.
        schema:
          type: string
      - name: Wawa-Event-Id
        in: header
        required: true
        description: Stable event UUID; identical to the body `id`.
        schema:
          type: string
      - name: Wawa-Delivery-Id
        in: header
        required: true
        description: Stable UUID for this endpoint's delivery and its retries.
        schema:
          type: string
      - name: Wawa-Endpoint-Id
        in: header
        required: true
        description: Stable UUID of the endpoint this delivery was sent to; identical
          on every retry. Use it to select the signing secret to verify against, and
          to identify which wawa account the delivery came from.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
              - "$ref": "#/components/schemas/WebhookEnvelope"
              - type: object
                properties:
                  type:
                    const: canonical.v0.patient.disconnected
                  data:
                    type: object
                    properties:
                      record:
                        "$ref": "#/components/schemas/PatientRecord"
                    required:
                    - record
            example:
              id: d1f8c0a2-6b3e-4c5a-9f21-0a1b2c3d4e5f
              type: canonical.v0.patient.disconnected
              sequence: 1
              occurred_at: '2026-07-01T09:00:00.000000Z'
              originating_request_id: req_example
              data:
                record:
                  id: 1
                  first_name: example
                  last_name: example
                  external_identifier: example
                  title: example
                  patient_identity_management_id: example
                  regulatory_reference_number: example
                  middle_name: example
                  preferred_name: example
                  full_legal_name: example
                  date_of_birth: '2026-07-01'
                  email: example
                  sex_assigned_at_birth: example
                  gender_identity: example
                  pronouns: example
                  ethnicity: example
                  fathers_ethnicity: example
                  mothers_ethnicity: example
                  country_of_birth: example
                  town_or_city_of_birth: example
                  nationality: example
                  religion: example
                  preferred_language: example
                  marital_status: example
                  blood_group: example
                  rhesus_factor: example
                  address_line_1: example
                  address_line_2: example
                  town_or_city: example
                  state_or_province: example
                  postcode: example
                  country: example
                  is_donor: true
                  is_deceased: true
                  date_of_death: '2026-07-01'
                  is_test_patient: true
                  primary_user_id: 1
                  brand_id: 1
                  fund_source_id: 1
                  metadata: {}
                  initial_contact_at: '2026-07-01T09:00:00.000000Z'
                  first_seen_at: '2026-07-01T09:00:00.000000Z'
                  app_invitation_last_sent_at: '2026-07-01T09:00:00.000000Z'
                  app_invitation_accepted_at: '2026-07-01T09:00:00.000000Z'
                  is_app_connected: true
                  registration_status: example
                  registration_completion_percentage: 1
                  care_stage: example
                  source_system: example
                  deleted: '2026-07-01T09:00:00.000000Z'
                  created_at: '2026-07-01T09:00:00.000000Z'
                  updated_at: '2026-07-01T09:00:00.000000Z'
                  is_portal_connected: true
      responses:
        '200':
          description: Acknowledge with any 2xx. Other statuses, redirects, timeouts,
            and network failures are retried.
  canonical.v0.patient.fund_source_changed:
    post:
      operationId: canonical_v0_patient_fund_source_changed
      summary: canonical.v0.patient.fund_source_changed
      description: Delivered when a `canonical.v0.patient.fund_source_changed` event
        is published. Subscribe via the `canonical.v0.patient.*` family (or this exact
        event name).
      security: []
      parameters:
      - name: Wawa-Signature
        in: header
        required: true
        description: t=<unix timestamp>,v1=<HMAC-SHA256 of `<timestamp>.<raw body>`>.
          One `v1` entry per accepted secret, so two during the 24-hour rotation overlap.
          See this document's description for the verification steps.
        schema:
          type: string
      - name: Wawa-Event-Id
        in: header
        required: true
        description: Stable event UUID; identical to the body `id`.
        schema:
          type: string
      - name: Wawa-Delivery-Id
        in: header
        required: true
        description: Stable UUID for this endpoint's delivery and its retries.
        schema:
          type: string
      - name: Wawa-Endpoint-Id
        in: header
        required: true
        description: Stable UUID of the endpoint this delivery was sent to; identical
          on every retry. Use it to select the signing secret to verify against, and
          to identify which wawa account the delivery came from.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
              - "$ref": "#/components/schemas/WebhookEnvelope"
              - type: object
                properties:
                  type:
                    const: canonical.v0.patient.fund_source_changed
                  data:
                    type: object
                    properties:
                      record:
                        "$ref": "#/components/schemas/PatientRecord"
                    required:
                    - record
            example:
              id: d1f8c0a2-6b3e-4c5a-9f21-0a1b2c3d4e5f
              type: canonical.v0.patient.fund_source_changed
              sequence: 1
              occurred_at: '2026-07-01T09:00:00.000000Z'
              originating_request_id: req_example
              data:
                record:
                  id: 1
                  first_name: example
                  last_name: example
                  external_identifier: example
                  title: example
                  patient_identity_management_id: example
                  regulatory_reference_number: example
                  middle_name: example
                  preferred_name: example
                  full_legal_name: example
                  date_of_birth: '2026-07-01'
                  email: example
                  sex_assigned_at_birth: example
                  gender_identity: example
                  pronouns: example
                  ethnicity: example
                  fathers_ethnicity: example
                  mothers_ethnicity: example
                  country_of_birth: example
                  town_or_city_of_birth: example
                  nationality: example
                  religion: example
                  preferred_language: example
                  marital_status: example
                  blood_group: example
                  rhesus_factor: example
                  address_line_1: example
                  address_line_2: example
                  town_or_city: example
                  state_or_province: example
                  postcode: example
                  country: example
                  is_donor: true
                  is_deceased: true
                  date_of_death: '2026-07-01'
                  is_test_patient: true
                  primary_user_id: 1
                  brand_id: 1
                  fund_source_id: 1
                  metadata: {}
                  initial_contact_at: '2026-07-01T09:00:00.000000Z'
                  first_seen_at: '2026-07-01T09:00:00.000000Z'
                  app_invitation_last_sent_at: '2026-07-01T09:00:00.000000Z'
                  app_invitation_accepted_at: '2026-07-01T09:00:00.000000Z'
                  is_app_connected: true
                  registration_status: example
                  registration_completion_percentage: 1
                  care_stage: example
                  source_system: example
                  deleted: '2026-07-01T09:00:00.000000Z'
                  created_at: '2026-07-01T09:00:00.000000Z'
                  updated_at: '2026-07-01T09:00:00.000000Z'
                  is_portal_connected: true
      responses:
        '200':
          description: Acknowledge with any 2xx. Other statuses, redirects, timeouts,
            and network failures are retried.
  canonical.v0.patient.identity_updated:
    post:
      operationId: canonical_v0_patient_identity_updated
      summary: canonical.v0.patient.identity_updated
      description: Delivered when a `canonical.v0.patient.identity_updated` event
        is published. Subscribe via the `canonical.v0.patient.*` family (or this exact
        event name).
      security: []
      parameters:
      - name: Wawa-Signature
        in: header
        required: true
        description: t=<unix timestamp>,v1=<HMAC-SHA256 of `<timestamp>.<raw body>`>.
          One `v1` entry per accepted secret, so two during the 24-hour rotation overlap.
          See this document's description for the verification steps.
        schema:
          type: string
      - name: Wawa-Event-Id
        in: header
        required: true
        description: Stable event UUID; identical to the body `id`.
        schema:
          type: string
      - name: Wawa-Delivery-Id
        in: header
        required: true
        description: Stable UUID for this endpoint's delivery and its retries.
        schema:
          type: string
      - name: Wawa-Endpoint-Id
        in: header
        required: true
        description: Stable UUID of the endpoint this delivery was sent to; identical
          on every retry. Use it to select the signing secret to verify against, and
          to identify which wawa account the delivery came from.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
              - "$ref": "#/components/schemas/WebhookEnvelope"
              - type: object
                properties:
                  type:
                    const: canonical.v0.patient.identity_updated
                  data:
                    type: object
                    properties:
                      record:
                        "$ref": "#/components/schemas/PatientRecord"
                    required:
                    - record
            example:
              id: d1f8c0a2-6b3e-4c5a-9f21-0a1b2c3d4e5f
              type: canonical.v0.patient.identity_updated
              sequence: 1
              occurred_at: '2026-07-01T09:00:00.000000Z'
              originating_request_id: req_example
              data:
                record:
                  id: 1
                  first_name: example
                  last_name: example
                  external_identifier: example
                  title: example
                  patient_identity_management_id: example
                  regulatory_reference_number: example
                  middle_name: example
                  preferred_name: example
                  full_legal_name: example
                  date_of_birth: '2026-07-01'
                  email: example
                  sex_assigned_at_birth: example
                  gender_identity: example
                  pronouns: example
                  ethnicity: example
                  fathers_ethnicity: example
                  mothers_ethnicity: example
                  country_of_birth: example
                  town_or_city_of_birth: example
                  nationality: example
                  religion: example
                  preferred_language: example
                  marital_status: example
                  blood_group: example
                  rhesus_factor: example
                  address_line_1: example
                  address_line_2: example
                  town_or_city: example
                  state_or_province: example
                  postcode: example
                  country: example
                  is_donor: true
                  is_deceased: true
                  date_of_death: '2026-07-01'
                  is_test_patient: true
                  primary_user_id: 1
                  brand_id: 1
                  fund_source_id: 1
                  metadata: {}
                  initial_contact_at: '2026-07-01T09:00:00.000000Z'
                  first_seen_at: '2026-07-01T09:00:00.000000Z'
                  app_invitation_last_sent_at: '2026-07-01T09:00:00.000000Z'
                  app_invitation_accepted_at: '2026-07-01T09:00:00.000000Z'
                  is_app_connected: true
                  registration_status: example
                  registration_completion_percentage: 1
                  care_stage: example
                  source_system: example
                  deleted: '2026-07-01T09:00:00.000000Z'
                  created_at: '2026-07-01T09:00:00.000000Z'
                  updated_at: '2026-07-01T09:00:00.000000Z'
                  is_portal_connected: true
      responses:
        '200':
          description: Acknowledge with any 2xx. Other statuses, redirects, timeouts,
            and network failures are retried.
  canonical.v0.patient.invitation_accepted:
    post:
      operationId: canonical_v0_patient_invitation_accepted
      summary: canonical.v0.patient.invitation_accepted
      description: Delivered when a `canonical.v0.patient.invitation_accepted` event
        is published. Subscribe via the `canonical.v0.patient.*` family (or this exact
        event name).
      security: []
      parameters:
      - name: Wawa-Signature
        in: header
        required: true
        description: t=<unix timestamp>,v1=<HMAC-SHA256 of `<timestamp>.<raw body>`>.
          One `v1` entry per accepted secret, so two during the 24-hour rotation overlap.
          See this document's description for the verification steps.
        schema:
          type: string
      - name: Wawa-Event-Id
        in: header
        required: true
        description: Stable event UUID; identical to the body `id`.
        schema:
          type: string
      - name: Wawa-Delivery-Id
        in: header
        required: true
        description: Stable UUID for this endpoint's delivery and its retries.
        schema:
          type: string
      - name: Wawa-Endpoint-Id
        in: header
        required: true
        description: Stable UUID of the endpoint this delivery was sent to; identical
          on every retry. Use it to select the signing secret to verify against, and
          to identify which wawa account the delivery came from.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
              - "$ref": "#/components/schemas/WebhookEnvelope"
              - type: object
                properties:
                  type:
                    const: canonical.v0.patient.invitation_accepted
                  data:
                    type: object
                    properties:
                      record:
                        "$ref": "#/components/schemas/PatientRecord"
                    required:
                    - record
            example:
              id: d1f8c0a2-6b3e-4c5a-9f21-0a1b2c3d4e5f
              type: canonical.v0.patient.invitation_accepted
              sequence: 1
              occurred_at: '2026-07-01T09:00:00.000000Z'
              originating_request_id: req_example
              data:
                record:
                  id: 1
                  first_name: example
                  last_name: example
                  external_identifier: example
                  title: example
                  patient_identity_management_id: example
                  regulatory_reference_number: example
                  middle_name: example
                  preferred_name: example
                  full_legal_name: example
                  date_of_birth: '2026-07-01'
                  email: example
                  sex_assigned_at_birth: example
                  gender_identity: example
                  pronouns: example
                  ethnicity: example
                  fathers_ethnicity: example
                  mothers_ethnicity: example
                  country_of_birth: example
                  town_or_city_of_birth: example
                  nationality: example
                  religion: example
                  preferred_language: example
                  marital_status: example
                  blood_group: example
                  rhesus_factor: example
                  address_line_1: example
                  address_line_2: example
                  town_or_city: example
                  state_or_province: example
                  postcode: example
                  country: example
                  is_donor: true
                  is_deceased: true
                  date_of_death: '2026-07-01'
                  is_test_patient: true
                  primary_user_id: 1
                  brand_id: 1
                  fund_source_id: 1
                  metadata: {}
                  initial_contact_at: '2026-07-01T09:00:00.000000Z'
                  first_seen_at: '2026-07-01T09:00:00.000000Z'
                  app_invitation_last_sent_at: '2026-07-01T09:00:00.000000Z'
                  app_invitation_accepted_at: '2026-07-01T09:00:00.000000Z'
                  is_app_connected: true
                  registration_status: example
                  registration_completion_percentage: 1
                  care_stage: example
                  source_system: example
                  deleted: '2026-07-01T09:00:00.000000Z'
                  created_at: '2026-07-01T09:00:00.000000Z'
                  updated_at: '2026-07-01T09:00:00.000000Z'
                  is_portal_connected: true
      responses:
        '200':
          description: Acknowledge with any 2xx. Other statuses, redirects, timeouts,
            and network failures are retried.
  canonical.v0.patient.invited:
    post:
      operationId: canonical_v0_patient_invited
      summary: canonical.v0.patient.invited
      description: Delivered when a `canonical.v0.patient.invited` event is published.
        Subscribe via the `canonical.v0.patient.*` family (or this exact event name).
      security: []
      parameters:
      - name: Wawa-Signature
        in: header
        required: true
        description: t=<unix timestamp>,v1=<HMAC-SHA256 of `<timestamp>.<raw body>`>.
          One `v1` entry per accepted secret, so two during the 24-hour rotation overlap.
          See this document's description for the verification steps.
        schema:
          type: string
      - name: Wawa-Event-Id
        in: header
        required: true
        description: Stable event UUID; identical to the body `id`.
        schema:
          type: string
      - name: Wawa-Delivery-Id
        in: header
        required: true
        description: Stable UUID for this endpoint's delivery and its retries.
        schema:
          type: string
      - name: Wawa-Endpoint-Id
        in: header
        required: true
        description: Stable UUID of the endpoint this delivery was sent to; identical
          on every retry. Use it to select the signing secret to verify against, and
          to identify which wawa account the delivery came from.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
              - "$ref": "#/components/schemas/WebhookEnvelope"
              - type: object
                properties:
                  type:
                    const: canonical.v0.patient.invited
                  data:
                    type: object
                    properties:
                      record:
                        "$ref": "#/components/schemas/PatientRecord"
                    required:
                    - record
            example:
              id: d1f8c0a2-6b3e-4c5a-9f21-0a1b2c3d4e5f
              type: canonical.v0.patient.invited
              sequence: 1
              occurred_at: '2026-07-01T09:00:00.000000Z'
              originating_request_id: req_example
              data:
                record:
                  id: 1
                  first_name: example
                  last_name: example
                  external_identifier: example
                  title: example
                  patient_identity_management_id: example
                  regulatory_reference_number: example
                  middle_name: example
                  preferred_name: example
                  full_legal_name: example
                  date_of_birth: '2026-07-01'
                  email: example
                  sex_assigned_at_birth: example
                  gender_identity: example
                  pronouns: example
                  ethnicity: example
                  fathers_ethnicity: example
                  mothers_ethnicity: example
                  country_of_birth: example
                  town_or_city_of_birth: example
                  nationality: example
                  religion: example
                  preferred_language: example
                  marital_status: example
                  blood_group: example
                  rhesus_factor: example
                  address_line_1: example
                  address_line_2: example
                  town_or_city: example
                  state_or_province: example
                  postcode: example
                  country: example
                  is_donor: true
                  is_deceased: true
                  date_of_death: '2026-07-01'
                  is_test_patient: true
                  primary_user_id: 1
                  brand_id: 1
                  fund_source_id: 1
                  metadata: {}
                  initial_contact_at: '2026-07-01T09:00:00.000000Z'
                  first_seen_at: '2026-07-01T09:00:00.000000Z'
                  app_invitation_last_sent_at: '2026-07-01T09:00:00.000000Z'
                  app_invitation_accepted_at: '2026-07-01T09:00:00.000000Z'
                  is_app_connected: true
                  registration_status: example
                  registration_completion_percentage: 1
                  care_stage: example
                  source_system: example
                  deleted: '2026-07-01T09:00:00.000000Z'
                  created_at: '2026-07-01T09:00:00.000000Z'
                  updated_at: '2026-07-01T09:00:00.000000Z'
                  is_portal_connected: true
      responses:
        '200':
          description: Acknowledge with any 2xx. Other statuses, redirects, timeouts,
            and network failures are retried.
  canonical.v0.patient.updated:
    post:
      operationId: canonical_v0_patient_updated
      summary: canonical.v0.patient.updated
      description: Delivered when a `canonical.v0.patient.updated` event is published.
        Subscribe via the `canonical.v0.patient.*` family (or this exact event name).
      security: []
      parameters:
      - name: Wawa-Signature
        in: header
        required: true
        description: t=<unix timestamp>,v1=<HMAC-SHA256 of `<timestamp>.<raw body>`>.
          One `v1` entry per accepted secret, so two during the 24-hour rotation overlap.
          See this document's description for the verification steps.
        schema:
          type: string
      - name: Wawa-Event-Id
        in: header
        required: true
        description: Stable event UUID; identical to the body `id`.
        schema:
          type: string
      - name: Wawa-Delivery-Id
        in: header
        required: true
        description: Stable UUID for this endpoint's delivery and its retries.
        schema:
          type: string
      - name: Wawa-Endpoint-Id
        in: header
        required: true
        description: Stable UUID of the endpoint this delivery was sent to; identical
          on every retry. Use it to select the signing secret to verify against, and
          to identify which wawa account the delivery came from.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
              - "$ref": "#/components/schemas/WebhookEnvelope"
              - type: object
                properties:
                  type:
                    const: canonical.v0.patient.updated
                  data:
                    type: object
                    properties:
                      record:
                        "$ref": "#/components/schemas/PatientRecord"
                    required:
                    - record
            example:
              id: d1f8c0a2-6b3e-4c5a-9f21-0a1b2c3d4e5f
              type: canonical.v0.patient.updated
              sequence: 1
              occurred_at: '2026-07-01T09:00:00.000000Z'
              originating_request_id: req_example
              data:
                record:
                  id: 1
                  first_name: example
                  last_name: example
                  external_identifier: example
                  title: example
                  patient_identity_management_id: example
                  regulatory_reference_number: example
                  middle_name: example
                  preferred_name: example
                  full_legal_name: example
                  date_of_birth: '2026-07-01'
                  email: example
                  sex_assigned_at_birth: example
                  gender_identity: example
                  pronouns: example
                  ethnicity: example
                  fathers_ethnicity: example
                  mothers_ethnicity: example
                  country_of_birth: example
                  town_or_city_of_birth: example
                  nationality: example
                  religion: example
                  preferred_language: example
                  marital_status: example
                  blood_group: example
                  rhesus_factor: example
                  address_line_1: example
                  address_line_2: example
                  town_or_city: example
                  state_or_province: example
                  postcode: example
                  country: example
                  is_donor: true
                  is_deceased: true
                  date_of_death: '2026-07-01'
                  is_test_patient: true
                  primary_user_id: 1
                  brand_id: 1
                  fund_source_id: 1
                  metadata: {}
                  initial_contact_at: '2026-07-01T09:00:00.000000Z'
                  first_seen_at: '2026-07-01T09:00:00.000000Z'
                  app_invitation_last_sent_at: '2026-07-01T09:00:00.000000Z'
                  app_invitation_accepted_at: '2026-07-01T09:00:00.000000Z'
                  is_app_connected: true
                  registration_status: example
                  registration_completion_percentage: 1
                  care_stage: example
                  source_system: example
                  deleted: '2026-07-01T09:00:00.000000Z'
                  created_at: '2026-07-01T09:00:00.000000Z'
                  updated_at: '2026-07-01T09:00:00.000000Z'
                  is_portal_connected: true
      responses:
        '200':
          description: Acknowledge with any 2xx. Other statuses, redirects, timeouts,
            and network failures are retried.
  canonical.v0.patient_external_identifier.created:
    post:
      operationId: canonical_v0_patient_external_identifier_created
      summary: canonical.v0.patient_external_identifier.created
      description: Delivered when a `canonical.v0.patient_external_identifier.created`
        event is published. Subscribe via the `canonical.v0.patient_external_identifier.*`
        family (or this exact event name).
      security: []
      parameters:
      - name: Wawa-Signature
        in: header
        required: true
        description: t=<unix timestamp>,v1=<HMAC-SHA256 of `<timestamp>.<raw body>`>.
          One `v1` entry per accepted secret, so two during the 24-hour rotation overlap.
          See this document's description for the verification steps.
        schema:
          type: string
      - name: Wawa-Event-Id
        in: header
        required: true
        description: Stable event UUID; identical to the body `id`.
        schema:
          type: string
      - name: Wawa-Delivery-Id
        in: header
        required: true
        description: Stable UUID for this endpoint's delivery and its retries.
        schema:
          type: string
      - name: Wawa-Endpoint-Id
        in: header
        required: true
        description: Stable UUID of the endpoint this delivery was sent to; identical
          on every retry. Use it to select the signing secret to verify against, and
          to identify which wawa account the delivery came from.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
              - "$ref": "#/components/schemas/WebhookEnvelope"
              - type: object
                properties:
                  type:
                    const: canonical.v0.patient_external_identifier.created
                  data:
                    type: object
                    properties:
                      record:
                        "$ref": "#/components/schemas/PatientExternalIdentifierRecord"
                    required:
                    - record
            example:
              id: d1f8c0a2-6b3e-4c5a-9f21-0a1b2c3d4e5f
              type: canonical.v0.patient_external_identifier.created
              sequence: 1
              occurred_at: '2026-07-01T09:00:00.000000Z'
              originating_request_id: req_example
              data:
                record:
                  id: 1
                  patient_id: 1
                  identifier_type: example
                  identifier_value: example
                  issuing_jurisdiction: example
                  valid_from: '2026-07-01'
                  valid_to: '2026-07-01'
                  source_system: example
                  deleted: '2026-07-01T09:00:00.000000Z'
                  created_at: '2026-07-01T09:00:00.000000Z'
                  updated_at: '2026-07-01T09:00:00.000000Z'
                  primary: true
      responses:
        '200':
          description: Acknowledge with any 2xx. Other statuses, redirects, timeouts,
            and network failures are retried.
  canonical.v0.patient_external_identifier.deleted:
    post:
      operationId: canonical_v0_patient_external_identifier_deleted
      summary: canonical.v0.patient_external_identifier.deleted
      description: Delivered when a `canonical.v0.patient_external_identifier.deleted`
        event is published. Subscribe via the `canonical.v0.patient_external_identifier.*`
        family (or this exact event name).
      security: []
      parameters:
      - name: Wawa-Signature
        in: header
        required: true
        description: t=<unix timestamp>,v1=<HMAC-SHA256 of `<timestamp>.<raw body>`>.
          One `v1` entry per accepted secret, so two during the 24-hour rotation overlap.
          See this document's description for the verification steps.
        schema:
          type: string
      - name: Wawa-Event-Id
        in: header
        required: true
        description: Stable event UUID; identical to the body `id`.
        schema:
          type: string
      - name: Wawa-Delivery-Id
        in: header
        required: true
        description: Stable UUID for this endpoint's delivery and its retries.
        schema:
          type: string
      - name: Wawa-Endpoint-Id
        in: header
        required: true
        description: Stable UUID of the endpoint this delivery was sent to; identical
          on every retry. Use it to select the signing secret to verify against, and
          to identify which wawa account the delivery came from.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
              - "$ref": "#/components/schemas/WebhookEnvelope"
              - type: object
                properties:
                  type:
                    const: canonical.v0.patient_external_identifier.deleted
                  data:
                    type: object
                    properties:
                      record:
                        "$ref": "#/components/schemas/PatientExternalIdentifierRecord"
                    required:
                    - record
            example:
              id: d1f8c0a2-6b3e-4c5a-9f21-0a1b2c3d4e5f
              type: canonical.v0.patient_external_identifier.deleted
              sequence: 1
              occurred_at: '2026-07-01T09:00:00.000000Z'
              originating_request_id: req_example
              data:
                record:
                  id: 1
                  patient_id: 1
                  identifier_type: example
                  identifier_value: example
                  issuing_jurisdiction: example
                  valid_from: '2026-07-01'
                  valid_to: '2026-07-01'
                  source_system: example
                  deleted: '2026-07-01T09:00:00.000000Z'
                  created_at: '2026-07-01T09:00:00.000000Z'
                  updated_at: '2026-07-01T09:00:00.000000Z'
                  primary: true
      responses:
        '200':
          description: Acknowledge with any 2xx. Other statuses, redirects, timeouts,
            and network failures are retried.
  canonical.v0.patient_external_identifier.updated:
    post:
      operationId: canonical_v0_patient_external_identifier_updated
      summary: canonical.v0.patient_external_identifier.updated
      description: Delivered when a `canonical.v0.patient_external_identifier.updated`
        event is published. Subscribe via the `canonical.v0.patient_external_identifier.*`
        family (or this exact event name).
      security: []
      parameters:
      - name: Wawa-Signature
        in: header
        required: true
        description: t=<unix timestamp>,v1=<HMAC-SHA256 of `<timestamp>.<raw body>`>.
          One `v1` entry per accepted secret, so two during the 24-hour rotation overlap.
          See this document's description for the verification steps.
        schema:
          type: string
      - name: Wawa-Event-Id
        in: header
        required: true
        description: Stable event UUID; identical to the body `id`.
        schema:
          type: string
      - name: Wawa-Delivery-Id
        in: header
        required: true
        description: Stable UUID for this endpoint's delivery and its retries.
        schema:
          type: string
      - name: Wawa-Endpoint-Id
        in: header
        required: true
        description: Stable UUID of the endpoint this delivery was sent to; identical
          on every retry. Use it to select the signing secret to verify against, and
          to identify which wawa account the delivery came from.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
              - "$ref": "#/components/schemas/WebhookEnvelope"
              - type: object
                properties:
                  type:
                    const: canonical.v0.patient_external_identifier.updated
                  data:
                    type: object
                    properties:
                      record:
                        "$ref": "#/components/schemas/PatientExternalIdentifierRecord"
                    required:
                    - record
            example:
              id: d1f8c0a2-6b3e-4c5a-9f21-0a1b2c3d4e5f
              type: canonical.v0.patient_external_identifier.updated
              sequence: 1
              occurred_at: '2026-07-01T09:00:00.000000Z'
              originating_request_id: req_example
              data:
                record:
                  id: 1
                  patient_id: 1
                  identifier_type: example
                  identifier_value: example
                  issuing_jurisdiction: example
                  valid_from: '2026-07-01'
                  valid_to: '2026-07-01'
                  source_system: example
                  deleted: '2026-07-01T09:00:00.000000Z'
                  created_at: '2026-07-01T09:00:00.000000Z'
                  updated_at: '2026-07-01T09:00:00.000000Z'
                  primary: true
      responses:
        '200':
          description: Acknowledge with any 2xx. Other statuses, redirects, timeouts,
            and network failures are retried.
  canonical.v0.patient_location.created:
    post:
      operationId: canonical_v0_patient_location_created
      summary: canonical.v0.patient_location.created
      description: Delivered when a `canonical.v0.patient_location.created` event
        is published. Subscribe via the `canonical.v0.patient_location.*` family (or
        this exact event name).
      security: []
      parameters:
      - name: Wawa-Signature
        in: header
        required: true
        description: t=<unix timestamp>,v1=<HMAC-SHA256 of `<timestamp>.<raw body>`>.
          One `v1` entry per accepted secret, so two during the 24-hour rotation overlap.
          See this document's description for the verification steps.
        schema:
          type: string
      - name: Wawa-Event-Id
        in: header
        required: true
        description: Stable event UUID; identical to the body `id`.
        schema:
          type: string
      - name: Wawa-Delivery-Id
        in: header
        required: true
        description: Stable UUID for this endpoint's delivery and its retries.
        schema:
          type: string
      - name: Wawa-Endpoint-Id
        in: header
        required: true
        description: Stable UUID of the endpoint this delivery was sent to; identical
          on every retry. Use it to select the signing secret to verify against, and
          to identify which wawa account the delivery came from.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
              - "$ref": "#/components/schemas/WebhookEnvelope"
              - type: object
                properties:
                  type:
                    const: canonical.v0.patient_location.created
                  data:
                    type: object
                    properties:
                      record:
                        "$ref": "#/components/schemas/PatientLocationRecord"
                    required:
                    - record
            example:
              id: d1f8c0a2-6b3e-4c5a-9f21-0a1b2c3d4e5f
              type: canonical.v0.patient_location.created
              sequence: 1
              occurred_at: '2026-07-01T09:00:00.000000Z'
              originating_request_id: req_example
              data:
                record:
                  id: 1
                  patient_id: 1
                  location_id: 1
                  source_system: example
                  deleted: '2026-07-01T09:00:00.000000Z'
                  created_at: '2026-07-01T09:00:00.000000Z'
                  updated_at: '2026-07-01T09:00:00.000000Z'
      responses:
        '200':
          description: Acknowledge with any 2xx. Other statuses, redirects, timeouts,
            and network failures are retried.
  canonical.v0.patient_phone.created:
    post:
      operationId: canonical_v0_patient_phone_created
      summary: canonical.v0.patient_phone.created
      description: Delivered when a `canonical.v0.patient_phone.created` event is
        published. Subscribe via the `canonical.v0.patient_phone.*` family (or this
        exact event name).
      security: []
      parameters:
      - name: Wawa-Signature
        in: header
        required: true
        description: t=<unix timestamp>,v1=<HMAC-SHA256 of `<timestamp>.<raw body>`>.
          One `v1` entry per accepted secret, so two during the 24-hour rotation overlap.
          See this document's description for the verification steps.
        schema:
          type: string
      - name: Wawa-Event-Id
        in: header
        required: true
        description: Stable event UUID; identical to the body `id`.
        schema:
          type: string
      - name: Wawa-Delivery-Id
        in: header
        required: true
        description: Stable UUID for this endpoint's delivery and its retries.
        schema:
          type: string
      - name: Wawa-Endpoint-Id
        in: header
        required: true
        description: Stable UUID of the endpoint this delivery was sent to; identical
          on every retry. Use it to select the signing secret to verify against, and
          to identify which wawa account the delivery came from.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
              - "$ref": "#/components/schemas/WebhookEnvelope"
              - type: object
                properties:
                  type:
                    const: canonical.v0.patient_phone.created
                  data:
                    type: object
                    properties:
                      record:
                        "$ref": "#/components/schemas/PatientPhoneRecord"
                    required:
                    - record
            example:
              id: d1f8c0a2-6b3e-4c5a-9f21-0a1b2c3d4e5f
              type: canonical.v0.patient_phone.created
              sequence: 1
              occurred_at: '2026-07-01T09:00:00.000000Z'
              originating_request_id: req_example
              data:
                record:
                  id: 1
                  patient_id: 1
                  phone_type: example
                  phone_number: example
                  country_code: example
                  preferred_at: '2026-07-01T09:00:00.000000Z'
                  source_system: example
                  deleted: '2026-07-01T09:00:00.000000Z'
                  created_at: '2026-07-01T09:00:00.000000Z'
                  updated_at: '2026-07-01T09:00:00.000000Z'
      responses:
        '200':
          description: Acknowledge with any 2xx. Other statuses, redirects, timeouts,
            and network failures are retried.
  canonical.v0.patient_phone.deleted:
    post:
      operationId: canonical_v0_patient_phone_deleted
      summary: canonical.v0.patient_phone.deleted
      description: Delivered when a `canonical.v0.patient_phone.deleted` event is
        published. Subscribe via the `canonical.v0.patient_phone.*` family (or this
        exact event name).
      security: []
      parameters:
      - name: Wawa-Signature
        in: header
        required: true
        description: t=<unix timestamp>,v1=<HMAC-SHA256 of `<timestamp>.<raw body>`>.
          One `v1` entry per accepted secret, so two during the 24-hour rotation overlap.
          See this document's description for the verification steps.
        schema:
          type: string
      - name: Wawa-Event-Id
        in: header
        required: true
        description: Stable event UUID; identical to the body `id`.
        schema:
          type: string
      - name: Wawa-Delivery-Id
        in: header
        required: true
        description: Stable UUID for this endpoint's delivery and its retries.
        schema:
          type: string
      - name: Wawa-Endpoint-Id
        in: header
        required: true
        description: Stable UUID of the endpoint this delivery was sent to; identical
          on every retry. Use it to select the signing secret to verify against, and
          to identify which wawa account the delivery came from.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
              - "$ref": "#/components/schemas/WebhookEnvelope"
              - type: object
                properties:
                  type:
                    const: canonical.v0.patient_phone.deleted
                  data:
                    type: object
                    properties:
                      record:
                        "$ref": "#/components/schemas/PatientPhoneRecord"
                    required:
                    - record
            example:
              id: d1f8c0a2-6b3e-4c5a-9f21-0a1b2c3d4e5f
              type: canonical.v0.patient_phone.deleted
              sequence: 1
              occurred_at: '2026-07-01T09:00:00.000000Z'
              originating_request_id: req_example
              data:
                record:
                  id: 1
                  patient_id: 1
                  phone_type: example
                  phone_number: example
                  country_code: example
                  preferred_at: '2026-07-01T09:00:00.000000Z'
                  source_system: example
                  deleted: '2026-07-01T09:00:00.000000Z'
                  created_at: '2026-07-01T09:00:00.000000Z'
                  updated_at: '2026-07-01T09:00:00.000000Z'
      responses:
        '200':
          description: Acknowledge with any 2xx. Other statuses, redirects, timeouts,
            and network failures are retried.
  canonical.v0.patient_phone.updated:
    post:
      operationId: canonical_v0_patient_phone_updated
      summary: canonical.v0.patient_phone.updated
      description: Delivered when a `canonical.v0.patient_phone.updated` event is
        published. Subscribe via the `canonical.v0.patient_phone.*` family (or this
        exact event name).
      security: []
      parameters:
      - name: Wawa-Signature
        in: header
        required: true
        description: t=<unix timestamp>,v1=<HMAC-SHA256 of `<timestamp>.<raw body>`>.
          One `v1` entry per accepted secret, so two during the 24-hour rotation overlap.
          See this document's description for the verification steps.
        schema:
          type: string
      - name: Wawa-Event-Id
        in: header
        required: true
        description: Stable event UUID; identical to the body `id`.
        schema:
          type: string
      - name: Wawa-Delivery-Id
        in: header
        required: true
        description: Stable UUID for this endpoint's delivery and its retries.
        schema:
          type: string
      - name: Wawa-Endpoint-Id
        in: header
        required: true
        description: Stable UUID of the endpoint this delivery was sent to; identical
          on every retry. Use it to select the signing secret to verify against, and
          to identify which wawa account the delivery came from.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
              - "$ref": "#/components/schemas/WebhookEnvelope"
              - type: object
                properties:
                  type:
                    const: canonical.v0.patient_phone.updated
                  data:
                    type: object
                    properties:
                      record:
                        "$ref": "#/components/schemas/PatientPhoneRecord"
                    required:
                    - record
            example:
              id: d1f8c0a2-6b3e-4c5a-9f21-0a1b2c3d4e5f
              type: canonical.v0.patient_phone.updated
              sequence: 1
              occurred_at: '2026-07-01T09:00:00.000000Z'
              originating_request_id: req_example
              data:
                record:
                  id: 1
                  patient_id: 1
                  phone_type: example
                  phone_number: example
                  country_code: example
                  preferred_at: '2026-07-01T09:00:00.000000Z'
                  source_system: example
                  deleted: '2026-07-01T09:00:00.000000Z'
                  created_at: '2026-07-01T09:00:00.000000Z'
                  updated_at: '2026-07-01T09:00:00.000000Z'
      responses:
        '200':
          description: Acknowledge with any 2xx. Other statuses, redirects, timeouts,
            and network failures are retried.
  canonical.v0.patient_relationship.created:
    post:
      operationId: canonical_v0_patient_relationship_created
      summary: canonical.v0.patient_relationship.created
      description: Delivered when a `canonical.v0.patient_relationship.created` event
        is published. Subscribe via the `canonical.v0.patient_relationship.*` family
        (or this exact event name).
      security: []
      parameters:
      - name: Wawa-Signature
        in: header
        required: true
        description: t=<unix timestamp>,v1=<HMAC-SHA256 of `<timestamp>.<raw body>`>.
          One `v1` entry per accepted secret, so two during the 24-hour rotation overlap.
          See this document's description for the verification steps.
        schema:
          type: string
      - name: Wawa-Event-Id
        in: header
        required: true
        description: Stable event UUID; identical to the body `id`.
        schema:
          type: string
      - name: Wawa-Delivery-Id
        in: header
        required: true
        description: Stable UUID for this endpoint's delivery and its retries.
        schema:
          type: string
      - name: Wawa-Endpoint-Id
        in: header
        required: true
        description: Stable UUID of the endpoint this delivery was sent to; identical
          on every retry. Use it to select the signing secret to verify against, and
          to identify which wawa account the delivery came from.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
              - "$ref": "#/components/schemas/WebhookEnvelope"
              - type: object
                properties:
                  type:
                    const: canonical.v0.patient_relationship.created
                  data:
                    type: object
                    properties:
                      record:
                        "$ref": "#/components/schemas/PatientRelationshipRecord"
                    required:
                    - record
            example:
              id: d1f8c0a2-6b3e-4c5a-9f21-0a1b2c3d4e5f
              type: canonical.v0.patient_relationship.created
              sequence: 1
              occurred_at: '2026-07-01T09:00:00.000000Z'
              originating_request_id: req_example
              data:
                record:
                  id: 1
                  patient_id: 1
                  related_patient_id: 1
                  relationship_type: example
                  same_sex_couple: true
                  active_from: '2026-07-01'
                  active_to: '2026-07-01'
                  source_system: example
                  deleted: '2026-07-01T09:00:00.000000Z'
                  created_at: '2026-07-01T09:00:00.000000Z'
                  updated_at: '2026-07-01T09:00:00.000000Z'
      responses:
        '200':
          description: Acknowledge with any 2xx. Other statuses, redirects, timeouts,
            and network failures are retried.
  canonical.v0.patient_relationship.ended:
    post:
      operationId: canonical_v0_patient_relationship_ended
      summary: canonical.v0.patient_relationship.ended
      description: Delivered when a `canonical.v0.patient_relationship.ended` event
        is published. Subscribe via the `canonical.v0.patient_relationship.*` family
        (or this exact event name).
      security: []
      parameters:
      - name: Wawa-Signature
        in: header
        required: true
        description: t=<unix timestamp>,v1=<HMAC-SHA256 of `<timestamp>.<raw body>`>.
          One `v1` entry per accepted secret, so two during the 24-hour rotation overlap.
          See this document's description for the verification steps.
        schema:
          type: string
      - name: Wawa-Event-Id
        in: header
        required: true
        description: Stable event UUID; identical to the body `id`.
        schema:
          type: string
      - name: Wawa-Delivery-Id
        in: header
        required: true
        description: Stable UUID for this endpoint's delivery and its retries.
        schema:
          type: string
      - name: Wawa-Endpoint-Id
        in: header
        required: true
        description: Stable UUID of the endpoint this delivery was sent to; identical
          on every retry. Use it to select the signing secret to verify against, and
          to identify which wawa account the delivery came from.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
              - "$ref": "#/components/schemas/WebhookEnvelope"
              - type: object
                properties:
                  type:
                    const: canonical.v0.patient_relationship.ended
                  data:
                    type: object
                    properties:
                      record:
                        "$ref": "#/components/schemas/PatientRelationshipRecord"
                    required:
                    - record
            example:
              id: d1f8c0a2-6b3e-4c5a-9f21-0a1b2c3d4e5f
              type: canonical.v0.patient_relationship.ended
              sequence: 1
              occurred_at: '2026-07-01T09:00:00.000000Z'
              originating_request_id: req_example
              data:
                record:
                  id: 1
                  patient_id: 1
                  related_patient_id: 1
                  relationship_type: example
                  same_sex_couple: true
                  active_from: '2026-07-01'
                  active_to: '2026-07-01'
                  source_system: example
                  deleted: '2026-07-01T09:00:00.000000Z'
                  created_at: '2026-07-01T09:00:00.000000Z'
                  updated_at: '2026-07-01T09:00:00.000000Z'
      responses:
        '200':
          description: Acknowledge with any 2xx. Other statuses, redirects, timeouts,
            and network failures are retried.
  canonical.v0.patient_relationship.updated:
    post:
      operationId: canonical_v0_patient_relationship_updated
      summary: canonical.v0.patient_relationship.updated
      description: Delivered when a `canonical.v0.patient_relationship.updated` event
        is published. Subscribe via the `canonical.v0.patient_relationship.*` family
        (or this exact event name).
      security: []
      parameters:
      - name: Wawa-Signature
        in: header
        required: true
        description: t=<unix timestamp>,v1=<HMAC-SHA256 of `<timestamp>.<raw body>`>.
          One `v1` entry per accepted secret, so two during the 24-hour rotation overlap.
          See this document's description for the verification steps.
        schema:
          type: string
      - name: Wawa-Event-Id
        in: header
        required: true
        description: Stable event UUID; identical to the body `id`.
        schema:
          type: string
      - name: Wawa-Delivery-Id
        in: header
        required: true
        description: Stable UUID for this endpoint's delivery and its retries.
        schema:
          type: string
      - name: Wawa-Endpoint-Id
        in: header
        required: true
        description: Stable UUID of the endpoint this delivery was sent to; identical
          on every retry. Use it to select the signing secret to verify against, and
          to identify which wawa account the delivery came from.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
              - "$ref": "#/components/schemas/WebhookEnvelope"
              - type: object
                properties:
                  type:
                    const: canonical.v0.patient_relationship.updated
                  data:
                    type: object
                    properties:
                      record:
                        "$ref": "#/components/schemas/PatientRelationshipRecord"
                    required:
                    - record
            example:
              id: d1f8c0a2-6b3e-4c5a-9f21-0a1b2c3d4e5f
              type: canonical.v0.patient_relationship.updated
              sequence: 1
              occurred_at: '2026-07-01T09:00:00.000000Z'
              originating_request_id: req_example
              data:
                record:
                  id: 1
                  patient_id: 1
                  related_patient_id: 1
                  relationship_type: example
                  same_sex_couple: true
                  active_from: '2026-07-01'
                  active_to: '2026-07-01'
                  source_system: example
                  deleted: '2026-07-01T09:00:00.000000Z'
                  created_at: '2026-07-01T09:00:00.000000Z'
                  updated_at: '2026-07-01T09:00:00.000000Z'
      responses:
        '200':
          description: Acknowledge with any 2xx. Other statuses, redirects, timeouts,
            and network failures are retried.
  canonical.v0.scheduler_event.cancelled:
    post:
      operationId: canonical_v0_scheduler_event_cancelled
      summary: canonical.v0.scheduler_event.cancelled
      description: Delivered when a `canonical.v0.scheduler_event.cancelled` event
        is published. Subscribe via the `canonical.v0.scheduler_event.*` family (or
        this exact event name).
      security: []
      parameters:
      - name: Wawa-Signature
        in: header
        required: true
        description: t=<unix timestamp>,v1=<HMAC-SHA256 of `<timestamp>.<raw body>`>.
          One `v1` entry per accepted secret, so two during the 24-hour rotation overlap.
          See this document's description for the verification steps.
        schema:
          type: string
      - name: Wawa-Event-Id
        in: header
        required: true
        description: Stable event UUID; identical to the body `id`.
        schema:
          type: string
      - name: Wawa-Delivery-Id
        in: header
        required: true
        description: Stable UUID for this endpoint's delivery and its retries.
        schema:
          type: string
      - name: Wawa-Endpoint-Id
        in: header
        required: true
        description: Stable UUID of the endpoint this delivery was sent to; identical
          on every retry. Use it to select the signing secret to verify against, and
          to identify which wawa account the delivery came from.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
              - "$ref": "#/components/schemas/WebhookEnvelope"
              - type: object
                properties:
                  type:
                    const: canonical.v0.scheduler_event.cancelled
                  data:
                    type: object
                    properties:
                      record:
                        "$ref": "#/components/schemas/SchedulerEventRecord"
                    required:
                    - record
            example:
              id: d1f8c0a2-6b3e-4c5a-9f21-0a1b2c3d4e5f
              type: canonical.v0.scheduler_event.cancelled
              sequence: 1
              occurred_at: '2026-07-01T09:00:00.000000Z'
              originating_request_id: req_example
              data:
                record:
                  id: 1
                  external_identifier: example
                  patient_id: 1
                  scheduler_event_type_id: 1
                  event_type: example
                  title: example
                  start_at: '2026-07-01T09:00:00.000000Z'
                  end_at: '2026-07-01T09:00:00.000000Z'
                  all_day: true
                  status: example
                  appointment_status: example
                  scheduler_event_status_id: 1
                  location_id: 1
                  meeting_type: example
                  booked_online_at: '2026-07-01T09:00:00.000000Z'
                  notes: example
                  internal_notes: example
                  source_system: example
                  deleted: '2026-07-01T09:00:00.000000Z'
                  created_at: '2026-07-01T09:00:00.000000Z'
                  updated_at: '2026-07-01T09:00:00.000000Z'
      responses:
        '200':
          description: Acknowledge with any 2xx. Other statuses, redirects, timeouts,
            and network failures are retried.
  canonical.v0.scheduler_event.created:
    post:
      operationId: canonical_v0_scheduler_event_created
      summary: canonical.v0.scheduler_event.created
      description: Delivered when a `canonical.v0.scheduler_event.created` event is
        published. Subscribe via the `canonical.v0.scheduler_event.*` family (or this
        exact event name).
      security: []
      parameters:
      - name: Wawa-Signature
        in: header
        required: true
        description: t=<unix timestamp>,v1=<HMAC-SHA256 of `<timestamp>.<raw body>`>.
          One `v1` entry per accepted secret, so two during the 24-hour rotation overlap.
          See this document's description for the verification steps.
        schema:
          type: string
      - name: Wawa-Event-Id
        in: header
        required: true
        description: Stable event UUID; identical to the body `id`.
        schema:
          type: string
      - name: Wawa-Delivery-Id
        in: header
        required: true
        description: Stable UUID for this endpoint's delivery and its retries.
        schema:
          type: string
      - name: Wawa-Endpoint-Id
        in: header
        required: true
        description: Stable UUID of the endpoint this delivery was sent to; identical
          on every retry. Use it to select the signing secret to verify against, and
          to identify which wawa account the delivery came from.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
              - "$ref": "#/components/schemas/WebhookEnvelope"
              - type: object
                properties:
                  type:
                    const: canonical.v0.scheduler_event.created
                  data:
                    type: object
                    properties:
                      record:
                        "$ref": "#/components/schemas/SchedulerEventRecord"
                    required:
                    - record
            example:
              id: d1f8c0a2-6b3e-4c5a-9f21-0a1b2c3d4e5f
              type: canonical.v0.scheduler_event.created
              sequence: 1
              occurred_at: '2026-07-01T09:00:00.000000Z'
              originating_request_id: req_example
              data:
                record:
                  id: 1
                  external_identifier: example
                  patient_id: 1
                  scheduler_event_type_id: 1
                  event_type: example
                  title: example
                  start_at: '2026-07-01T09:00:00.000000Z'
                  end_at: '2026-07-01T09:00:00.000000Z'
                  all_day: true
                  status: example
                  appointment_status: example
                  scheduler_event_status_id: 1
                  location_id: 1
                  meeting_type: example
                  booked_online_at: '2026-07-01T09:00:00.000000Z'
                  notes: example
                  internal_notes: example
                  source_system: example
                  deleted: '2026-07-01T09:00:00.000000Z'
                  created_at: '2026-07-01T09:00:00.000000Z'
                  updated_at: '2026-07-01T09:00:00.000000Z'
      responses:
        '200':
          description: Acknowledge with any 2xx. Other statuses, redirects, timeouts,
            and network failures are retried.
  canonical.v0.scheduler_event.deleted:
    post:
      operationId: canonical_v0_scheduler_event_deleted
      summary: canonical.v0.scheduler_event.deleted
      description: Delivered when a `canonical.v0.scheduler_event.deleted` event is
        published. Subscribe via the `canonical.v0.scheduler_event.*` family (or this
        exact event name).
      security: []
      parameters:
      - name: Wawa-Signature
        in: header
        required: true
        description: t=<unix timestamp>,v1=<HMAC-SHA256 of `<timestamp>.<raw body>`>.
          One `v1` entry per accepted secret, so two during the 24-hour rotation overlap.
          See this document's description for the verification steps.
        schema:
          type: string
      - name: Wawa-Event-Id
        in: header
        required: true
        description: Stable event UUID; identical to the body `id`.
        schema:
          type: string
      - name: Wawa-Delivery-Id
        in: header
        required: true
        description: Stable UUID for this endpoint's delivery and its retries.
        schema:
          type: string
      - name: Wawa-Endpoint-Id
        in: header
        required: true
        description: Stable UUID of the endpoint this delivery was sent to; identical
          on every retry. Use it to select the signing secret to verify against, and
          to identify which wawa account the delivery came from.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
              - "$ref": "#/components/schemas/WebhookEnvelope"
              - type: object
                properties:
                  type:
                    const: canonical.v0.scheduler_event.deleted
                  data:
                    type: object
                    properties:
                      record:
                        "$ref": "#/components/schemas/SchedulerEventRecord"
                    required:
                    - record
            example:
              id: d1f8c0a2-6b3e-4c5a-9f21-0a1b2c3d4e5f
              type: canonical.v0.scheduler_event.deleted
              sequence: 1
              occurred_at: '2026-07-01T09:00:00.000000Z'
              originating_request_id: req_example
              data:
                record:
                  id: 1
                  external_identifier: example
                  patient_id: 1
                  scheduler_event_type_id: 1
                  event_type: example
                  title: example
                  start_at: '2026-07-01T09:00:00.000000Z'
                  end_at: '2026-07-01T09:00:00.000000Z'
                  all_day: true
                  status: example
                  appointment_status: example
                  scheduler_event_status_id: 1
                  location_id: 1
                  meeting_type: example
                  booked_online_at: '2026-07-01T09:00:00.000000Z'
                  notes: example
                  internal_notes: example
                  source_system: example
                  deleted: '2026-07-01T09:00:00.000000Z'
                  created_at: '2026-07-01T09:00:00.000000Z'
                  updated_at: '2026-07-01T09:00:00.000000Z'
      responses:
        '200':
          description: Acknowledge with any 2xx. Other statuses, redirects, timeouts,
            and network failures are retried.
  canonical.v0.scheduler_event.status_changed:
    post:
      operationId: canonical_v0_scheduler_event_status_changed
      summary: canonical.v0.scheduler_event.status_changed
      description: Delivered when a `canonical.v0.scheduler_event.status_changed`
        event is published. Subscribe via the `canonical.v0.scheduler_event.*` family
        (or this exact event name).
      security: []
      parameters:
      - name: Wawa-Signature
        in: header
        required: true
        description: t=<unix timestamp>,v1=<HMAC-SHA256 of `<timestamp>.<raw body>`>.
          One `v1` entry per accepted secret, so two during the 24-hour rotation overlap.
          See this document's description for the verification steps.
        schema:
          type: string
      - name: Wawa-Event-Id
        in: header
        required: true
        description: Stable event UUID; identical to the body `id`.
        schema:
          type: string
      - name: Wawa-Delivery-Id
        in: header
        required: true
        description: Stable UUID for this endpoint's delivery and its retries.
        schema:
          type: string
      - name: Wawa-Endpoint-Id
        in: header
        required: true
        description: Stable UUID of the endpoint this delivery was sent to; identical
          on every retry. Use it to select the signing secret to verify against, and
          to identify which wawa account the delivery came from.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
              - "$ref": "#/components/schemas/WebhookEnvelope"
              - type: object
                properties:
                  type:
                    const: canonical.v0.scheduler_event.status_changed
                  data:
                    type: object
                    properties:
                      record:
                        "$ref": "#/components/schemas/SchedulerEventRecord"
                    required:
                    - record
            example:
              id: d1f8c0a2-6b3e-4c5a-9f21-0a1b2c3d4e5f
              type: canonical.v0.scheduler_event.status_changed
              sequence: 1
              occurred_at: '2026-07-01T09:00:00.000000Z'
              originating_request_id: req_example
              data:
                record:
                  id: 1
                  external_identifier: example
                  patient_id: 1
                  scheduler_event_type_id: 1
                  event_type: example
                  title: example
                  start_at: '2026-07-01T09:00:00.000000Z'
                  end_at: '2026-07-01T09:00:00.000000Z'
                  all_day: true
                  status: example
                  appointment_status: example
                  scheduler_event_status_id: 1
                  location_id: 1
                  meeting_type: example
                  booked_online_at: '2026-07-01T09:00:00.000000Z'
                  notes: example
                  internal_notes: example
                  source_system: example
                  deleted: '2026-07-01T09:00:00.000000Z'
                  created_at: '2026-07-01T09:00:00.000000Z'
                  updated_at: '2026-07-01T09:00:00.000000Z'
      responses:
        '200':
          description: Acknowledge with any 2xx. Other statuses, redirects, timeouts,
            and network failures are retried.
  canonical.v0.scheduler_event.updated:
    post:
      operationId: canonical_v0_scheduler_event_updated
      summary: canonical.v0.scheduler_event.updated
      description: Delivered when a `canonical.v0.scheduler_event.updated` event is
        published. Subscribe via the `canonical.v0.scheduler_event.*` family (or this
        exact event name).
      security: []
      parameters:
      - name: Wawa-Signature
        in: header
        required: true
        description: t=<unix timestamp>,v1=<HMAC-SHA256 of `<timestamp>.<raw body>`>.
          One `v1` entry per accepted secret, so two during the 24-hour rotation overlap.
          See this document's description for the verification steps.
        schema:
          type: string
      - name: Wawa-Event-Id
        in: header
        required: true
        description: Stable event UUID; identical to the body `id`.
        schema:
          type: string
      - name: Wawa-Delivery-Id
        in: header
        required: true
        description: Stable UUID for this endpoint's delivery and its retries.
        schema:
          type: string
      - name: Wawa-Endpoint-Id
        in: header
        required: true
        description: Stable UUID of the endpoint this delivery was sent to; identical
          on every retry. Use it to select the signing secret to verify against, and
          to identify which wawa account the delivery came from.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
              - "$ref": "#/components/schemas/WebhookEnvelope"
              - type: object
                properties:
                  type:
                    const: canonical.v0.scheduler_event.updated
                  data:
                    type: object
                    properties:
                      record:
                        "$ref": "#/components/schemas/SchedulerEventRecord"
                    required:
                    - record
            example:
              id: d1f8c0a2-6b3e-4c5a-9f21-0a1b2c3d4e5f
              type: canonical.v0.scheduler_event.updated
              sequence: 1
              occurred_at: '2026-07-01T09:00:00.000000Z'
              originating_request_id: req_example
              data:
                record:
                  id: 1
                  external_identifier: example
                  patient_id: 1
                  scheduler_event_type_id: 1
                  event_type: example
                  title: example
                  start_at: '2026-07-01T09:00:00.000000Z'
                  end_at: '2026-07-01T09:00:00.000000Z'
                  all_day: true
                  status: example
                  appointment_status: example
                  scheduler_event_status_id: 1
                  location_id: 1
                  meeting_type: example
                  booked_online_at: '2026-07-01T09:00:00.000000Z'
                  notes: example
                  internal_notes: example
                  source_system: example
                  deleted: '2026-07-01T09:00:00.000000Z'
                  created_at: '2026-07-01T09:00:00.000000Z'
                  updated_at: '2026-07-01T09:00:00.000000Z'
      responses:
        '200':
          description: Acknowledge with any 2xx. Other statuses, redirects, timeouts,
            and network failures are retried.
