---
title: "Export raw consultation data"
method: GET
path: "/workspaces/{workspaceId}/consultations/{consultationId}/data-export"
tags: ["consultations"]
---

# Export raw consultation data

`GET /workspaces/{workspaceId}/consultations/{consultationId}/data-export`

## Request

- Base URL: `https://vetnio.com/api/v2`
- URL: `https://vetnio.com/api/v2/workspaces/{workspaceId}/consultations/{consultationId}/data-export`
- Auth: HTTP bearer

Returns presigned download URLs for the full audio recording, transcription, clinical note, structured JSON document, owner communication, and referral letter of a consultation. Each field is null when the underlying artifact does not yet exist (for example if the clinical note has not been generated). Creator-only playback settings do not apply to this authorized admin export.

Workspace admin only (direct workspace admins and organization admins); other members get `403`. Archived or deleted consultations return `403` even though they appear in `GET .../data-export/consultations`. URLs are valid for 1 hour (`expiresAt`); call again for fresh ones. Read-only: nothing is generated or changed.

## Path parameters

- `workspaceId` string, required: Identifier of the clinic (workspace), as returned by `GET /workspaces`. The key's user must be a member of the clinic, or an admin of the organization it belongs to.
- `consultationId` string, required: Identifier of the consultation (UUID), as returned when it was created or by `GET /workspaces/{workspaceId}/consultations`. It must belong to the clinic in `workspaceId`.

## Response `200`

Presigned download URLs for the consultation's stored artifacts.

- ConsultationDataExport: Presigned download URLs for a consultation's retained artifacts: audio recording, transcription, clinical note, structured JSON document, owner communication, and referral letter. Each URL is time-limited; fields are `null` when the corresponding artifact does not exist.
  - `structuredDocument` string, nullable, required: Presigned GET URL for the separately stored structured JSON document, or null if none exists. The payload matches the JSON template used to generate it; it is not the rendered clinical note.
  - `communication` string, nullable, required: Presigned GET URL for the owner communication in its stored format, or null if none exists.
  - `referral` string, nullable, required: Presigned GET URL for the referral letter in its stored format, or null if none exists.
  - `consultationId` string, required: The consultation these artifacts belong to.
  - `workspaceId` string, required: The workspace that owns the consultation.
  - `externalId` string, nullable, required: External ID from an integrated system, or `null` if the consultation is not linked to one.
  - `expiresInSeconds` number, required: How long each presigned download URL remains valid, in seconds.
  - `expiresAt` string, required: ISO-8601 timestamp at which the download URLs expire. Provided for convenience so clients can display a countdown without computing it themselves.
  - `audioRecording` string, nullable, required: Presigned GET URL for the full consultation audio: every uploaded recording joined into one 16 kHz mono WAV file, silence included. `null` if no audio exists (for example a text-only consultation, or audio removed by the clinic's audio-retention policy). Creator-only playback settings do not apply to authorized admin exports.
  - `transcription` string, nullable, required: Presigned GET URL for the full transcript as a UTF-8 plain-text file (the same text as `GET .../transcription`), or `null` if nothing has been transcribed yet.
  - `clinicalNote` string, nullable, required: Presigned GET URL for the stored clinical note (HTML, or JSON for structured notes), or `null` if no note has been saved yet.

## Other responses

- `400`: Invalid input data
- `401`: Authorization not provided
- `403`: Insufficient access
- `404`: Not found
- `500`: Internal server error

---

[API](https://skmtc.dev/vetnio/apis/vetnio-api.md) - [All operations](https://skmtc.dev/vetnio/apis/vetnio-api/llms.txt) - [OpenAPI document](https://skmtc.dev/vetnio/apis/vetnio-api/revisions/d004afd5617d?raw)
