AI label rules

Update an AI label rule

PATCH/ai-label-rules/{ruleId}

Renames the label, changes the condition, or configures auto-draft and auto-reply. Setting autoReplyEnabled: true requires allowOutboundSend on the key.

Authorization

apiKey
AuthorizationBearer <token>

Send your key as Authorization: Bearer mk_…. Session cookies are never accepted on this surface.

In: header

Path Parameters

ruleId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/ai-label-rules/string" \  -H "Authorization: Bearer $MAYLEE_KEY" \  -H "Content-Type: application/json" \  -d '{    "autoDraftEnabled": true  }'
{  "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"  }}