Skip to content
API Reference
API Reference

Delete a guardrail

Soft-delete a guardrail and remove its assignments.

Soft-delete a guardrail and remove its assignments.

Endpoint

DELETE /api/v1/guardrails/:id
Base URL
https://runapi.ai
API version
v1
Authentication
Authorization: Bearer YOUR_MANAGEMENT_API_KEY
Authorization
Requires an account-admin Management API key.
02

Request

JSON body

Send values only in the listed request location.

Path parameters1 field
idstring
Required

Guardrail prefix ID, for example guardrail_abc123.

03

Success response

HTTP 204

DELETE /api/v1/guardrails/:id

This response has no body.

04

Error response (401)

HTTP 401
Response schema
JSON
{
  "properties": {
    "error": {
      "description": "Human-readable error message.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}

Response example

JSON
{
  "error": "Authentication required"
}
05

Error response (403)

HTTP 403
Response schema
JSON
{
  "properties": {
    "error": {
      "description": "Human-readable error message.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}

Response example

JSON
{
  "error": "Management API key required"
}
06

Error response (403)

HTTP 403
Response schema
JSON
{
  "properties": {
    "error": {
      "description": "Human-readable error message.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}

Response example

JSON
{
  "error": "Account admin required"
}
07

Error response (404)

HTTP 404
Response schema
JSON
{
  "properties": {
    "error": {
      "description": "Human-readable error message.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}

Response example

JSON
{
  "error": "Resource not found"
}
08

cURL example

CURL
curl -X DELETE https://runapi.ai/api/v1/guardrails/guardrail_123 \
  -H 'Authorization: Bearer YOUR_MANAGEMENT_API_KEY'