> ## Documentation Index
> Fetch the complete documentation index at: https://docs.waterr.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a scenario-guardrail attachment

> Toggle `active` or change `position` for this scenario only. Does NOT modify the guardrail definition — use [`Update a guardrail`](#tag/Guardrails/operation/UpdateGuardrail) for that.



## OpenAPI

````yaml PATCH /scenarios/{scenarioId}/guardrails/{id}
openapi: 3.0.0
info:
  title: WaterrAI API
  version: 1.0.0
  description: >-
    REST API for the WaterrAI meeting platform — create scenarios, spin up
    AI-driven meetings, fetch transcripts and analyses.
  contact:
    name: Support
    email: harshit@waterr.ai
servers:
  - url: https://api.waterr.ai/v1
    description: Production
security:
  - apiKeyAuth: []
tags:
  - name: Users
  - name: Personas
  - name: Voices
  - name: Scenarios
  - name: Goals
  - name: Meetings
  - name: Analyses
  - name: Recordings
  - name: Transcripts
  - name: Tools
    description: >-
      Account-scoped custom function (tool) definitions the LLM can call
      mid-meeting.
  - name: Scenario Tools
    description: >-
      Per-scenario attachments linking a scenario to one or more tool
      definitions.
  - name: Guardrails
    description: >-
      Account-scoped named prompt fragments appended to a scenario's system
      prompt.
  - name: Scenario Guardrails
    description: Per-scenario attachments linking a scenario to one or more guardrails.
  - name: Meeting Skills
    description: Account-scoped invokable instruction packs the agent loads mid-meeting.
  - name: Scenario Meeting Skills
    description: Per-scenario attachments linking a scenario to one or more skills.
  - name: Memories
    description: >-
      Facts your agents remember, in containers named by user_memory_tag and
      shared across agents.
paths:
  /scenarios/{scenarioId}/guardrails/{id}:
    patch:
      tags:
        - Scenario Guardrails
      summary: Update a scenario-guardrail attachment
      description: >-
        Toggle `active` or change `position` for this scenario only. Does NOT
        modify the guardrail definition — use [`Update a
        guardrail`](#tag/Guardrails/operation/UpdateGuardrail) for that.
      operationId: UpdateScenarioGuardrailAttachment
      parameters:
        - name: scenarioId
          in: path
          required: true
          schema:
            type: string
            format: uuid
          example: 7e3b9c2a-1d4f-4a1b-bdc6-9c8b2d3f4e5a
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: Guardrail UUID.
          example: 9b1f3d70-2a4e-4c8b-8f1a-6d5c4b3a2e10
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              minProperties: 1
              properties:
                active:
                  type: boolean
                  description: >-
                    Set `false` to drop the rule from this scenario's prompt
                    without detaching it.
                position:
                  type: integer
                  minimum: 0
            example:
              active: false
      responses:
        '200':
          description: Attachment updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScenarioGuardrailAttachment'
        '400':
          description: Empty body or invalid field types.
        '401':
          description: Unauthorized — missing or invalid API key.
        '404':
          description: Attachment not found for this scenario/guardrail pair.
      security:
        - apiKeyAuth: []
components:
  schemas:
    ScenarioGuardrailAttachment:
      type: object
      description: >-
        Links a guardrail to a scenario. The rule enters the system prompt only
        when `active = true`.
      required:
        - id
        - scenario_id
        - guardrail_id
        - active
      properties:
        id:
          type: string
          format: uuid
          example: c7e4a2b1-8f3d-4e6a-9b0c-1d2e3f4a5b6c
        scenario_id:
          type: string
          format: uuid
          example: 7e3b9c2a-1d4f-4a1b-bdc6-9c8b2d3f4e5a
        guardrail_id:
          type: string
          format: uuid
          example: 9b1f3d70-2a4e-4c8b-8f1a-6d5c4b3a2e10
        active:
          type: boolean
          default: true
          description: >-
            Set `false` to keep the attachment but drop the rule from the
            prompt.
          example: true
        position:
          type: integer
          minimum: 0
          default: 0
          description: >-
            Order this rule appears in within the `## Guardrails` block. Lower
            first.
          example: 0
        guardrail:
          $ref: '#/components/schemas/Guardrail'
          description: >-
            Embedded guardrail definition. Returned on list/attach/update
            responses.
        created_at:
          type: string
          format: date-time
          example: '2026-09-09T12:35:00.000Z'
        updated_at:
          type: string
          format: date-time
          example: '2026-09-09T12:35:00.000Z'
    Guardrail:
      type: object
      description: >-
        A named prompt fragment. Every guardrail attached to a scenario is
        appended to that scenario's system prompt as a bullet under a `##
        Guardrails` heading, so the persona treats it as a non-negotiable rule
        for the whole conversation.
      required:
        - id
        - guardrail_name
        - guardrail_prompt
        - active
      properties:
        id:
          type: string
          format: uuid
          example: 9b1f3d70-2a4e-4c8b-8f1a-6d5c4b3a2e10
        membership_id:
          type: string
          format: uuid
          example: a1b2c3d4-e5f6-7890-abcd-ef0123456789
        guardrail_name:
          type: string
          maxLength: 64
          pattern: ^[a-zA-Z0-9_-]{1,64}$
          description: >-
            Handle for the rule. Unique per account. Used in the API and in your
            logs — it is never shown to the persona or the participant.
          example: no_competitors
        guardrail_prompt:
          type: string
          maxLength: 10000
          description: >-
            The rule itself, appended verbatim to the system prompt. Write it as
            a direct instruction. Encrypted at rest.
          example: >-
            Only mention products within Our Company Inc. during conversations;
            never discuss competitors.
        active:
          type: boolean
          default: true
          description: >-
            Account-level kill-switch. `false` removes the rule from every
            scenario at once.
          example: true
        scenarios:
          type: array
          description: >-
            Scenarios this guardrail is attached to. Returned only on the
            single-guardrail read.
          items:
            type: object
            properties:
              id:
                type: string
                format: uuid
              name:
                type: string
              active:
                type: boolean
              position:
                type: integer
        created_at:
          type: string
          format: date-time
          example: '2026-09-09T12:34:56.000Z'
        updated_at:
          type: string
          format: date-time
          example: '2026-09-09T12:34:56.000Z'
  securitySchemes:
    apiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: wai_...
      description: >-
        API key from waterr.ai/settings?tab=api-keys. Send as `Authorization:
        Bearer wai_<your_key>`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.