Skip to main content
Pocketflows can deliver webhooks to your server whenever certain events occur in your project. This allows you to react to changes — such as a campaign being updated — without polling the API.

Payload shape

Every webhook delivery has the same top-level shape:
string
The ID of the event (prefixed pe_).
string
The event type. See the full list below.
object
The event payload. The shape depends on type.
Example:

Event types

Customer

customer.unsubscribe

Fires when a customer unsubscribes, through an email’s unsubscribe link, an unsubscribe embed, or POST /customers/:id/unsubscribe. It doesn’t fire when a customer replies STOP to a text. See Respect customer consent. data contains:
string
The ID of the customer’s business.
string
The ID of the customer.
string
future when the customer unsubscribed from all current and future campaigns and triggers, campaign for a single campaign, or trigger for a single trigger.
string
The ID of the campaign, when unsubscribe_type is campaign.
string
The ID of the trigger, when unsubscribe_type is trigger.
An unsubscribe with the all type sends one event for each campaign and trigger the customer was unsubscribed from.

Campaign

campaign.created

Fires when a new campaign is created. data is the Campaign object.

campaign.updated

Fires when an existing campaign is updated. data is the Campaign object.

campaign.deleted

Fires when a campaign is deleted. data is the Campaign object as it existed at the time of deletion.

Trigger

trigger.created

Fires when a new trigger is created. data is the Trigger object.

trigger.updated

Fires when an existing trigger is updated. data is the Trigger object.

trigger.deleted

Fires when a trigger is deleted. data is the Trigger object as it existed at the time of deletion.

Segment

segment.created

Fires when a new segment is created. data is the Segment object.

segment.updated

Fires when an existing segment is updated. data is the Segment object.

segment.deleted

Fires when a segment is deleted. data is the Segment object as it existed at the time of deletion.