NetBird Full API Reference + Read-Only MCP Prototype
PUT/api/agent-network/guardrails/{guardrailId}

Update an Agent Network guardrail

Replaces the configuration of an existing Agent Network guardrail. When you send a body, include name and checks; checks must include model_allowlist and prompt_capture, each with its required fields. A 200 response returns the updated guardrail, including its identifier and creation and update timestamps.

1 parameter · 3 body fields
guardrailIdstringrequired
The unique identifier of the Agent Network guardrail to update.

Guardrail update request. Include name and checks; description is optional.

checksobjectrequired
Guardrail check parameters. Each entry has an `enabled` flag plus per-check configuration; disabled entries are inert.
descriptionstringoptional
Optional human-readable description.
namestringrequired
Display name for the guardrail.

7 status codes
200Returns the updated guardrail object, including its ID, name, description, checks, and creation and update timestamps.
checksobjectrequired
Guardrail check parameters. Each entry has an `enabled` flag plus per-check configuration; disabled entries are inert.
created_atstringrequired
Timestamp when the guardrail was created.
descriptionstringrequired
Optional human-readable description.
idstringrequired
Guardrail ID
namestringrequired
Display name for the guardrail.
updated_atstringrequired
Timestamp when the guardrail was last updated.
400Returned when the request is invalid, such as when a required field is missing or a check object fails validation.
401Returned when the request is not authenticated.
403Returned when you are not permitted to update the guardrail.
404Returned when the guardrail resource is not found.
409Returned when the update conflicts with the current resource state.
messagestringoptional
A human-readable error message.
500Returned when an internal server error occurs.

Error handling

A 400 is returned when the request is invalid, including when name or checks is missing or a check object omits a required field. A 401 is returned when authentication is missing, and a 403 when you are not permitted to update the guardrail. The guardrailId path parameter must identify an existing guardrail or a 404 is returned; a 409 indicates a conflict, and a 500 indicates an internal server error.