Skip to Content
API ReferenceGuardrailsUpdate Guardrail

Update a guardrail

PATCH

https://novapai.ai/api/v1/guardrails/:id 

PATCH

/api/v1/guardrails/:id

cURL
$curl -X PATCH https://novapai.ai/api/v1/guardrails/550e8400-e29b-41d4-a716-446655440000 \ >-H "Authorization: Bearer <token>" \ >-H "Content-Type: application/json" \ >-d '\{ >"name": "Updated Guardrail Name", >"description": "Updated description", >"limit_usd": 75, >"reset_interval": "weekly" >\}'
200 Updated
reference-guardrails-update-guardrail-01.json
{ "data": { "id": "550e8400-e29b-41d4-a716-446655440000", "name": "Updated Guardrail Name", "created_at": "2025-08-24T10:30:00Z", "description": "Updated description", "limit_usd": 75, "reset_interval": "weekly", "allowed_providers": [ "openai" ], "enforce_zdr": true, "updated_at": "2025-08-24T16:00:00Z" } } ```sql showLineNumbers filename="reference-guardrails-update-guardrail-02.sql" Update an existing guardrail. [Management key](http://novapai.ai/docs/guides/overview/auth/management-api-keys) required. ### Authentication Authorization Bearer API key as bearer token in Authorization header ### Path parameters id string Required`format: "uuid"` The unique identifier of the guardrail to update ### Request This endpoint expects an object. | 字段 | 类型 | 必填 | 说明 | | --- | --- | --- | --- | | name | string | 否 | `1-200 characters` New name for the guardrail | | description | string or null | 否 | `<=1000 characters` New description for the guardrail | | limit_usd | double or null | 否 | `>=0` New spending limit in USD | | reset_interval | enum or null | 否 | Interval at which the limit resets (daily, weekly, monthly) Allowed values:daily weekly monthly | | allowed_providers | list of strings or null | 否 | - | | New | list of allowed provider IDs | - | - | | ignored_providers | list of strings or null | 否 | List of provider IDs to exclude from routing | | allowed_models | list of strings or null | 否 | Array of model identifiers (slug or canonical_slug accepted) | | enforce_zdr | boolean or null | 否 | Whether to enforce zero data retention | ### Response Guardrail updated successfully | 字段 | 类型 | 必填 | 说明 | | --- | --- | --- | --- | | data | object | - | The updated guardrail | ### Errors | 状态码 | 说明 | | --- | --- | | 400 | Bad Request Error | | 401 | Unauthorized Error | | 404 | Not Found Error | | 500 | Internal Server Error |