File Upload
curl --request POST \
--url https://api.eka.care/v1/file-upload \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.eka.care/v1/file-upload"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.eka.care/v1/file-upload', 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/v1/file-upload",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.eka.care/v1/file-upload"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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/v1/file-upload")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eka.care/v1/file-upload")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"uploadData": {
"url": "https://m-prod-ekascribe-batch.s3.amazonaws.com/",
"fields": {
"x-amz-meta-mode": "dictation",
"key": "EC_173210496011417/txn_301/20250617_105524/${filename}",
"x-amz-algorithm": "AWS4-HMAC-SHA256",
"x-amz-credential": "ASIAYES5P2B2ZIB4II4R/20250617/ap-south-1/s3/aws4_request",
"x-amz-date": "20250617T105524Z",
"x-amz-security-token": "<string>",
"policy": "<string>",
"x-amz-signature": "<string>"
}
},
"folderPath": "EC_173210496011417/txn_301/20250617_105524/",
"txn_id": "txn_301"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "Unauthorized",
"message": "Invalid or missing authentication token"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Presigned URL
This endpoint generates presigned URLs for uploading audio files to S3. It provides the necessary credentials and upload parameters to securely upload files directly to AWS S3.
POST
/
v1
/
file-upload
File Upload
curl --request POST \
--url https://api.eka.care/v1/file-upload \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.eka.care/v1/file-upload"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.eka.care/v1/file-upload', 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/v1/file-upload",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.eka.care/v1/file-upload"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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/v1/file-upload")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eka.care/v1/file-upload")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"uploadData": {
"url": "https://m-prod-ekascribe-batch.s3.amazonaws.com/",
"fields": {
"x-amz-meta-mode": "dictation",
"key": "EC_173210496011417/txn_301/20250617_105524/${filename}",
"x-amz-algorithm": "AWS4-HMAC-SHA256",
"x-amz-credential": "ASIAYES5P2B2ZIB4II4R/20250617/ap-south-1/s3/aws4_request",
"x-amz-date": "20250617T105524Z",
"x-amz-security-token": "<string>",
"policy": "<string>",
"x-amz-signature": "<string>"
}
},
"folderPath": "EC_173210496011417/txn_301/20250617_105524/",
"txn_id": "txn_301"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "Unauthorized",
"message": "Invalid or missing authentication token"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}This API is deprecated. Please use the new EkaScribe Protocol APIs (Create Session → Upload Audio → End Session) or the SDKs instead.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
txn_id | string | Yes | Session ID for file upload |
action | string | No | Upload action: ekascribe-v2 |
Response
{
"uploadData": {
"url": "https://m-prod-ekascribe-batch.s3.amazonaws.com/",
"fields": {
"x-amz-meta-mode": "dictation",
"x-amz-meta-uhid": "unique_patient_id",
"x-amz-meta-hfid": "unique_health_facility_id",
"key": "EC_173210496011417/txn_301/20250617_105524/${filename}",
"x-amz-algorithm": "AWS4-HMAC-SHA256",
"x-amz-credential": "...",
"x-amz-date": "...",
"policy": "...",
"x-amz-signature": "..."
}
},
"folderPath": "EC_173210496011417/txn_301/20250617_105524/",
"txn_id": "txn_301"
}
HTTP Status Codes
| Code | Description |
|---|---|
| 200 | Presigned URL generated successfully |
| 204 | File uploaded successfully |
| 403 | Upload failed (expired policy) |
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Session ID for file upload
Example:
"txn_301"
Upload action type
Available options:
ekascribe-v2 Example:
"ekascribe-v2"
Response
Presigned URL generated successfully
Was this page helpful?
⌘I

