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

# Delete a guardrail assignment

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.

## Request

Send values only in the listed request location.

### Path parameters

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

## Success response

HTTP 204 - DELETE /api/v1/guardrail_assignments/: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": "Forbidden"
}
```

## Error response (404)

HTTP 404

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

## cURL example



### curl

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

## Related reference

- [Guardrail Assignments](/docs/api/management/guardrail-assignments)
- [Guardrail Assignment object](/docs/api/management/guardrail-assignments/object)
