Webhook events
Every event a webhook can fire on, and the payload it sends for each
Use these events as the trigger of a workflow with a Webhook step. Setting one up is covered in Webhooks.
Internal events
Plunk automatically tracks a set of internal events that you can use as workflow triggers. These events cannot be manually tracked via the API — they are generated by the system.
Email events
| Event | Description |
|---|---|
email.sent | An email was successfully sent |
email.delivery | An email was delivered to the recipient |
email.open | A contact opened an email. Opens SES marks as automated are left out |
email.click | A contact clicked a link in an email |
email.bounce | An email bounced (hard or soft bounce) |
email.complaint | A contact marked an email as spam |
email.received | An email was received at your verified domain (requires inbound email setup) |
Contact events
| Event | Description |
|---|---|
contact.subscribed | A contact's subscription status changed to subscribed |
contact.unsubscribed | A contact's subscription status changed to unsubscribed |
Segment events
| Event | Description |
|---|---|
segment.<name>.entry | A contact entered a segment |
segment.<name>.exit | A contact exited a segment |
Segment event names
Segment events use a slugified version of the segment name. For example, a segment called "VIP Users" would produce
the events segment.vip-users.entry and segment.vip-users.exit.
Webhook payload
When using the default payload (no custom body configured), Plunk sends a JSON request with the following structure:
{
"contact": {
"email": "user@example.com",
"subscribed": true,
"data": {
"name": "John",
"plan": "pro"
}
},
"workflow": {
"id": "wf_abc123",
"name": "Bounce Notifications"
},
"execution": {
"id": "exec_xyz789",
"startedAt": "2025-01-15T10:30:00.000Z"
},
"event": {
"subject": "Welcome to Plunk",
"from": "hello@example.com",
"fromName": "Plunk Team",
"messageId": "ses-message-id",
"emailId": "ac32f08e-c6b9-45d3-9824-a73dff1e3bbf",
"templateId": null,
"campaignId": "camp_abc123",
"sourceType": "CAMPAIGN",
"bounceType": "Permanent",
"bouncedAt": "2025-01-15T10:30:00.000Z"
}
}The event field contains the data associated with the event that triggered the workflow. The exact contents depend on the event type.
Event data by type
Email events
Most email events share a common set of base fields:
Prop
Type
In addition to these base fields, each event includes the following event-specific fields. The base fields above (subject, from, fromName, messageId, emailId, templateId, campaignId, sourceType) are present on every email event in addition to the event-specific fields shown below.
{
"subject": "Welcome to Plunk",
"from": "hello@example.com",
"fromName": "Plunk Team",
"messageId": "ses-message-id",
"emailId": "ac32f08e-c6b9-45d3-9824-a73dff1e3bbf",
"templateId": null,
"campaignId": null,
"sourceType": "TRANSACTIONAL",
"sentAt": "2025-01-15T10:30:00.000Z"
}Prop
Type
Contact events
contact.subscribed and contact.unsubscribed carry no event data by default. The event field will be an empty object {}.
The exception is when an unsubscription is triggered automatically by an email bounce or complaint — in that case event includes a reason field:
{
"reason": "bounce"
}Prop
Type
Segment events
Both segment.<name>.entry and segment.<name>.exit include:
{
"segmentId": "seg_abc123",
"segmentName": "VIP Users"
}Prop
Type
Custom events
Custom events tracked via the API include whatever data you passed in the data field when calling track.
No event data
For events that carry no data, the event field will be an empty object {}.