Runs examples for real against your account. Test keys only; kept in this tab, never stored on our side. Get a key
ZapSMTP / Docs / Inbound setup

Create a route

POST/v1/inbound/routes

Create an inbound route (max 100 per account).

Requires a full-access live key; test keys get 403 test_key_restricted.

Body parameters

namestring
Label (trimmed).
priorityinteger
Lower runs first; first match wins. Default 100.
match_recipientstring
Glob (case-insensitive, * and ?) e.g. support+*@acme.com, or /regex/ (RE2, case-insensitive). Empty matches all. Limits: max 512 chars; must compile (422 invalid_parameter)
match_senderstring
Same syntax, matched against the envelope sender. Limits: max 512 chars; must compile
match_headerstring
Header name to test.
match_header_valuestring
Glob or /regex/ for that header's value. Limits: max 512 chars; must compile
actionstringrequired
webhook: deliver email.received only to webhook_id; store: keep without webhook; forward: keep and forward to forward_id (a confirmed forward destination); reject: refuse with 550 at SMTP time. Limits: 422 invalid_parameter "action must be webhook, store, reject or forward" One of webhook, store, forward, reject.
webhook_idstring | null
Required when action is webhook. A webhook of this account. Cleared for store/reject. Limits: 422 "webhook_id is required for action webhook" / "webhook_id does not belong to this account"
forward_idstring | null
A confirmed forward destination of this account (action forward). Cleared for other actions. Limits: 422 "forward_id is required for action forward" / "forward_id does not belong to this account" / "... is not confirmed yet"
enabledboolean
Default True.

Errors

restricted_api_keyHTTP 403
test_key_restrictedHTTP 403
test-mode keys can send test email and read, not change the account: use a live key
invalid_parameterHTTP 422
validation failures or "at most 100 routes per account"
POST/v1/inbound/routes
curl -X POST 'https://zapsmtp.xyz/v1/inbound/routes' \
  -H "Authorization: Bearer $ZAP_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "Support tickets",
  "priority": 10,
  "match_recipient": "support+*@acme.com",
  "action": "store"
}'
Set ZAP_API_KEY in your environment.
Response 201 Created
{
  "id": "019a1f31-0b2c-7d3e-8f4a-5b6c7d8e9f01",
  "name": "Support tickets",
  "priority": 10,
  "match_recipient": "support+*@acme.com",
  "match_sender": "",
  "match_header": "",
  "match_header_value": "",
  "action": "webhook",
  "webhook_id": "019a1f22-6e7f-7091-8a2b-3c4d5e6f7a8b",
  "enabled": true,
  "created_at": "2026-10-21T15:20:00Z"
}