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

Save a module

POST/v1/template-modules

Save rows as a module that every template of the account can insert.

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

Inserting a module copies its rows into the template: changing the module later does not change templates that already use it.

Body parameters

namestringrequired
Limits: trimmed, 1-200 characters → 422 missing_required_field
categorystring
Groups modules in the editor’s palette. Limits: trimmed, max 100 characters → 422 missing_required_field Default "".
designobjectrequired
The saved rows: {"rows": [...]} with at least one row in the visual editor’s format (copy rows from a template’s design). Limits: max 1 MB → 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
payload_too_largeHTTP 413
request body too large
invalid_parameterHTTP 422
design must be {"rows": [...]} with at least one row (max 1 MB)
missing_required_fieldHTTP 422
name is required (max 200 chars), category max 100 chars
POST/v1/template-modules
curl -X POST 'https://zapsmtp.xyz/v1/template-modules' \
  -H "Authorization: Bearer $ZAP_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "Footer",
  "category": "Brand",
  "design": {
    "rows": [
      {
        "id": "r1",
        "columns": [
          {
            "id": "c1",
            "width": 100,
            "blocks": [
              {
                "id": "b1",
                "type": "text",
                "html": "<p>Acme Inc. · 1 Market St, San Francisco</p>"
              }
            ]
          }
        ]
      }
    ]
  }
}'
Set ZAP_API_KEY in your environment.
Response 201 Created
{
  "id": "019a1f61-4e5f-7a60-8b71-8c9d0e1f2a3b",
  "name": "Footer",
  "category": "Brand",
  "design": {
    "rows": [
      {
        "id": "r1",
        "columns": [
          {
            "id": "c1",
            "width": 100,
            "blocks": [
              {
                "id": "b1",
                "type": "text",
                "html": "<p>Acme Inc. · 1 Market St, San Francisco</p>"
              }
            ]
          }
        ]
      }
    ]
  },
  "created_at": "2026-10-22T16:00:00Z",
  "updated_at": "2026-10-22T16:00:00Z"
}