Skip to main content
POST
Create Transcription

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.

Path Parameters

string
required
The appointment ObjectId this transcription belongs to. Only one transcription may exist per appointment.

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
The created transcription record.
Additional fields (for example __v) may appear on the transcription object. Treat any field not documented here as opaque.

Example Request

Example Response

Success (200)

Error Responses

401 Unauthorized
400 Transcription Already Exists
404 Appointment Not Found After Save
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 transcribing or error_transcription, it is advanced to processing.
  • 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.