---
title: "Create Voice Note"
method: POST
path: "/clinic/voice-notes"
tags: ["clinic", "voice-notes"]
---

# Create Voice Note

`POST /clinic/voice-notes`

## Request

- Base URL: `https://api.projectindi.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.projectindi.com/clinic/voice-notes`
- Auth: none declared

Stage a recording and, unless ``transcribe`` is false, return its transcript.

The access gate is ``resolve_source_type_and_gate`` - the same one
``/observations/quick-note`` applies on send. Running it *before* Deepgram
means the transcribe call rejects in exactly the cases the send would, so a
clinician can never dictate for five minutes into a note they are not
allowed to file (and we never pay Deepgram for one).

It runs before ``read_bounded`` too, but that ordering saves a copy and not
a transfer: FastAPI resolves ``audio_file`` by awaiting ``request.form()``,
which drains the whole multipart body before this function's first line, so
an ungranted clinician has already pushed their recording by the time the
403 is decided. Refusing the upload before the bytes leave the phone would
take a separate pre-flight, which nothing here has.

## Request body `multipart/form-data`

- BodyCreateVoiceNoteClinicVoiceNotesPost
  - `audio_file` string, binary, required
  - `child_id` string, required
  - `transcribe` boolean

## Response `200`

Successful Response

- VoiceNoteResponse: What the client needs to reach the review screen, transcript or not. ``staged_attachment_id`` is always present: it is the only handle on the audio, and without it a failed transcription orphans the object in the bucket and quietly drops the recording from the note that follows.
  - `staged_attachment_id` string, required
  - `staged_filename` string, required
  - `transcription_failed` boolean
  - `transcript` string, nullable
  - `confidence` number, nullable
  - `duration_seconds` number, nullable
  - `model` string, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/projectindi/apis/indi-agent-api-first-principles.md) - [All operations](https://skmtc.dev/projectindi/apis/indi-agent-api-first-principles/llms.txt) - [OpenAPI document](https://skmtc.dev/projectindi/apis/indi-agent-api-first-principles/revisions/25a7813e21fd?raw)
