Tell Pocketflows a customer opted out
Of everything
To stop every campaign and trigger from reaching a customer, now and in the future, unsubscribe them with thefuture type:
unsubscribed value is future.
The
all type is narrower than its name suggests: it unsubscribes the customer only from the
campaigns and triggers they are part of right now, and new campaigns and triggers can still reach
them. To opt a customer out of everything, use future.Of one campaign or trigger
"type": "campaign" with a campaign_id for a campaign.
Undo an opt-out
Resubscribe the customer withPOST /customers/:id/resubscribe. It accepts the future,
campaign and trigger types:
- To undo
future, resubscribe withfuture. This doesn’t undo unsubscribes from individual campaigns or triggers. - To undo a single campaign or trigger, resubscribe with
campaignand acampaign_id, ortriggerand atrigger_id. While the customer is unsubscribed withfuture, this returns422: resubscribe them withfuturefirst. - To undo
all, there is noalltype to resubscribe with. Anallunsubscribe is recorded as one unsubscribe for each campaign and trigger the customer was part of, so callGET /customers/:id/unsubscribe_infoand resubscribe the customer to each campaign inunsubscribed_campaignsand each trigger inunsubscribed_triggers.
How customers opt out through Pocketflows
- Email. By default, emails from campaigns and triggers include an unsubscribe link, and supported
senders also add a one-click unsubscribe header for mail apps. Either way, the customer is
unsubscribed with the
futuretype. - SMS. When a customer replies STOP, Pocketflows adds them to the unsubscribe list of the phone
number they replied to, and texts from that number skip them. Replying START removes them again.
STOP doesn’t change the customer’s
unsubscribedvalue.
Find out when a customer unsubscribes
Subscribe to thecustomer.unsubscribe webhook event.
It’s sent when a customer unsubscribes through an email link, through an
unsubscribe embed, or through the API. It is not sent when a
customer replies STOP to a text.
To check a single customer, call GET /customers/:id/unsubscribe_info. unsubscribed_from_all is
true when the customer is unsubscribed with future, and unsubscribed_campaigns and
unsubscribed_triggers list any individual unsubscribes.
Build your own unsubscribe page
To let customers opt out inside your product, create an unsubscribe embed for the customer and show its URL:url for a hosted page with an “Unsubscribe from all” button, which you can
link to or show in an iframe. Submitting it unsubscribes the customer with the future type.
Related
- Sending semantics for every check Pocketflows runs before it sends.