# Get an AI label rule

Source: https://docs.maylee.app/api-reference/ai-label-rules/get-ai-label-rule

`GET https://api.maylee.app/api/v1/ai-label-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/ai-label-rules/<ruleId>" \
  -H "Authorization: Bearer $MAYLEE_KEY"
```

## Responses

### 200

The rule.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `rule` | AiLabelRule | yes | An AI label and the natural-language condition that applies it. Auto-draft and auto-reply are configured here. |
| `rule.autoDraftEnabled` | boolean | yes |  |
| `rule.autoReplyConfidenceThreshold` | integer | yes | From 0 to 100. |
| `rule.autoReplyDelayMinutes` | integer | yes | From 0 to 15. |
| `rule.autoReplyEnabled` | boolean | yes | When true, Maylee sends replies on your behalf. Setting it requires `allowOutboundSend` on the key. |
| `rule.autoReplyNotifyOnSend` | boolean | yes |  |
| `rule.condition` | string | yes | Natural-language condition, up to 500 characters. |
| `rule.createdAt` | string (date-time) | yes |  |
| `rule.hideFromInbox` | boolean | yes | When true, emails that receive this label leave the main inbox. They stay in INBOX, listable with `GET /emails?filtered=only`, and remain visible in any view whose criteria match them. |
| `rule.id` | string | yes |  |
| `rule.label` | LabelRef | yes | A label as it appears on an email or on a rule. |
| `rule.updatedAt` | string (date-time) | yes |  |

```json
{
  "rule": {
    "autoDraftEnabled": true,
    "autoReplyConfidenceThreshold": 85,
    "autoReplyDelayMinutes": 0,
    "autoReplyEnabled": false,
    "autoReplyNotifyOnSend": true,
    "condition": "The sender asks about pricing, a quote or a demo of our product.",
    "createdAt": "2026-06-03T08:00:00.000Z",
    "hideFromInbox": false,
    "id": "cmrl1a2b3c4d5e6f7g8h9i0j",
    "label": {
      "color": "Blue",
      "id": "cmtgai1b2c3d4e5f6g7h8i9j",
      "isAiLabel": true,
      "name": "Sales"
    },
    "updatedAt": "2026-08-20T16:40: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).
