> ## 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.

# User Preferences

> Update user personalization preferences for clinical note generation

Use this endpoint to update and save a user's <Tooltip tip="Provider-level controls for how notes are generated, such as verbosity and section format (narrative or bulleted). In Suki, personalization preferences apply across a provider's future sessions rather than only one visit." cta="View in Glossary" href="/Glossary/p">personalization</Tooltip> preferences. These settings are saved at the user level, not per <Tooltip tip="A single, time-bound instance of an ambient recording for a specific patient encounter that captures clinical conversations." cta="View in Glossary" href="/Glossary/s">session</Tooltip>, and will be applied to all of the user's future interactions. For details, see [Personalization](/api-reference/capabilities/personalization). Section format preferences use <Tooltip tip="Logical Observation Identifiers Names and Codes. An international healthcare coding standard that assigns unique codes to clinical content such as note sections, labs, and observations. In Suki, you pass LOINC codes when you configure ambient note sections so each part of the generated note maps cleanly into your EHR." cta="View in Glossary" href="/Glossary/l">LOINC</Tooltip> codes to identify note sections.

<Note>
  This is a `PATCH` request, you only need to send the fields you want to change.
</Note>

<Tip>
  For the best results, we recommend that you call this endpoint before the **main interaction begins** (for example, before audio streaming starts or before you call the `/end` endpoint).

  This ensures the user's preferences are applied before content is generated. However, you can call this endpoint at any time to update the settings.
</Tip>

## Code examples

<Tabs>
  <Tab title="Python">
    ```python theme={"theme":{"light":"github-dark","dark":"material-theme-darker"}}
    import requests

    url = "https://sdp.suki-stage.com/api/v1/user/preferences"
    headers = {
        "sdp_suki_token": "<sdp_suki_token>",
        "sdp_provider_id": "<sdp_provider_id>",
        "Content-Type": "application/json"
    }

    payload = {
        "personalization_preference": {
            "verbosity": "CONCISE",  # Options: CONCISE, BALANCED, DETAILED
            "section_format": [
                {
                    "loinc": "10164-2",
                    "style": "NARRATIVE"  # Options: NARRATIVE, BULLETED
                }
            ]
        }
    }

    response = requests.patch(url, json=payload, headers=headers)

    if response.status_code == 200:
        data = response.json()
        print("Preferences updated successfully")
        print(f"Updated preferences: {data}")
    else:
        print(f"Failed to update preferences: {response.status_code}")
        print(response.json())
    ```
  </Tab>

  <Tab title="TypeScript">
    ```typescript theme={"theme":{"light":"github-dark","dark":"material-theme-darker"}}
    const response = await fetch('https://sdp.suki-stage.com/api/v1/user/preferences', {
      method: 'PATCH',
        headers: {
          'sdp_suki_token': '<sdp_suki_token>',
          'sdp_provider_id': '<sdp_provider_id>',
          'Content-Type': 'application/json'
        },
      body: JSON.stringify({
        personalization_preference: {
          verbosity: 'CONCISE', // Options: CONCISE, BALANCED, DETAILED
          section_format: [
            {
              loinc: '10164-2',
              style: 'NARRATIVE' // Options: NARRATIVE, BULLETED
            }
          ]
        }
      })
    });

    if (response.ok) {
      const data = await response.json();
      console.log('Preferences updated successfully');
      console.log('Updated preferences:', data);
    } else {
      const error = await response.json();
      console.error(`Failed to update preferences: ${response.status}`, error);
    }
    ```
  </Tab>
</Tabs>


## OpenAPI

````yaml PATCH /api/v1/user/preferences
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, 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/user/preferences:
    patch:
      tags:
        - /api/v1/user/preferences
      summary: Update user preferences
      description: >-
        Updates personalization preferences for the authenticated user, such as
        note verbosity and section format. Settings apply to future sessions for
        that user. Send only the fields you want to change.
      parameters:
        - $ref: '#/components/parameters/ProviderIdHeader'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/controllers.Preference'
        required: true
      responses:
        '200':
          description: Request succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/controllers.UpdateUserPreferencesResponse'
              example:
                preference:
                  personalization_preference:
                    section_format:
                      - loinc: 10164-2
                        style: NARRATIVE
                    verbosity: CONCISE
        '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/user/preferences \
              --header 'Content-Type: application/json' \
              --header 'sdp_suki_token: <sdp_suki_token>' \
              --header 'sdp_provider_id: <sdp_provider_id>'
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.Preference:
      type: object
      properties:
        personalization_preference:
          type: object
          description: >-
            **Optional** - Personalization settings such as note verbosity and
            section format.
          allOf:
            - $ref: '#/components/schemas/controllers.PersonalizationPreference'
      description: Personalization settings to create or update for the authenticated user.
    controllers.UpdateUserPreferencesResponse:
      type: object
      properties:
        preference:
          type: object
          description: Updated user preference settings
          allOf:
            - $ref: '#/components/schemas/controllers.Preference'
      description: Response body for the /user/preferences endpoint
      example:
        preference:
          personalization_preference:
            section_format:
              - loinc: 10164-2
                style: NARRATIVE
            verbosity: CONCISE
    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.PersonalizationPreference:
      type: object
      properties:
        section_format:
          type: array
          description: >-
            Formatting preference per LOINC section. Each entry includes a
            `loinc` code and `style` (`NARRATIVE` or `BULLETED`).
          items:
            $ref: '#/components/schemas/controllers.SectionFormat'
        verbosity:
          type: string
          description: >-
            Controls detail level in generated notes. Accepted values:
            `CONCISE`, `BALANCED`, `DETAILED`.
          example: CONCISE
          enum:
            - CONCISE
            - BALANCED
            - DETAILED
      description: Personalization settings for content generation
    controllers.SectionFormat:
      type: object
      properties:
        loinc:
          type: string
          description: LOINC code identifying the clinical section
          example: 10164-2
        style:
          type: string
          description: |-
            Preferred formatting style for the section
            Possible values: NARRATIVE, BULLETED
          example: NARRATIVE
          enum:
            - NARRATIVE
            - BULLETED
      description: Style preferences for a specific clinical section
  securitySchemes:
    SukiTokenAuth:
      type: apiKey
      in: header
      name: sdp_suki_token
      description: >-
        Suki access token (`suki_token`) from Login or Register. Expires after
        one hour.

````