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

Declare an action

POST/v1/actions

Declare an action and describe it. Optional: links work with any valid name, declared or not.

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

The response does not count activity: the stats are zero and templates is 0 here. Read them with GET /actions/{name}.

Body parameters

namestringrequired
The name links carry in data-zap-action: lowercase letters, digits, _, . and -, starting with a letter or digit, up to 64 characters. Limits: other names → 422 invalid_parameter
descriptionstring
What the button does, for your team. Limits: at most 500 bytes → 422 invalid_parameter

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
conflictHTTP 409
an action with this name exists
invalid_parameterHTTP 422
bad name or description
POST/v1/actions
curl -X POST 'https://zapsmtp.xyz/v1/actions' \
  -H "Authorization: Bearer $ZAP_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "confirm_order",
  "description": "Customer confirms the order from the receipt"
}'
Set ZAP_API_KEY in your environment.
Response 201 Created
{
  "object": "action",
  "name": "confirm_order",
  "description": "Customer confirms the order from the receipt",
  "declared": true,
  "created_at": "2026-10-24T09:12:00Z",
  "updated_at": "2026-10-24T09:12:00Z",
  "clicks_7d": 0,
  "clicks_30d": 0,
  "unique_clickers_30d": 0,
  "last_click_at": null,
  "templates": 0,
  "webhooks": []
}