Skip to main content
POST
Create a prompt version

Authorizations

x-api-key
string
header
required

Project API key. Manage keys in the Zespan dashboard under project settings.

Body

application/json
name
string
required
Minimum string length: 1
Example:

"support-reply"

type
enum<string>
required
Available options:
text,
chat
Example:

"chat"

prompt
required

Prompt content. A string for text prompts, or an array of chat messages for chat prompts.

Example:
projectId
string<uuid>

Optional when authenticating with an API key.

config
object

Model configuration (temperature, max_tokens, etc.).

Example:
labels
string[]
Example:
tags
string[]
Example:
commitMessage
string
Example:

"Tighten system instructions"

folder
string | null
Example:

"support/inbound"

Response

Prompt version created.

A single prompt version.

id
string<uuid>
projectId
string<uuid>
name
string
Example:

"support-reply"

version
integer
Example:

3

type
enum<string>
Available options:
text,
chat
prompt

Prompt content — a string for text prompts, or an array of chat messages.

config
object
labels
string[]
Example:
tags
string[]
folder
string | null
commitMessage
string | null
createdBy
string
createdAt
string<date-time>
updatedAt
string<date-time>
resolvedPrompt
any | null

Prompt content with dependencies inlined (present on single-prompt fetch).