Skip to main content
POST
Create a new version

Authorizations

Authorization
string
header
required

Use a project private API key via Authorization: Bearer <key>.

Path Parameters

id
string
required

The ID of the template to create a new version for

Body

application/json
content
object[]
required
isDraft
boolean
required
metadata
object

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.

Example:
extra
object
testValues
object
notes
string

Response

200 - application/json

Successful response

id
string
templateId
string
content
object[]
metadata
object

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.

Example:
extra
object
testValues
object
isDraft
boolean
notes
string
createdAt
string<date-time>
version
number