v1

latestOpenAPI 3.0.32026-07-267015229.9 KB
Guardrails

Patch Guardrails

Update specific fields of a guardrail using JSON Patch operations. Paths must match the current document shape - compare against the response from Get Guardrails before patching.

patch/v2/guardrails/{guardrail_id}

Request body

op'add' | 'remove' | 'replace' | 'copy' | 'move' | 'test' required
pathstring required

JSON Pointer (RFC 6901) to a field on the guardrail (e.g. /guardrail_prompt, /tags, /modality).

valuestring

The value used by the operation. Not required for remove.

Example request

[
  {
    "op": "replace",
    "path": "/guardrail_prompt",
    "value": "Updated prompt with stricter restrictions."
  }
]

Response

Guardrail updated successfully

uuidstring
guardrail_namestring
guardrail_promptstring
modalitystring
callback_urlstring
tagsstring[]
app_messageboolean

Whether triggering this guardrail emits a real-time app-message event on the conversation.

updated_atstring

Example response

{
  "uuid": "g1234567890ab"
}