---
title: "Retrieve a rule"
description: "One rule in full, with its conditions, its actions and how often it has fired."
url: "https://openemail.uk/docs/api/rules/get"
area: "API"
category: "Mailbox"
---

# Retrieve a rule

One rule in full, with its conditions, its actions and how often it has fired.

`GET /rules/{id}`

## GET /rules/{id}

One rule in full, with its conditions, its actions and how often it has fired.

## Example

Needs `rules:read`. Ids carry a `rul_` prefix.

**curl**

```
curl "$OE/rules/rul_7f3a1c94e05d3862c1f0a44b" -H "$AUTH"
```

**Response**

```
{
  "object": "rule",
  "id": "rul_7f3a1c94e05d3862c1f0a44b",
  "name": "Receipts to their own label",
  "description": null,
  "enabled": true,
  "position": 0,
  "match": "all",
  "conditions": [
    { "field": "from_domain", "op": "matches", "value": "*.stripe.com", "negate": false }
  ],
  "actions": [{ "type": "label", "value": "USER_RECEIPTS" }, { "type": "archive" }],
  "stopProcessing": true,
  "lastMatchedAt": "2026-08-29T11:04:12.000Z",
  "matchCount": 148,
  "createdAt": "2026-08-01T09:00:00.000Z",
  "updatedAt": "2026-08-20T16:31:00.000Z"
}
```

> A rule on another connection is `rule_not_found`, a 404, rather than a 403, the same answer as an id that never existed, because telling a key which ids exist on a mailbox it cannot read is itself the leak.

> This is the whole rule. There are no versions and no history: an edit overwrites, and what a rule DID is recorded per message in `GET /rules/runs` instead.
