---
title: "Rename template version"
method: PATCH
path: "/v4/templates/{templateId}/versions/{version}"
tags: ["Templates"]
---

# Rename template version

`PATCH /v4/templates/{templateId}/versions/{version}`

## Request

- Base URL: `https://api.kadoa.com`
- URL: `https://api.kadoa.com/v4/templates/{templateId}/versions/{version}`
- Auth: API key in header `x-api-key`

Set or clear the display name of a published template version. The version content stays immutable; only the label changes.

## Path parameters

- `templateId` string, uuid, required
- `version` integer, required

## Request body

- UpdateTemplateVersionBody: Request body for renaming a template version
  - `name` string, nullable, required: Custom display name. null, 'null', empty, or whitespace clears the name and restores the default 'v.N' label.

## Response `200`

200

- TemplateVersionMutationResponse: Response for template version create/update
  - `error` false, required: Error flag (always false on success)
  - `success` true, required: Success flag
  - `data` object, required: Template version
    - `id` string, uuid, required: Version row ID
    - `templateId` string, uuid, required: Parent template ID
    - `version` number, required: Version number
    - `name` string, nullable, required: Custom display name (null = default 'v.N')
    - `publisher` object, required: Publisher attribution
      - `kind` 'HUMAN' | 'SERVICE_ACCOUNT' | 'AGENT' | 'SYSTEM', nullable, required: Publisher kind; null for legacy/unproven versions
      - `label` string, required: Current human name/email, non-human publisher label, or Unknown for legacy/unproven versions
    - `prompt` string, nullable, required: User prompt
    - `schemaId` string, uuid, nullable, required: Referenced data_schemas ID
    - `schemaFields` object[], nullable: Resolved schema fields from data_schemas
      - `mapper` 'jobDescription' | 'categoryClassifier' | 'taxonomyMapping' | 'stableUniqueId' | 'linkExtraction' | 'additionalData' | 'categorize': Function that produces this field's value.
      - `mapperConfig` object: Configuration for the selected mapper.
      - `name` string, required: Field name
      - `description` string: Human-readable field description shown in Kadoa
      - `instruction` string: Optional field-specific AI instruction for extraction guidance
      - `fieldType` string: Field role (SCHEMA or CLASSIFICATION)
      - `example` unknown
      - `shape` unknown
      - `dataType` string: Output data type for SCHEMA fields. Use public values such as STRING, NUMBER, BOOLEAN, DATE, DATETIME, MONEY, IMAGE, LINK, OBJECT, or ARRAY.
      - `isKey` boolean: Marks this field as part of the record's primary key. Key fields define row identity across runs and enable data linking (records with the same key values are treated as the same record over time, used for dedupe and change detection). Set true ONLY when the complete key tuple uniquely identifies a logical output record and every component is stable across runs and reliably present (not nullable/missing). Key fields should be scalar STRING, NUMBER, or LINK fields; avoid structured, semantic, boolean, image, and timestamp/date fields as keys. Good candidates: external IDs, SKUs, canonical URLs, posting IDs. Bad candidates: prices, counts, timestamps, free-text titles/descriptions, or anything that can change between runs. Multiple fields may form a composite key; uniqueness applies to their combination, not each component. For derived rows, source-backed grouping dimensions and a deterministic output discriminator may identify the result; measured values and explanations do not. If no supported key tuple satisfies these guarantees, leave isKey unset on every field — data linking will simply be disabled, which is preferable to a wrong key. Choosing a non-stable or non-unique key causes duplicate rows and missed updates.
      - `categories` object[]: Predefined categories for CLASSIFICATION fields
        - `title` string, required: Short title/label of the category
        - `definition` string, required: Full definition/description of the category
    - `schemaValidationRules` object, nullable: Schema validation rules for this version
    - `notifications` object[]
      - `id` string, uuid, required: Notification configuration ID
      - `eventType` string, required: Event type (e.g., workflow_finished, error)
      - `eventConfiguration` object, required: Event-specific config
      - `enabled` boolean, required: Whether this notification is enabled
      - `channels` object[], required: Linked notification channels
        - `channelId` string, uuid, required
        - `channelName` string, required
        - `channelType` string, required
    - `frequency` object, nullable, required: Frequency configuration for this version
      - `interval` 'ONLY_ONCE' | 'EVERY_10_MINUTES' | 'EVERY_20_MINUTES' | 'HALF_HOURLY' | 'HOURLY' | 'TWO_HOURLY' | 'THREE_HOURLY' | 'FOUR_HOURLY' | 'SIX_HOURLY' | 'TWELVE_HOURLY' | 'EIGHTEEN_HOURLY' | 'DAILY' | 'TWO_DAY' | 'THREE_DAY' | 'WEEKLY' | 'BIWEEKLY' | 'TRIWEEKLY' | 'FOUR_WEEKS' | 'MONTHLY' | 'CUSTOM': Update interval enum (HOURLY/DAILY/CUSTOM/...). When CUSTOM, schedules must be provided.
      - `schedules` object[]: Cron/repeat schedule specs. Required when interval=CUSTOM.
        - `type` 'repeat' | 'cron', required: Schedule type
        - `interval` string: Repeat token (e.g., '1h', '1d') when type=repeat
        - `expressions` string[]: Cron expressions when type=cron
        - `timezone` string: IANA timezone for cron expressions (e.g. 'America/New_York'). Defaults to UTC.
      - `weekdaysOnly` boolean: Skip runs that fall on Saturday or Sunday. Applies only to repeat intervals; for cron, set the weekdays in the expression.
    - `recordLimit` integer, nullable: Immutable output record limit; null when managed unlimited or unmanaged
    - `recordLimitManaged` boolean: Whether this version owns the workflow output record limit
    - `createdAt` string, required: Creation timestamp

## Other responses

- `400`: 400
- `401`: 401
- `404`: 404
- `500`: 500

---

[API](https://skmtc.dev/kadoa/apis/kadoa-api.md) · [All operations](https://skmtc.dev/kadoa/apis/kadoa-api/llms.txt) · [OpenAPI document](https://skmtc.dev/kadoa/apis/kadoa-api/revisions/bf7803c927b4?raw)
