Developers
Webhooks.
Tailgator sends a signed POST to your URL when a guest RSVPs, claims a supply, or an event is created or cancelled. Webhooks are part of the Pro and Crew plans.
Setup
Add an endpoint at /settings/webhooks or with POST /webhooks. Each endpoint gets its own signing secret, starting whsec_, returned in full only when the endpoint is created.
Endpoints receive events for things you host. Choose events when creating the endpoint; an empty list means every event. Pause one with active: false.
The request
A JSON body with the event name, its payload, a delivery id, and the Unix timestamp it was signed at. The same timestamp is in the signature header.
Content-Type: application/json
Party-People-Signature: t=1756562700,v1=5f2b9c...e81a{
"event": "supply.claimed",
"payload": {
"eventId": "cm5f0x2k10001a8b3c4d5e6f7",
"shareCode": "K7M2QX9PRT",
"supplyId": "cm5f1c3d40005a8b3c4d5e6f7",
"supplyName": "Bag of ice",
"claimerEmail": "sam@example.com",
"claimerName": "Sam"
},
"deliveryId": "cm5f1g7h80009a8b3c4d5e6f7",
"t": 1756562700
}Respond with any 2xx status to acknowledge. Anything else, or no response, counts as a failure.
Events
event.created
An event was created in your crew.
{
"eventId": "cm5f0x2k10001a8b3c4d5e6f7",
"shareCode": "K7M2QX9PRT",
"title": "Home opener tailgate"
}event.cancelled
An event was cancelled. Guests have been emailed.
{
"eventId": "cm5f0x2k10001a8b3c4d5e6f7",
"shareCode": "K7M2QX9PRT",
"title": "Home opener tailgate"
}rsvp.created
A guest RSVPed. From the public event page the payload carries the fields below; an RSVP recorded by a host through the API sends eventId, rsvpId, status and email.
{
"eventId": "cm5f0x2k10001a8b3c4d5e6f7",
"shareCode": "K7M2QX9PRT",
"rsvpId": "cm5f1a0b20003a8b3c4d5e6f7",
"email": "sam@example.com",
"name": "Sam",
"status": "going",
"plusOnes": 1
}supply.claimed
A guest claimed a supply item.
{
"eventId": "cm5f0x2k10001a8b3c4d5e6f7",
"shareCode": "K7M2QX9PRT",
"supplyId": "cm5f1c3d40005a8b3c4d5e6f7",
"supplyName": "Bag of ice",
"claimerEmail": "sam@example.com",
"claimerName": "Sam"
}supply.released
A claimed supply item was released and is open again. Claimer fields are null.
{
"eventId": "cm5f0x2k10001a8b3c4d5e6f7",
"shareCode": "K7M2QX9PRT",
"supplyId": "cm5f1c3d40005a8b3c4d5e6f7",
"supplyName": "Bag of ice",
"claimerEmail": null,
"claimerName": null
}message.posted
A message was posted on the event thread. A host post sends kind, authorId and body; a guest post from the public page sends shareCode and from instead.
{
"eventId": "cm5f0x2k10001a8b3c4d5e6f7",
"messageId": "cm5f1d4e50006a8b3c4d5e6f7",
"kind": "update",
"authorId": "cm5f0wq7d0000z9y8x7w6v5u4",
"body": "Parking opens at 9. See you there."
}The settings page also lists rsvp.updated, event.updated and poll.created. You can subscribe to them, but Tailgator does not send them yet.
Verifying signatures
The Party-People-Signature header has the form t=<timestamp>,v1=<signature>. The signature is a hex HMAC-SHA256 of <timestamp>.<raw body>, keyed with the endpoint's full secret, whsec_ prefix included.
- Read the raw request body before parsing it. Re-serialized JSON will not match.
- Split the header into
tandv1. - Compute the HMAC over the timestamp, a period, and the raw body.
- Compare in constant time, and reject timestamps far from now to block replays.
import { createHmac, timingSafeEqual } from "node:crypto";
import express from "express";
const SECRET = process.env.TAILGATOR_WEBHOOK_SECRET; // the full whsec_... value
const TOLERANCE_SECONDS = 5 * 60;
function verify(rawBody, header) {
const parts = Object.fromEntries(
header.split(",").map((kv) => kv.split("=", 2))
);
const t = Number(parts.t);
if (!t || !parts.v1) return false;
if (Math.abs(Date.now() / 1000 - t) > TOLERANCE_SECONDS) return false;
const expected = createHmac("sha256", SECRET)
.update(`${t}.${rawBody}`)
.digest("hex");
const a = Buffer.from(expected, "hex");
const b = Buffer.from(parts.v1, "hex");
return a.length === b.length && timingSafeEqual(a, b);
}
const app = express();
// Verify against the raw bytes, before any JSON parsing.
app.post("/hooks/tailgator", express.raw({ type: "application/json" }), (req, res) => {
const raw = req.body.toString("utf8");
if (!verify(raw, req.get("Party-People-Signature") ?? "")) {
return res.status(400).send("bad signature");
}
const { event, payload, deliveryId } = JSON.parse(raw);
// deliveryId is stable across retries: use it to skip duplicates.
console.log(event, deliveryId, payload);
res.sendStatus(200);
});
app.listen(3000);import hashlib
import hmac
import json
import os
import time
from flask import Flask, abort, request
SECRET = os.environ["TAILGATOR_WEBHOOK_SECRET"].encode() # the full whsec_... value
TOLERANCE_SECONDS = 5 * 60
app = Flask(__name__)
def verify(raw_body: bytes, header: str) -> bool:
parts = dict(kv.split("=", 1) for kv in header.split(",") if "=" in kv)
try:
t = int(parts["t"])
given = parts["v1"]
except (KeyError, ValueError):
return False
if abs(time.time() - t) > TOLERANCE_SECONDS:
return False
signed = f"{t}.".encode() + raw_body
expected = hmac.new(SECRET, signed, hashlib.sha256).hexdigest()
return hmac.compare_digest(expected, given)
@app.post("/hooks/tailgator")
def tailgator_hook():
raw = request.get_data() # raw bytes, before any JSON parsing
if not verify(raw, request.headers.get("Party-People-Signature", "")):
abort(400)
body = json.loads(raw)
# body["deliveryId"] is stable across retries: use it to skip duplicates.
print(body["event"], body["deliveryId"], body["payload"])
return "", 200The five-minute tolerance is a suggestion; Tailgator signs at send time, so a retry carries a fresh timestamp.
Retries
Deliveries go out from a queue that runs every 5 minutes, so expect a few minutes between the change and the request. A failed delivery is retried on a later run, at least 60 seconds after the last attempt, up to 6 attempts in total. After that it stops.
Order is not guaranteed, and the same delivery can occasionally arrive more than once. Use deliveryId to de-duplicate. Recent attempts and your response codes are listed by GET /webhooks/{id}/deliveries.
Slack and Discord
Point an endpoint at a Slack incoming webhook (hooks.slack.com) or a Discord webhook (discord.com/api/webhooks) and Tailgator sends a one-line message in that service's format instead of the JSON above. These requests are not signed, because the chat service is the receiver.