---
title: "List rules"
method: GET
path: "/v3/rules"
tags: ["Rules"]
---

# List rules

`GET /v3/rules`

Returns a list of all rules for your application.

## Query parameters

- `limit` integer
- `page_token` string

## Response `200`

OK

- object
  - `request_id` string — ID of the request.
  - `data` RuleObject[]
    - `id` string — Globally unique identifier for the rule (UUID).
    - `name` string — A human-readable name for the rule. Required on create.
    - `description` string — An optional description of what the rule does.
    - `priority` integer — Execution order for the rule. Lower numbers run first. Must be between `0` and `1000`. Defaults to `10`.
    - `enabled` boolean — Whether the rule is active. Defaults to `true`.
    - `trigger` 'inbound' | 'outbound' — When the rule is evaluated. `inbound` rules run on incoming messages. `outbound` rules run on sends before the message is submitted to the email provider — an `outbound` rule with a `block` action rejects the send with HTTP 403 and no message is delivered. Non-blocking actions (`mark_as_spam`, `archive`, `mark_as_read`, `mark_as_starred`, `assign_to_folder`, `trash`) on outbound rules apply to the stored sent copy. Inbound and outbound rules are isolated: inbound rules never run during sends, and outbound rules never run on receipt.
    - `match` object — Defines the conditions that must be met for the rule to apply.
      - `operator` 'any' | 'all' — How conditions are combined. Use `any` to match when any condition is true (OR), or `all` to require every condition to be true (AND). When omitted, the rule defaults to `all`.
      - `conditions` object[] — The list of conditions to evaluate. At least one condition is required.
        - `field` 'from.address' | 'from.domain' | 'from.tld' | 'recipient.address' | 'recipient.domain' | 'recipient.tld' | 'outbound.type' — The field to match against. `from.*` fields match the normalized sender and are valid on both triggers: `from.address` is the full sender email, `from.domain` is the domain portion, and `from.tld` is the top-level domain. `recipient.*` fields are valid only on `outbound` rules and match against **any** recipient — including To, CC, BCC, and SMTP envelope recipients. For `is_not`, the condition is true only when **no** recipient matches. `outbound.type` is valid only on `outbound` rules and classifies the send as `compose` (a fresh message) or `reply` (a reply to an existing thread). The type is derived as `reply` when the send includes `reply_to_message_id` or the raw MIME contains `In-Reply-To` or `References` headers; otherwise it's `compose`.
        - `operator` 'is' | 'is_not' | 'contains' | 'in_list' — How to compare the field value. Use `is` for an exact match, `is_not` for the inverse, `contains` for substring matching, or `in_list` to check against one or more List resources. String matching is case-insensitive. The `outbound.type` field accepts only `is` and `is_not` — `contains` and `in_list` are rejected.
        - `value` union — The value to compare the field against. For `is`, `is_not`, and `contains`, this is a string. For `in_list`, this is an array of List IDs. For `outbound.type`, this is `compose` or `reply` — values are normalized to lowercase on write.
          - string
          - string[]
    - `actions` object[] — The actions to perform when the rule matches. At least one action is required. The `block` action cannot be combined with other actions — it is terminal.
      - `type` 'block' | 'mark_as_spam' | 'assign_to_folder' | 'mark_as_read' | 'mark_as_starred' | 'archive' | 'trash' — The action to take on the matching message or send. `block` rejects inbound mail at the SMTP level or rejects an outbound send before provider submission. `mark_as_spam` routes the message or stored sent copy to the spam folder, `assign_to_folder` files it in the folder named in `value`, and the remaining actions modify the message state.
      - `value` string — Required when `type` is `assign_to_folder` — the target folder by name. Use a custom folder's name (or its full path for a nested folder, e.g. `Clients/Acme`), or a system folder name (`Inbox`, `Sent`, `Drafts`, `Trash`, `Junk`, `Archive`). The name is resolved when the rule runs, so a reference to a folder that doesn't exist is skipped. Optional for other action types.
    - `application_id` string — The ID of the application that owns the rule. Read-only; derived from the authenticated API key.
    - `organization_id` string — The ID of the Nylas organization that owns the rule. Read-only; derived from the authenticated API key.
    - `created_at` integer — When the rule was created, in seconds using the Unix timestamp format.
    - `updated_at` integer — When the rule was last updated, in seconds using the Unix timestamp format.
  - `next_cursor` string — A token to use for paginating through results. If present, pass this value as `page_token` in the next request.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `429` — Rate Limit

---

[API](https://skmtc.dev/nylas/apis/nylas-api.md) · [All operations](https://skmtc.dev/nylas/apis/nylas-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/nylas/nylas-api/revisions/51c2c1b4ecff/schema)
