Skip to main content
New integrations should use the Guardrails API. The endpoints documented below remain available for accounts that still rely on the deprecated set shape.
The deprecated API groups multiple guardrails together into a named set that is attached to a PAL via guardrails_id. The endpoints on this page use the same paths as the new individual API - the server discriminates between the two surfaces based on the request body shape (for POST) or the UUID type (for GET, PATCH, DELETE).

Create guardrail set

POST /v2/guardrails Send a payload with name and data (an array of guardrail items) to create a deprecated set. If you send guardrail_name at the top level instead, the request is routed to Create Guardrails and creates an individual guardrail.
Response
Attach the returned guardrails_id to a PAL via guardrails_id on Create PAL.

List guardrail sets

GET /v2/guardrails?legacy=true legacy=true is the default, so omitting the parameter returns the deprecated set list. Pass legacy=false to get a flat list of individual guardrails instead.

Get guardrail set

GET /v2/guardrails/{guardrails_id} When the supplied UUID is a deprecated set UUID, the response returns the set shape:

Patch guardrail set

PATCH /v2/guardrails/{guardrails_id} Send a JSON Patch array against the set document. Mirror UUIDs are preserved across field-level edits, moves, and removes; a whole-object replace /data/<i> rotates the underlying individual UUID.

Delete guardrail set

DELETE /v2/guardrails/{guardrails_id} Deletes the set and all of its mirrored individual items. PALs referencing the set via guardrails_id are scrubbed automatically.

Migrating to individual guardrails

The two surfaces interoperate - every guardrail item inside a deprecated set is also addressable as an individual guardrail by its own uuid. To move off the deprecated set shape:
  1. Stop creating new sets. Use Create Guardrails per guardrail.
  2. Attach guardrails to PALs via guardrail_ids (explicit list) or guardrail_tags (tag-based, dynamic) on Create PAL instead of guardrails_id.
  3. Existing sets continue to work - PALs can mix guardrails_id, guardrail_ids, and guardrail_tags during the transition.