Create Transcription
curl --request POST \
--url https://api.example.com/transcriptions/add/{appointmentId} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"transcription": [
{}
]
}
'import requests
url = "https://api.example.com/transcriptions/add/{appointmentId}"
payload = { "transcription": [{}] }
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({transcription: [{}]})
};
fetch('https://api.example.com/transcriptions/add/{appointmentId}', 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.example.com/transcriptions/add/{appointmentId}",
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([
'transcription' => [
[
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"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.example.com/transcriptions/add/{appointmentId}"
payload := strings.NewReader("{\n \"transcription\": [\n {}\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
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.example.com/transcriptions/add/{appointmentId}")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"transcription\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/transcriptions/add/{appointmentId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"transcription\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"_id": "<string>",
"appointment_id": "<string>",
"transcription": [
{}
],
"createdAt": "<string>",
"updatedAt": "<string>"
}
}Transcriptions
Create Transcription
Create the transcription for a specific appointment.
POST
/
transcriptions
/
add
/
{appointmentId}
Create Transcription
curl --request POST \
--url https://api.example.com/transcriptions/add/{appointmentId} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"transcription": [
{}
]
}
'import requests
url = "https://api.example.com/transcriptions/add/{appointmentId}"
payload = { "transcription": [{}] }
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({transcription: [{}]})
};
fetch('https://api.example.com/transcriptions/add/{appointmentId}', 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.example.com/transcriptions/add/{appointmentId}",
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([
'transcription' => [
[
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"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.example.com/transcriptions/add/{appointmentId}"
payload := strings.NewReader("{\n \"transcription\": [\n {}\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
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.example.com/transcriptions/add/{appointmentId}")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"transcription\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/transcriptions/add/{appointmentId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"transcription\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"_id": "<string>",
"appointment_id": "<string>",
"transcription": [
{}
],
"createdAt": "<string>",
"updatedAt": "<string>"
}
}Overview
Creates the transcription for a specific appointment. The transcription is stored as an ordered array of transcript segments, the appointment is advanced through its processing workflow, and clinical note generation is triggered automatically. Only one transcription may exist per appointment. If a transcription already exists, the request is rejected.Only one transcription can be created per appointment. If a transcription already exists, the request is rejected with
Transcription already exists.Authentication
string
required
Bearer JWT token. The calling user is derived from the token; there is no
uid parameter.Authorization: Bearer <JWT>
Path Parameters
string
required
The appointment ObjectId this transcription belongs to. Only one transcription may exist per appointment.
665f8a1b2c3d4e5f6789012f3
Body Parameters
array
required
Ordered array of transcript segment objects. Each segment is an object such as
{ "sender": "speaker_0", "message": "...", "start_time": "00:00:05,800" }, where sender is a diarization speaker label and start_time is an SRT-style timestamp string. The value is stored as-is; a non-array value is rejected by validation (500).Response
boolean
required
Indicates whether the transcription was created successfully.
object
Additional fields (for example
__v) may appear on the transcription object. Treat any field not documented here as opaque.Example Request
curl -X POST \
'https://app.medisync.me/api/transcriptions/add/665f8a1b2c3d4e5f6789012f3' \
-H 'Authorization: Bearer <JWT>' \
-H 'Content-Type: application/json' \
-d '{
"transcription": [
{ "sender": "speaker_0", "message": "Guten Tag, was fuehrt Sie zu mir?", "start_time": "00:00:01,200" },
{ "sender": "speaker_1", "message": "Ich habe seit heute Morgen Brustschmerzen.", "start_time": "00:00:05,800" }
]
}'
const response = await fetch(
'https://app.medisync.me/api/transcriptions/add/665f8a1b2c3d4e5f6789012f3',
{
method: 'POST',
headers: {
'Authorization': 'Bearer <JWT>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
transcription: [
{ sender: 'speaker_0', message: 'Guten Tag, was fuehrt Sie zu mir?', start_time: '00:00:01,200' },
{ sender: 'speaker_1', message: 'Ich habe seit heute Morgen Brustschmerzen.', start_time: '00:00:05,800' }
]
})
}
);
const result = await response.json();
import requests
data = {
"transcription": [
{"sender": "speaker_0", "message": "Guten Tag, was fuehrt Sie zu mir?", "start_time": "00:00:01,200"},
{"sender": "speaker_1", "message": "Ich habe seit heute Morgen Brustschmerzen.", "start_time": "00:00:05,800"}
]
}
headers = {
'Authorization': 'Bearer <JWT>',
'Content-Type': 'application/json'
}
response = requests.post(
'https://app.medisync.me/api/transcriptions/add/665f8a1b2c3d4e5f6789012f3',
headers=headers,
json=data
)
result = response.json()
Example Response
Success (200)
{
"success": true,
"data": {
"_id": "665f8a1b2c3d4e5f6789012f7",
"appointment_id": "665f8a1b2c3d4e5f6789012f3",
"transcription": [
{ "sender": "speaker_0", "message": "Guten Tag, was fuehrt Sie zu mir?", "start_time": "00:00:01,200" },
{ "sender": "speaker_1", "message": "Ich habe seit heute Morgen Brustschmerzen.", "start_time": "00:00:05,800" }
],
"createdAt": "2026-06-30T10:30:00.000Z",
"updatedAt": "2026-06-30T10:30:00.000Z"
}
}
Error Responses
401 Unauthorized
{
"success": false,
"message": "Unauthorized"
}
400 Transcription Already Exists
{
"success": false,
"error": "Transcription already exists"
}
404 Appointment Not Found After Save
{
"success": false,
"error": "Associated appointment not found after saving transcription."
}
The
Unauthorized response uses the message field; handler-level errors use the error field. Unexpected server errors — including posting a non-array transcription value, which fails validation — return 500 { "success": false, "error": "<message>" }.Behavior Notes
- One transcription per appointment: A second create for the same appointment is rejected with
Transcription already exists. - Status advance: If the appointment status is
transcribingorerror_transcription, it is advanced toprocessing. - Note generation: Creating a transcription automatically triggers clinical note generation for the appointment. This runs in the background and does not change the HTTP response.
- Order preserved: Segments are stored and returned in the order provided.