Test keys (sandbox)
A test key is a full sandbox — build and test your integration with realistic responses, but nothing real happens and nothing is charged.
A key created in test mode (afn_test_…) is a sandbox. Sends and verifications behave exactly like production — same responses, same message IDs, same webhooks — but no real email is sent, no SMTP probe runs, and nothing is charged. Use it to build your whole integration with confidence before switching to a live key.
Free monthly limits
Test traffic never touches your paid quota or verification credits. Instead each account has a free, capped monthly allowance (staff can raise it):
| Parameter | Type | Required | Description |
|---|---|---|---|
Test sends | 10,000 / month | Optional | Simulated sends from test keys. No real email leaves. |
Test verifications | 100 / month | Optional | Simulated verifications from test keys. No SMTP probe runs. |
When an allowance is exhausted the API returns 429 — switch to a live key for production volume.
Choosing outcomes
When you create a test key you set an outcome mix — the odds of each simulated result. Every request rolls the mix and fires the matching webhook.
{
"name": "sandbox",
"env": "test",
"test_outcomes": {
"send": { "delivered": 90, "bounce": 8, "complaint": 2 },
"verify": { "valid": 70, "invalid": 20, "catch_all": 5, "unknown": 5 }
}
}Magic addresses
To force a specific result (overriding the mix), name the outcome in the recipient local-part:
| Parameter | Type | Required | Description |
|---|---|---|---|
Sending | delivered@ · bounce@ · complaint@ | Optional | e.g. bounce@example.com always produces a hard bounce + bounce webhook. |
Verification | valid@ · invalid@ · catchall@ · unknown@ | Optional | e.g. invalid@example.com always returns invalid. |