Template events
Template versions created, updated, published or deleted.
template.created
Sent when a template version is created: with Create a template, by importing a template in the dashboard, or by saving a campaign as a template. A version created for a new alias is published right away; check published_at.
Webhook requests carry a JSON array of events like this one; see Webhook requests.
Fields
event_idstringEvent ID (evt_…). A retried request carries the same ID, so use it to skip events you already handled. You can also look the event up with Retrieve an event.
typestringAlways template.created.
objectobjectThe template version the event describes. Its fields are listed below.
data.objectobjectThe same object again, in the shape that the Events API returns in data.
Template object
idstringTemplate version ID (tem_…).
objectstringAlways template.
namestringTemplate name.
aliasstringAlias shared by all versions of the template.
fromstring | nullDefault sender.
subjectstring | nullDefault subject line.
reply_tostring[] | nullDefault reply-to addresses.
htmlstring | nullHTML body.
textstring | nullPlain-text body.
editorstringhtml, text, dragit or tiptap.
published_atstring | nullWhen this version was published, or null if it isn’t the published version.
created_atstringWhen the version was created, in ISO 8601 with a UTC offset.
updated_atstringWhen the version was last updated.
{
"event_id": "evt_2xLc9Rr4Tn6Wb1Qm8Ks3Vf0Hd7a",
"type": "template.created",
"object": {
"id": "tem_2xKx7M2c9wQe3kHhJ8sVtY1pZ0a",
"object": "template",
"name": "Welcome email",
"alias": "welcome-email",
"from": "Acme <hello@acme.com>",
"subject": "Welcome to Acme, {{ first_name }}",
"reply_to": [
"support@acme.com"
],
"html": "<h1>Welcome, {{ first_name }}</h1>",
"text": "Welcome, {{ first_name }}",
"editor": "html",
"published_at": "2026-09-30T10:30:00.482119+00:00",
"created_at": "2026-09-30T10:30:00.482119+00:00",
"updated_at": "2026-09-30T10:30:00.482119+00:00"
},
"data": {
"object": {
"id": "tem_2xKx7M2c9wQe3kHhJ8sVtY1pZ0a",
"object": "template",
"name": "Welcome email",
"alias": "welcome-email",
"from": "Acme <hello@acme.com>",
"subject": "Welcome to Acme, {{ first_name }}",
"reply_to": [
"support@acme.com"
],
"html": "<h1>Welcome, {{ first_name }}</h1>",
"text": "Welcome, {{ first_name }}",
"editor": "html",
"published_at": "2026-09-30T10:30:00.482119+00:00",
"created_at": "2026-09-30T10:30:00.482119+00:00",
"updated_at": "2026-09-30T10:30:00.482119+00:00"
}
}
}template.updated
Sent when a template version changes with Update a template. Publishing also sends this event: once for the version you publish and once for each version of the alias that was unpublished. Use published_at to tell them apart.
Webhook requests carry a JSON array of events like this one; see Webhook requests.
Fields
event_idstringEvent ID (evt_…). A retried request carries the same ID, so use it to skip events you already handled. You can also look the event up with Retrieve an event.
typestringAlways template.updated.
objectobjectThe template version the event describes. Its fields are listed below.
data.objectobjectThe same object again, in the shape that the Events API returns in data.
Template object
idstringTemplate version ID (tem_…).
objectstringAlways template.
namestringTemplate name.
aliasstringAlias shared by all versions of the template.
fromstring | nullDefault sender.
subjectstring | nullDefault subject line.
reply_tostring[] | nullDefault reply-to addresses.
htmlstring | nullHTML body.
textstring | nullPlain-text body.
editorstringhtml, text, dragit or tiptap.
published_atstring | nullWhen this version was published, or null if it isn’t the published version.
created_atstringWhen the version was created, in ISO 8601 with a UTC offset.
updated_atstringWhen the version was last updated.
{
"event_id": "evt_2xLc9Rr4Tn6Wb1Qm8Ks3Vf0Hd7a",
"type": "template.updated",
"object": {
"id": "tem_2xKx7M2c9wQe3kHhJ8sVtY1pZ0a",
"object": "template",
"name": "Welcome email",
"alias": "welcome-email",
"from": "Acme <hello@acme.com>",
"subject": "Welcome to Acme, {{ first_name }}",
"reply_to": [
"support@acme.com"
],
"html": "<h1>Welcome, {{ first_name }}</h1>",
"text": "Welcome, {{ first_name }}",
"editor": "html",
"published_at": "2026-09-30T10:30:00.482119+00:00",
"created_at": "2026-09-30T10:30:00.482119+00:00",
"updated_at": "2026-10-01T10:02:14.307000+00:00"
},
"data": {
"object": {
"id": "tem_2xKx7M2c9wQe3kHhJ8sVtY1pZ0a",
"object": "template",
"name": "Welcome email",
"alias": "welcome-email",
"from": "Acme <hello@acme.com>",
"subject": "Welcome to Acme, {{ first_name }}",
"reply_to": [
"support@acme.com"
],
"html": "<h1>Welcome, {{ first_name }}</h1>",
"text": "Welcome, {{ first_name }}",
"editor": "html",
"published_at": "2026-09-30T10:30:00.482119+00:00",
"created_at": "2026-09-30T10:30:00.482119+00:00",
"updated_at": "2026-10-01T10:02:14.307000+00:00"
}
}
}template.deleted
Sent when a template version is deleted with Delete a template. The payload is the version as it was before it was deleted. If it was the published version, the alias has no published version until you publish another one.
Webhook requests carry a JSON array of events like this one; see Webhook requests.
Fields
event_idstringEvent ID (evt_…). A retried request carries the same ID, so use it to skip events you already handled. You can also look the event up with Retrieve an event.
typestringAlways template.deleted.
objectobjectThe template version the event describes. Its fields are listed below.
data.objectobjectThe same object again, in the shape that the Events API returns in data.
Template object
idstringTemplate version ID (tem_…).
objectstringAlways template.
namestringTemplate name.
aliasstringAlias shared by all versions of the template.
fromstring | nullDefault sender.
subjectstring | nullDefault subject line.
reply_tostring[] | nullDefault reply-to addresses.
htmlstring | nullHTML body.
textstring | nullPlain-text body.
editorstringhtml, text, dragit or tiptap.
published_atstring | nullWhen this version was published, or null if it isn’t the published version.
created_atstringWhen the version was created, in ISO 8601 with a UTC offset.
updated_atstringWhen the version was last updated.
{
"event_id": "evt_2xLc9Rr4Tn6Wb1Qm8Ks3Vf0Hd7a",
"type": "template.deleted",
"object": {
"id": "tem_2xKx7M2c9wQe3kHhJ8sVtY1pZ0a",
"object": "template",
"name": "Welcome email",
"alias": "welcome-email",
"from": "Acme <hello@acme.com>",
"subject": "Welcome to Acme, {{ first_name }}",
"reply_to": [
"support@acme.com"
],
"html": "<h1>Welcome, {{ first_name }}</h1>",
"text": "Welcome, {{ first_name }}",
"editor": "html",
"published_at": "2026-09-30T10:30:00.482119+00:00",
"created_at": "2026-09-30T10:30:00.482119+00:00",
"updated_at": "2026-09-30T10:30:00.482119+00:00"
},
"data": {
"object": {
"id": "tem_2xKx7M2c9wQe3kHhJ8sVtY1pZ0a",
"object": "template",
"name": "Welcome email",
"alias": "welcome-email",
"from": "Acme <hello@acme.com>",
"subject": "Welcome to Acme, {{ first_name }}",
"reply_to": [
"support@acme.com"
],
"html": "<h1>Welcome, {{ first_name }}</h1>",
"text": "Welcome, {{ first_name }}",
"editor": "html",
"published_at": "2026-09-30T10:30:00.482119+00:00",
"created_at": "2026-09-30T10:30:00.482119+00:00",
"updated_at": "2026-09-30T10:30:00.482119+00:00"
}
}
}