---
title: "Get VetsGPT chat attachments"
method: GET
path: "/workspaces/{workspaceId}/vetsgpt/chats/{chatId}/attachments"
tags: ["vetsgpt"]
---

# Get VetsGPT chat attachments

`GET /workspaces/{workspaceId}/vetsgpt/chats/{chatId}/attachments`

## Request

- Base URL: `https://vetnio.com/api/v2`
- URL: `https://vetnio.com/api/v2/workspaces/{workspaceId}/vetsgpt/chats/{chatId}/attachments`
- Auth: HTTP bearer

Returns the consultations and patient attached to an owned or explicitly shared chat as context. Despite the path, uploaded files are not listed here. Sharing does not grant access to the underlying clinical resources. Returns `404` when the chat does not exist or the caller lacks access.

## Path parameters

- `workspaceId` string, required: Identifier of the workspace (clinic). The caller must be a member, and VetsGPT must be enabled for them in this workspace.
- `chatId` string, required: Identifier of a VetsGPT chat owned by or explicitly shared with the caller. Unshared chats behave as if they did not exist.

## Response `200`

The chat context attachments.

- VetsgptChatContext: The consultation and patient context attached to a VetsGPT chat. VetsGPT uses it when answering later messages in the chat.
  - `consultations` object[], required: Consultations attached to the chat as context, in attachment order. Empty when none are attached.
    - `id` string, required: Consultation id.
    - `name` string, required: Consultation name. `Unknown` when the consultation no longer exists or the caller can no longer read it; it is then still listed but not used as context.
  - `patient` object, nullable, required: The patient attached to the chat as context, or `null` when none is attached or the patient has since been deleted.
    - `id` string, required: Patient id.
    - `name` string, required: Patient name, or `Unknown` when the record has no name.
    - `species` string, nullable, required: Species as recorded on the patient, or `null`.
    - `identifier` string, nullable, required: Patient identifier (for example a microchip number), or `null`.

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