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

Update a route

PATCH/v1/inbound/routes/{id}

Update an inbound route (partial; same fields and validation as create).

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

Any subset of the POST /inbound/routes fields. Omitted fields keep their value; webhook_id: "" clears it. The resulting route must still be valid (e.g. action webhook needs webhook_id).

Path parameters

idstring (UUID)required
Route id

Body parameters

namestring
Label (trimmed).
priorityinteger
Lower runs first; first match wins.
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
actionstring
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
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

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
not_foundHTTP 404
route not found
invalid_parameterHTTP 422
PATCH/v1/inbound/routes/{id}
curl -X PATCH 'https://zapsmtp.xyz/v1/inbound/routes/019a1c55-0d6e-7f21-8b3a-5e9d4c7b2a10' \
  -H "Authorization: Bearer $ZAP_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "enabled": false
}'
Set ZAP_API_KEY in your environment.
Response 200 OK
{
  "id": "019a1f31-0b2c-7d3e-8f4a-5b6c7d8e9f01",
  "name": "Support tickets",
  "priority": 5,
  "match_recipient": "support+*@acme.com",
  "match_sender": "",
  "match_header": "",
  "match_header_value": "",
  "action": "store",
  "webhook_id": null,
  "enabled": true,
  "created_at": "2026-10-20T12:00:00Z"
}