API reference · Core resources
Instructions that control how Vetnio writes clinical notes and other free-text documents.
Guides:TemplatesManage templates
A prompt template: reusable writing instructions (headings plus guidance on what belongs under each) that Vetnio follows when it generates a clinical note, client communication or referral letter. The template body is not included.
idstringrequiredID of the template (a UUID). Pass it as templateId when generating a record or managing the template.
namestringrequiredTemplate Name shown in Vetnio's template lists and pickers. Not unique within a clinic. An empty string when the template has no name.
typeenumrequirednullableThe Template Type: which kind of document the template writes (clinical_note, client_communication or referral). Always set in practice; templates created without a type are clinical_note.
creatorIdstringrequiredUser ID (a UUID) of the person who created the template, or who duplicated it from another template. For templates Vetnio added to the clinic, the user who triggered that provisioning.
creatorRoleenumrequiredThe creator's role in the clinic when the template was created; it is not updated if their role changes later. Members' access to a template depends on it under the clinic's template permissions.
member — created by a regular clinic member.admin — created by a clinic admin, or provisioned by Vetnio.superadmin — created by a clinic super-admin.createdAtstringrequiredWhen the template was created, as an ISO-8601 UTC timestamp.
jsonTemplateIdstringrequirednullableID of the JSON template (structured template) linked to this template, or null. When set, clinical notes generated on consultations that use this template are produced as structured JSON documents following that JSON template, with this template's instructions guiding the field content.
isDefaultbooleanrequiredtrue for a Vetnio default template, added to the clinic from Vetnio's default template library. Default templates are read-only: updating or deleting one returns 403. Duplicate it to get an editable copy.
isHiddenbooleanrequiredtrue when the calling user has hidden this template from their own picker.
isPinnedbooleanrequiredtrue when the calling user has starred this template.
isManagedbooleanrequiredtrue when Vetnio or the clinic's organization provisioned the template (Vetnio defaults, organization templates, practice-management-system integrations) rather than a clinic user writing it. Managed templates stay visible to members under every template-permission mode, and members cannot edit them unless they created them.
{
"id": "3f6c2a1e-8b4d-4c7a-9e21-5d0b7f9a6c13",
"name": "Follow-up - clinical team",
"type": "clinical_note",
"creatorId": "5b1e9d3c-27a4-4f0e-8c6d-2e9f71a4b852",
"creatorRole": "admin",
"createdAt": "2026-09-14T08:30:00.000Z",
"jsonTemplateId": null,
"isDefault": false,
"isHidden": false,
"isPinned": false,
"isManaged": false
}POST/workspaces/{workspaceId}/templates
Creates a prompt template in the clinic, owned by the calling user and stamped with their current clinic role (creatorRole). Pass the returned templateId to Generate a clinical note to use it.
Write the body as reusable instructions, not as an example patient record: anything written as fixed text can appear in every generated document. Creating a template does not change any existing record.
The caller must be a direct member of the clinic (organization admins without a clinic membership cannot create templates). A clinic can hold about 100 templates; beyond that creation fails. The API does not apply the clinic's Strict Mode creation block, but a member's template is then hidden from that member under Strict Mode. Not idempotent: repeating the call creates another template. Requires a personal API key.
AcceptsPersonal key
workspaceIdstringrequiredIdentifier 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.
templatestringrequiredThe template body: the headings of the document, each followed by instructions in parentheses saying what belongs there, how to format it and what to write when the information is missing. HTML as produced by Vetnio's template editor; plain text is also accepted. Unsafe markup is removed before saving. No length limit is enforced by the API (Vetnio's editor stops at 150,000 characters).
namestringrequiredTemplate Name shown in Vetnio's template lists and pickers. Does not need to be unique. Name it after the purpose or reader, not a patient.
typeenumoptionalThe Template Type: which kind of document the template writes. Defaults to clinical_note when omitted.
clinical_note — Clinical Note: the medical record of the visit.client_communication — Client Communication: an owner-facing message.referral — Referral: a letter to or from another clinician or clinic.jsonTemplateIdstringoptionalnullableID of a JSON template (structured template) to link, from List JSON templates. When set, clinical notes generated on consultations that use this template are produced as structured JSON documents with this template's instructions guiding the field content. Omit or pass null for a free-text template. An ID the caller cannot read returns 404.
templateIdstringrequiredID (a UUID) of the new template.
curl -X POST "https://vetnio.com/api/v2/workspaces/demo-north-clinic/templates" \
-H "Authorization: Bearer $VETNIO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Vaccination visit",
"template": "Write a concise SOAP note. List every vaccine given with batch number and site."
}'{
"templateId": "65f1cc73-507d-4804-aeeb-b5b334861f00"
}GET/workspaces/{workspaceId}/templates
Returns the clinic's prompt templates that the caller can see, sorted by name: templates written by clinic users, Vetnio default templates and templates provisioned by the organization or an integration. Use it to let users pick the templateId passed to Generate a clinical note.
Visibility follows the clinic's template permissions. Admins see every template. Members see all templates under Full Access and View & Use Only; under Private they see their own, admin-created and managed templates; under Strict Mode only admin-created and managed templates. Templates the user has hidden from their own picker are still listed, with isHidden set to true. isPinned reflects the calling user's starred templates.
Only metadata is returned. Clinic admins can read a template's body through the configuration export (GET /workspaces/{workspaceId}/data-export/templates/versions and …/templates/version); Vetnio's built-in templates are not exported. Not paginated; a clinic holds at most about 100 templates. Requires a personal API key.
AcceptsPersonal key
workspaceIdstringrequiredIdentifier 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.
[ ]array of objectsrequiredThe templates the caller can see in the clinic, sorted by name (case-insensitive).
idstringrequiredID of the template (a UUID). Pass it as templateId when generating a record or managing the template.
namestringrequiredTemplate Name shown in Vetnio's template lists and pickers. Not unique within a clinic. An empty string when the template has no name.
typeenumrequirednullableThe Template Type: which kind of document the template writes (clinical_note, client_communication or referral). Always set in practice; templates created without a type are clinical_note.
creatorIdstringrequiredUser ID (a UUID) of the person who created the template, or who duplicated it from another template. For templates Vetnio added to the clinic, the user who triggered that provisioning.
creatorRoleenumrequiredThe creator's role in the clinic when the template was created; it is not updated if their role changes later. Members' access to a template depends on it under the clinic's template permissions.
member — created by a regular clinic member.admin — created by a clinic admin, or provisioned by Vetnio.superadmin — created by a clinic super-admin.createdAtstringrequiredWhen the template was created, as an ISO-8601 UTC timestamp.
jsonTemplateIdstringrequirednullableID of the JSON template (structured template) linked to this template, or null. When set, clinical notes generated on consultations that use this template are produced as structured JSON documents following that JSON template, with this template's instructions guiding the field content.
isDefaultbooleanrequiredtrue for a Vetnio default template, added to the clinic from Vetnio's default template library. Default templates are read-only: updating or deleting one returns 403. Duplicate it to get an editable copy.
isHiddenbooleanrequiredtrue when the calling user has hidden this template from their own picker.
isPinnedbooleanrequiredtrue when the calling user has starred this template.
isManagedbooleanrequiredtrue when Vetnio or the clinic's organization provisioned the template (Vetnio defaults, organization templates, practice-management-system integrations) rather than a clinic user writing it. Managed templates stay visible to members under every template-permission mode, and members cannot edit them unless they created them.
curl "https://vetnio.com/api/v2/workspaces/demo-north-clinic/templates" \
-H "Authorization: Bearer $VETNIO_API_KEY"[
{
"id": "788bfbe6-3ad1-577d-ad3a-7c586e763952",
"name": "DEMO Owner summary",
"type": "client_communication",
"creatorId": "c1b0f2a0-f819-5fcc-a2ed-85db0cef66a7",
"creatorRole": "admin",
"createdAt": "2026-10-04T15:45:44.068Z",
"jsonTemplateId": null,
"isDefault": true,
"isManaged": false
},
{
"id": "6cc373c0-d683-5abe-a942-03359aebbcc3",
"name": "DEMO Referral draft",
"type": "referral",
"creatorId": "c1b0f2a0-f819-5fcc-a2ed-85db0cef66a7",
"creatorRole": "admin",
"createdAt": "2026-10-04T15:45:44.068Z",
"jsonTemplateId": null,
"isDefault": true,
"isManaged": false
}
]PUT/workspaces/{workspaceId}/templates/{templateId}
Replaces the body of a template. The name, type and structured-template link are unchanged and cannot be edited through this API. The previous body is kept in the template's history in Vetnio.
The change applies to every future generation that uses the template, for every user of the clinic; records generated earlier are not rewritten.
Who may update: the template's creator, clinic admins, and, when the clinic's template permissions are Full Access, members for other members' templates that are not managed. Others get 403, as does any attempt to update a Vetnio default template (duplicate it first). A template the caller cannot see returns 404. A stale expectedContentVersion returns 409. Requires a personal API key.
AcceptsPersonal key
workspaceIdstringrequiredIdentifier 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.
templateIdstringrequiredID of the template (a UUID), as returned by List templates or Create a template. The template must belong to the workspace in the path and be visible to the caller under the clinic's template permissions; otherwise the request returns 404.
templatestringrequiredThe complete new template body, in the same format as when creating a template (headings with instructions in parentheses; HTML or plain text). It replaces the current body entirely. Unsafe markup is removed before saving.
expectedContentVersionstringoptionalnullableOptimistic-concurrency guard: the contentVersion returned by your previous update of this template, sent unchanged including its double quotes. If the template body has changed since then, the update is rejected with 409 and nothing is saved. Omit it or pass null to overwrite unconditionally.
successbooleanrequiredAlways true when the request succeeds; failures are returned as an HTTP error status instead.
contentVersionstringoptionalnullableOpaque version tag of the content you just saved, including its surrounding double quotes. Send it unchanged as expectedContentVersion on your next update so that the update fails with 409 if someone else changed the template in between. null if storage did not return one.
curl -X PUT "https://vetnio.com/api/v2/workspaces/demo-north-clinic/templates/65f1cc73-507d-4804-aeeb-b5b334861f00" \
-H "Authorization: Bearer $VETNIO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"template": "Write a concise SOAP note. List every vaccine given with product, batch number and injection site."
}'{
"success": true,
"contentVersion": "\"52a03a55bda222b052efa2679fdae39e\""
}DELETE/workspaces/{workspaceId}/templates/{templateId}
Deletes a template from the clinic. It disappears from every list and picker and cannot be restored through the API or Vetnio.
Records already generated with it are not changed. Consultations that had it selected lose the selection, so their next generation runs without a template unless one is passed.
Who may delete: the same users who may update it (the creator, clinic admins, and under Full Access other members for non-managed member templates); others get 403. Vetnio default templates cannot be deleted (403). Deleting an unknown or already deleted template returns 404. Requires a personal API key.
AcceptsPersonal key
workspaceIdstringrequiredIdentifier 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.
templateIdstringrequiredID of the template (a UUID), as returned by List templates or Create a template. The template must belong to the workspace in the path and be visible to the caller under the clinic's template permissions; otherwise the request returns 404.
An empty body on success.
curl -X DELETE "https://vetnio.com/api/v2/workspaces/demo-north-clinic/templates/b025e093-49bd-4505-b684-b0ba74ae8ad2" \
-H "Authorization: Bearer $VETNIO_API_KEY"{}POST/workspaces/{workspaceId}/templates/{templateId}/duplicate
Creates an editable copy of a template the caller can see, with the same body, type and structured-template link. The copy belongs to the caller (creatorId, and creatorRole set to their current role) and is never a default or managed template, which makes this the way to customize a Vetnio default or organization template.
Only read access to the source is needed. The copy counts toward the clinic's limit of about 100 templates, and organization admins without a clinic membership cannot duplicate. Under Strict Mode a member's copy is hidden from that member. Not idempotent: each call creates another copy. Requires a personal API key.
AcceptsPersonal key
workspaceIdstringrequiredIdentifier 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.
templateIdstringrequiredID of the template (a UUID), as returned by List templates or Create a template. The template must belong to the workspace in the path and be visible to the caller under the clinic's template permissions; otherwise the request returns 404.
copySuffixstringrequiredText added to the original name to name the copy. Vetnio inserts a space between them, so (copy) turns "Follow-up - clinical team" into "Follow-up - clinical team (copy)". Use your users' language, for example (kopia) in Swedish.
idstringrequiredID (a UUID) of the new copy. Note that this field is id, while Create a template returns templateId.
curl -X POST "https://vetnio.com/api/v2/workspaces/demo-north-clinic/templates/65f1cc73-507d-4804-aeeb-b5b334861f00/duplicate" \
-H "Authorization: Bearer $VETNIO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"copySuffix": " (copy)"
}'{
"id": "b025e093-49bd-4505-b684-b0ba74ae8ad2"
}