---
title: "List all Rules"
method: GET
path: "/v1/Webhooks/Rules"
tags: ["Rules"]
---

# List all Rules

`GET /v1/Webhooks/Rules`

## Request

- Base URL: `https://webhooks.twilio.com`
- URL: `https://webhooks.twilio.com/v1/Webhooks/Rules`
- Auth: HTTP basic

Returns paginated list of Rules sorted by evaluation order:
1. exact-match rules (evaluated first, longest match first)
2. prefix-match rules (longest prefix first)
3. default rule (matches all incoming requests when no other rule matches)

## Query parameters

- `pageSize` integer
- `pageToken` string
- `settingId` string

## Response `200`

List of Rules

- RulesList
  - `rules` Rule[]
    - union: URL matching rule that applies Settings to webhook requests. Rules are discriminated by matchType - each type has different required fields.
      - PrefixMatchRule: Rule that matches URLs starting with a prefix
        - `id` string, required: Unique Rule identifier (TypeID/TTID format)
        - `friendlyName` string: Human-readable name for identification
        - `description` string: Optional description of the Rule's purpose and usage
        - `matchType` 'PREFIX_MATCH', required
        - `settings` SettingReference[], required: Settings to apply with traffic distribution (percentages must sum to 100)
          - `settingId` string, required: Setting resource ID (TypeID format)
          - `percentage` integer, required: Percentage of traffic to route (all settings in rule must sum to 100)
        - `createdAt` string, date-time
        - `updatedAt` string, date-time
        - `prefix` string, required: URL prefix to match. Must be unique - only one rule per prefix allowed. Example: 'https://api.example.com/webhooks/'
      - ExactMatchRule: Rule that matches an exact URL
        - `id` string, required: Unique Rule identifier (TypeID/TTID format)
        - `friendlyName` string: Human-readable name for identification
        - `description` string: Optional description of the Rule's purpose and usage
        - `matchType` 'EXACT_MATCH', required
        - `settings` SettingReference[], required: Settings to apply with traffic distribution (percentages must sum to 100)
          - `settingId` string, required: Setting resource ID (TypeID format)
          - `percentage` integer, required: Percentage of traffic to route (all settings in rule must sum to 100)
        - `createdAt` string, date-time
        - `updatedAt` string, date-time
        - `value` string, required: Exact URL to match. Must be unique - only one rule per value allowed. Example: 'https://api.example.com/webhooks/voice/incoming'
      - DefaultRule: Rule that matches all incoming requests not matched by other rules. Only ONE default rule allowed per account. Evaluated only when no exact-match or prefix-match rule matches.
        - `id` string, required: Unique Rule identifier (TypeID/TTID format)
        - `friendlyName` string: Human-readable name for identification
        - `description` string: Optional description of the Rule's purpose and usage
        - `matchType` 'DEFAULT', required
        - `settings` SettingReference[], required: Settings to apply with traffic distribution (percentages must sum to 100)
          - `settingId` string, required: Setting resource ID (TypeID format)
          - `percentage` integer, required: Percentage of traffic to route (all settings in rule must sum to 100)
        - `createdAt` string, date-time
        - `updatedAt` string, date-time
  - `meta` PaginationMeta: Pagination metadata containing navigation tokens and result information, this schema should according to convention be added to the response payload's 'meta' attribute
    - `key` string, required: The key of the list property contains the actual data items. This enables programmatic iteration over paginated results.
    - `pageSize` integer, required: The page size used for this request (the requested value, or the default/max-capped value if none was requested). The number of items actually returned in the list may be less than this on the last page.
    - `previousToken` string, nullable: Token to fetch the previous page of results. Only included if there is a previous page, otherwise omitted.
    - `nextToken` string, nullable: Token to fetch the next page of results. Only included if there is a next page, otherwise omitted.

## Other responses

- `401`: Authentication failed
- `403`: Authenticated account does not have permission to perform this operation
- `429`: Rate limit exceeded
- `500`: An unexpected server error occurred

---

[API](https://skmtc.dev/twilio/apis/webhooks-v1.md) - [All operations](https://skmtc.dev/twilio/apis/webhooks-v1/llms.txt) - [OpenAPI document](https://skmtc.dev/twilio/apis/webhooks-v1/revisions/629b4cc3a029?raw)
