Skip to main content
PUT
/
transcriptions
/
update
/
{appointmentId}
Update Transcription
curl --request PUT \
  --url https://api.example.com/transcriptions/update/{appointmentId} \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "transcription": [
    {}
  ]
}
'
import requests

url = "https://api.example.com/transcriptions/update/{appointmentId}"

payload = { "transcription": [{}] }
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PUT',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({transcription: [{}]})
};

fetch('https://api.example.com/transcriptions/update/{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/update/{appointmentId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
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/update/{appointmentId}"

payload := strings.NewReader("{\n \"transcription\": [\n {}\n ]\n}")

req, _ := http.NewRequest("PUT", 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.put("https://api.example.com/transcriptions/update/{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/update/{appointmentId}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.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

Replaces the transcription stored for a specific appointment, looked up by appointment_id. The supplied array fully replaces the existing transcription, the appointment status is set to processing, and its error reason is cleared.
This endpoint finds the transcription by appointment ID and replaces its content. The appointment status is set to processing and its error reason is cleared.

Authentication

Authorization
string
required
Bearer JWT token. The calling user is derived from the token.
Authorization: Bearer <JWT>

Path Parameters

appointmentId
string
required
The appointment ObjectId whose transcription is updated (looked up by appointment_id).
665f8a1b2c3d4e5f6789012f3

Body Parameters

transcription
array
required
Replacement array of transcript segment objects, e.g. { "sender": "speaker_0", "message": "...", "start_time": "00:00:05,800" }. This fully replaces the existing transcription array. A non-array value is rejected (500).

Response

success
boolean
required
Indicates whether the transcription was updated successfully.
data
object
The updated transcription record.
Additional fields (for example __v) may appear on the transcription object. Treat any field not documented here as opaque.

Example Request

curl -X PUT \
  'https://app.medisync.me/api/transcriptions/update/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, korrigiert.", "start_time": "00:00:05,800" }
    ]
  }'
const response = await fetch(
  'https://app.medisync.me/api/transcriptions/update/665f8a1b2c3d4e5f6789012f3',
  {
    method: 'PUT',
    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, korrigiert.', 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, korrigiert.", "start_time": "00:00:05,800"}
    ]
}

headers = {
    'Authorization': 'Bearer <JWT>',
    'Content-Type': 'application/json'
}

response = requests.put(
    'https://app.medisync.me/api/transcriptions/update/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, korrigiert.", "start_time": "00:00:05,800" }
    ],
    "createdAt": "2026-06-30T10:30:00.000Z",
    "updatedAt": "2026-06-30T11:15:00.000Z"
  }
}

Error Responses

401 Unauthorized
{
  "success": false,
  "message": "Unauthorized"
}
404 Transcription Not Found
{
  "success": false,
  "error": "Transcription not found"
}
404 Associated Appointment Not Found
{
  "success": false,
  "error": "Associated appointment not found."
}
The Unauthorized response uses the message field; handler-level errors use the error field. Unexpected server errors — including sending a non-array transcription value — return 500 { "success": false, "error": "<message>" }.

Behavior Notes

  • Full replacement: The supplied array completely replaces the existing transcription.
  • Update order: The transcription is updated first; if the appointment is then not found, the endpoint returns 404 Associated appointment not found. (the transcription is still updated).
  • Status reset: The appointment status is set to processing unconditionally and its error reason is cleared.
  • Note generation: Updating a transcription may re-trigger clinical note generation in the background; this does not change the HTTP response.