Create or Update Document
curl --request POST \
--url https://api.eka.care/voice/api/v1/documents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"session_id": "ses_abc123def456",
"template_id": "clinical_notes_template",
"type": "custom",
"document_name": "Edited clinical note",
"status": "success"
}
'import requests
url = "https://api.eka.care/voice/api/v1/documents"
payload = {
"session_id": "ses_abc123def456",
"template_id": "clinical_notes_template",
"type": "custom",
"document_name": "Edited clinical note",
"status": "success"
}
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({
session_id: 'ses_abc123def456',
template_id: 'clinical_notes_template',
type: 'custom',
document_name: 'Edited clinical note',
status: 'success'
})
};
fetch('https://api.eka.care/voice/api/v1/documents', 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/documents",
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([
'session_id' => 'ses_abc123def456',
'template_id' => 'clinical_notes_template',
'type' => 'custom',
'document_name' => 'Edited clinical note',
'status' => 'success'
]),
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/documents"
payload := strings.NewReader("{\n \"session_id\": \"ses_abc123def456\",\n \"template_id\": \"clinical_notes_template\",\n \"type\": \"custom\",\n \"document_name\": \"Edited clinical note\",\n \"status\": \"success\"\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/documents")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"session_id\": \"ses_abc123def456\",\n \"template_id\": \"clinical_notes_template\",\n \"type\": \"custom\",\n \"document_name\": \"Edited clinical note\",\n \"status\": \"success\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eka.care/voice/api/v1/documents")
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 \"session_id\": \"ses_abc123def456\",\n \"template_id\": \"clinical_notes_template\",\n \"type\": \"custom\",\n \"document_name\": \"Edited clinical note\",\n \"status\": \"success\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"document_id": "doc_9f8e7d6c",
"session_id": "ses_abc123def456",
"template_id": "clinical_notes_template",
"document_name": "Edited clinical note",
"type": "markdown",
"document_type": "custom",
"status": "success",
"errors": [],
"warnings": [],
"usage_information": {},
"presigned_url": "https://s3.amazonaws.com/...&X-Amz-Signature=...",
"created_at": "2026-06-06T14:21:07Z",
"updated_at": "2026-06-06T14:25:12Z",
"publish": {}
}
}{
"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": {}
}
}Documents
Create or Update Document
Create a new document on a session (omit document_id → 201), or update an existing one (include document_id → 200) — for example to save a doctor’s edits to generated notes. Every response includes a presigned PUT URL: upload the document content (markdown) to that URL to store it.
POST
/
voice
/
api
/
v1
/
documents
Create or Update Document
curl --request POST \
--url https://api.eka.care/voice/api/v1/documents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"session_id": "ses_abc123def456",
"template_id": "clinical_notes_template",
"type": "custom",
"document_name": "Edited clinical note",
"status": "success"
}
'import requests
url = "https://api.eka.care/voice/api/v1/documents"
payload = {
"session_id": "ses_abc123def456",
"template_id": "clinical_notes_template",
"type": "custom",
"document_name": "Edited clinical note",
"status": "success"
}
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({
session_id: 'ses_abc123def456',
template_id: 'clinical_notes_template',
type: 'custom',
document_name: 'Edited clinical note',
status: 'success'
})
};
fetch('https://api.eka.care/voice/api/v1/documents', 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/documents",
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([
'session_id' => 'ses_abc123def456',
'template_id' => 'clinical_notes_template',
'type' => 'custom',
'document_name' => 'Edited clinical note',
'status' => 'success'
]),
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/documents"
payload := strings.NewReader("{\n \"session_id\": \"ses_abc123def456\",\n \"template_id\": \"clinical_notes_template\",\n \"type\": \"custom\",\n \"document_name\": \"Edited clinical note\",\n \"status\": \"success\"\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/documents")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"session_id\": \"ses_abc123def456\",\n \"template_id\": \"clinical_notes_template\",\n \"type\": \"custom\",\n \"document_name\": \"Edited clinical note\",\n \"status\": \"success\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eka.care/voice/api/v1/documents")
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 \"session_id\": \"ses_abc123def456\",\n \"template_id\": \"clinical_notes_template\",\n \"type\": \"custom\",\n \"document_name\": \"Edited clinical note\",\n \"status\": \"success\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"document_id": "doc_9f8e7d6c",
"session_id": "ses_abc123def456",
"template_id": "clinical_notes_template",
"document_name": "Edited clinical note",
"type": "markdown",
"document_type": "custom",
"status": "success",
"errors": [],
"warnings": [],
"usage_information": {},
"presigned_url": "https://s3.amazonaws.com/...&X-Amz-Signature=...",
"created_at": "2026-06-06T14:21:07Z",
"updated_at": "2026-06-06T14:25:12Z",
"publish": {}
}
}{
"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": {}
}
}Create a document on a session (omit
document_id → 201) or update one (include document_id → 200) — e.g. to save a doctor’s edits. The response includes a presigned PUT URL — upload the markdown content there:
curl -X PUT "<presigned_url>" -H "Content-Type: text/markdown" --data-binary @note.md
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
The session this document belongs to.
Example:
"ses_abc123def456"
Omit to create a new document; include to update an existing one.
Template the document is associated with, if any.
Document category.
Available options:
context, transcript, custom, notes, integration Human-readable document name.
Document status, e.g. in-progress or success.
Was this page helpful?
⌘I

