Skip to content
API Reference
API Reference

Delete a guardrail assignment

Remove a guardrail from its API key or account-member target.

Remove a guardrail from its API key or account-member target.

Endpoint

DELETE /api/v1/guardrail_assignments/:id
Base URL
https://runapi.ai
API version
v1
Authentication
Authorization: Bearer YOUR_MANAGEMENT_API_KEY
Authorization
Account admins can remove any assignment. Non-admin users can remove assignments on their own API keys.
02

Request

JSON body

Send values only in the listed request location.

Path parameters1 field
idstring
Required

Guardrail assignment prefix ID.

03

Success response

HTTP 204

DELETE /api/v1/guardrail_assignments/: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": "Forbidden"
}
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/guardrail_assignments/guardrail_assignment_123 \
  -H 'Authorization: Bearer YOUR_MANAGEMENT_API_KEY'