Funnel Webhooks

Send webhook postbacks to external systems when funnel events occur.

OptiPub can send webhook postbacks to external URLs when funnel events fire. This lets you notify third-party systems β€” such as CRMs, analytics platforms, or custom backends β€” in real time when subscribers take actions like signing up, opening an email, or clicking a link.

Webhooks are sent using the Post To URL funnel action, which delivers a JSON payload containing the subscription, subscriber, email, and event data.

Setting Up a Funnel Webhook

Step 1. Create or edit a funnel.

Open an existing funnel or create a new one in Marketing > Funnels.

Step 2. Add a trigger event.

Choose the funnel event that should trigger the webhook (e.g., New Subscription, Email Opened, Email Clicked). Click the + button on the event grid to add one.

Step 3. Add the "Post To URL" action.

Click the + button under your trigger event and select Make Post Request to Url from the action list.

Choosing the 'Make Post Request to Url' funnel action.

Selecting the webhook action in the funnel builder.

Step 4. Configure the webhook.

FieldDescription
NameInternal label for the action (not visible to subscribers).
URLThe full endpoint URL including https://. This is where OptiPub will POST the JSON payload.
Only OnceWhen enabled, the webhook fires only once per subscriber for this funnel. Useful for avoiding duplicate notifications.
Send Only If ActiveWhen enabled, the webhook only fires if the subscription is still active.

Step 5. Set the timing.

Choose when the webhook should fire after the trigger event:

OptionBehavior
ImmediatelyFires as soon as the event occurs.
Specific Day / TimeFires on a specific day and time after the event.
DelayedFires after a set delay (e.g., 30 minutes, 2 hours).
Delayed at a Specific TimeFires after a set number of days, at a specific time.
Choosing the time the action fires with the time menu.

Timing options for the webhook action.

Step 6. Save.

Click OK to add the action, then Save the funnel.

Webhook Payload

When a webhook fires, OptiPub POSTs a JSON payload to the configured URL. The payload includes the full subscription, subscriber, email, and event context.

{
    "id": 715462777,
    "active": true,
    "email_id": 10048162,
    "publication_id": 7,
    "subscriber_id": 57343261,
    "started_at": "2024-10-17 16:11:50",
    "ended_at": null,
    "deleted_at": null,
    "created_at": "2024-10-17T16:11:50.000000Z",
    "updated_at": "2024-10-17T16:11:50.000000Z",
    "publication": {
        "id": 7,
        "name": "OptiPub Daily",
        "active": true,
        "code": "opd"
    },
    "subscriber": {
        "id": 57343261,
        "created_at": "2024-10-17T16:11:50.000000Z",
        "updated_at": "2024-10-17T16:11:50.000000Z",
        "emails": [
            {
                "id": 10048162,
                "email": "[email protected]",
                "md5": "01f6ea24e7137bd99a7b73436fd7ef30",
                "variables": [
                    { "id": 1002021, "name": "phone", "value": "5554445949" },
                    { "id": 1002703, "name": "first_name", "value": "John" },
                    { "id": 1002707, "name": "last_name", "value": "Doe" }
                ]
            }
        ]
    },
    "email": {
        "id": 10048162,
        "email": "[email protected]",
        "md5": "01f6ea24e7137bd99a7b73436fd7ef30"
    },
    "event": {
        "event": "NewSubscription",
        "data": {
            "ip": "17.30.57.47",
            "effort_id": "809502",
            "variables": [
                { "name": "first_name", "value": "John" },
                { "name": "last_name", "value": "Doe" },
                { "name": "phone", "value": "5554445949" }
            ]
        }
    },
    "subscription": {
        "id": 715462777,
        "active": true,
        "email_id": 10048162,
        "publication_id": 7,
        "subscriber_id": 57343261,
        "started_at": "2024-10-17 16:11:50"
    }
}

The payload above is condensed for readability. The actual payload includes additional fields on publication, subscriber, email, and subscription objects.

Common Use Cases

Use CaseExample
CRM syncPOST new subscriber data to your CRM when they sign up.
Analytics trackingNotify your analytics platform when subscribers open or click.
Partner postbacksFire a conversion postback to an affiliate or ad network.
Slack/Teams alertsSend a notification to a webhook URL when a high-value event occurs.
Custom workflowsTrigger downstream automation in Zapier, Make, or a custom API.