Delete AI Prompt-Guard Preset
Endpoint
DELETE /apiops/settings/ai-prompt-guard-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 prompt-guard preset to delete (case-insensitive match) |
Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| projectId | string | No | admin | Scope project id. Omit for the admin/global scope. |
Response
Success Response (200 OK)
{
"status": "SUCCESS",
"deploymentResult": {
"success": true
}
}
Response Fields
| Field | Type | Description |
|---|---|---|
| status | string | Response status: SUCCESS or FAILURE |
| deploymentResult | object | Deployment result summary |
| deploymentResult.success | boolean | true when the preset was deleted successfully |
Error Response (400 Bad Request)
Returned when the preset name is blank, the preset is not found, the preset is built-in, or the caller lacks the ADMIN role.
{
"status": "FAILURE",
"resultMessage": "AI prompt-guard preset (name: block-internal-hostnames) was not found!"
}
Other possible messages:
{
"status": "FAILURE",
"resultMessage": "Built-in presets cannot be deleted"
}
{
"status": "FAILURE",
"resultMessage": "Unauthorized! Only users with ADMIN role can manage AI presets!"
}
Error Response (401 Unauthorized)
{
"status": "FAILURE",
"resultMessage": "Token is not valid!"
}
cURL Example
curl -X DELETE \
"https://demo.apinizer.com/apiops/settings/ai-prompt-guard-presets/block-internal-hostnames/" \
-H "Authorization: Bearer YOUR_TOKEN"
Notes and Warnings
- Admin Only:
- Only sysAdmin users (or users with the
ADMINrole) can delete AI prompt-guard presets - A project-scoped
AI_DEVELOPMENTtoken is not sufficient
- Only sysAdmin users (or users with the
- Built-in Presets Are Read-only:
- Built-in (seeded) presets cannot be deleted; such attempts are rejected with
Built-in presets cannot be deleted
- Built-in (seeded) presets cannot be deleted; such attempts are rejected with
- Must Exist:
- Deleting a non-existent preset returns a
not founderror
- Deleting a non-existent preset returns a
- Irreversible:
- Deletion is permanent; a deleted custom preset must be recreated to restore it
Related Documentation
- List AI Prompt-Guard Presets - List all presets
- Create AI Prompt-Guard Preset - Create a preset
- AI Prompt-Guard Presets API - Resource overview