---
title: "List consultations with export URLs"
method: GET
path: "/workspaces/{workspaceId}/data-export/consultations"
tags: ["consultations"]
---

# List consultations with export URLs

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

## Request

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

Paginated list of all consultations in the workspace, regardless of creator, including archived consultations and consultations deleted in the Vetnio app (rows do not say which). Each row includes the selected clinical note template ID (`clinicalNoteTemplateId`, or `null` if none is selected) and presigned download URLs for the audio recording, transcription, clinical note, structured JSON document, owner communication, and referral letter (or `null` when the artifact does not exist). Workspace admin only.

Creator-only playback settings do not apply to this authorized admin export.

Optional createdAtFrom (inclusive) and createdAtBefore (exclusive) filter the consultation creation timestamp, not the last edit or recording time. Supply ISO-8601 timestamps with Z or an explicit offset. Filters apply before pagination and to the total count. Results are ordered by createdAt descending, then ID descending. Omit either bound for an open-ended range.

Pair with `GET .../data-export` for single-consultation export, or use this endpoint to build a bulk export UI. URLs expire after 1 hour; re-fetch the page if they go stale. Each row checks storage for six artifacts, so larger pages take noticeably longer.

## Path parameters

- `workspaceId` string, required: Workspace to list consultations for.

## Query parameters

- `page` integer: Page to return, starting at 1. Defaults to 1. Pages past the end return an empty `consultations` array.
- `pageSize` integer: Consultations per page, 1 to 50. Defaults to 10. Capped at 50 because each row includes presigned download URLs for six artifacts.
- `searchQuery` string: Case-insensitive substring filter matched against the consultation name, the plain text of its clinical note, its `externalId`, and the linked patient's name or identifier. Surrounding whitespace is ignored; omit for no filter.
- `createdAtFrom` string, date-time: Inclusive lower bound on the consultation creation timestamp (not last edit or recording time). ISO-8601 with Z or an explicit timezone offset. Omit for no lower bound.
- `createdAtBefore` string, date-time: Exclusive upper bound on the consultation creation timestamp. ISO-8601 with Z or an explicit timezone offset. Must be later than createdAtFrom. Omit for no upper bound.

## Response `200`

Paginated consultation list with presigned export URLs.

- ConsultationExportList: Paginated list of consultations with presigned download URLs for audio, transcription, clinical note, structured JSON document, owner communication, and referral letter. Workspace admin only.
  - `consultations` ConsultationExportItemOutput[], required: Consultations on the current page, each with presigned download URLs for its artifacts.
    - `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.
    - `id` string, required: Consultation ID (UUID).
    - `name` string, required: Display name of the consultation; may be an empty string.
    - `creatorId` string, required: User ID of the person who created the consultation.
    - `createdAt` string, required: When the consultation was created, as an ISO-8601 UTC timestamp. The `createdAtFrom`/`createdAtBefore` filters and the sort order use this value.
    - `externalId` string, nullable, required: Identifier of the matching visit in the clinic's practice-management system, or `null` if the consultation is not linked to one.
    - `clinicalNoteTemplateId` string, nullable, required: ID of the clinical note template selected for the consultation, or `null` if none is selected.
    - `audioRecording` string, nullable, required: Presigned GET URL for the full consultation audio (all uploaded recordings joined into one 16 kHz mono WAV file), or `null` if no audio exists or it was 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, 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.
  - `count` number, required: Total consultations matching the filters across all pages, including archived and deleted ones.
  - `page` number, required: Current page number (1-indexed).
  - `pageSize` number, required: Consultations per page.
  - `totalPages` number, required: Total pages given the current page size.
  - `expiresInSeconds` number, required: How long each presigned URL remains valid, in seconds.
  - `expiresAt` string, required: ISO-8601 timestamp at which the presigned URLs in this response expire.

## 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)
