templates

Create a template

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.

post/workspaces/{workspaceId}/templates

Request

  • Base URL
    https://vetnio.com/api/v2
  • URL
    https://vetnio.com/api/v2/workspaces/{workspaceId}/templates
  • Auth
    HTTP bearer

Path parameters

workspaceIdstring 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.

Example:furunculotic-loud-chihuahua

Request body

templatestring required

The 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).

namestring required

Template 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.

type'clinical_note' | 'referral' | 'client_communication'

The 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.
jsonTemplateIdstring nullable

ID 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.

Example request

{
  "template": "<p><strong>Reason for visit</strong></p><p>(Summarize the reason for the visit in one sentence. If absent, write \"Not recorded\".)</p><p><strong>Examination</strong></p><p>(Include only findings explicitly recorded in this consultation. Preserve measurements and units. If none are recorded, write \"Not recorded\".)</p><p><strong>Plan</strong></p><p>(List only the actions and treatments actually discussed, one bullet per action.)</p>",
  "name": "Follow-up - clinical team",
  "type": "clinical_note"
}

Response

The template was created; its ID is returned.

templateIdstring required

ID (a UUID) of the new template.

Example response

{
  "templateId": "3f6c2a1e-8b4d-4c7a-9e21-5d0b7f9a6c13"
}

Changes

No recorded changes to this operation across all 1 revision of this API.