Skip to main content
POST
cURL

Create a Prompt Version

This endpoint creates a new version of a prompt with the specified configuration, variables, and content.

Request Body

The request body must include the following fields:

Optional Fields

Examples

Response

The response includes the created prompt version object with its assigned ID and other details.

Structured Output Example

Body

application/json
promptId
string<uuid>
required

UUID of the prompt to create a version for

title
string
required

Title of the prompt version

Maximum string length: 256
configuration
object
required

Configuration settings for the prompt version

variables
object[]
required

Array of variables used in the prompt

content
string | null

Plain text content of the prompt version

markdownContent
string | null

Markdown content of the prompt version

promoted
boolean | null

Whether this version is promoted

draft
boolean | null

Whether this version is a draft

messages
object

Messages for chat-type prompts

Response

200 - application/json

Prompt version created successfully

id
string
required

Unique identifier for the prompt version

promptId
string<uuid>
required

UUID of the prompt this version belongs to

title
string
required

Title of the prompt version

Maximum string length: 256
configuration
object
required

Configuration settings for the prompt version

variables
object[]
required

Array of variables used in the prompt

content
string | null

Plain text content of the prompt version

markdownContent
string | null

Markdown content of the prompt version

promoted
boolean | null

Whether this version is promoted

draft
boolean | null

Whether this version is a draft

messages
object

Messages for chat-type prompts

createdAt
string<date-time>

Creation timestamp

updatedAt
string<date-time>

Last update timestamp