---
title: "Update Organization Guardrail"
method: PATCH
path: "/v1/organizations/me/guardrails/{guardrail_id}"
tags: ["organization-guardrails"]
---

# Update Organization Guardrail

`PATCH /v1/organizations/me/guardrails/{guardrail_id}`

Change a guardrail's profile, endpoint, credential, modes, or scope.

Organization owners and admins only. Omitted fields are left as they are;
``workspace_ids`` replaces the scope whole when sent, and ``url`` and
``credential`` are cleared by sending an empty string rather than null.

## Path parameters

- `guardrail_id` string, uuid, required

## Request body

- OrganizationGuardrailUpdate — Partial update. Only the fields the caller sets are applied. ``credential`` and ``url`` have three states rather than two, which is what a write-only field and its nullable partner need: omit to leave the stored value alone, send ``""`` to clear it, send a value to replace it. An explicit ``null`` also leaves them alone, matching `WorkspaceMcpServerUpdate`: a client that serializes its whole form back, with an empty credential box it never filled in, must not destroy a credential it was never shown. ``workspace_ids`` replaces the scope whole when sent; ``[]`` clears it.
  - `applies_to_all_workspaces` boolean
  - `credential` string, nullable
  - `enabled` boolean
  - `mode` 'block' | 'monitor'
  - `on_unavailable` 'block' | 'monitor'
  - `profile` string
  - `url` string, nullable
  - `validate_kwargs` object, nullable
  - `workspace_ids` string[], nullable

## Response `200`

Successful Response

- OrganizationGuardrailPublic — The API-facing shape. Never carries the credential, only whether one is set.
  - `applies_to_all_workspaces` boolean, required
  - `created_at` string, required
  - `enabled` boolean, required
  - `has_credential` boolean, required
  - `id` string, uuid, required
  - `mode` string, required
  - `on_unavailable` string, required
  - `organization_id` string, uuid, required
  - `profile` string, required
  - `updated_at` string, required
  - `url` string, nullable, required
  - `validate_kwargs` object, nullable, required
  - `workspace_ids` string[], required

## Other responses

- `422` — Validation Error

## Changes

- **2026-08-24** `cf308338ce74` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/mozilla-ai/apis/otari/changes/v1/organizations/me/guardrails/:guardrail_id/patch.md)

---

[API](https://skmtc.dev/mozilla-ai/apis/otari.md) · [All operations](https://skmtc.dev/mozilla-ai/apis/otari/llms.txt) · [OpenAPI document](https://skmtc.dev/mozilla-ai/apis/otari/revisions/80c117c36f36?raw)
