Skip to main content
POST
Create Agent Version
Integration Prompt for AI Agents
New: POST /v1/agents/{agent_id}/versionsDeprecated: POST /v1/agents/{agent_id}/prompts/versions. Old path, still works.
Creates a new agent version under /agents/{agent_id}/versions. prompt_text is optional. Omit it to copy the current prompt and increment the version.

Headers

X-Organization-Id
string
X-API-Key
string
required

API key required to authenticate requests.

Path Parameters

agent_id
integer
required

Body

application/json

body for agent-scoped create version endpoint (agent_id in path).

prompt_text
string | null

Prompt content. Omit to copy the current latest version (MAX(version) / latest label) and increment. An empty string stores a blank prompt.

commit_message
string | null
labels
string[] | null
override_label
boolean | null
default:false

When true, a label that already points at another version (including production) moves here.

metadata
Metadata · object | null

Response

Successful Response

response model for prompt without created_at.

prompt_text
string
required

the prompt content

version
integer
required

the version number of the prompt

agent_id
integer
required

id of the agent that owns this prompt

id
string<uuid> | null

the id of the prompt

commit_message
string | null
labels
string[] | null

labels associated with the prompt

metadata
Metadata · object | null

arbitrary JSON metadata