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));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();using RestSharp;
var options = new RestClientOptions("https://api.eka.care/voice/v1/sessions/{session_id}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\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}", false);
var response = await client.PatchAsync(request);
Console.WriteLine("{0}", response.Content);
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));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();using RestSharp;
var options = new RestClientOptions("https://api.eka.care/voice/v1/sessions/{session_id}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\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}", false);
var response = await client.PatchAsync(request);
Console.WriteLine("{0}", response.Content);
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?

