Patronus AI APIPrompts
Create Prompt Revision
Create a new prompt revision.
If prompt_id is provided, creates a new revision of an existing prompt definition.
If prompt_id is not provided but prompt_name is, creates a new prompt definition with its first revision.
Either project_id or project_name must be provided.
If project_name is provided and doesn't exist, a new project will be created.
Returns the newly created prompt revision.
POST
/
v1
/prompt-revisions
Authorization
X-API-KEY
<token>
In: header
Request Body
application/json
Requiredproject_id
Project Id
project_name
Project Name
prompt_id
Prompt Id
prompt_name
Prompt Name
prompt_description
Prompt Description
create_only_if_not_exists
Create Only If Not Exists
If true, creation will fail if a prompt with the same name already exists in the project. Only applies when creating a new prompt (not providing prompt_id).
Default:
false
body
RequiredBody
Maximum length:
500000
metadata
Metadata
Optional JSON metadata to associate with this revision
Successful Response