Skip to main content
POST
/
email
/
templates
Create template
curl --request POST \
  --url https://www.dench.com/api/v1/email/templates \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Intro outreach",
  "subject": "Hi {{firstName}}",
  "htmlBody": "<p>Hi {{firstName}}, saw your work at {{company}}.</p>"
}
'
{
  "templateId": "etpl_abc123"
}

Authorizations

Authorization
string
header
required

Workspace-scoped Dench API key from workspace settings. This is the same key used by DENCH_API_KEY in sandboxes.

Body

application/json
name
string
required
subject
string
required

Supports {{variable}} placeholders.

htmlBody
string
required

HTML body with {{variable}} placeholders.

textBody
string
status
enum<string>

Template lifecycle status. Defaults to active.

Available options:
draft,
active,
archived

Response

Successful response

templateId
string
required