Change a forwarding rule

Change any field of a rule.

PATCHhttps://app.usenotix.dev/api/v1/forwarding-rules/{id}

Needs a full access key. Sending access keys cannot call this. Key permissions lists the extra rules some calls have.

Change any field of a rule. Only the fields you send change, and the whole rule is checked again as it would be saved. Send "paused": false to resume a rule Notix paused, after you have looked at its log.

Who can call it

A full access key made by a team admin, as on the dashboard. Every refusal is 403:

CodeWhy
SCOPE_DENIEDThe key is not a full access key (send-only, read only or live AI).
FORBIDDENThe key was made by a team member without admin rights, or before Notix recorded who made each key. Create a new key as a team admin.
DOMAIN_PINNEDThe key is limited to one domain and the rule is on another, or the rule sends to a webhook.

Path parameters

idstringrequired

Body parameters

namestring

A label for the rule.

At most 80 characters.

patternstring

The receiving addresses the rule forwards: one address (billing@reply.acmepay.com), every address on a domain (*@reply.acmepay.com, needs confirmCatchAll), or addresses that start with a prefix (orders-*@reply.acmepay.com). The domain must be one your team receives email on.

At least 3 characters. At most 320 characters.

destinationIdsstring[]

Up to 10 forwarding address ids from POST /v1/forwarding-destinations. Only confirmed addresses receive forwards.

webhookIdstring

Also send each matching message to this webhook of yours as an email.received event, whatever events it subscribes to. Not for a key limited to one domain.

At most 64 characters. Can be null.

fromAddressstring

The address forwards are sent from, on one of your verified sending domains. Leave it out to send from the receiving address, which then has to be on a verified sending domain too. Forwards are never sent as the original sender, who is set as Reply-To.

At most 254 characters. Can be null.

subjectPrefixstring

Text put in front of each forwarded subject. Off by default.

At most 40 characters. Can be null.

allowChainingboolean

Allow forwarding addresses on a domain your team also receives on. Off by default, because that can start a loop.

passthroughboolean

true (the default): forward each message exactly as it arrived. false: send it like an email client's forward, with note on top, then a Forwarded message block (From, Date, Subject, To, Cc) above the original, and Fwd: on the subject. Attachments go either way.

notestring

Plain text shown above the Forwarded message block when passthrough is false. At most 2,000 characters; ignored when passthrough is true.

At most 2,000 characters. Can be null.

activeboolean

Whether the rule forwards. A rule that is off is skipped.

priorityinteger

Lower numbers are tried first. The first matching rule that is on forwards the message. Default 100.

Minimum 0. Maximum 10000.

confirmCatchAllboolean

Required as true for a pattern like *@reply.acmepay.com, which forwards every email the domain receives.

pausedboolean

false resumes a rule Notix paused; true pauses it by hand.

Headers

Authorizationstringrequired

Bearer followed by your API key.

Errors

400

No field given, a field the route does not know, or the changed rule is refused.

403

`SCOPE_DENIED`: not a full access key. `FORBIDDEN`: the key was made by a team member without admin rights, or before Notix recorded who made each key. `DOMAIN_PINNED`: the pattern or the webhook is outside the key's one domain.

404

No rule with this id for the calling team, or outside a pinned key's domain.

409

Another rule of the team already has this pattern.

429

The team changed rules 30 times in the last minute.

503

Notix cannot count the team's calls just now; try again shortly.

Every error has the same shape. See all error codes.

curl -X PATCH "https://app.usenotix.dev/api/v1/forwarding-rules/<id>" \
  -H "Authorization: Bearer $NOTIX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Billing to finance",
  "pattern": "billing@reply.acmepay.com",
  "destinationIds": [
    "clx9f2k3l0002qz8a7b6c5d4e"
  ],
  "webhookId": null,
  "fromAddress": "support@acmepay.com",
  "subjectPrefix": "[Acme]",
  "allowChaining": true,
  "passthrough": false,
  "note": "For the accounts team. Please check the total.",
  "active": true,
  "priority": 10,
  "confirmCatchAll": true,
  "paused": true
}'
Response200
{
  "id": "cm1x8f3k20001qz7v5b9d2e4a",
  "name": "Acme",
  "pattern": "billing@reply.acmepay.com",
  "patternType": "EXACT",
  "receivingDomain": "reply.acmepay.com",
  "destinations": [
    {
      "id": "cm1x8f3k20001qz7v5b9d2e4a",
      "email": "customer@example.com",
      "status": "PENDING"
    }
  ],
  "webhookId": "cm1x8f3k20001qz7v5b9d2e4a",
  "fromAddress": "string",
  "subjectPrefix": "Your receipt for order 4471",
  "allowChaining": true,
  "passthrough": true,
  "note": "string",
  "active": true,
  "priority": 1,
  "paused": true,
  "pausedAt": "string",
  "pauseReason": "string",
  "createdAt": "string",
  "updatedAt": "string"
}
Open in ClaudeOpen in ChatGPT