Test an address against your rules
Shows which rule takes a message sent to an address, whether it is forwarded (forwards; a paused rule takes the message and forwards nothing), and every…
https://app.usenotix.dev/api/v1/forwarding-rules/testNeeds a full access key. Sending access keys cannot call this. Key permissions lists the extra rules some calls have.
Shows which rule takes a message sent to an address, whether it is forwarded (forwards; a paused rule takes the message and forwards nothing), and every rule whose pattern matches it, including rules that are off or paused. Nothing is sent or changed.
{ "address": "billing@reply.acmepay.com" }
Needs a full access key. A key limited to one domain tests only the rules it can see.
Body parameters
The address to test.
At least 3 characters. At most 320 characters.
Headers
Bearer followed by your API key.
Errors
The address is not an email address.
`SCOPE_DENIED`: not a full access key.
The team tested 60 addresses 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 POST "https://app.usenotix.dev/api/v1/forwarding-rules/test" \
-H "Authorization: Bearer $NOTIX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"address": "billing@reply.acmepay.com"
}'
import { Notix } from "notix-js";
const notix = new Notix(process.env.NOTIX_API_KEY);
const { data, error } = await notix.forwarding.test("billing@reply.acmepay.com");
console.log(data?.rule?.name ?? "No rule forwards this address");
{
"address": "string",
"rule": {
"id": "cm1x8f3k20001qz7v5b9d2e4a",
"name": "Acme",
"pattern": "string",
"active": true,
"paused": true,
"priority": 1
},
"forwards": true,
"note": "\"Billing to finance\" forwards this address.",
"matches": [
{
"id": "cm1x8f3k20001qz7v5b9d2e4a",
"name": "Acme",
"pattern": "string",
"active": true,
"paused": true,
"priority": 1
}
]
}