---
title: "Set VetsGPT consultation context"
method: PUT
path: "/workspaces/{workspaceId}/vetsgpt/chats/{chatId}/attachments/consultations"
tags: ["vetsgpt"]
---

# Set VetsGPT consultation context

`PUT /workspaces/{workspaceId}/vetsgpt/chats/{chatId}/attachments/consultations`

## Request

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

Owner only: replaces the consultations attached as context for new questions. VetsGPT reads each consultation's name, date, transcript, clinical note, client communication and linked patient, re-checking read access on every message. Existing questions retain their captured context on retry. Returns `404` when the chat does not exist or the caller is not its owner. More than 50 consultations currently returns `500`.

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

## Request body

- object
  - `consultationIds` string[], required: The complete new set of consultations (duplicates removed, up to 50). An empty array removes all consultation context. Every id must be a consultation the caller can read, otherwise `404` and nothing changes.

## Response `200`

The consultation context was updated.

- object: Acknowledgement returned by VetsGPT mutations that have no resource body.
  - `success` boolean, required: Always `true` on success; failures are returned as errors.

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