Delete a forwarding rule
Delete a rule.
https://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.
Delete a rule. Mail keeps arriving in your inbox; it is no longer forwarded by this rule. Its forward log is kept, with the rule's name and pattern, until the log's 90 days are up.
Who can call it
A full access key made by a team admin, as on the dashboard. Every refusal is 403:
| Code | Why |
|---|---|
SCOPE_DENIED | The key is not a full access key (send-only, read only or live AI). |
FORBIDDEN | The 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_PINNED | The key is limited to one domain and the rule is on another, or the rule sends to a webhook. |
Path parameters
Headers
Bearer followed by your API key.
Errors
`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.
No rule with this id for the calling team, or outside a pinned key's domain.
The team changed rules 30 times in the last minute.
Notix cannot count the team's calls just now; try again shortly.
Every error has the same shape. See all error codes.
curl -X DELETE "https://app.usenotix.dev/api/v1/forwarding-rules/<id>" \
-H "Authorization: Bearer $NOTIX_API_KEY"
import { Notix } from "notix-js";
const notix = new Notix(process.env.NOTIX_API_KEY);
const { data, error } = await notix.forwarding.deleteRule("clx9f2k3l0001qz8a7b6c5d4e");
{
"id": "cm1x8f3k20001qz7v5b9d2e4a",
"deleted": true
}