End Session
curl --request POST \
--url https://api.eka.care/voice/v1/sessions/{session_id}/end \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"audio_files_sent": 3
}
'import requests
url = "https://api.eka.care/voice/v1/sessions/{session_id}/end"
payload = { "audio_files_sent": 3 }
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({audio_files_sent: 3})
};
fetch('https://api.eka.care/voice/v1/sessions/{session_id}/end', 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/v1/sessions/{session_id}/end")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"audio_files_sent\": 3\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.eka.care/voice/v1/sessions/{session_id}/end");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"audio_files_sent\": 3\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/v1/sessions/{session_id}/end")
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 \"audio_files_sent\": 3\n}"
response = http.request(request)
puts response.read_body{
"session_id": "ses_abc123def456",
"status": "processing",
"message": "Session ended. Processing started.",
"audio_files_received": 3,
"audio_files": [
"0.webm",
"1.webm",
"2.webm"
]
}{
"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": {}
}
}Sessions
End Session
Finalize the session and start asynchronous processing. After this call no further audio uploads are accepted. The server collects and orders all uploaded chunks, commits the session, and queues it for transcription and template extraction. Poll GET /voice/v1/sessions/{session_id} (or use a webhook) to retrieve results once processing completes.
POST
/
voice
/
v1
/
sessions
/
{session_id}
/
end
End Session
curl --request POST \
--url https://api.eka.care/voice/v1/sessions/{session_id}/end \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"audio_files_sent": 3
}
'import requests
url = "https://api.eka.care/voice/v1/sessions/{session_id}/end"
payload = { "audio_files_sent": 3 }
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({audio_files_sent: 3})
};
fetch('https://api.eka.care/voice/v1/sessions/{session_id}/end', 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/v1/sessions/{session_id}/end")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"audio_files_sent\": 3\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.eka.care/voice/v1/sessions/{session_id}/end");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"audio_files_sent\": 3\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/v1/sessions/{session_id}/end")
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 \"audio_files_sent\": 3\n}"
response = http.request(request)
puts response.read_body{
"session_id": "ses_abc123def456",
"status": "processing",
"message": "Session ended. Processing started.",
"audio_files_received": 3,
"audio_files": [
"0.webm",
"1.webm",
"2.webm"
]
}{
"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": {}
}
}Lock the session and start processing — no body required. After this call no more audio is accepted.
On
202 Accepted, poll Get Session (or use a webhook) until the results are ready.Authorizations
Path Parameters
Body
application/json
Was this page helpful?

