Create an auto-forward rule
/auto-forward-rulesForwards every incoming email matching the condition to forwardTo.
A rule makes email leave the workspace: creating, changing or deleting one requires allowOutboundSend on the key, like sending does. A key with write alone gets 403 OUTBOUND_SEND_NOT_ALLOWED.
Authorization
apiKey Send your key as Authorization: Bearer mk_…. Session cookies are never accepted on this surface.
In: header
Header Parameters
A unique value per operation, such as a UUID. Replays the stored response for 24h. Reusing a key with a different body returns 409.
length <= 255Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/auto-forward-rules" \ -H "Authorization: Bearer $MAYLEE_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{ "conditionField": "label", "conditionValue": "Invoices", "forwardTo": "accounting@your-company.com", "mode": "normal" }'{ "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" }}List the forwarding attempts of a rule GET
The 50 most recent attempts, newest first, with the email that triggered each one. In-flight attempts are not listed.
Update an auto-forward rule PATCH
Requires `allowOutboundSend` on the key. At least one field is required; `forwardTo` and `conditionValue` cannot be emptied.