Use this endpoint to remove prompt templates that are no longer needed. Deleted templates cannot be recovered, so ensure you have backups or alternative templates before deletion.
prompt_id string required
The unique identifier of the prompt template to delete.
organizationId string required
The unique identifier of the organization that owns the prompt template.
confirmDeletion string optional
Safety parameter requiring explicit confirmation. Must be set to "confirmed" to actually perform the deletion. Without this parameter, the request will return a 400 error.
id string
The identifier of the deleted prompt template (for confirmation).
object string
Always set to "prompt".
name string
The name of the deleted prompt template (for confirmation).
deleted boolean
Always true when deletion is successful.
message string
Confirmation message: "Prompt template permanently deleted".
- Irreversible: Once deleted, the prompt template and all its versions cannot be recovered.
- Usage Impact: Any active conversations or cached results using this template will continue to work with the last known version, but new requests will fail with a 404 error.
- References: Update any code or configurations that reference the deleted template ID.
- Permissions: Only organization owners and template administrators can delete templates.
- Audit Trail: Deletion events are logged in the organization's audit log for compliance and tracking.
A DeletePromptResponse object containing the API response data.
- Bash
- Python
- JavaScript
curl -X DELETE "https://api.freddy.aitronos.com/v1/prompts/prompt_abc123?organizationId=org_abc123&confirmDeletion=confirmed" \
-H "Authorization: Bearer $FREDDY_API_KEY"Response:
{
"id": "prompt_abc123",
"object": "prompt",
"name": "Deprecated Code Review Template",
"deleted": true,
"message": "Prompt template permanently deleted"
}- Check Usage: Review the template's usage statistics to understand its impact
- Update References: Modify any assistants, workflows, or code that reference this template
- Backup Content: Copy the template content and variables before permanent deletion
- Notify Team: Inform team members if the template is shared or widely used
- Test Impact: Verify that deleting the template doesn't break existing functionality
- Monitor Logs: Watch for 404 errors in application logs related to the deleted template
- Update Documentation: Remove references from internal documentation and READMEs
- Clean Cache: Clear any cached prompt results or compiled templates
- Audit Trail: Review the audit log entry for the deletion event
- Deprecate: Add a
deprecated: trueflag to the metadata and create a replacement - Archive: Set
isPublic: falseand add archival metadata instead of deleting - Version Control: Create a new version with empty content rather than deleting
Safety Note: The confirmDeletion parameter prevents accidental deletions. Always include it in production code to avoid unintended data loss.