Delete AI Prompt-Decorator Preset
Endpoint
DELETE /apiops/settings/ai-prompt-decorator-presets/{presetName}/
Authentication
Requires a Personal API Access Token with admin privileges.
Header
Authorization: Bearer YOUR_TOKEN
Request
Headers
| Header | Value | Required |
|---|---|---|
| Authorization | Bearer {token} | Yes |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| presetName | string | Yes | Name of the preset to delete (case-insensitive) |
Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| projectId | string | No | admin | Scope the preset lives in. Omit for the admin/global scope. |
Response
Success Response (200 OK)
{
"status": "SUCCESS"
}
Error Response (400 Bad Request)
Returned when the name is empty, no preset with that name is visible in the scope, the preset belongs to a different scope than the projectId you sent, or the caller lacks the ADMIN role.
{
"status": "FAILURE",
"resultMessage": "Project mismatch"
}
Error Response (401 Unauthorized)
{
"status": "FAILURE",
"resultMessage": "Token is not valid!"
}
cURL Example
curl -X DELETE \
"https://demo.apinizer.com/apiops/settings/ai-prompt-decorator-presets/support-tone/" \
-H "Authorization: Bearer YOUR_TOKEN"
Notes and Warnings
- Built-in Presets Can Be Deleted — Permanently:
- A seeded row (
builtIn: true) accepts this call the same as a custom preset. Mongock deduplicates seed changesets by id and none arerunAlways=true, so a deleted built-in preset does not reappear on a version upgrade — it returns only if a future release ships an explicit re-seed changeset. To stop using a preset without losing it, disable it instead of deleting it.
- A seeded row (
- Bound Blocks Are Localized, Not Broken:
- Blocks bound to this preset are detached (localized) as part of the delete: each keeps its current position, role and content and goes on working. No block is removed from any policy and no redeploy is required — only the catalog link is dropped.
- Scope Must Match (
projectId):- The preset is deleted only when its own scope equals the
projectIdyou send. OmittingprojectIdtargets the admin/global scope (admin). - Deleting a preset that belongs to a different scope is rejected with
Project mismatch(error keyprojectmismatch) and nothing is deleted — an admin token does not let you delete another project's preset by name. - To delete a project-scoped preset, pass that project's id explicitly:
?projectId=<projectId>.
- The preset is deleted only when its own scope equals the
- Admin Only:
- A project-scoped
AI_DEVELOPMENTtoken is not sufficient on this surface; use the project endpoint to delete a preset the project owns
- A project-scoped
Related Documentation
- List AI Prompt-Decorator Presets - List all presets
- Create AI Prompt-Decorator Preset - Create or upsert a preset
- AI Prompt-Decorator Presets API - Resource overview