Three kinds of webhooks
| What | Direction | Set up in |
|---|---|---|
| Your website’s webhook | GetsetNews calls one address of yours, signed, for the events you pick | Integrations → Webhooks |
| Webhook subscriptions | GetsetNews calls any number of addresses that apps asked for through the API (Zapier uses these) | The API |
| Webhook received | Another app calls GetsetNews and starts an automation | The automation builder |
The automation builder also has a Send webhook step, which calls any address as part of an automation.
Your website’s webhook
Each brand can send its events to one address, for example your own backend.
- In GetsetNews, open Integrations and go to Webhooks.
- Enter the address (it must be public), pick the events, and save. Keep the secret it shows: you use it to check that a call really came from GetsetNews.
- Press Send test to check your side answers.
What is sent
A JSON POST for every event:
POST /your-address HTTP/1.1
Content-Type: application/json
User-Agent: EmailMarketing-Webhooks/1.0
X-Webhook-Event: emailmarketing.contact_created
X-Webhook-Signature: sha256=5d2c0f…
{
"event": "emailmarketing.contact_created",
"data": { "contact_id": 1024, "email": "[email protected]", "source": "form" },
"sent_at": "2026-11-21T10:15:00+00:00"
}
data carries the IDs of what the event is about (contact_id, campaign_id, automation_id, list_id) and, where known, the email. Use the API to read more about the contact.
Events
| Event | When | Data |
|---|---|---|
emailmarketing.contact_created | A contact is added and subscribed | contact_id, email, source |
emailmarketing.contact_confirmed | Double opt-in confirmed | contact_id, list_id |
emailmarketing.contact_unsubscribed | A contact unsubscribed | contact_id, email, campaign_id or source |
emailmarketing.email_bounced | An email bounced | email, type (hard / soft), campaign_id |
emailmarketing.email_complained | Marked as spam | email, campaign_id |
emailmarketing.email_opened | First open of a campaign email | contact_id, campaign_id |
emailmarketing.link_clicked | A link in an email was clicked | contact_id, campaign_id, url |
emailmarketing.campaign_sent | A campaign finished sending | campaign_id, campaign_name, list_id |
automation.contact_enrolled | A contact entered an automation | automation_id, contact_id, trigger |
automation.contact_completed | A contact finished an automation | automation_id, contact_id |
Check the signature
X-Webhook-Signature is sha256= followed by the HMAC-SHA256 of the raw request body, made with your secret. Compute it from the exact bytes you received, before parsing the JSON, and compare in constant time.
PHP
<?php
$body = file_get_contents('php://input');
$secret = getenv('GETSETNEWS_WEBHOOK_SECRET');
$sent = $_SERVER['HTTP_X_WEBHOOK_SIGNATURE'] ?? '';
$good = 'sha256=' . hash_hmac('sha256', $body, $secret);
if (!hash_equals($good, $sent)) {
http_response_code(401);
exit;
}
$event = json_decode($body, true);
// ... handle $event['event'] and $event['data'] ...
http_response_code(200);
Node.js (Express)
const crypto = require('crypto');
const express = require('express');
const app = express();
app.post('/getsetnews', express.raw({ type: 'application/json' }), (req, res) => {
const good = 'sha256=' + crypto.createHmac('sha256', process.env.GETSETNEWS_WEBHOOK_SECRET)
.update(req.body).digest('hex');
const sent = req.get('X-Webhook-Signature') || '';
if (sent.length !== good.length || !crypto.timingSafeEqual(Buffer.from(sent), Buffer.from(good))) {
return res.sendStatus(401);
}
const event = JSON.parse(req.body);
// ... handle event.event and event.data ...
res.sendStatus(200);
});
Webhook subscriptions
Apps ask for these through the API (POST /hooks) with an API key; each one names an event and an address. The Zapier app uses them for its instant triggers. They belong to the key’s brand and end when the key is revoked.
Events
| Event | When | Extra fields |
|---|---|---|
contact.created | A contact is added and subscribed | source |
contact.confirmed | Double opt-in confirmed | list_id |
contact.unsubscribed | A contact unsubscribed | source or campaign_* |
contact.tag_added | A tag was added to a contact | tag |
email.opened | First open of a campaign email | campaign_id, campaign_name, campaign_subject |
email.clicked | A link in an email was clicked | campaign_*, url |
email.bounced | An email bounced | type, campaign_* |
email.complained | Marked as spam | campaign_* |
campaign.sent | A campaign finished sending | campaign_*, list_id (no contact) |
automation.entered | A contact entered an automation | automation_id, automation_name, trigger |
automation.completed | A contact finished an automation | automation_id, automation_name |
What is sent
A flat JSON POST with the whole contact, so no-code tools can map it without another lookup. id is unique per delivery; use it to ignore a repeat.
{
"id": "5f1c2a9d8e7b6a5c4d3e2f10",
"event": "contact.tag_added",
"sent_at": "2026-11-21T10:15:00+00:00",
"contact": {
"id": 1024, "email": "[email protected]", "first_name": "Jane", "last_name": "Doe",
"phone": "", "status": "subscribed", "source": "form", "created_at": "2026-11-20 10:15:00",
"tags": ["customer", "vip"], "lists": ["Newsletter"], "fields": { "city": "Pune" }
},
"tag": "vip"
}
These calls carry X-Webhook-Event but no signature: the address itself is the secret, so make it long and hard to guess. Answer 410 Gone to stop a subscription from your side.
Delivery and retries
- Events are queued and sent within about a minute, so a slow receiver never slows down signups or sending.
- Any
2xxanswer within 10 seconds counts as delivered. Redirects are not followed. - Anything else is tried again after 1, 4, 9, 16 and 25 minutes, six attempts in all, then given up.
- A delivery can arrive more than once and events can arrive out of order. Use the IDs (and
idfor subscriptions) to stay safe. - Integrations → Webhooks shows how many are waiting, sent and failed, and the last error.
Webhook received (start an automation)
Use this when another app should start a GetsetNews automation, for example a booking tool, a payment page or a form builder.
- Create an automation and choose the trigger Webhook received.
- Copy its address:
https://app.getsetnews.com/em/in/<token>. The token is the key, so keep the address private. - Send one test call from the other app. GetsetNews keeps the last call as a sample.
- In the trigger, pick which fields hold the email and name, and switch the automation on.
It accepts GET, POST and PUT, with JSON, form data or query parameters. The contact is found or added from the email, and everything that was sent can be used later in the automation as {{trigger.field}} (for example {{trigger.order.id}} in a Send webhook step or an alert).
curl -X POST https://app.getsetnews.com/em/in/your_token \
-H "Content-Type: application/json" \
-d '{ "email": "[email protected]", "name": "Jane", "order": { "id": "A-1001", "total": 49 } }'
Send webhook (an automation step)
The Send webhook step calls any public address while a contact goes through an automation: GET, POST, PUT, PATCH or DELETE, with headers, a JSON, form or text body, and sign-in (a bearer token, basic sign-in or a header; secrets are stored encrypted). Contact details and {{trigger.*}} values can go in the address, headers and body. Values from the answer can be saved on the contact or used in later steps as {{response.*}}, and the step can stop the automation if the call fails. Use Test in the step to see the real answer before switching on.