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

Duplicate a template

POST/v1/templates/{id}/duplicate

Copy a template’s draft into a new, unpublished template named “… (copy)”, without the alias.

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

Path parameters

idstringrequired
Template id or alias.

Errors

test_key_restrictedHTTP 403
test-mode keys can send test email and read, not change the account: use a live key
not_foundHTTP 404
Unknown template.
POST/v1/templates/{id}/duplicate
curl -X POST 'https://zapsmtp.xyz/v1/templates/welcome/duplicate' \
  -H "Authorization: Bearer $ZAP_API_KEY"
Set ZAP_API_KEY in your environment.
Response 201 Created
{
  "object": "template",
  "id": "019a1f52-3e4f-7a5b-8c6d-7e8f9a0b1c2d",
  "name": "Welcome (copy)",
  "alias": null,
  "status": "draft",
  "has_unpublished_changes": false,
  "published_at": null,
  "published": null
}