Add a forwarding address
Add an address to forward to.
https://app.usenotix.dev/api/v1/forwarding-destinationsNeeds a full access key. Sending access keys cannot call this. Key permissions lists the extra rules some calls have.
Add an address to forward to. Notix emails it a confirmation link that works once, for 24 hours. The address gets no forwards until someone who reads it presses the link, and your team's admins are emailed when it is confirmed.
{ "email": "amina@acmepay.com" }
Sending the same address again sends a new link while it is waiting, and nothing once it is confirmed. One address gets at most one link a minute and 3 an hour from your team, even if you remove it and add it again, and 5 a day from every team together; a team sends at most 50 a day. An address that never confirms is removed 7 days after its link expired.
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, which is always refused here. |
Body parameters
The address to forward to.
At least 3 characters. At most 254 characters.
Headers
Bearer followed by your API key.
Errors
Not one email address, or a body not sent as JSON.
`SCOPE_DENIED`: not a full access key. `DOMAIN_PINNED`: the key is limited to one domain. `FORBIDDEN`: the key was made by a team member without admin rights, or before Notix recorded who made each key; or the team has 100 addresses.
Too many confirmation emails: 10 changes a minute for the team, one email a minute and 3 an hour to one address, 50 a day for the team.
Notix cannot count the calls just now, or the email could not be sent; try again shortly.
Every error has the same shape. See all error codes.
curl -X POST "https://app.usenotix.dev/api/v1/forwarding-destinations" \
-H "Authorization: Bearer $NOTIX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "amina@acmepay.com"
}'
import { Notix } from "notix-js";
const notix = new Notix(process.env.NOTIX_API_KEY);
const { data, error } = await notix.forwarding.addDestination("amina@acmepay.com");
// amina@acmepay.com gets a confirmation link; nothing is forwarded there until she presses it.
{
"destination": {
"id": "cm1x8f3k20001qz7v5b9d2e4a",
"email": "customer@example.com",
"status": "PENDING",
"verifiedAt": "string",
"expiresAt": "string",
"lastSentAt": "string",
"createdAt": "string"
},
"confirmationSent": true
}