Voice & Transcription (1.0.0)

Download OpenAPI specification:

Voice recordings, transcription processing and document management

Get Documentation Instructions

Get clinical documentation instructions. This endpoint provides instruction sets for various clinical documentation tasks.

Args: instruction_type: Type of instruction (clinical_notes, safety_plan, etc.) user_id: Optional user ID for personalized instructions

Returns: Instructions for the specified documentation task

path Parameters
instruction_type
required
string (Instruction Type)
query Parameters
User Id (string) or User Id (null) (User Id)

Responses

Response samples

Content type
application/json
null

Upload a voice recording blob to Azure Blob Storage

Accepts an audio file together with session metadata, uploads it to Azure Blob Storage under a structured path of the form ///, persists a TherapistSessionRecords entry to the database, and asynchronously triggers transcript generation via a Celery task. If a blob with the same name already exists in the container a numeric suffix (-1, -2, …) is appended to guarantee uniqueness. The is_last_blob flag signals the pipeline that all audio chunks for the session have been received and full transcription can begin.

Authorizations:
cookieAuthbasicAuthNone
Request Body schema: multipart/form-data
required
therapist_userid
required
string

Unique identifier of the therapist user (maps to Users FK).

therapist_clientid
required
string

Identifier of the client record linked to the therapist (maps to TherapistClient FK).

client_userid
string or null

Optional user ID of the client. Forwarded to the async transcript task.

file
required
string <uri>

Audio file to upload (e.g. .wav, .mp3, .webm).

session_id
required
string

Unique identifier for the recording session.

is_last_blob
required
string

String boolean ('True' / 'False') indicating whether this chunk is the final audio segment for the session.

therapist_session_id
string or null

Optional foreign key reference to an existing TherapistSession record.

Responses

Response samples

Content type
application/json
{
  • "message": "File uploaded successfully as therapist1/client2/2026-02-23/session_audio.wav!"
}

apis

apis_document_download_retrieve

Authorizations:
cookieAuthbasicAuthNone

Responses

apis_document_download_retrieve_2

Authorizations:
cookieAuthbasicAuthNone
path Parameters
id
required
string

Responses

apis_document_download_update

Authorizations:
cookieAuthbasicAuthNone
path Parameters
id
required
string

Responses

apis_document_download_destroy

Authorizations:
cookieAuthbasicAuthNone
path Parameters
id
required
string

Responses

apis_document_process_retrieve

Authorizations:
cookieAuthbasicAuthNone

Responses

apis_document_process_retrieve_2

Authorizations:
cookieAuthbasicAuthNone
path Parameters
id
required
string

Responses

apis_document_process_update

Authorizations:
cookieAuthbasicAuthNone
path Parameters
id
required
string

Responses

apis_document_process_destroy

Authorizations:
cookieAuthbasicAuthNone
path Parameters
id
required
string

Responses

apis_voicerecordings_list

Authorizations:
cookieAuthbasicAuthNone

Responses

Response samples

Content type
application/json
[
  • {
    }
]

apis_voicerecordings_retrieve

Authorizations:
cookieAuthbasicAuthNone
path Parameters
id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "filename": "string",
  • "userid": 0,
  • "is_processed": true,
  • "therapist_client_id": 0,
  • "create_timestamp": "2019-08-24T14:15:22Z",
  • "update_timestamp": "2019-08-24T14:15:22Z",
  • "session_id": "string",
  • "is_last_blob": true,
  • "therapist_session_id": 0
}

apis_voicerecordings_update

Authorizations:
cookieAuthbasicAuthNone
path Parameters
id
required
string
Request Body schema:
filename
string or null <= 512 characters
userid
integer or null
is_processed
boolean or null
therapist_client_id
integer or null
create_timestamp
string or null <date-time>
update_timestamp
string or null <date-time>
session_id
string or null <= 255 characters
is_last_blob
boolean or null
therapist_session_id
integer or null

Responses

Request samples

Content type
{
  • "filename": "string",
  • "userid": 0,
  • "is_processed": true,
  • "therapist_client_id": 0,
  • "create_timestamp": "2019-08-24T14:15:22Z",
  • "update_timestamp": "2019-08-24T14:15:22Z",
  • "session_id": "string",
  • "is_last_blob": true,
  • "therapist_session_id": 0
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "filename": "string",
  • "userid": 0,
  • "is_processed": true,
  • "therapist_client_id": 0,
  • "create_timestamp": "2019-08-24T14:15:22Z",
  • "update_timestamp": "2019-08-24T14:15:22Z",
  • "session_id": "string",
  • "is_last_blob": true,
  • "therapist_session_id": 0
}

apis_voicerecordings_destroy

Authorizations:
cookieAuthbasicAuthNone
path Parameters
id
required
string

Responses

apis_voicerecordings_history_userid_list

Authorizations:
cookieAuthbasicAuthNone

Responses

Response samples

Content type
application/json
[
  • {
    }
]

apis_voicerecordings_history_userid_retrieve

Authorizations:
cookieAuthbasicAuthNone
path Parameters
id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "transcript_summary": "string",
  • "client_user_id": 0,
  • "therapist_user_id": 0,
  • "therapist_client_id": 0,
  • "date": "2019-08-24T14:15:22Z",
  • "therapist_session_id": 0
}

apis_voicerecordings_history_userid_update

Authorizations:
cookieAuthbasicAuthNone
path Parameters
id
required
string
Request Body schema:
required
transcript_summary
required
string
client_user_id
integer or null
therapist_user_id
integer or null
therapist_client_id
integer or null
date
required
string <date-time>
therapist_session_id
integer or null

Responses

Request samples

Content type
{
  • "transcript_summary": "string",
  • "client_user_id": 0,
  • "therapist_user_id": 0,
  • "therapist_client_id": 0,
  • "date": "2019-08-24T14:15:22Z",
  • "therapist_session_id": 0
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "transcript_summary": "string",
  • "client_user_id": 0,
  • "therapist_user_id": 0,
  • "therapist_client_id": 0,
  • "date": "2019-08-24T14:15:22Z",
  • "therapist_session_id": 0
}

apis_voicerecordings_history_userid_destroy

Authorizations:
cookieAuthbasicAuthNone
path Parameters
id
required
string

Responses

apis_voicerecordings_process_userid_retrieve

Authorizations:
cookieAuthbasicAuthNone

Responses

apis_voicerecordings_process_userid_retrieve_2

Authorizations:
cookieAuthbasicAuthNone
path Parameters
id
required
string

Responses

apis_voicerecordings_process_userid_update

Authorizations:
cookieAuthbasicAuthNone
path Parameters
id
required
string

Responses

apis_voicerecordings_process_userid_destroy

Authorizations:
cookieAuthbasicAuthNone
path Parameters
id
required
string

Responses

apis_voicerecordings_userid_list

Authorizations:
cookieAuthbasicAuthNone

Responses

Response samples

Content type
application/json
[
  • {
    }
]

apis_voicerecordings_userid_retrieve

Authorizations:
cookieAuthbasicAuthNone
path Parameters
id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "transcript": "string",
  • "transcript_summary": "string",
  • "date": "2019-08-24T14:15:22Z",
  • "update_timestamp": "2019-08-24T14:15:22Z",
  • "therapist_session_id": 0
}

apis_voicerecordings_userid_update

Authorizations:
cookieAuthbasicAuthNone
path Parameters
id
required
string
Request Body schema:
required
transcript
required
string
transcript_summary
required
string
date
required
string <date-time>
update_timestamp
string or null <date-time>
therapist_session_id
integer or null

Responses

Request samples

Content type
{
  • "transcript": "string",
  • "transcript_summary": "string",
  • "date": "2019-08-24T14:15:22Z",
  • "update_timestamp": "2019-08-24T14:15:22Z",
  • "therapist_session_id": 0
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "transcript": "string",
  • "transcript_summary": "string",
  • "date": "2019-08-24T14:15:22Z",
  • "update_timestamp": "2019-08-24T14:15:22Z",
  • "therapist_session_id": 0
}

apis_voicerecordings_userid_destroy

Authorizations:
cookieAuthbasicAuthNone
path Parameters
id
required
string

Responses

Document Intelligence

Stream a document file directly from Azure Blob Storage

Looks up a blob by its storage path (file_url) and streams it back to the caller as a chunked HTTP response with the original content type preserved. The Content-Disposition header is set to 'inline' so browsers render the file in-place rather than downloading it. Content-Length is also returned so clients can display accurate progress. Intended for use when rendering previously uploaded documents (e.g. intake forms, clinical notes) inside the application.

Authorizations:
cookieAuthbasicAuthNone
Request Body schema:
required
file_name
required
string

Original filename of the document (e.g. 'intake_form.pdf'). Required.

file_url
required
string

Full blob storage path returned by the upload endpoint (e.g. 'intake-forms/Therapist/42/2026-02-23/intake_form.pdf').

Responses

Request samples

Content type
{
  • "file_name": "string",
  • "file_url": "string"
}

Response samples

Content type
application/json
"string"

Upload documents to blob storage and extract text via Azure Document Intelligence

Accepts one or more document files alongside user metadata, uploads each file to Azure Blob Storage under the path ////, and immediately runs Azure Document Intelligence to extract the full text content. Image files (.png, .jpg, .jpeg, .tiff, .bmp) are processed with the 'prebuilt-read' OCR model; PDF files are processed with the 'prebuilt-layout' model for full structural analysis. The extracted text, original filename, and blob path are returned for every file in the batch. Unsupported file extensions raise a ValueError before upload.

Authorizations:
cookieAuthbasicAuthNone
Request Body schema: multipart/form-data
required
userid
required
string

User ID of the uploader. Used as the third-level folder prefix in blob storage.

role
required
string
Enum: "User" "Therapist"

Role of the uploader. Must be 'User' or 'Therapist'. Used as the second-level folder prefix.

  • User - User
  • Therapist - Therapist
feature
required
string

Feature or module name. Used as the top-level folder prefix in blob storage (e.g. 'intake-forms').

files
required
Array of strings <uri> [ items <uri > ]

One or more files to upload and analyse. Supported types: .pdf (layout analysis) and .png, .jpg, .jpeg, .tiff, .bmp (OCR).

Responses

Response samples

Content type
application/json
[
  • [
    ]
]

Transcription

Retrieve transcript summary history for a therapist–client pair

Returns all non-deleted TherapistSessionTranscriptHistory records for the given client user ID and therapist-client relationship ID, ordered by most recent session first (descending create_timestamp). Each record contains an AES-encrypted, Base64-encoded transcript summary along with identifying metadata such as client/therapist user IDs and the associated session reference. Returns 204 when no history records exist.

Authorizations:
cookieAuthbasicAuthNone
Request Body schema:
required
userid
required
string

Client's user ID (maps to TherapistSessionTranscriptHistory.client_user_id).

therapist_clientid
required
string

Therapist-client relationship ID (maps to TherapistSessionTranscriptHistory.therapist_client_id).

Responses

Request samples

Content type
{
  • "userid": "string",
  • "therapist_clientid": "string"
}

Response samples

Content type
application/json
[
  • {
    }
]

Trigger on-demand transcription for a therapist–client session date

Lists all audio blobs stored under the path /// in Azure Blob Storage, generates a short-lived SAS token for each blob, and synchronously transcribes every file using the AzureTranscriptionService. All resulting transcript strings are collected and returned in a single response. This endpoint is intended for manual or on-demand re-processing; automated transcription is normally triggered asynchronously via the Celery pipeline after the last blob is uploaded.

Authorizations:
cookieAuthbasicAuthNone
Request Body schema:
required
userid
required
string

Therapist user ID — used as the top-level folder prefix in blob storage.

therapist_clientid
required
string

Therapist-client relationship ID — second-level folder prefix in blob storage.

date
required
string <date>

Session date in YYYY-MM-DD format. Determines which daily blob folder is transcribed.

Responses

Request samples

Content type
{
  • "userid": "string",
  • "therapist_clientid": "string",
  • "date": "2019-08-24"
}

Response samples

Content type
application/json
{
  • "transcripts": [
    ]
}

Retrieve session transcripts for a therapist–client pair

Returns all non-deleted TherapistSessionTranscript records that match the given client user ID and therapist-client relationship ID. Each record includes the full transcript and AI-generated summary, both AES-encrypted and Base64-encoded in the response. Returns 204 when no transcripts exist for the specified pair.

Authorizations:
cookieAuthbasicAuthNone
Request Body schema:
required
userid
required
string

Client's user ID (maps to TherapistSessionTranscript.client_user_id).

therapist_clientid
required
string

Therapist-client relationship ID (maps to TherapistSessionTranscript.therapist_client_id).

Responses

Request samples

Content type
{
  • "userid": "string",
  • "therapist_clientid": "string"
}

Response samples

Content type
application/json
[
  • {
    }
]