Skip to main content
PATCH
/
api
/
v1
/
user
/
preferences
cURL
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>'
import requests

url = "https://sdp.suki.ai/api/v1/user/preferences"

payload = { "personalization_preference": {
        "section_format": [
            {
                "loinc": "10164-2",
                "style": "NARRATIVE"
            }
        ],
        "verbosity": "CONCISE"
    } }
headers = {
    "sdp_suki_token": "<api-key>",
    "Content-Type": "application/json"
}

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

print(response.text)
const options = {
  method: 'PATCH',
  headers: {sdp_suki_token: '<api-key>', 'Content-Type': 'application/json'},
  body: JSON.stringify({
    personalization_preference: {section_format: [{loinc: '10164-2', style: 'NARRATIVE'}], verbosity: 'CONCISE'}
  })
};

fetch('https://sdp.suki.ai/api/v1/user/preferences', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://sdp.suki.ai/api/v1/user/preferences",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PATCH",
  CURLOPT_POSTFIELDS => json_encode([
    'personalization_preference' => [
        'section_format' => [
                [
                                'loinc' => '10164-2',
                                'style' => 'NARRATIVE'
                ]
        ],
        'verbosity' => 'CONCISE'
    ]
  ]),
  CURLOPT_HTTPHEADER => [
    "Content-Type: application/json",
    "sdp_suki_token: <api-key>"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://sdp.suki.ai/api/v1/user/preferences"

	payload := strings.NewReader("{\n  \"personalization_preference\": {\n    \"section_format\": [\n      {\n        \"loinc\": \"10164-2\",\n        \"style\": \"NARRATIVE\"\n      }\n    ],\n    \"verbosity\": \"CONCISE\"\n  }\n}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("sdp_suki_token", "<api-key>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.patch("https://sdp.suki.ai/api/v1/user/preferences")
  .header("sdp_suki_token", "<api-key>")
  .header("Content-Type", "application/json")
  .body("{\n  \"personalization_preference\": {\n    \"section_format\": [\n      {\n        \"loinc\": \"10164-2\",\n        \"style\": \"NARRATIVE\"\n      }\n    ],\n    \"verbosity\": \"CONCISE\"\n  }\n}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://sdp.suki.ai/api/v1/user/preferences")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["sdp_suki_token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"personalization_preference\": {\n    \"section_format\": [\n      {\n        \"loinc\": \"10164-2\",\n        \"style\": \"NARRATIVE\"\n      }\n    ],\n    \"verbosity\": \"CONCISE\"\n  }\n}"

response = http.request(request)
puts response.read_body
{
  "preference": {
    "personalization_preference": {
      "section_format": [
        {
          "loinc": "10164-2",
          "style": "NARRATIVE"
        }
      ],
      "verbosity": "CONCISE"
    }
  }
}
{
  "code": 400,
  "message": "invalid request"
}
{
  "code": 401,
  "message": "invalid token"
}
{
  "code": 403,
  "message": "forbidden"
}
{
  "code": 404,
  "message": "not found"
}
{
  "code": 500,
  "message": "internal server error"
}
Use this endpoint to update and save a user’s preferences. These settings are saved at the user level, not per , and will be applied to all of the user’s future interactions. For details, see Personalization. Section format preferences use codes to identify note sections.
This is a PATCH request, you only need to send the fields you want to change.
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.

Code examples

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())

Authorizations

sdp_suki_token
string
header
required

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.

Headers

sdp_provider_id
string

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.

Example:

"provider-123"

Body

application/json

Personalization settings to create or update for the authenticated user.

personalization_preference
object

Optional - Personalization settings such as note verbosity and section format.

Response

Request succeeded.

Response body for the /user/preferences endpoint

preference
object

Updated user preference settings

Last modified on June 12, 2026