> ## Documentation Index
> Fetch the complete documentation index at: https://developer.suki.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Ambient Session Context

> Update existing session context with new clinical information

**Updates**

**Updated:**

* You can now update **Embedded Form templates** and prior section text through `sections[].precharted_content`. Read more in [Embedded Forms](https://developer.suki.ai/documentation/concepts/ambient-clinical-notes/embedded-forms.md).
* You can now update the ambient session context with new **EMR context** and **Medication orders**. Read more in [Medication orders](https://developer.suki.ai/documentation/concepts/ambient-clinical-notes/medication-orders.md).
* When you use [E/M Coding](https://developer.suki.ai/documentation/concepts/em-coding/overview.md) with an ambient session, you can update `patient.patient_type`, `patient.mrn`, `patient.insurance`, provider `first_name` / `last_name` / `npi`, and visit `date_of_service` / `total_time_minutes` / `csn`.

Use this endpoint to update the session context (Metadata provided when creating an ambient session (such as encounter type, patient age, diagnoses) that helps guide note generation and improve output quality.) for an ambient session (A single, time-bound instance of an ambient recording for a specific patient encounter that captures clinical conversations.). The API applies a field mask so you can send only the parts of the context you want to change.
This is a **PATCH** operation that allows partial updates to the session context.

> [!TIP]
>
> * Use `PATCH` when updating context for an existing Ambient session and `POST` when adding session context through the seed flow. For guidance on choosing the right operation in your UI, see [Update context during a visit](https://developer.suki.ai/documentation/how-to/ambient-clinical-notes/update-ambient-session-context.md).
>
> For guidance on what to include and exclude when seeding session context, refer to [Provide visit context](https://developer.suki.ai/documentation/how-to/ambient-clinical-notes/seed-ambient-session-context.md) guide.

## Comparison with POST Context

| Feature | POST (Seed) | PATCH (Update) |
| :- | - | - |
| **Purpose** | Set entire context all at once when available | Incrementally build context as information becomes available |
| **Data Approach** | Complete context payload | Partial context updates |
| **Timing** | Before EndSession. When you have all context information together. | Before EndSession. As information becomes available progressively |
| **Behavior** | Replaces entire context | Updates only specified fields. Those fields replace previous values. They do not append |

## Update Embedded Form templates

The PATCH `sections` list replaces the previous one, so send every section and `precharted_content` entry you want to keep.

> [!WARNING]
>
> Finish [Embedded Form](https://developer.suki.ai/documentation/concepts/ambient-clinical-notes/embedded-forms.md) updates **before you end the session**. You can update after streaming has started, including just before you end. For an example and what to do after a recording, refer to [Seed and read Embedded Forms](https://developer.suki.ai/documentation/how-to/ambient-clinical-notes/seed-and-read-embedded-forms.md#correct-templates-before-streaming).


## OpenAPI

````yaml PATCH /api/v1/ambient/session/{ambient_session_id}/context
openapi: 3.0.1
info:
  title: Suki Developer Platform
  description: >-
    REST and WebSocket APIs for the Suki Developer Platform. Authenticate with
    Login or Register to obtain a Suki access token, then integrate ambient
    clinical documentation, form filling, transcription, content rewrite, and
    reference metadata endpoints.
  contact: {}
  version: '1.0'
servers:
  - url: https://sdp.suki.ai
    description: >-
      Production base URL for Suki Developer Platform REST APIs. WebSocket
      endpoints use the same host with `wss://`.
security:
  - SukiTokenAuth: []
paths:
  /api/v1/ambient/session/{ambient_session_id}/context:
    patch:
      tags:
        - /api/v1/ambient/session
      summary: Update ambient session context
      description: >-
        Partially updates ambient session context using a field mask. Send only
        the context fields you want to add or change before you end the session.
      parameters:
        - name: ambient_session_id
          in: path
          description: >-
            UUID for the ambient session. Use the `ambient_session_id` returned
            from Create Ambient Session, or the UUID you supplied in that
            request.
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/ProviderIdHeader'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/controllers.UpdateContextRequest'
            example:
              diagnoses:
                values:
                  - codes:
                      - code: '30422'
                        description: Essential hypertension
                        type: IMO
                    diagnosis_note: Hypertension
              emr:
                target_emr: ATHENA
              orders:
                medication_orders:
                  values:
                    - dosage:
                        quantity: 1
                        raw_value: 1 tablet
                        unit: TAB
                      drug_name: Acetaminophen 500mg Tab
                      duration_in_days: 7
                      end_date: '2026-01-08T00:00:00Z'
                      format:
                        raw_value: Tablet
                      frequency:
                        raw_value: once daily
                        structured_value: ONE_A_DAY
                      instructions: Take with food
                      linked_diagnosis_codes:
                        - code: I10
                          type: ICD10
                      medication_code:
                        code: '860975'
                        type: RXCUI
                      medication_timing:
                        raw_value: morning
                        structured_value: IN_THE_MORNING
                      metadata:
                        encounter_relation: CURRENT_ENCOUNTER
                        origin: SUKI_AMBIENT
                      number_of_refills: 3
                      quantity_dispensed: 1 box
                      route:
                        raw_value: Oral
                      start_date: '2026-01-01T00:00:00Z'
                      status: ACTIVE
                      strength:
                        raw_value: 500mg
              patient:
                dob: '2000-01-01'
                sex: male
              provider:
                role: ATTENDING
                specialty: CARDIOLOGY
              sections:
                - loinc: 10164-2
                  precharted_content:
                    - type: string
                      text: >-
                        Patient reported low mood and poor sleep at the last
                        visit.
                    - type: structured
                      template_id: hpi-mood-v1
                      fields:
                        - id: slot-symptoms
                          key: symptoms
                          context: Which symptoms has the patient had?
                          type: multi_select
                          options:
                            - low mood
                            - poor sleep
                            - anxiety
                        - id: slot-duration
                          key: symptom_duration
                          context: How long have the symptoms been present?
                          type: radio
                          options:
                            - recently
                            - in the last two weeks
                            - for over 6 months
                        - id: slot-onset
                          key: onset_date
                          type: date
              visit:
                chief_complaint: Headache
                encounter_type: AMBULATORY
                reason_for_visit: Follow-up for migraines
                visit_type: ESTABLISHED_PATIENT
        required: true
      responses:
        '200':
          description: Request succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/controllers.UpdateContextResponse'
              example:
                context:
                  diagnoses:
                    values:
                      - codes:
                          - code: '30422'
                            description: Essential hypertension
                            type: IMO
                        diagnosis_note: Hypertension
                  emr:
                    target_emr: ATHENA
                  orders:
                    medication_orders:
                      values:
                        - dosage:
                            quantity: 1
                            raw_value: 1 tablet
                            unit: TAB
                          drug_name: Acetaminophen 500mg Tab
                          duration_in_days: 7
                          end_date: '2026-01-08T00:00:00Z'
                          format:
                            raw_value: Tablet
                          frequency:
                            raw_value: once daily
                            structured_value: ONE_A_DAY
                          instructions: Take with food
                          linked_diagnosis_codes:
                            - code: I10
                              type: ICD10
                          medication_code:
                            code: '860975'
                            type: RXCUI
                          medication_timing:
                            raw_value: morning
                            structured_value: IN_THE_MORNING
                          metadata:
                            encounter_relation: CURRENT_ENCOUNTER
                            origin: SUKI_AMBIENT
                          number_of_refills: 3
                          quantity_dispensed: 1 box
                          route:
                            raw_value: Oral
                          start_date: '2026-01-01T00:00:00Z'
                          status: ACTIVE
                          strength:
                            raw_value: 500mg
                  patient:
                    dob: '2000-01-01'
                    sex: male
                  provider:
                    role: ATTENDING
                    specialty: CARDIOLOGY
                  sections:
                    - loinc: 10164-2
                  visit:
                    chief_complaint: Headache
                    encounter_type: AMBULATORY
                    reason_for_visit: Follow-up for migraines
                    visit_type: ESTABLISHED_PATIENT
        '400':
          description: Bad request. The request body or parameters failed validation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/controllers.BadRequestError'
        '401':
          description: Unauthorized. The Suki access token is missing, expired, or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/controllers.AuthenticationError'
        '403':
          description: Forbidden. The authenticated user cannot access this resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/controllers.ForbiddenError'
        '404':
          description: Not found. The session, encounter, or resource ID does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/controllers.NotFoundError'
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/controllers.InternalServerError'
      security:
        - SukiTokenAuth: []
      x-codeSamples:
        - lang: bash
          label: cURL
          source: |-
            curl --request PATCH \
              --url https://sdp.suki.ai/api/v1/ambient/session/<ambient_session_id>/context \
              --header 'Content-Type: application/json' \
              --header 'sdp_suki_token: <sdp_suki_token>' \
              --header 'sdp_provider_id: <sdp_provider_id>' \
              --data '{
              "diagnoses": {
                "values": [
                  {
                    "codes": [
                      {
                        "code": "30422",
                        "description": "Essential hypertension",
                        "type": "IMO"
                      }
                    ],
                    "diagnosis_note": "Hypertension"
                  }
                ]
              },
              "emr": {
                "target_emr": "ATHENA"
              },
              "orders": {
                "medication_orders": {
                  "values": [
                    {
                      "dosage": {
                        "quantity": 1,
                        "raw_value": "1 tablet",
                        "unit": "TAB"
                      },
                      "drug_name": "Acetaminophen 500mg Tab",
                      "duration_in_days": 7,
                      "end_date": "2026-01-08T00:00:00Z",
                      "format": {
                        "raw_value": "Tablet"
                      },
                      "frequency": {
                        "raw_value": "once daily",
                        "structured_value": "ONE_A_DAY"
                      },
                      "instructions": "Take with food",
                      "linked_diagnosis_codes": [
                        {
                          "code": "I10",
                          "type": "ICD10"
                        }
                      ],
                      "medication_code": {
                        "code": "860975",
                        "type": "RXCUI"
                      },
                      "medication_timing": {
                        "raw_value": "morning",
                        "structured_value": "IN_THE_MORNING"
                      },
                      "metadata": {
                        "encounter_relation": "CURRENT_ENCOUNTER",
                        "origin": "SUKI_AMBIENT"
                      },
                      "number_of_refills": 3,
                      "quantity_dispensed": "1 box",
                      "route": {
                        "raw_value": "Oral"
                      },
                      "start_date": "2026-01-01T00:00:00Z",
                      "status": "ACTIVE",
                      "strength": {
                        "raw_value": "500mg"
                      }
                    }
                  ]
                }
              },
              "patient": {
                "dob": "2000-01-01",
                "sex": "male"
              },
              "provider": {
                "role": "ATTENDING",
                "specialty": "CARDIOLOGY"
              },
              "sections": [
                {
                  "loinc": "10164-2",
                  "precharted_content": [
                    {
                      "type": "string",
                      "text": "Patient reported low mood and poor sleep at the last visit."
                    },
                    {
                      "type": "structured",
                      "template_id": "hpi-mood-v1",
                      "fields": [
                        {
                          "id": "slot-symptoms",
                          "key": "symptoms",
                          "context": "Which symptoms has the patient had?",
                          "type": "multi_select",
                          "options": [
                            "low mood",
                            "poor sleep",
                            "anxiety"
                          ]
                        },
                        {
                          "id": "slot-duration",
                          "key": "symptom_duration",
                          "context": "How long have the symptoms been present?",
                          "type": "radio",
                          "options": [
                            "recently",
                            "in the last two weeks",
                            "for over 6 months"
                          ]
                        },
                        {
                          "id": "slot-onset",
                          "key": "onset_date",
                          "type": "date"
                        }
                      ]
                    }
                  ]
                }
              ],
              "visit": {
                "chief_complaint": "Headache",
                "encounter_type": "AMBULATORY",
                "reason_for_visit": "Follow-up for migraines",
                "visit_type": "ESTABLISHED_PATIENT"
              }
            }'
components:
  parameters:
    ProviderIdHeader:
      name: sdp_provider_id
      in: header
      description: >-
        **Optional** for standard partners.


        **Required** for:


        - **Bearer authentication.** Use the same `provider_id` returned by the
        Login or Register API.

        - **Single Auth Token authentication.** Include the same `provider_id`
        on every request as `sdp_provider_id`.
      required: false
      schema:
        type: string
        example: provider-123
  schemas:
    controllers.UpdateContextRequest:
      type: object
      properties:
        diagnoses:
          type: object
          description: '**Optional** - Diagnoses to add or update.'
          allOf:
            - $ref: '#/components/schemas/controllers.DiagnosesContext'
        emr:
          type: object
          description: '**Optional** - EMR context to add or update.'
          allOf:
            - $ref: '#/components/schemas/controllers.EmrContext'
        orders:
          type: object
          description: '**Optional** - Medication orders to add or update.'
          allOf:
            - $ref: '#/components/schemas/controllers.OrdersContext'
        patient:
          type: object
          description: '**Optional** - Patient demographics to add or update.'
          allOf:
            - $ref: '#/components/schemas/controllers.PatientContext'
        provider:
          type: object
          description: '**Optional** - Provider details to add or update.'
          allOf:
            - $ref: '#/components/schemas/controllers.ProviderContext'
        sections:
          type: array
          description: >-
            **Optional** - Information about the sections to be generated.

            If not provided, all supported
            [note-sections](/documentation/concepts/ambient-clinical-notes/note-sections)
            will be generated.
          items:
            $ref: '#/components/schemas/controllers.SectionContext'
        visit:
          type: object
          description: '**Optional** - Visit details to add or update.'
          allOf:
            - $ref: '#/components/schemas/controllers.VisitContext'
      description: >-
        Partial ambient session context update. Include only the fields you want
        to add or change.
      example:
        diagnoses:
          values:
            - codes:
                - code: '30422'
                  description: Essential hypertension
                  type: IMO
              diagnosis_note: Hypertension
        emr:
          target_emr: ATHENA
        orders:
          medication_orders:
            values:
              - dosage:
                  quantity: 1
                  raw_value: 1 tablet
                  unit: TAB
                drug_name: Acetaminophen 500mg Tab
                duration_in_days: 7
                end_date: '2026-01-08T00:00:00Z'
                format:
                  raw_value: Tablet
                frequency:
                  raw_value: once daily
                  structured_value: ONE_A_DAY
                instructions: Take with food
                linked_diagnosis_codes:
                  - code: I10
                    type: ICD10
                medication_code:
                  code: '860975'
                  type: RXCUI
                medication_timing:
                  raw_value: morning
                  structured_value: IN_THE_MORNING
                metadata:
                  encounter_relation: CURRENT_ENCOUNTER
                  origin: SUKI_AMBIENT
                number_of_refills: 3
                quantity_dispensed: 1 box
                route:
                  raw_value: Oral
                start_date: '2026-01-01T00:00:00Z'
                status: ACTIVE
                strength:
                  raw_value: 500mg
        patient:
          dob: '2000-01-01'
          sex: male
        provider:
          role: ATTENDING
          specialty: CARDIOLOGY
        sections:
          - loinc: 10164-2
            precharted_content:
              - type: string
                text: Patient reported low mood and poor sleep at the last visit.
              - type: structured
                template_id: hpi-mood-v1
                fields:
                  - id: slot-symptoms
                    key: symptoms
                    context: Which symptoms has the patient had?
                    type: multi_select
                    options:
                      - low mood
                      - poor sleep
                      - anxiety
                  - id: slot-duration
                    key: symptom_duration
                    context: How long have the symptoms been present?
                    type: radio
                    options:
                      - recently
                      - in the last two weeks
                      - for over 6 months
                  - id: slot-onset
                    key: onset_date
                    type: date
        visit:
          chief_complaint: Headache
          encounter_type: AMBULATORY
          reason_for_visit: Follow-up for migraines
          visit_type: ESTABLISHED_PATIENT
    controllers.UpdateContextResponse:
      type: object
      properties:
        context:
          type: object
          description: Updated context for the session
          allOf:
            - $ref: '#/components/schemas/controllers.Context'
      description: Updated ambient session context after a successful PATCH.
      example:
        context:
          diagnoses:
            values:
              - codes:
                  - code: '30422'
                    description: Essential hypertension
                    type: IMO
                diagnosis_note: Hypertension
          emr:
            target_emr: ATHENA
          orders:
            medication_orders:
              values:
                - dosage:
                    quantity: 1
                    raw_value: 1 tablet
                    unit: TAB
                  drug_name: Acetaminophen 500mg Tab
                  duration_in_days: 7
                  end_date: '2026-01-08T00:00:00Z'
                  format:
                    raw_value: Tablet
                  frequency:
                    raw_value: once daily
                    structured_value: ONE_A_DAY
                  instructions: Take with food
                  linked_diagnosis_codes:
                    - code: I10
                      type: ICD10
                  medication_code:
                    code: '860975'
                    type: RXCUI
                  medication_timing:
                    raw_value: morning
                    structured_value: IN_THE_MORNING
                  metadata:
                    encounter_relation: CURRENT_ENCOUNTER
                    origin: SUKI_AMBIENT
                  number_of_refills: 3
                  quantity_dispensed: 1 box
                  route:
                    raw_value: Oral
                  start_date: '2026-01-01T00:00:00Z'
                  status: ACTIVE
                  strength:
                    raw_value: 500mg
          patient:
            dob: '2000-01-01'
            sex: male
          provider:
            role: ATTENDING
            specialty: CARDIOLOGY
          sections:
            - loinc: 10164-2
          visit:
            chief_complaint: Headache
            encounter_type: AMBULATORY
            reason_for_visit: Follow-up for migraines
            visit_type: ESTABLISHED_PATIENT
    controllers.BadRequestError:
      description: Bad Request Response
      type: object
      properties:
        code:
          type: integer
          example: 400
        message:
          type: string
          example: invalid request
    controllers.AuthenticationError:
      description: Authentication Failure Response
      type: object
      properties:
        code:
          type: integer
          example: 401
        message:
          type: string
          example: invalid token
    controllers.ForbiddenError:
      type: object
      properties:
        code:
          type: integer
          example: 403
          description: HTTP status code for the error.
        message:
          type: string
          example: forbidden
          description: Human-readable description of the authorization failure.
      description: Error response when the caller lacks permission.
    controllers.NotFoundError:
      description: Not Found Response
      type: object
      properties:
        code:
          type: integer
          example: 404
        message:
          type: string
          example: not found
    controllers.InternalServerError:
      description: Internal Server Error Response
      type: object
      properties:
        code:
          type: integer
          example: 500
        message:
          type: string
          example: internal server error
    controllers.DiagnosesContext:
      type: object
      properties:
        values:
          description: (Optional) Array of diagnosis requests
          type: array
          items:
            $ref: '#/components/schemas/controllers.DiagnosisRequest'
    controllers.EmrContext:
      type: object
      properties:
        target_emr:
          type: string
          description: >-
            **Optional** - Target EMR for context-aware processing, such as
            order submission and validation rules. Supported values include
            ATHENA, EPIC, and CERNER.
          enum:
            - ATHENA
            - EPIC
            - CERNER
          example: ATHENA
      description: Target EMR for context-aware processing.
    controllers.OrdersContext:
      type: object
      properties:
        medication_orders:
          type: object
          description: '**Optional** - Medication orders supplied in context'
          allOf:
            - $ref: '#/components/schemas/controllers.MedicationOrdersContext'
    controllers.PatientContext:
      type: object
      properties:
        dob:
          description: (Optional) {YYYY-MM-DD}
          type: string
          example: '2000-01-01'
        insurance:
          description: (Optional) Insurance coverages. Used for E/M coding.
          allOf:
            - $ref: '#/components/schemas/controllers.EMInsuranceInfo'
        mrn:
          description: >-
            (Optional) Patient medical record number, up to 64 characters. Used
            for E/M coding.
          type: string
          example: MRN-12345
        name:
          description: (Optional) Patient name for create + note label
          allOf:
            - d0eea748-0a9b-44cd-b442-8963f65514dd
        patient_id:
          description: (Optional) Partner patient id (maps to ms-patients emr_id)
          type: string
          example: partner-patient-123
        patient_type:
          description: (Optional) Used for E/M coding.
          type: string
          enum:
            - NEW_PATIENT
            - ESTABLISHED_PATIENT
          example: ESTABLISHED_PATIENT
        sex:
          description: (Optional)
          type: string
          enum:
            - male
            - female
            - other
            - unknown
          example: male
    controllers.ProviderContext:
      type: object
      properties:
        first_name:
          description: (Optional) Used for E/M coding.
          type: string
          example: Jane
        last_name:
          description: (Optional) Used for E/M coding.
          type: string
          example: Doe
        npi:
          description: >-
            (Optional) National Provider Identifier, up to 64 characters. Used
            for E/M coding.
          type: string
          example: '1234567893'
        role:
          description: (Optional)
          type: string
          example: ATTENDING
        specialty:
          description: (Optional)
          type: string
          example: CARDIOLOGY
    controllers.SectionContext:
      type: object
      required:
        - loinc
      properties:
        loinc:
          type: string
          description: >-
            LOINC code for the section. Supported Loinc codes are available at:
            [note-sections](/documentation/concepts/ambient-clinical-notes/note-sections)
          example: 10164-2
        precharted_content:
          type: array
          description: >-
            **Optional** - Content you already have for this section, Embedded
            Form templates, or both. Each entry is either `type: "string"`
            (prior section text) or `type: "structured"` (an Embedded Form
            template). You can send more than one `structured` entry on the same
            LOINC. Refer to [Embedded
            Forms](/documentation/concepts/ambient-clinical-notes/embedded-forms).
          items:
            $ref: '#/components/schemas/controllers.PrechartedContent'
    controllers.VisitContext:
      type: object
      properties:
        chief_complaint:
          description: (Optional)
          type: string
          example: Headache
        csn:
          description: >-
            (Optional) Contact Serial Number, up to 64 characters. Used for E/M
            coding.
          type: string
          example: CSN-12345
        date_of_service:
          description: (Optional) {YYYY-MM-DD}, not in the future. Used for E/M coding.
          type: string
          example: '2026-01-01'
        encounter_type:
          description: (Optional)
          type: string
          example: AMBULATORY
        reason_for_visit:
          description: (Optional)
          type: string
          example: Follow-up for migraines
        total_time_minutes:
          description: >-
            (Optional) Total clinician time in minutes, greater than 0. Used for
            time-based E/M coding.
          type: integer
          example: 35
        visit_type:
          description: (Optional)
          type: string
          example: ESTABLISHED_PATIENT
    controllers.Context:
      type: object
      properties:
        diagnoses:
          type: object
          description: >-
            **Optional** - Existing diagnoses and coded values to include in
            note generation.
          allOf:
            - $ref: '#/components/schemas/controllers.DiagnosesContext'
        emr:
          type: object
          description: '**Optional** - EMR context, including the target EMR system.'
          allOf:
            - $ref: '#/components/schemas/controllers.EmrContext'
        orders:
          type: object
          description: '**Optional** - Medication orders and related order context.'
          allOf:
            - $ref: '#/components/schemas/controllers.OrdersContext'
        patient:
          type: object
          description: '**Optional** - Patient demographics such as date of birth and sex.'
          allOf:
            - $ref: '#/components/schemas/controllers.PatientContext'
        provider:
          type: object
          description: '**Optional** - Provider role and specialty for the session.'
          allOf:
            - $ref: '#/components/schemas/controllers.ProviderContext'
        sections:
          type: array
          description: >-
            **Optional** - Information about the sections to be generated.

            If not provided, all supported
            [note-sections](/documentation/concepts/ambient-clinical-notes/note-sections)
            will be generated.
          items:
            $ref: '#/components/schemas/controllers.SectionContext'
        visit:
          type: object
          description: >-
            **Optional** - Visit details such as chief complaint and encounter
            type.
          allOf:
            - $ref: '#/components/schemas/controllers.VisitContext'
      description: >-
        Clinical context for the ambient session, including provider, patient,
        visit, sections, diagnoses, EMR, and medication orders.
    controllers.DiagnosisRequest:
      type: object
      properties:
        codes:
          type: array
          description: >-
            **Optional** - Codes associated with the diagnosis. When sending
            context, use ICD10 or IMO. HCC codes are returned in structured data
            output only.
          items:
            $ref: '#/components/schemas/controllers.Code'
        diagnosis_note:
          type: string
          description: '**Optional** - Diagnosis note'
          example: Hypertension
    controllers.MedicationOrdersContext:
      type: object
      properties:
        values:
          type: array
          description: '**Optional** - Medication order requests'
          items:
            $ref: '#/components/schemas/controllers.MedicationOrderRequest'
    controllers.EMInsuranceInfo:
      description: Insurance coverages used for E/M coding
      type: object
      properties:
        coverages:
          type: array
          items:
            $ref: '#/components/schemas/controllers.EMInsuranceCoverage'
    controllers.PrechartedContent:
      type: object
      required:
        - type
      description: >-
        One entry in `sections[].precharted_content`. Send `text` when `type` is
        `string`. Send `template_id` and `fields` when `type` is `structured`.
        Do not mix them in one entry.
      properties:
        type:
          type: string
          enum:
            - string
            - structured
          description: >-
            **Required** - `string` for prior section text, or `structured` for
            an Embedded Form template. Entries with any other value are skipped.
          example: structured
        text:
          type: string
          description: >-
            **Required when `type` is `string`** - Prior text for this section,
            such as history already in the chart. Suki considers it with the
            visit conversation when it generates the section.
          example: Patient reported low mood and poor sleep at the last visit.
        template_id:
          type: string
          description: >-
            **Required when `type` is `structured`** - Your stable ID for the
            template. The same value comes back on the filled values. A
            `structured` entry without `template_id` is skipped and returns no
            filled values.
          example: hpi-mood-v1
        fields:
          type: array
          description: >-
            **Required when `type` is `structured`** - The fields you want Suki
            to fill from the visit.
          items:
            $ref: '#/components/schemas/controllers.StructuredDataField'
    controllers.Code:
      type: object
      properties:
        code:
          description: Code value
          type: string
          example: '30422'
        description:
          description: Description of the code
          type: string
          example: Essential hypertension
        type:
          type: string
          enum:
            - UNSPECIFIED
            - IMO
            - ICD10
            - SNOMED
          example: IMO
    controllers.MedicationOrderRequest:
      type: object
      required:
        - drug_name
        - status
      properties:
        dosage:
          type: object
          description: '**Optional** - Amount per administration'
          allOf:
            - $ref: '#/components/schemas/controllers.Dosage'
        drug_name:
          type: string
          description: '**Required** - Full medication name'
          example: Acetaminophen 500mg Tab
        duration_in_days:
          type: integer
          description: '**Optional** - Duration in days'
          example: 7
        end_date:
          type: string
          description: '**Optional** - End date-time (RFC3339)'
          example: '2026-01-08T00:00:00Z'
        format:
          type: object
          description: '**Optional** - Physical dosage form'
          allOf:
            - $ref: '#/components/schemas/controllers.Format'
        frequency:
          type: object
          description: '**Optional** - Administration frequency'
          allOf:
            - $ref: '#/components/schemas/controllers.Frequency'
        instructions:
          type: string
          description: '**Optional** - Free-form instructions'
          example: Take with food
        linked_diagnosis_codes:
          type: array
          description: >-
            **Optional** - Diagnosis codes linked to this order. When provided,
            each entry should match a diagnosis already supplied under
            `diagnoses` (same coding system) so the platform can validate the
            link.
          items:
            $ref: '#/components/schemas/controllers.LinkedDiagnosisCode'
        medication_code:
          type: object
          description: '**Optional** - Standardized medication code (see `MedicationCode`)'
          allOf:
            - $ref: '#/components/schemas/controllers.MedicationCode'
        medication_timing:
          type: object
          description: '**Optional** - Timing modifiers'
          allOf:
            - $ref: '#/components/schemas/controllers.MedicationTiming'
        metadata:
          type: object
          description: >-
            **Required** - Order metadata. **`origin`** is required (`EMR` or
            `SUKI_AMBIENT`). **`encounter_relation`** is **required** when
            **`origin`** is **`EMR`** (see `OrderMetadata`).
          allOf:
            - $ref: '#/components/schemas/controllers.OrderMetadata'
        number_of_refills:
          type: integer
          description: '**Optional** - Number of refills'
          example: 3
        quantity_dispensed:
          type: string
          description: '**Optional** - Quantity dispensed'
          example: 1 box
        route:
          type: object
          description: '**Optional** - Administration route'
          allOf:
            - $ref: '#/components/schemas/controllers.Route'
        start_date:
          type: string
          description: '**Optional** - Start date-time (RFC3339)'
          example: '2026-01-01T00:00:00Z'
        status:
          type: string
          description: '**Required** - Order status'
          enum:
            - ACTIVE
            - DISCONTINUED
            - REFILLED
          example: ACTIVE
        strength:
          type: object
          description: >-
            **Optional** - Medication strength or concentration (`raw_value`
            until standardized values are finalized)
          allOf:
            - $ref: '#/components/schemas/controllers.Strength'
    controllers.EMInsuranceCoverage:
      description: A single insurance coverage, as provided by the EMR
      type: object
      properties:
        eligibility_status:
          description: (Optional) Eligibility status.
          type: string
          example: Eligible
        insurance_payer_name_raw:
          description: (Optional) Raw payer name.
          type: string
          example: AETNA
        insurance_product_type_raw:
          description: (Optional) Raw insurance product type.
          type: string
          example: PPO
        insurance_type_raw:
          description: (Optional) Raw insurance type.
          type: string
          example: Commercial
        sequence_number:
          description: (Optional) "1" for primary, "2" for secondary, etc.
          type: string
          example: '1'
    controllers.StructuredDataField:
      type: object
      required:
        - key
        - type
      description: >-
        A field in an Embedded Form template. `context` and `options` are used
        for filling only and do not come back on the read endpoints.
      properties:
        id:
          type: string
          description: >-
            **Optional** - Your ID for the field. Suki returns it unchanged on
            the filled value so you can map the answer back to your form.
          example: slot-duration
        key:
          type: string
          description: >-
            **Required** - Stable machine name for the field. The same value
            comes back on the filled value.
          example: symptom_duration
        context:
          type: string
          description: >-
            **Optional** - What the field asks for, for example `How long have
            the symptoms been present?`. You can include other field `id` values
            as `{id}` placeholders, for example `Patient has had {slot-symptoms}
            for {slot-duration}`. Not returned on read.
          example: How long have the symptoms been present?
        type:
          type: string
          enum:
            - text
            - radio
            - multi_select
            - date
          description: >-
            **Required** - Field type. `radio` and `multi_select` need
            `options`. Get the current list from [Structured data field
            types](/api-reference/info/structured-data-field-types).
          example: radio
        options:
          type: array
          items:
            type: string
          description: >-
            **Required for `radio` and `multi_select`** - The choices Suki can
            pick from. Not returned on read.
          example:
            - recently
            - in the last two weeks
            - for over 6 months
    controllers.Dosage:
      type: object
      properties:
        quantity:
          description: (Optional) Dosage quantity
          type: number
          example: 1
        raw_value:
          description: (Optional) Raw dosage text
          type: string
          example: 1 tablet
        unit:
          description: (Optional) Dosage unit
          type: string
          example: TAB
    controllers.Format:
      type: object
      properties:
        raw_value:
          description: (Optional) Raw medication form
          type: string
          example: Tablet
    controllers.Frequency:
      type: object
      properties:
        raw_value:
          description: (Optional) Raw frequency text
          type: string
          example: once daily
        structured_value:
          description: (Optional) Frequency enum
          type: string
          example: ONE_A_DAY
    controllers.LinkedDiagnosisCode:
      type: object
      properties:
        code:
          description: '**Optional** - Diagnosis code value'
          type: string
          example: I10
        type:
          description: '**Optional** - Diagnosis coding system'
          type: string
          example: ICD10
    controllers.MedicationCode:
      type: object
      properties:
        code:
          description: '**Optional** - Medication code value'
          type: string
          example: '860975'
        type:
          description: '**Optional** - Medication coding system'
          type: string
          enum:
            - RXCUI
            - NDC
          example: RXCUI
    controllers.MedicationTiming:
      type: object
      properties:
        raw_value:
          description: (Optional) Raw timing text
          type: string
          example: morning
        structured_value:
          description: (Optional) Medication timing enum
          type: string
          example: IN_THE_MORNING
    controllers.OrderMetadata:
      type: object
      required:
        - origin
      properties:
        encounter_relation:
          type: string
          description: >-
            **Required when `origin` is `EMR`** - How this order relates to the
            encounter. Set to **`CURRENT_ENCOUNTER`** or **`PRIOR_ENCOUNTER`**.
          enum:
            - CURRENT_ENCOUNTER
            - PRIOR_ENCOUNTER
          example: CURRENT_ENCOUNTER
        origin:
          type: string
          description: '**Required** - Source of the order'
          enum:
            - EMR
            - SUKI_AMBIENT
          example: SUKI_AMBIENT
    controllers.Route:
      type: object
      properties:
        raw_value:
          description: (Optional) Raw administration route
          type: string
          example: Oral
    controllers.Strength:
      type: object
      properties:
        raw_value:
          description: (Optional) Raw strength value
          type: string
          example: 500mg
  securitySchemes:
    SukiTokenAuth:
      type: apiKey
      in: header
      name: sdp_suki_token
      description: >-
        Suki access token (`suki_token`) from Login or Register. Expires after
        one hour.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.