Send a test of a template

Send a test of a template

POST/api/v1/email/templates/{id}/test-send

POST /email/templates/{id}/test-send
curl -X POST 'https://www.unitpost.com/api/v1/email/templates/tmpl_123/test-send' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'User-Agent: my-app/1.0' \
  -H 'Content-Type: application/json' \
  -d '{ }'
Response · 200
{
  "object": "template_test_send",
  "email_id": "email_123",
  "status": "queued",
  "dispatched": false,
  "unresolved_variables": [
    "string"
  ]
}

Render the template with sample variables and send ONE test email to to, exactly as a recipient would get it (footer included). With a verified sending domain it comes from test@<your domain> and may go to anyone; with none it comes from Unitpost's shared test address and only to your workspace's members (403 forbidden otherwise). unresolved_variables lists the ones with no sample value. Rate limited per workspace. Requires the emails:send capability.

Parameters1 field
FieldTypeDescription
idrequiredstring · path—
Request body3 fields
FieldTypeDescription
torequiredstring—
subjectstring—
variablesobject—
Response · 200 fields5 fields
FieldTypeDescription
objectrequiredenumtemplate_test_send—
email_idrequiredstringThe test email (`email_…`); retrieve it like any email.
statusrequiredstringThe test email's status, usually `queued`.
dispatchedrequiredbooleanFalse when this environment records sends without delivering them.
unresolved_variablesrequiredstring[]Variables with no sample value, sent as a literal `{{name}}`.
200401403404422429502

Search docs and guides

Search the docs and product guides.