Agent Versions

Create Agent Version

create a new prompt version under /agents/{agent_id}/prompts/versions.

post/v1/agents/{agent_id}/versions

Path parameters

agent_idinteger required

Headers

X-Organization-Idstring
X-API-Keystring required

API key required to authenticate requests.

Request body

prompt_textstring nullable

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

commit_messagestring nullable
labelsstring[] nullable
override_labelboolean nullable

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

metadataobject nullable

Response

Successful Response

idstring uuid nullable

the id of the prompt

prompt_textstring required

the prompt content

commit_messagestring nullable
labelsstring[] nullable

labels associated with the prompt

metadataobject nullable

arbitrary JSON metadata

versioninteger required

the version number of the prompt

agent_idinteger required

id of the agent that owns this prompt

Changes

Changed in 1 of the 38 revisions of this API.1