---
title: "Create a workspace"
method: POST
path: "/workspaces"
tags: ["workspaces"]
---

# Create a workspace

`POST /workspaces`

## Request

- Base URL: `https://vetnio.com/api/v2`
- URL: `https://vetnio.com/api/v2/workspaces`
- Auth: HTTP bearer

Creates a new workspace (veterinary clinic) from a name and country code, and makes the caller its `superadmin`. Before responding it also records the caller's acceptance of Vetnio's Terms of Service, Privacy Policy and Data Processing Agreement, creates the workspace's default note templates and a billing customer, and may link the clinic to an organization that matches the caller's email domain or lists the clinic on its roster. Failures in those follow-up steps are logged and do not fail the request. The free trial does not start here; it starts with the workspace's first consultation or first VetsGPT conversation. Not idempotent: every successful call creates another workspace. A user may normally create only one workspace (accounts enabled for multi-clinic administration can create up to 200); beyond that the request fails with a generic 500 error. Accepts a session or a personal API key.

## Request body

- object: Workspace creation payload. Only a clinic name and country code are needed; the address and tax ID can be completed later in the app.
  - `name` string, required: Display name of the clinic, shown in the workspace switcher, on invoices and on PDF letterheads. Not checked for uniqueness or length; an empty string is accepted.
  - `countryCode` string, required: Two-letter ISO 3166-1 alpha-2 country code of the clinic, for example `se`, `de` or `us` (matched case-insensitively). It sets regional defaults such as the audio retention policy (12 months for Germany, Austria and Switzerland) and becomes the billing address country. Stored as sent and not validated, so send a real code.

## Response `200`

Workspace created. Use the returned `id` as `workspaceId` in subsequent workspace-scoped requests.

- WorkspaceCreated: Confirmation returned after a workspace (veterinary clinic) is created. Contains only the new workspace ID; it also appears in `GET /workspaces` from now on.
  - `id` string, required: Identifier of the newly created workspace. Use it as `workspaceId` in subsequent workspace-scoped calls, for example to create consultations.

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