Skip to content
Docs

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_idstring

Event 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.

typestring

Always template.created.

objectobject

The template version the event describes. Its fields are listed below.

data.objectobject

The same object again, in the shape that the Events API returns in data.

Template object

idstring

Template version ID (tem_…).

objectstring

Always template.

namestring

Template name.

aliasstring

Alias shared by all versions of the template.

fromstring | null

Default sender.

subjectstring | null

Default subject line.

reply_tostring[] | null

Default reply-to addresses.

htmlstring | null

HTML body.

textstring | null

Plain-text body.

editorstring

html, text, dragit or tiptap.

published_atstring | null

When this version was published, or null if it isn’t the published version.

created_atstring

When the version was created, in ISO 8601 with a UTC offset.

updated_atstring

When the version was last updated.

JSON
{
  "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_idstring

Event 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.

typestring

Always template.updated.

objectobject

The template version the event describes. Its fields are listed below.

data.objectobject

The same object again, in the shape that the Events API returns in data.

Template object

idstring

Template version ID (tem_…).

objectstring

Always template.

namestring

Template name.

aliasstring

Alias shared by all versions of the template.

fromstring | null

Default sender.

subjectstring | null

Default subject line.

reply_tostring[] | null

Default reply-to addresses.

htmlstring | null

HTML body.

textstring | null

Plain-text body.

editorstring

html, text, dragit or tiptap.

published_atstring | null

When this version was published, or null if it isn’t the published version.

created_atstring

When the version was created, in ISO 8601 with a UTC offset.

updated_atstring

When the version was last updated.

JSON
{
  "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_idstring

Event 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.

typestring

Always template.deleted.

objectobject

The template version the event describes. Its fields are listed below.

data.objectobject

The same object again, in the shape that the Events API returns in data.

Template object

idstring

Template version ID (tem_…).

objectstring

Always template.

namestring

Template name.

aliasstring

Alias shared by all versions of the template.

fromstring | null

Default sender.

subjectstring | null

Default subject line.

reply_tostring[] | null

Default reply-to addresses.

htmlstring | null

HTML body.

textstring | null

Plain-text body.

editorstring

html, text, dragit or tiptap.

published_atstring | null

When this version was published, or null if it isn’t the published version.

created_atstring

When the version was created, in ISO 8601 with a UTC offset.

updated_atstring

When the version was last updated.

JSON
{
  "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"
    }
  }
}

Was this page helpful?

Thanks for the feedback.

Thanks, we read every message.