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

# Get VetsGPT chat messages

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

## Request

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

Returns the stored messages of an owned or explicitly shared chat, oldest first. Hidden internal messages (extracted file text and answers still being generated) are left out. Attachments are returned inline as base64 data URIs, which can make the response large. 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 persisted chat messages.

- object[]
  - `message_id` string, required: Message id, unique within the chat. Use it with the feedback endpoint.
  - `timestamp` string, required: When the message was stored (ISO-8601 UTC).
  - `type` 'user_message' | 'bot_message', required: Who wrote the message: - `user_message` — the vet. - `bot_message` — VetsGPT.
  - `content` object, required: Text and attachments of a stored VetsGPT message.
    - `text` string, required: Message text. Assistant answers are Markdown with inline source citations (see the ask endpoint).
    - `attachments` string[]: Files attached to a user message. The messages endpoint returns each file inline as a base64 data URI (`data:<mime>;name=<url-encoded file name>;base64,<bytes>`), which can make responses large; files that can no longer be read are left out. Absent when the message has no attachments.
  - `feedback` 'positive' | 'negative' | 'none', required: The vet's rating of the message: - `positive` — rated helpful (thumbs up). - `negative` — rated unhelpful (thumbs down). - `none` — not rated, or the rating was cleared.
  - `isAttachmentAnalysis` boolean: Internal marker for hidden messages that hold VetsGPT's analysis of uploaded files. Such messages are filtered out of the messages endpoint, so REST clients do not normally see this field.
  - `copilotProposals` object[]: Edits to a consultation's clinical note or client communication that VetsGPT proposed while the vet chatted from the consultation page in the web app. Absent for chats that never used the consultation editor. Informational for REST clients; proposals can only be applied in the web app.
    - `proposalId` string, required: Id of the proposal, unique within the message.
    - `tool` 'edit_clinical_note' | 'edit_communication', required: The editing tool VetsGPT used: - `edit_clinical_note` — edits the consultation's clinical note. - `edit_communication` — edits the consultation's client communication.
    - `target` 'clinical_note' | 'communication', required: Which document the edit applies to: - `clinical_note` — the clinical note. - `communication` — the client communication.
    - `summary` string, required: Short description of the change shown to the vet (up to 300 characters).
    - `operation` union, required: The edit itself, discriminated by `kind`: `patch` carries `edits` (1 to 20 `{find, replace}` pairs of lines in the document's HTML); `replace_all` carries `html`, the complete new document.
      - object
        - `kind` 'patch', required
        - `edits` object[], required
          - `find` string, required: The line, or the consecutive lines, being replaced — their text exactly as it reads in the current content, one per <br />.
          - `replace` string, required: What those lines become. Empty removes them.
      - object
        - `kind` 'replace_all', required
        - `html` string, required
    - `source` 'consultation' | 'vetsgpt_knowledge': Where the content of the edit came from: - `consultation` — this consultation's data. - `vetsgpt_knowledge` — VetsGPT's own veterinary knowledge, flagged to the vet for review. Absent on older proposals, which count as `consultation`.
    - `mode` 'auto' | 'manual', required: How the vet had VetsGPT apply edits when the proposal was made: - `auto` — applied immediately ("Write it"). - `manual` — waits for the vet to accept ("Ask first").
    - `baseHash` string, required: Fingerprint of the document version the edit was written against. Used to detect that the document changed since.
    - `status` 'pending' | 'applied' | 'accepted' | 'rejected' | 'undone' | 'stale', required: Review state of the proposal: - `pending` — waiting for the vet. - `applied` — applied automatically. - `accepted` — accepted by the vet and applied. - `rejected` — declined by the vet. - `undone` — applied, then reverted. - `stale` — could not be applied because the document changed (shown as Outdated).

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