curl --request POST \
--url https://api.eka.care/voice/api/v1/transaction/{session_id}/convert-to-template \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"transcript": "Doctor: What brings you in today?\nPatient: I've had a dry cough and mild fever for the last three days.\nDoctor: Any breathlessness or chest pain?\nPatient: No, just the cough and I feel tired.\n",
"template_id": "clinical_notes_template"
}
EOFimport requests
url = "https://api.eka.care/voice/api/v1/transaction/{session_id}/convert-to-template"
payload = {
"transcript": "Doctor: What brings you in today?
Patient: I've had a dry cough and mild fever for the last three days.
Doctor: Any breathlessness or chest pain?
Patient: No, just the cough and I feel tired.
",
"template_id": "clinical_notes_template"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
transcript: 'Doctor: What brings you in today?\nPatient: I\'ve had a dry cough and mild fever for the last three days.\nDoctor: Any breathlessness or chest pain?\nPatient: No, just the cough and I feel tired.\n',
template_id: 'clinical_notes_template'
})
};
fetch('https://api.eka.care/voice/api/v1/transaction/{session_id}/convert-to-template', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.post("https://api.eka.care/voice/api/v1/transaction/{session_id}/convert-to-template")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"transcript\": \"Doctor: What brings you in today?\\nPatient: I've had a dry cough and mild fever for the last three days.\\nDoctor: Any breathlessness or chest pain?\\nPatient: No, just the cough and I feel tired.\\n\",\n \"template_id\": \"clinical_notes_template\"\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.eka.care/voice/api/v1/transaction/{session_id}/convert-to-template");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"transcript\": \"Doctor: What brings you in today?\\nPatient: I've had a dry cough and mild fever for the last three days.\\nDoctor: Any breathlessness or chest pain?\\nPatient: No, just the cough and I feel tired.\\n\",\n \"template_id\": \"clinical_notes_template\"\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
require 'uri'
require 'net/http'
url = URI("https://api.eka.care/voice/api/v1/transaction/{session_id}/convert-to-template")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"transcript\": \"Doctor: What brings you in today?\\nPatient: I've had a dry cough and mild fever for the last three days.\\nDoctor: Any breathlessness or chest pain?\\nPatient: No, just the cough and I feel tired.\\n\",\n \"template_id\": \"clinical_notes_template\"\n}"
response = http.request(request)
puts response.read_body{
"status": "in-progress",
"message": "Template generation started in background",
"txn_id": "ses_abc123def456",
"b_id": "123456",
"template_id": "clinical_notes_template",
"document_id": "doc_9f8e7d6c",
"templates": [
{
"template_id": "clinical_notes_template",
"document_id": "doc_9f8e7d6c"
}
]
}{
"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": {}
}
}Upload Transcript
Optional. Use this only if you already have the transcript and do not want EkaScribe to transcribe audio for you. Instead of uploading audio files, create a session, POST your transcript here along with the template_id you want it structured into, then poll Get Session for the structured result.
The call is asynchronous: it returns 202 with a document_id and status: in-progress. Fetch the structured note with GET /voice/v1/sessions/{session_id} (optionally ?document_id=<document_id>) or Get Document once its status is success.
You may also omit template_id and send target_language instead to translate the transcript (or the session’s stored transcript) into another language.
curl --request POST \
--url https://api.eka.care/voice/api/v1/transaction/{session_id}/convert-to-template \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"transcript": "Doctor: What brings you in today?\nPatient: I've had a dry cough and mild fever for the last three days.\nDoctor: Any breathlessness or chest pain?\nPatient: No, just the cough and I feel tired.\n",
"template_id": "clinical_notes_template"
}
EOFimport requests
url = "https://api.eka.care/voice/api/v1/transaction/{session_id}/convert-to-template"
payload = {
"transcript": "Doctor: What brings you in today?
Patient: I've had a dry cough and mild fever for the last three days.
Doctor: Any breathlessness or chest pain?
Patient: No, just the cough and I feel tired.
",
"template_id": "clinical_notes_template"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
transcript: 'Doctor: What brings you in today?\nPatient: I\'ve had a dry cough and mild fever for the last three days.\nDoctor: Any breathlessness or chest pain?\nPatient: No, just the cough and I feel tired.\n',
template_id: 'clinical_notes_template'
})
};
fetch('https://api.eka.care/voice/api/v1/transaction/{session_id}/convert-to-template', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.post("https://api.eka.care/voice/api/v1/transaction/{session_id}/convert-to-template")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"transcript\": \"Doctor: What brings you in today?\\nPatient: I've had a dry cough and mild fever for the last three days.\\nDoctor: Any breathlessness or chest pain?\\nPatient: No, just the cough and I feel tired.\\n\",\n \"template_id\": \"clinical_notes_template\"\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.eka.care/voice/api/v1/transaction/{session_id}/convert-to-template");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"transcript\": \"Doctor: What brings you in today?\\nPatient: I've had a dry cough and mild fever for the last three days.\\nDoctor: Any breathlessness or chest pain?\\nPatient: No, just the cough and I feel tired.\\n\",\n \"template_id\": \"clinical_notes_template\"\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
require 'uri'
require 'net/http'
url = URI("https://api.eka.care/voice/api/v1/transaction/{session_id}/convert-to-template")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"transcript\": \"Doctor: What brings you in today?\\nPatient: I've had a dry cough and mild fever for the last three days.\\nDoctor: Any breathlessness or chest pain?\\nPatient: No, just the cough and I feel tired.\\n\",\n \"template_id\": \"clinical_notes_template\"\n}"
response = http.request(request)
puts response.read_body{
"status": "in-progress",
"message": "Template generation started in background",
"txn_id": "ses_abc123def456",
"b_id": "123456",
"template_id": "clinical_notes_template",
"document_id": "doc_9f8e7d6c",
"templates": [
{
"template_id": "clinical_notes_template",
"document_id": "doc_9f8e7d6c"
}
]
}{
"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": {}
}
}template_id you want it structured into, and EkaScribe returns the structured note.
The flow is three calls — no audio upload, no End Session:
1. Create Session POST /voice/v1/sessions → session_id
2. Upload Transcript POST /voice/api/v1/transaction/{session_id}/convert-to-template
{ "transcript": "...", "template_id": "..." } → 202, document_id
3. Get Session GET /voice/v1/sessions/{session_id} (poll ~1s until ≠202)
→ structured note for that template
curl -X POST "https://api.eka.care/voice/api/v1/transaction/{session_id}/convert-to-template" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"transcript": "Doctor: What brings you in today?\nPatient: I have had a dry cough and mild fever for three days.",
"template_id": "clinical_notes_template"
}'
202 with a document_id. Poll Get Session (optionally ?document_id=<id>) or Get Document until the document’s status is success.template_id, the template requested in Create Session (templates) is used. To structure the same transcript into more templates later, call Process Template — each one creates its own document.target_language instead of template_id translates the transcript into that language (eng, hi, ta, te, bn, mr, gu, kn, ml, pa, as) rather than structuring it into a template.Authorizations
Path Parameters
Body
Send at least one of transcript or target_language. If both are omitted the request is rejected with 400.
Response
Transcript accepted, template generation started
Was this page helpful?

