curl --request PATCH \
--url https://api.eka.care/voice/v1/sessions/{session_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"patient_details": {
"oid": "PAT-12345",
"name": "John Doe"
},
"templates": [
"clinical_notes_template"
],
"language_hint": [
"en",
"hi"
]
}
'import requests
url = "https://api.eka.care/voice/v1/sessions/{session_id}"
payload = {
"patient_details": {
"oid": "PAT-12345",
"name": "John Doe"
},
"templates": ["clinical_notes_template"],
"language_hint": ["en", "hi"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
patient_details: {oid: 'PAT-12345', name: 'John Doe'},
templates: ['clinical_notes_template'],
language_hint: ['en', 'hi']
})
};
fetch('https://api.eka.care/voice/v1/sessions/{session_id}', 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://api.eka.care/voice/v1/sessions/{session_id}",
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([
'patient_details' => [
'oid' => 'PAT-12345',
'name' => 'John Doe'
],
'templates' => [
'clinical_notes_template'
],
'language_hint' => [
'en',
'hi'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api.eka.care/voice/v1/sessions/{session_id}"
payload := strings.NewReader("{\n \"patient_details\": {\n \"oid\": \"PAT-12345\",\n \"name\": \"John Doe\"\n },\n \"templates\": [\n \"clinical_notes_template\"\n ],\n \"language_hint\": [\n \"en\",\n \"hi\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.eka.care/voice/v1/sessions/{session_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"patient_details\": {\n \"oid\": \"PAT-12345\",\n \"name\": \"John Doe\"\n },\n \"templates\": [\n \"clinical_notes_template\"\n ],\n \"language_hint\": [\n \"en\",\n \"hi\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eka.care/voice/v1/sessions/{session_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"patient_details\": {\n \"oid\": \"PAT-12345\",\n \"name\": \"John Doe\"\n },\n \"templates\": [\n \"clinical_notes_template\"\n ],\n \"language_hint\": [\n \"en\",\n \"hi\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"session_id": "ses_abc123def456",
"status": "success",
"message": "Session updated successfully"
}{
"error": {
"code": "invalid_audio_format",
"message": "Audio format 'audio/mp3' is not supported",
"details": {}
}
}{
"error": {
"code": "invalid_audio_format",
"message": "Audio format 'audio/mp3' is not supported",
"details": {}
}
}{
"error": {
"code": "invalid_audio_format",
"message": "Audio format 'audio/mp3' is not supported",
"details": {}
}
}Update Session
Update a session’s metadata before it is committed. Use this to attach or correct patient_details, change the requested templates, adjust language_hint, or switch session_mode / model. session_mode and model can only be changed while the session is still open (before End Session) — attempting to change them afterwards returns 409. Unknown fields are rejected.
curl --request PATCH \
--url https://api.eka.care/voice/v1/sessions/{session_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"patient_details": {
"oid": "PAT-12345",
"name": "John Doe"
},
"templates": [
"clinical_notes_template"
],
"language_hint": [
"en",
"hi"
]
}
'import requests
url = "https://api.eka.care/voice/v1/sessions/{session_id}"
payload = {
"patient_details": {
"oid": "PAT-12345",
"name": "John Doe"
},
"templates": ["clinical_notes_template"],
"language_hint": ["en", "hi"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
patient_details: {oid: 'PAT-12345', name: 'John Doe'},
templates: ['clinical_notes_template'],
language_hint: ['en', 'hi']
})
};
fetch('https://api.eka.care/voice/v1/sessions/{session_id}', 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://api.eka.care/voice/v1/sessions/{session_id}",
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([
'patient_details' => [
'oid' => 'PAT-12345',
'name' => 'John Doe'
],
'templates' => [
'clinical_notes_template'
],
'language_hint' => [
'en',
'hi'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api.eka.care/voice/v1/sessions/{session_id}"
payload := strings.NewReader("{\n \"patient_details\": {\n \"oid\": \"PAT-12345\",\n \"name\": \"John Doe\"\n },\n \"templates\": [\n \"clinical_notes_template\"\n ],\n \"language_hint\": [\n \"en\",\n \"hi\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.eka.care/voice/v1/sessions/{session_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"patient_details\": {\n \"oid\": \"PAT-12345\",\n \"name\": \"John Doe\"\n },\n \"templates\": [\n \"clinical_notes_template\"\n ],\n \"language_hint\": [\n \"en\",\n \"hi\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eka.care/voice/v1/sessions/{session_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"patient_details\": {\n \"oid\": \"PAT-12345\",\n \"name\": \"John Doe\"\n },\n \"templates\": [\n \"clinical_notes_template\"\n ],\n \"language_hint\": [\n \"en\",\n \"hi\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"session_id": "ses_abc123def456",
"status": "success",
"message": "Session updated successfully"
}{
"error": {
"code": "invalid_audio_format",
"message": "Audio format 'audio/mp3' is not supported",
"details": {}
}
}{
"error": {
"code": "invalid_audio_format",
"message": "Audio format 'audio/mp3' is not supported",
"details": {}
}
}{
"error": {
"code": "invalid_audio_format",
"message": "Audio format 'audio/mp3' is not supported",
"details": {}
}
}patient_details, templates, language_hint, etc. Send only the fields you want to change.
session_mode and model can only be changed before End Session — afterwards the call returns 409.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Session ID returned by Create Session
"ses_abc123def456"
Body
Patient demographic / identifier metadata. The oid key is promoted to patient_oid for indexing.
Replace the requested template IDs (up to 2).
ISO 639-1 code(s) hinting the spoken language(s).
Arbitrary pass-through metadata merged into the session.
Updatable only before the session is committed (End Session).
consultation, dictation Updatable only before the session is committed (End Session).
pro, lite Client-side session status marker.
Processing status override (advanced use).
Was this page helpful?

