---
title: Delete a guardrail
url: https://runapi.ai/docs/api/management/guardrails/delete.md
canonical: https://runapi.ai/docs/api/management/guardrails/delete
locale: en
---

# Delete a guardrail

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.

## Request

Send values only in the listed request location.

### Path parameters

```json
{
  "id": {
    "description": "Guardrail prefix ID, for example guardrail_abc123.",
    "required": true,
    "type": "string"
  }
}
```

## Success response

HTTP 204 - DELETE /api/v1/guardrails/:id

This response has no body.

## Error response (401)

HTTP 401

```json
{
  "error": "Authentication required"
}
```

## Error response (403)

HTTP 403

```json
{
  "error": "Management API key required"
}
```

## Error response (403)

HTTP 403

```json
{
  "error": "Account admin required"
}
```

## Error response (404)

HTTP 404

```json
{
  "error": "Resource not found"
}
```

## cURL example



### curl

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

## Related reference

- [Guardrails](/docs/api/management/guardrails)
- [Guardrail object](/docs/api/management/guardrails/object)
