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));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.eka.care/voice/api/v1/transaction/{session_id}/convert-to-template",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'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'
]),
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/api/v1/transaction/{session_id}/convert-to-template"
payload := strings.NewReader("{\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}")
req, _ := http.NewRequest("POST", 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.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();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));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.eka.care/voice/api/v1/transaction/{session_id}/convert-to-template",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'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'
]),
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/api/v1/transaction/{session_id}/convert-to-template"
payload := strings.NewReader("{\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}")
req, _ := http.NewRequest("POST", 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.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();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
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
Send at least one of transcript or target_language. If both are omitted the request is rejected with 400.
The plain-text transcript of the consultation. This replaces EkaScribe's own transcription — no audio upload is needed for the session.
"Doctor: What brings you in today?\nPatient: I've had a dry cough and mild fever for the last three days.\n"
Template to structure the transcript into (from List Templates). If omitted, the template requested in Create Session (templates) is used.
"clinical_notes_template"
Translate the transcript into this language instead of structuring it into a template. One of eng, hi, ta, te, bn, mr, gu, kn, ml, pa, as.
"hi"
Response
Transcript accepted, template generation started
"in-progress"
"Template generation started in background"
The session ID the transcript was uploaded to.
"ses_abc123def456"
Business ID resolved from your access token.
"123456"
"clinical_notes_template"
ID of the document being generated. Poll Get Session or Get Document until its status is success.
"doc_9f8e7d6c"
Documents created for this request.
Show child attributes
Show child attributes
Was this page helpful?

