Skip to main content
POST
Attach a guardrail to a scenario

Authorizations

Authorization
string
header
required

API key from waterr.ai/settings?tab=api-keys. Send as Authorization: Bearer wai_<your_key>.

Path Parameters

scenarioId
string<uuid>
required

Scenario UUID.

id
string<uuid>
required

Guardrail UUID.

Body

application/json
position
integer
default:0

Order this rule appears in within the ## Guardrails block.

Required range: x >= 0

Response

Already attached — the existing attachment row is returned.

Links a guardrail to a scenario. The rule enters the system prompt only when active = true.

id
string<uuid>
required
Example:

"c7e4a2b1-8f3d-4e6a-9b0c-1d2e3f4a5b6c"

scenario_id
string<uuid>
required
Example:

"7e3b9c2a-1d4f-4a1b-bdc6-9c8b2d3f4e5a"

guardrail_id
string<uuid>
required
Example:

"9b1f3d70-2a4e-4c8b-8f1a-6d5c4b3a2e10"

active
boolean
default:true
required

Set false to keep the attachment but drop the rule from the prompt.

Example:

true

position
integer
default:0

Order this rule appears in within the ## Guardrails block. Lower first.

Required range: x >= 0
Example:

0

guardrail
object

Embedded guardrail definition. Returned on list/attach/update responses.

created_at
string<date-time>
Example:

"2026-09-09T12:35:00.000Z"

updated_at
string<date-time>
Example:

"2026-09-09T12:35:00.000Z"