> ## 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="The ability to customize note generation behavior per provider, including verbosity levels and section formats." 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." 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. A standardized vocabulary for identifying clinical sections and medical concepts." 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** - Stable identifier for the active provider. Omit for
        standard partners whose `partner_token` identifies the user.
        **Required** for Bearer partners and Single Auth Token authentication
        where multiple providers share one `partner_token`. Use the same
        `provider_id` you sent on Login or Register.
      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:
      type: object
      properties:
        code:
          type: integer
          example: 400
          description: HTTP status code for the error.
        message:
          type: string
          example: invalid request
          description: Human-readable description of the validation or request error.
      description: Error response when the request fails validation.
    controllers.AuthenticationError:
      type: object
      properties:
        code:
          type: integer
          example: 401
          description: HTTP status code for the error.
        message:
          type: string
          example: invalid token
          description: Human-readable description of the authentication failure.
      description: Error response when authentication fails.
    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:
      type: object
      properties:
        code:
          type: integer
          example: 404
          description: HTTP status code for the error.
        message:
          type: string
          example: not found
          description: Human-readable description of the missing resource.
      description: Error response when the requested resource was not found.
    controllers.InternalServerError:
      type: object
      properties:
        code:
          type: integer
          example: 500
          description: HTTP status code for the error.
        message:
          type: string
          example: internal server error
          description: Human-readable description of the server error.
      description: Error response when the server encounters an unexpected 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 for the authenticated provider. Obtain this by calling
        Login or Register with a valid `partner_token`. Pass the `suki_token`
        value from the JSON response as the `sdp_suki_token` header on REST
        requests and non-browser WebSocket upgrades. Browser WebSocket clients
        pass the token in `Sec-WebSocket-Protocol` instead. Tokens expire after
        one hour; call Login again to refresh.

````