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

Update a module

PATCH/v1/template-modules/{id}

Rename, recategorize or replace a module’s rows.

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

Fields left out keep their value.

Path parameters

idstring (UUID)required
Module id.

Body parameters

namestring
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
designobject
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
not_foundHTTP 404
module not found
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
PATCH/v1/template-modules/{id}
curl -X PATCH 'https://zapsmtp.xyz/v1/template-modules/019a1f61-4e5f-7a60-8b71-8c9d0e1f2a3b' \
  -H "Authorization: Bearer $ZAP_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "category": "Footers"
}'
Set ZAP_API_KEY in your environment.
Response 200 OK
{
  "id": "019a1f61-4e5f-7a60-8b71-8c9d0e1f2a3b",
  "name": "Footer",
  "category": "Footers",
  "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-23T09:30:00Z"
}