Prompts
Reusable prompts and the inputs they ask for.
List prompts
Returns the prompts available to the workspace, including ones published by the platform. A prompt the workspace does not own is listed without its text or configuration.
query Parameters
cursor^[A-Za-z0-9_-]+$limitoffsetprompt_activeprompt_agentprompt_authorprompt_createdprompt_descriptionprompt_description_shortprompt_idprompt_managed_byprompt_nameprompt_tenant_categoriesprompt_textprompt_updatedsort^-?[a-z0-9_]+$Headers
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
List prompts › Responses
Success
has_moreWhether more rows exist past this page.
next_cursorPass back as cursor for the next page. Null on the last page.
Create a prompt
Creates a reusable prompt. The inputs it asks for are wildcards, which are declared separately and referenced by name.
Headers
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
Create a prompt › Request Body
prompt_nameprompt_agentprompt_textprompt_descriptionprompt_description_shortprompt_tenant_time_savings^-?[0-9]+(\.[0-9]+)?…prompt_tenant_enabledCreate a prompt › Responses
Created
prompt_idprompt_nameprompt_descriptionprompt_description_shortprompt_iconprompt_agentprompt_authorprompt_configprompt_metadataprompt_supported_modelsprompt_textprompt_wildcardsprompt_managed_byprompt_activeprompt_createdprompt_updatedagent_idagent_nameagent_iconprompt_tenant_idprompt_tenant_categoriesHow this workspace filed the prompt — ids from /prompt-categories. Per workspace, so filing a product prompt affects nobody else.
prompt_tenant_time_savingslast_usedGet a prompt
Returns the prompt with the wildcards it asks for. A prompt published by the platform is returned without its text.
path Parameters
idHeaders
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
Get a prompt › Responses
Success
prompt_idprompt_nameprompt_descriptionprompt_description_shortprompt_iconprompt_agentprompt_authorprompt_configprompt_metadataprompt_supported_modelsprompt_textprompt_wildcardsprompt_managed_byprompt_activeprompt_createdprompt_updatedagent_idagent_nameagent_iconprompt_tenant_idprompt_tenant_categoriesHow this workspace filed the prompt — ids from /prompt-categories. Per workspace, so filing a product prompt affects nobody else.
prompt_tenant_time_savingslast_usedDelete a prompt
Deactivates the prompt. Threads that already used it keep the messages it produced.
path Parameters
idHeaders
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
Delete a prompt › Responses
Success. No content.
Update a prompt
Applies the prompt_-prefixed fields present in the body. A prompt the workspace does not own cannot be edited, only used.
path Parameters
idHeaders
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
Update a prompt › Request Body optional
prompt_nameprompt_textprompt_agentprompt_descriptionprompt_description_shortUpdate a prompt › Responses
Success
prompt_idprompt_nameprompt_descriptionprompt_description_shortprompt_iconprompt_agentprompt_authorprompt_configprompt_metadataprompt_supported_modelsprompt_textprompt_wildcardsprompt_managed_byprompt_activeprompt_createdprompt_updatedagent_idagent_nameagent_iconprompt_tenant_idprompt_tenant_categoriesHow this workspace filed the prompt — ids from /prompt-categories. Per workspace, so filing a product prompt affects nobody else.
prompt_tenant_time_savingslast_usedSet categories
Replaces how the calling workspace files the prompt — per workspace, so filing a product prompt affects nobody else. Categories are the workspace's own taxonomy, defined under /prompt-categories.
path Parameters
idHeaders
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
Set categories › Responses
Success
Get the input form
The fields a prompt asks for before it runs, resolved from the wildcards it references — this is what a caller needs in order to supply its inputs.
path Parameters
idHeaders
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
Get the input form › Responses
Success
List prompt history
Every recorded change, newest first, each as a per-field {from, to} changeset.
path Parameters
idHeaders
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
List prompt history › Responses
Success
history_idhistory_timestamphistory_userhistory_opThe kind of change — insert, update or delete.
One entry per field that changed, keyed by column name.
history_refWhat the writer noted about the change rather than the columns: the action that made it, or the reason it was made.
Revert to a version
Puts the prompt back to the state a history entry recorded, and audits the restore itself so it can be undone in turn. Only the fields the history view shows are written.
Restoring the prompt text re-derives the input form from it, so the fields the prompt asks for match the text that is now stored.
A restore can write less than the version held, and skipped says what it left alone and why — a field whose stored value was last written outside the app has no audited value to restore over.
For a platform-published prompt this restores only the calling workspace's own overrides, the same fields its history returns.
path Parameters
history_ididHeaders
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
Revert to a version › Responses
Success
restoredColumns written back, by name.
Columns the version carried that were deliberately not written.
List recent prompts
Returns the prompts the calling user has run most recently, newest first. last_used is when they last ran it.
query Parameters
limit^-?[0-9]+(\.[0-9]+)?…Headers
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
List recent prompts › Responses
Success
has_moreWhether more rows exist past this page.
next_cursorPass back as cursor for the next page. Null on the last page.
Get prompt statistics
How many prompts exist and how heavily they are used, for a dashboard rather than a listing.
Headers
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
Get prompt statistics › Responses
Success
