---
title: "Export clinical note to VetManager"
method: POST
path: "/workspaces/{workspaceId}/consultations/{consultationId}/vetmanager/export"
tags: ["vetmanager"]
---

# Export clinical note to VetManager

`POST /workspaces/{workspaceId}/consultations/{consultationId}/vetmanager/export`

## Request

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

Adds the supplied note to the consultation's VetManager visit as a new AI note ("AI-anteckning"). The consultation must be linked to a visit, either by opening Vetnio from that visit or through the create-visit endpoint. Exporting the same text again replays the first result; edited text adds another note.

Errors: `400` when the consultation is not linked or the note is empty; `401` when the caller must sign in to VetManager again; `403` when the visit's access belongs to another visit; `404` when the visit no longer exists; `409` when the visit is locked.

## Path parameters

- `workspaceId` string, required: Identifier of the clinic (workspace), as returned by `GET /workspaces`. The key's user must be a member of the clinic, or an admin of the organization it belongs to.
- `consultationId` string, required: Identifier of the consultation (UUID), as returned when it was created or by `GET /workspaces/{workspaceId}/consultations`. It must belong to the clinic in `workspaceId`.

## Request body

- object
  - `clinicalNote` string, required: The note to write: HTML, plain text, or a structured note serialised as a JSON object. It is converted to plain text and must not be empty.

## Response `200`

The created note.

- object: The note was added to the visit as a new AI note.
  - `status` 'ok', required: Always `ok` on success.
  - `vetmanagerEventId` number, nullable, required: Id of the AI note created in VetManager, or `null` when VetManager did not return one.

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