---
title: "Retrieve a guardrail rule"
method: GET
path: "/v2/guardrail-rules/{guardrail_rule_id}"
tags: ["Guardrail Rules"]
---

# Retrieve a guardrail rule

`GET /v2/guardrail-rules/{guardrail_rule_id}`

## Request

- Base URL: `https://my.orq.ai`
- URL: `https://my.orq.ai/v2/guardrail-rules/{guardrail_rule_id}`
- Auth: HTTP bearer

Retrieves a guardrail rule by its unique identifier.

## Path parameters

- `guardrail_rule_id` string, required

## Response `200`

OK

- GetGuardrailRuleResponse
  - `guardrail_rule` GuardrailRule, required
    - `id` string, required
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required
    - `created_by_id` string, required
    - `updated_by_id` string, required
    - `project_id` string, required: Project that contains the rule. Empty for workspace-wide rules.
    - `display_name` string, required: Human-readable guardrail-rule name.
    - `description` string, required
    - `enabled` boolean, required
    - `expression` GuardrailRuleExpression
      - `config` object
      - `cel` string: CEL expression used to match requests. Empty means the rule always matches.
    - `guardrails` GuardrailRuleGuardrail[], required
      - `id` string, required
      - `execute_on` string, required
      - `sample_rate` number, double
      - `is_guardrail` boolean
      - `options` object
    - `plugins` GuardrailRulePlugin[], required
      - `id` string: Plugin discriminator.
      - `language` string: Languages, regions and entity types are checked against the live pii-detection capabilities catalog when the rule is saved, not pinned here, so a language or region the detector gains becomes writable without a future update.
      - `entities` string[]: Entity types to redact. On their own a strict allowlist; alongside regions they add to the region coverage.
      - `on_failure` string
      - `threshold` number, double
      - `regions` string[]: Regions of coverage by ISO 3166-1 alpha-2 code, or ["all"]. Combines with entities: the two selections are unioned.
      - `entity_thresholds` object: Per-entity-type confidence cutoff. Every key must also appear in entities.

## Other responses

- `401`: Authentication required. See https://docs.orq.ai/reference/errors for the error codes.
- `403`: Not permitted for this key, project or workspace. See https://docs.orq.ai/reference/errors for the error codes.

## Changes

> 554 revisions in range; 71 not diffed.

- **2026-10-23** `0b4e519a544f`: 2 info
  - added the non-success response with the status `401`
  - added the non-success response with the status `403`
- **2026-10-23** `732aed62833a`: 2 info
  - removed the non-success response with the status `401`
  - removed the non-success response with the status `403`
- **2026-10-22** `4f826b2c3a0e`: 2 info
  - added the non-success response with the status `401`
  - added the non-success response with the status `403`
- **2026-10-22** `8f0dc569f247`: 2 info
  - removed the non-success response with the status `401`
  - removed the non-success response with the status `403`
- **2026-10-21** `08b800d640e6`: 2 info
  - added the non-success response with the status `401`
  - added the non-success response with the status `403`

[Operation history](https://skmtc.dev/orq-ai/apis/orq-ai-api/changes/v2/guardrail-rules/:guardrail_rule_id/get.md)

---

[API](https://skmtc.dev/orq-ai/apis/orq-ai-api.md) - [All operations](https://skmtc.dev/orq-ai/apis/orq-ai-api/llms.txt) - [OpenAPI document](https://skmtc.dev/orq-ai/apis/orq-ai-api/revisions/928a71e92252?raw)
