---
title: "Link a patient to a consultation"
method: POST
path: "/workspaces/{workspaceId}/consultations/{consultationId}/patient"
tags: ["consultations", "patients"]
---

# Link a patient to a consultation

`POST /workspaces/{workspaceId}/consultations/{consultationId}/patient`

## Request

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

Sets the consultation's patient. A consultation has at most one patient, so this replaces any patient already linked; the consultation then appears in that patient's history. Only the patient link changes (the owner, title and notes are untouched). Repeating the call with the same patient is harmless. Returns `404` when the consultation or the patient does not exist in the workspace and `403` when the consultation is archived. There is no unlink endpoint in the REST API.

## Path parameters

- `workspaceId` string, required: Identifier of the workspace (clinic) that owns the patients and clients. The caller must be a member of it; patients and clients are shared by all members of the workspace.
- `consultationId` string, required: Consultation (UUID) to link the patient to. Must be in the workspace and not archived.

## Request body

- object
  - `patientId` string, required: Patient (UUID) in the same workspace to link to the consultation.

## Response `200`

Confirmation that the patient is now linked to the consultation.

- PatientSuccess: Acknowledgement returned by patient and client mutations that have no resource body.
  - `success` boolean, required: Always `true`; failures are returned as errors.

## Other responses

- `400`: Invalid input data
- `401`: Authorization not provided
- `403`: Insufficient access
- `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)
