> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.vapi.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.vapi.ai/_mcp/server.

# List paginated guardrail rules

GET https://api.vapi.ai/guardrail/rules/paginated

Reference: https://docs.vapi.ai/api-reference/guardrail-rules/guardrail-rules-controller-paginated

## Authentication

- `Authorization` header (bearer token, required) — Authenticate server-side requests with a private Vapi API key. Create or copy a key from the [Vapi Dashboard](https://dashboard.vapi.ai) and send it in the `Authorization` header as `Bearer <token>`. Keep private API keys out of client-side code and public repositories.

## Request

### Query parameters

- `limit` (double, optional, default: 100)
- `search` (string, optional) — Case-insensitive name or identifier fragment; omitted means all resources.
- `packId` (string, optional) — Limits rules to a pack in the authenticated organization without per-member requests.
- `sortBy` (enum, optional) — Only persisted creation order is supported, with the ID as a stable tie-breaker.
  - Allowed values: `createdAt`
- `createdAtGt` (datetime, optional) — This will return items where the createdAt is greater than the specified value.
- `createdAtLt` (datetime, optional) — This will return items where the createdAt is less than the specified value.
- `createdAtGe` (datetime, optional) — This will return items where the createdAt is greater than or equal to the specified value.
- `createdAtLe` (datetime, optional) — This will return items where the createdAt is less than or equal to the specified value.
- `updatedAtGt` (datetime, optional) — This will return items where the updatedAt is greater than the specified value.
- `updatedAtLt` (datetime, optional) — This will return items where the updatedAt is less than the specified value.
- `updatedAtGe` (datetime, optional) — This will return items where the updatedAt is greater than or equal to the specified value.
- `updatedAtLe` (datetime, optional) — This will return items where the updatedAt is less than or equal to the specified value.
- `page` (double, optional) — A safe integer page; the reader also validates the computed offset.
- `sortOrder` (enum, optional) — This is the sort order for pagination. Defaults to 'DESC'.
  - Allowed values: `ASC`, `DESC`

## Response

### 200

- `results` (list of GuardrailRule, required)
- `metadata` (PaginationMeta, required) — Pagination and retention metadata returned with a paginated list of phone numbers.

## Types

### GuardrailRule

- `id` (string, required)
- `orgId` (string, required)
- `createdAt` (datetime, required)
- `updatedAt` (datetime, required)
- `name` (string, required)
- `sensitivity` (enum, required) — Evaluation sensitivity; numeric cutoffs are internal and provisional.
  - Allowed values: `low`, `medium`, `aggressive`
- `action` (GuardrailRuleAction, required) — Supplied PATCH actions replace the complete variant.
- `authoring` (GuardrailAuthoring, optional, nullable) — Structured editor input. Supplied PATCH authoring replaces the complete object; advanced text writes clear it to null.
- `instructions` (string, optional) — Evaluated instructions, generated from authoring or supplied in advanced mode.

### PaginationMeta

Pagination and retention metadata returned with a paginated list of phone numbers.

- `itemsPerPage` (double, required) — The number of phone numbers returned per page.
- `totalItems` (double, required) — The total number of phone numbers matching the request.
- `currentPage` (double, required) — The current page number.
- `totalPages` (double, optional)
- `hasNextPage` (boolean, optional)
- `nextCursor` (string, optional) — Opaque cursor for the next page under keyset pagination (PRO-3163). Pass it back as the `cursor` query param to fetch the next page without an OFFSET scan. Present only when a further page likely exists.
- `sortOrder` (enum, optional)
  - Allowed values: `ASC`, `DESC`
- `itemsBeyondRetention` (boolean, optional) — Whether additional matching phone numbers exist beyond the organization's data-retention window.
- `createdAtLe` (datetime, optional) — The inclusive upper creation-time boundary applied to the result set.
- `createdAtGe` (datetime, optional) — The inclusive lower creation-time boundary applied to the result set.

### GuardrailRuleAction

Supplied PATCH actions replace the complete variant.

- GuardrailRuleAction0
- GuardrailEscalateAction: GuardrailEscalateAction

### GuardrailAuthoring

- `mode` (enum, required)
  - Allowed values: `always`, `never`
- `behavior` (string, required)
- `condition` (string, optional) — Natural-language condition evaluated using the candidate and call history.

### GuardrailRuleAction0

- GuardrailFixedResponseAction: GuardrailFixedResponseAction
- GuardrailRedirectAction: GuardrailRedirectAction

### GuardrailEscalateAction

- `type` (enum, required)
  - Allowed values: `escalate`
- `toolId` (string, required) — Existing same-organization tool; attachment is checked at assignment. Tool edits/deletion can invalidate the action: activation must revalidate the current tool and arguments, and use failurePolicy on failure.
- `arguments` (map from string to any, required) — Parameter names follow the normalized tool schema (SMS uses body/to).

### GuardrailFixedResponseAction

- `type` (enum, required)
  - Allowed values: `auto-response`
- `text` (string, required) — Replacement speech; it must pass its own guardrail evaluation.
- `mode` (enum, optional, default: fixed) — Omitted legacy modes normalize to fixed when transformed.
  - Allowed values: `fixed`

### GuardrailRedirectAction

- `type` (enum, required)
  - Allowed values: `auto-response`
- `mode` (enum, required)
  - Allowed values: `redirect`
- `instructions` (string, required) — Steering instructions for generating a replacement candidate.

## Examples

**Response**

```json
{
  "results": [
    {
      "id": "string",
      "orgId": "string",
      "createdAt": "2024-01-15T09:30:00Z",
      "updatedAt": "2024-01-15T09:30:00Z",
      "name": "string",
      "sensitivity": "low",
      "action": null,
      "authoring": {
        "mode": "always",
        "behavior": "string",
        "condition": "string"
      },
      "instructions": "string"
    }
  ],
  "metadata": {
    "itemsPerPage": 1.1,
    "totalItems": 1.1,
    "currentPage": 1.1,
    "totalPages": 1.1,
    "hasNextPage": true,
    "nextCursor": "string",
    "sortOrder": "ASC",
    "itemsBeyondRetention": true,
    "createdAtLe": "2024-01-15T09:30:00Z",
    "createdAtGe": "2024-01-15T09:30:00Z"
  }
}
```