Template and version IDs

A template is the parent record. Each version is a revision of that template's content.

FieldWhat it isRequired
templateIdUUID of the templateYes
templateVersionIdUUID of a specific versionNo

Default behaviour

When templateVersionId is omitted, the API uses the latest approved version for the template.

Pin a version

Send both IDs when you need a fixed revision:

json
{
  "templateId": "550e8400-e29b-41d4-a716-446655440000",
  "templateVersionId": "660e8400-e29b-41d4-a716-446655440001",
  "variables": { "title": "Q1 Report" }
}

Find IDs

bash
# Templates → use "id" as templateId
curl -sS 'https://adminapi.commspliant.com/api/v1/templates' \
  -H 'X-Api-Key: ck_YOUR_API_KEY'

# Versions → use version "id" as templateVersionId
curl -sS 'https://adminapi.commspliant.com/api/v1/templates/TEMPLATE_ID/versions' \
  -H 'X-Api-Key: ck_YOUR_API_KEY'

Common mistake

Putting a version UUID in templateId returns 404 template not found for this organization.