Update Ambient Session Context
Update existing session context with new clinical information
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"
}
],
"visit": {
"chief_complaint": "Headache",
"encounter_type": "AMBULATORY",
"reason_for_visit": "Follow-up for migraines",
"visit_type": "ESTABLISHED_PATIENT"
}
}'import requests
url = "https://sdp.suki.ai/api/v1/ambient/session/{ambient_session_id}/context"
payload = {
"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"
}
}
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({
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'
}
})
};
fetch('https://sdp.suki.ai/api/v1/ambient/session/{ambient_session_id}/context', 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/ambient/session/{ambient_session_id}/context",
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([
'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'
]
]),
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/ambient/session/{ambient_session_id}/context"
payload := strings.NewReader("{\n \"diagnoses\": {\n \"values\": [\n {\n \"codes\": [\n {\n \"code\": \"30422\",\n \"description\": \"Essential hypertension\",\n \"type\": \"IMO\"\n }\n ],\n \"diagnosis_note\": \"Hypertension\"\n }\n ]\n },\n \"emr\": {\n \"target_emr\": \"ATHENA\"\n },\n \"orders\": {\n \"medication_orders\": {\n \"values\": [\n {\n \"dosage\": {\n \"quantity\": 1,\n \"raw_value\": \"1 tablet\",\n \"unit\": \"TAB\"\n },\n \"drug_name\": \"Acetaminophen 500mg Tab\",\n \"duration_in_days\": 7,\n \"end_date\": \"2026-01-08T00:00:00Z\",\n \"format\": {\n \"raw_value\": \"Tablet\"\n },\n \"frequency\": {\n \"raw_value\": \"once daily\",\n \"structured_value\": \"ONE_A_DAY\"\n },\n \"instructions\": \"Take with food\",\n \"linked_diagnosis_codes\": [\n {\n \"code\": \"I10\",\n \"type\": \"ICD10\"\n }\n ],\n \"medication_code\": {\n \"code\": \"860975\",\n \"type\": \"RXCUI\"\n },\n \"medication_timing\": {\n \"raw_value\": \"morning\",\n \"structured_value\": \"IN_THE_MORNING\"\n },\n \"metadata\": {\n \"encounter_relation\": \"CURRENT_ENCOUNTER\",\n \"origin\": \"SUKI_AMBIENT\"\n },\n \"number_of_refills\": 3,\n \"quantity_dispensed\": \"1 box\",\n \"route\": {\n \"raw_value\": \"Oral\"\n },\n \"start_date\": \"2026-01-01T00:00:00Z\",\n \"status\": \"ACTIVE\",\n \"strength\": {\n \"raw_value\": \"500mg\"\n }\n }\n ]\n }\n },\n \"patient\": {\n \"dob\": \"2000-01-01\",\n \"sex\": \"male\"\n },\n \"provider\": {\n \"role\": \"ATTENDING\",\n \"specialty\": \"CARDIOLOGY\"\n },\n \"sections\": [\n {\n \"loinc\": \"10164-2\"\n }\n ],\n \"visit\": {\n \"chief_complaint\": \"Headache\",\n \"encounter_type\": \"AMBULATORY\",\n \"reason_for_visit\": \"Follow-up for migraines\",\n \"visit_type\": \"ESTABLISHED_PATIENT\"\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/ambient/session/{ambient_session_id}/context")
.header("sdp_suki_token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"diagnoses\": {\n \"values\": [\n {\n \"codes\": [\n {\n \"code\": \"30422\",\n \"description\": \"Essential hypertension\",\n \"type\": \"IMO\"\n }\n ],\n \"diagnosis_note\": \"Hypertension\"\n }\n ]\n },\n \"emr\": {\n \"target_emr\": \"ATHENA\"\n },\n \"orders\": {\n \"medication_orders\": {\n \"values\": [\n {\n \"dosage\": {\n \"quantity\": 1,\n \"raw_value\": \"1 tablet\",\n \"unit\": \"TAB\"\n },\n \"drug_name\": \"Acetaminophen 500mg Tab\",\n \"duration_in_days\": 7,\n \"end_date\": \"2026-01-08T00:00:00Z\",\n \"format\": {\n \"raw_value\": \"Tablet\"\n },\n \"frequency\": {\n \"raw_value\": \"once daily\",\n \"structured_value\": \"ONE_A_DAY\"\n },\n \"instructions\": \"Take with food\",\n \"linked_diagnosis_codes\": [\n {\n \"code\": \"I10\",\n \"type\": \"ICD10\"\n }\n ],\n \"medication_code\": {\n \"code\": \"860975\",\n \"type\": \"RXCUI\"\n },\n \"medication_timing\": {\n \"raw_value\": \"morning\",\n \"structured_value\": \"IN_THE_MORNING\"\n },\n \"metadata\": {\n \"encounter_relation\": \"CURRENT_ENCOUNTER\",\n \"origin\": \"SUKI_AMBIENT\"\n },\n \"number_of_refills\": 3,\n \"quantity_dispensed\": \"1 box\",\n \"route\": {\n \"raw_value\": \"Oral\"\n },\n \"start_date\": \"2026-01-01T00:00:00Z\",\n \"status\": \"ACTIVE\",\n \"strength\": {\n \"raw_value\": \"500mg\"\n }\n }\n ]\n }\n },\n \"patient\": {\n \"dob\": \"2000-01-01\",\n \"sex\": \"male\"\n },\n \"provider\": {\n \"role\": \"ATTENDING\",\n \"specialty\": \"CARDIOLOGY\"\n },\n \"sections\": [\n {\n \"loinc\": \"10164-2\"\n }\n ],\n \"visit\": {\n \"chief_complaint\": \"Headache\",\n \"encounter_type\": \"AMBULATORY\",\n \"reason_for_visit\": \"Follow-up for migraines\",\n \"visit_type\": \"ESTABLISHED_PATIENT\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sdp.suki.ai/api/v1/ambient/session/{ambient_session_id}/context")
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 \"diagnoses\": {\n \"values\": [\n {\n \"codes\": [\n {\n \"code\": \"30422\",\n \"description\": \"Essential hypertension\",\n \"type\": \"IMO\"\n }\n ],\n \"diagnosis_note\": \"Hypertension\"\n }\n ]\n },\n \"emr\": {\n \"target_emr\": \"ATHENA\"\n },\n \"orders\": {\n \"medication_orders\": {\n \"values\": [\n {\n \"dosage\": {\n \"quantity\": 1,\n \"raw_value\": \"1 tablet\",\n \"unit\": \"TAB\"\n },\n \"drug_name\": \"Acetaminophen 500mg Tab\",\n \"duration_in_days\": 7,\n \"end_date\": \"2026-01-08T00:00:00Z\",\n \"format\": {\n \"raw_value\": \"Tablet\"\n },\n \"frequency\": {\n \"raw_value\": \"once daily\",\n \"structured_value\": \"ONE_A_DAY\"\n },\n \"instructions\": \"Take with food\",\n \"linked_diagnosis_codes\": [\n {\n \"code\": \"I10\",\n \"type\": \"ICD10\"\n }\n ],\n \"medication_code\": {\n \"code\": \"860975\",\n \"type\": \"RXCUI\"\n },\n \"medication_timing\": {\n \"raw_value\": \"morning\",\n \"structured_value\": \"IN_THE_MORNING\"\n },\n \"metadata\": {\n \"encounter_relation\": \"CURRENT_ENCOUNTER\",\n \"origin\": \"SUKI_AMBIENT\"\n },\n \"number_of_refills\": 3,\n \"quantity_dispensed\": \"1 box\",\n \"route\": {\n \"raw_value\": \"Oral\"\n },\n \"start_date\": \"2026-01-01T00:00:00Z\",\n \"status\": \"ACTIVE\",\n \"strength\": {\n \"raw_value\": \"500mg\"\n }\n }\n ]\n }\n },\n \"patient\": {\n \"dob\": \"2000-01-01\",\n \"sex\": \"male\"\n },\n \"provider\": {\n \"role\": \"ATTENDING\",\n \"specialty\": \"CARDIOLOGY\"\n },\n \"sections\": [\n {\n \"loinc\": \"10164-2\"\n }\n ],\n \"visit\": {\n \"chief_complaint\": \"Headache\",\n \"encounter_type\": \"AMBULATORY\",\n \"reason_for_visit\": \"Follow-up for migraines\",\n \"visit_type\": \"ESTABLISHED_PATIENT\"\n }\n}"
response = http.request(request)
puts response.read_body{
"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"
}
}
}{
"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"
}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 |
Authorizations
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
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.
"provider-123"
Path Parameters
UUID for the ambient session. Use the ambient_session_id returned from Create Ambient Session, or the UUID you supplied in that request.
Body
Partial ambient session context update. Include only the fields you want to add or change.
Optional - Diagnoses to add or update.
Show child attributes
Show child attributes
Optional - EMR context to add or update.
Show child attributes
Show child attributes
Optional - Medication orders to add or update.
Show child attributes
Show child attributes
Optional - Patient demographics to add or update.
Show child attributes
Show child attributes
Optional - Provider details to add or update.
Show child attributes
Show child attributes
Optional - Information about the sections to be generated. If not provided, all supported note-sections will be generated.
Show child attributes
Show child attributes
Optional - Visit details to add or update.
Show child attributes
Show child attributes
Response
Request succeeded.
Updated ambient session context after a successful PATCH.
Updated context for the session
Show child attributes
Show child attributes
Was this page helpful?
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"
}
],
"visit": {
"chief_complaint": "Headache",
"encounter_type": "AMBULATORY",
"reason_for_visit": "Follow-up for migraines",
"visit_type": "ESTABLISHED_PATIENT"
}
}'import requests
url = "https://sdp.suki.ai/api/v1/ambient/session/{ambient_session_id}/context"
payload = {
"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"
}
}
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({
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'
}
})
};
fetch('https://sdp.suki.ai/api/v1/ambient/session/{ambient_session_id}/context', 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/ambient/session/{ambient_session_id}/context",
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([
'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'
]
]),
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/ambient/session/{ambient_session_id}/context"
payload := strings.NewReader("{\n \"diagnoses\": {\n \"values\": [\n {\n \"codes\": [\n {\n \"code\": \"30422\",\n \"description\": \"Essential hypertension\",\n \"type\": \"IMO\"\n }\n ],\n \"diagnosis_note\": \"Hypertension\"\n }\n ]\n },\n \"emr\": {\n \"target_emr\": \"ATHENA\"\n },\n \"orders\": {\n \"medication_orders\": {\n \"values\": [\n {\n \"dosage\": {\n \"quantity\": 1,\n \"raw_value\": \"1 tablet\",\n \"unit\": \"TAB\"\n },\n \"drug_name\": \"Acetaminophen 500mg Tab\",\n \"duration_in_days\": 7,\n \"end_date\": \"2026-01-08T00:00:00Z\",\n \"format\": {\n \"raw_value\": \"Tablet\"\n },\n \"frequency\": {\n \"raw_value\": \"once daily\",\n \"structured_value\": \"ONE_A_DAY\"\n },\n \"instructions\": \"Take with food\",\n \"linked_diagnosis_codes\": [\n {\n \"code\": \"I10\",\n \"type\": \"ICD10\"\n }\n ],\n \"medication_code\": {\n \"code\": \"860975\",\n \"type\": \"RXCUI\"\n },\n \"medication_timing\": {\n \"raw_value\": \"morning\",\n \"structured_value\": \"IN_THE_MORNING\"\n },\n \"metadata\": {\n \"encounter_relation\": \"CURRENT_ENCOUNTER\",\n \"origin\": \"SUKI_AMBIENT\"\n },\n \"number_of_refills\": 3,\n \"quantity_dispensed\": \"1 box\",\n \"route\": {\n \"raw_value\": \"Oral\"\n },\n \"start_date\": \"2026-01-01T00:00:00Z\",\n \"status\": \"ACTIVE\",\n \"strength\": {\n \"raw_value\": \"500mg\"\n }\n }\n ]\n }\n },\n \"patient\": {\n \"dob\": \"2000-01-01\",\n \"sex\": \"male\"\n },\n \"provider\": {\n \"role\": \"ATTENDING\",\n \"specialty\": \"CARDIOLOGY\"\n },\n \"sections\": [\n {\n \"loinc\": \"10164-2\"\n }\n ],\n \"visit\": {\n \"chief_complaint\": \"Headache\",\n \"encounter_type\": \"AMBULATORY\",\n \"reason_for_visit\": \"Follow-up for migraines\",\n \"visit_type\": \"ESTABLISHED_PATIENT\"\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/ambient/session/{ambient_session_id}/context")
.header("sdp_suki_token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"diagnoses\": {\n \"values\": [\n {\n \"codes\": [\n {\n \"code\": \"30422\",\n \"description\": \"Essential hypertension\",\n \"type\": \"IMO\"\n }\n ],\n \"diagnosis_note\": \"Hypertension\"\n }\n ]\n },\n \"emr\": {\n \"target_emr\": \"ATHENA\"\n },\n \"orders\": {\n \"medication_orders\": {\n \"values\": [\n {\n \"dosage\": {\n \"quantity\": 1,\n \"raw_value\": \"1 tablet\",\n \"unit\": \"TAB\"\n },\n \"drug_name\": \"Acetaminophen 500mg Tab\",\n \"duration_in_days\": 7,\n \"end_date\": \"2026-01-08T00:00:00Z\",\n \"format\": {\n \"raw_value\": \"Tablet\"\n },\n \"frequency\": {\n \"raw_value\": \"once daily\",\n \"structured_value\": \"ONE_A_DAY\"\n },\n \"instructions\": \"Take with food\",\n \"linked_diagnosis_codes\": [\n {\n \"code\": \"I10\",\n \"type\": \"ICD10\"\n }\n ],\n \"medication_code\": {\n \"code\": \"860975\",\n \"type\": \"RXCUI\"\n },\n \"medication_timing\": {\n \"raw_value\": \"morning\",\n \"structured_value\": \"IN_THE_MORNING\"\n },\n \"metadata\": {\n \"encounter_relation\": \"CURRENT_ENCOUNTER\",\n \"origin\": \"SUKI_AMBIENT\"\n },\n \"number_of_refills\": 3,\n \"quantity_dispensed\": \"1 box\",\n \"route\": {\n \"raw_value\": \"Oral\"\n },\n \"start_date\": \"2026-01-01T00:00:00Z\",\n \"status\": \"ACTIVE\",\n \"strength\": {\n \"raw_value\": \"500mg\"\n }\n }\n ]\n }\n },\n \"patient\": {\n \"dob\": \"2000-01-01\",\n \"sex\": \"male\"\n },\n \"provider\": {\n \"role\": \"ATTENDING\",\n \"specialty\": \"CARDIOLOGY\"\n },\n \"sections\": [\n {\n \"loinc\": \"10164-2\"\n }\n ],\n \"visit\": {\n \"chief_complaint\": \"Headache\",\n \"encounter_type\": \"AMBULATORY\",\n \"reason_for_visit\": \"Follow-up for migraines\",\n \"visit_type\": \"ESTABLISHED_PATIENT\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sdp.suki.ai/api/v1/ambient/session/{ambient_session_id}/context")
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 \"diagnoses\": {\n \"values\": [\n {\n \"codes\": [\n {\n \"code\": \"30422\",\n \"description\": \"Essential hypertension\",\n \"type\": \"IMO\"\n }\n ],\n \"diagnosis_note\": \"Hypertension\"\n }\n ]\n },\n \"emr\": {\n \"target_emr\": \"ATHENA\"\n },\n \"orders\": {\n \"medication_orders\": {\n \"values\": [\n {\n \"dosage\": {\n \"quantity\": 1,\n \"raw_value\": \"1 tablet\",\n \"unit\": \"TAB\"\n },\n \"drug_name\": \"Acetaminophen 500mg Tab\",\n \"duration_in_days\": 7,\n \"end_date\": \"2026-01-08T00:00:00Z\",\n \"format\": {\n \"raw_value\": \"Tablet\"\n },\n \"frequency\": {\n \"raw_value\": \"once daily\",\n \"structured_value\": \"ONE_A_DAY\"\n },\n \"instructions\": \"Take with food\",\n \"linked_diagnosis_codes\": [\n {\n \"code\": \"I10\",\n \"type\": \"ICD10\"\n }\n ],\n \"medication_code\": {\n \"code\": \"860975\",\n \"type\": \"RXCUI\"\n },\n \"medication_timing\": {\n \"raw_value\": \"morning\",\n \"structured_value\": \"IN_THE_MORNING\"\n },\n \"metadata\": {\n \"encounter_relation\": \"CURRENT_ENCOUNTER\",\n \"origin\": \"SUKI_AMBIENT\"\n },\n \"number_of_refills\": 3,\n \"quantity_dispensed\": \"1 box\",\n \"route\": {\n \"raw_value\": \"Oral\"\n },\n \"start_date\": \"2026-01-01T00:00:00Z\",\n \"status\": \"ACTIVE\",\n \"strength\": {\n \"raw_value\": \"500mg\"\n }\n }\n ]\n }\n },\n \"patient\": {\n \"dob\": \"2000-01-01\",\n \"sex\": \"male\"\n },\n \"provider\": {\n \"role\": \"ATTENDING\",\n \"specialty\": \"CARDIOLOGY\"\n },\n \"sections\": [\n {\n \"loinc\": \"10164-2\"\n }\n ],\n \"visit\": {\n \"chief_complaint\": \"Headache\",\n \"encounter_type\": \"AMBULATORY\",\n \"reason_for_visit\": \"Follow-up for migraines\",\n \"visit_type\": \"ESTABLISHED_PATIENT\"\n }\n}"
response = http.request(request)
puts response.read_body{
"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"
}
}
}{
"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"
}