Skip to main content
POST
Publish Prompt Template
Publish Prompt Template allows you to programmatically create a new version of a prompt template and make it available for use in the application.

Behavior Notes

  • Templates that reference snippets with @@@snippet_name@@@ must be published after their dependencies. See Snippet Dependency Ordering.

Authorizations

X-API-KEY
string
header
required

Body

application/json
prompt_template
BasePromptTemplate · object
required

Template metadata, including prompt name, tags, folder, and workspace fields.

prompt_version
PromptVersion · object
required

Version content and configuration.

release_labels
string[] | null

Release labels to create or move to the newly created version.

external_ids
ExternalId · object[] | null

Identifiers from other systems.

Response

Successful Response

id
integer
required

The ID of the prompt template.

prompt_name
string
required

The name of the prompt template.

prompt_version_id
integer
required

The ID of the created prompt version.

version_number
integer
required

The version number of the prompt template.

tags
string[]
required
prompt_template
Completion Template · object
required
external_ids
ExternalId · object[]
required

External ID mappings attached to the prompt template.

release_labels
string[] | null
metadata
Metadata · object | null

Metadata associated with the prompt blueprint. Supports additional custom fields beyond the model field.

commit_message
string | null