Create prompt version

Create prompt version

Request

This endpoint expects an object.
namestringRequired>=1 character
versionobjectRequired
template_structureenumOptionalDefaults to text

Template structure for the prompt: ‘text’ or ‘chat’. Note: This field is only used when creating a new prompt. If a prompt with the given name already exists, this field is ignored and the existing prompt’s template structure is used. Template structure is immutable after prompt creation.

Allowed values:
exclude_blueprint_update_for_projectslist of stringsOptional
Optional set of project IDs to exclude from automatic blueprint creation when this prompt version is committed.
project_idstringOptionalformat: "uuid"

Project ID. Takes precedence over project_name when both are provided.

project_namestringOptionalformat: "(?s)^\s*(\S.*\S|\S)\s*$"

If provided, scopes the prompt to the specified project. Ignored when project_id is provided.

Response

OK
templatestring>=1 character
idstringformat: "uuid"
version unique identifier, generated if absent
prompt_idstringRead-onlyformat: "uuid"
commitstringformat: "^[a-zA-Z0-9]{8}$"
version short unique identifier, generated if absent. it must be 8 characters long
metadataobject
typeenum
Allowed values:
change_descriptionstring
tagslist of strings
variableslist of stringsRead-only
template_structureenumRead-only
Allowed values:
created_atdatetimeRead-only
created_bystringRead-only

Errors

400
Bad Request Error
409
Conflict Error
422
Unprocessable Entity Error