Help docs / Webhooks

Webhooks

Get told the moment something happens in GetsetNews, and let other apps start your automations.

Three kinds of webhooks

WhatDirectionSet up in
Your website’s webhookGetsetNews calls one address of yours, signed, for the events you pickIntegrations → Webhooks
Webhook subscriptionsGetsetNews calls any number of addresses that apps asked for through the API (Zapier uses these)The API
Webhook receivedAnother app calls GetsetNews and starts an automationThe 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.

  1. In GetsetNews, open Integrations and go to Webhooks.
  2. 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.
  3. 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

EventWhenData
emailmarketing.contact_createdA contact is added and subscribedcontact_id, email, source
emailmarketing.contact_confirmedDouble opt-in confirmedcontact_id, list_id
emailmarketing.contact_unsubscribedA contact unsubscribedcontact_id, email, campaign_id or source
emailmarketing.email_bouncedAn email bouncedemail, type (hard / soft), campaign_id
emailmarketing.email_complainedMarked as spamemail, campaign_id
emailmarketing.email_openedFirst open of a campaign emailcontact_id, campaign_id
emailmarketing.link_clickedA link in an email was clickedcontact_id, campaign_id, url
emailmarketing.campaign_sentA campaign finished sendingcampaign_id, campaign_name, list_id
automation.contact_enrolledA contact entered an automationautomation_id, contact_id, trigger
automation.contact_completedA contact finished an automationautomation_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

EventWhenExtra fields
contact.createdA contact is added and subscribedsource
contact.confirmedDouble opt-in confirmedlist_id
contact.unsubscribedA contact unsubscribedsource or campaign_*
contact.tag_addedA tag was added to a contacttag
email.openedFirst open of a campaign emailcampaign_id, campaign_name, campaign_subject
email.clickedA link in an email was clickedcampaign_*, url
email.bouncedAn email bouncedtype, campaign_*
email.complainedMarked as spamcampaign_*
campaign.sentA campaign finished sendingcampaign_*, list_id (no contact)
automation.enteredA contact entered an automationautomation_id, automation_name, trigger
automation.completedA contact finished an automationautomation_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 2xx answer 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 id for 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.

  1. Create an automation and choose the trigger Webhook received.
  2. Copy its address: https://app.getsetnews.com/em/in/<token>. The token is the key, so keep the address private.
  3. Send one test call from the other app. GetsetNews keeps the last call as a sample.
  4. 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.