Templates
Versions

Create a new version

This endpoint allows you to push a new version of a prompt. You can specify the content, extra parameters, test values, draft status, and notes for the new version.

post/v1/templates/{id}/versions

Request

Path parameters

idstring required

The ID of the template to create a new version for

Request body

metadataPromptMetadata

Versioned key/value text, separate from model parameters and prompt variables. Keys are preserved exactly, must not be blank, and are limited to 256 characters. The reserved key proto is not allowed. Values must be strings. Numbers, booleans, null, arrays, and objects are rejected. The serialized object must be no larger than 64 KiB. Returned by prompt retrieval endpoints, including public-key retrieval; do not store secrets here. Omitted metadata defaults to an empty object on creation and is preserved on PATCH.

extraobject
testValuesobject
isDraftboolean required
notesstring

Example request

{
  "metadata": {
    "owner": "support",
    "release_channel": "production",
    "locale": "en"
  }
}

Response

Successful response

idstring
templateIdstring
metadataPromptMetadata

Versioned key/value text, separate from model parameters and prompt variables. Keys are preserved exactly, must not be blank, and are limited to 256 characters. The reserved key proto is not allowed. Values must be strings. Numbers, booleans, null, arrays, and objects are rejected. The serialized object must be no larger than 64 KiB. Returned by prompt retrieval endpoints, including public-key retrieval; do not store secrets here. Omitted metadata defaults to an empty object on creation and is preserved on PATCH.

extraobject
testValuesobject
isDraftboolean
notesstring
createdAtstring date-time
versionnumber

Example response

{
  "metadata": {
    "owner": "support",
    "release_channel": "production",
    "locale": "en"
  }
}

Changes

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