# Get an auto-forward rule

Source: https://docs.maylee.app/api-reference/auto-forward-rules/get-auto-forward-rule

`GET https://api.maylee.app/api/v1/auto-forward-rules/{ruleId}`

Scope: `read`.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `ruleId` | path | string | yes |  |

## Example request

```bash
curl -X GET "https://api.maylee.app/api/v1/auto-forward-rules/<ruleId>" \
  -H "Authorization: Bearer $MAYLEE_KEY"
```

## Responses

### 200

The rule.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `rule` | AutoForwardRule | yes | Forwards matching incoming emails to an address. Managing rules requires `allowOutboundSend` on the key. |
| `rule.conditionField` | string | yes | One of: `label`, `sender_contains`, `sender_equals`, `subject_contains`, `subject_equals`. |
| `rule.conditionValue` | string | yes | A label name when `conditionField` is `label`, otherwise the text to match, case-insensitively. |
| `rule.createdAt` | string (date-time) | yes |  |
| `rule.forwardTo` | string (email) | yes |  |
| `rule.id` | string | yes |  |
| `rule.isActive` | boolean | yes |  |
| `rule.mode` | string | yes | `normal` forwards with the usual `Fwd:` subject and quoted body. `invisible` sends the original as is, with `Reply-To` set to the original sender. One of: `normal`, `invisible`. |
| `rule.updatedAt` | string (date-time) | yes |  |

```json
{
  "rule": {
    "conditionField": "label",
    "conditionValue": "Invoices",
    "createdAt": "2026-08-01T09:00:00.000Z",
    "forwardTo": "accounting@your-company.com",
    "id": "cmaf1a2b3c4d5e6f7g8h9i0j",
    "isActive": true,
    "mode": "normal",
    "updatedAt": "2026-08-01T09:00:00.000Z"
  }
}
```

### 401

Missing, malformed, revoked or expired API key.

### 403

Key lacks the required scope, or outbound sending is not enabled on it.

### 404

Not found, or belongs to another workspace.

### 429

Per-minute rate limit (`RATE_LIMIT_EXCEEDED`) or monthly quota (`QUOTA_EXCEEDED`) exhausted.

Errors use the format `{ "code", "error", "details" }`: see [Errors](/errors.md).
