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-revisionsAuthorization
X-API-KEY<token>
In: header
Request Body
application/jsonRequiredproject_idProject Id
project_nameProject Name
prompt_idPrompt Id
prompt_namePrompt Name
prompt_descriptionPrompt Description
create_only_if_not_existsCreate 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:
falsebodyRequiredBody
Maximum length:
500000metadataMetadata
Optional JSON metadata to associate with this revision
Successful Response
