---
title: Organisation webhooks | Space Works Events docs
description: Documentation index. Organisation webhooks in the Space Works Events documentation: developers.
url: https://spaceworkslabs.tech/docs/events/webhooks/
updated: 2026-10-30
---

[Space Works Events](https://spaceworkslabs.tech/docs/events/) Overview
- [Overview](https://spaceworkslabs.tech/docs/events/overview/)
- [Features](https://spaceworkslabs.tech/docs/events/features/)
- [Event permissions matrix](https://spaceworkslabs.tech/docs/events/permissions/)
Modules
- [Paid tickets](https://spaceworkslabs.tech/docs/events/payments/)
- [Team registration](https://spaceworkslabs.tech/docs/events/teams/)
- [Applications and shortlisting](https://spaceworkslabs.tech/docs/events/admission/)
- [Hackathon submissions, judging, and results](https://spaceworkslabs.tech/docs/events/hackathon/)
- [Mentor Desk](https://spaceworkslabs.tech/docs/events/mentor-desk/)
- [Event crew](https://spaceworkslabs.tech/docs/events/crew/)
- [Volunteer shifts and contributor hours](https://spaceworkslabs.tech/docs/events/volunteers/)
- [Ticket designer](https://spaceworkslabs.tech/docs/events/ticket-designer/)
- [Attendance confirmation ("Are you still coming?")](https://spaceworkslabs.tech/docs/events/attendance/)
- [Event finance](https://spaceworkslabs.tech/docs/events/finance/)
Install and run
- [Host the complete stack on a VPS](https://spaceworkslabs.tech/docs/events/deployment-vps/)
- [Production Docker deployment](https://spaceworkslabs.tech/docs/events/deployment-docker/)
- [Free-tier cloud deployment](https://spaceworkslabs.tech/docs/events/deployment-cloud/)
- [Netlify frontend with a Docker VPS backend](https://spaceworkslabs.tech/docs/events/deployment-split/)
- [Configuration](https://spaceworkslabs.tech/docs/events/configuration/)
- [Production operations](https://spaceworkslabs.tech/docs/events/production-operations/)
Developers
- [Machine API v1](https://spaceworkslabs.tech/docs/events/api/)
- [Organisation webhooks](https://spaceworkslabs.tech/docs/events/webhooks/)
[All docs](https://spaceworkslabs.tech/docs/)

Space Works Events · Developers

# Organisation webhooks

[Documentation index](https://github.com/SpaceWorks-Labs/SpaceWorks-Events/blob/4e3cf5a733517585bebd258a3cdd87d30d844863/docs/README.md)

Organisation owners and admins can send their organisation's events to their own systems. Space Works Events makes a signed`POST`request to each configured endpoint shortly after something happens: a registration, a status change, a check-in, a publish or cancellation, or a feedback submission.

Manage endpoints at**Settings → Webhooks**(`/dashboard/:orgSlug/settings/webhooks`). Only organisation`OWNER`s and`ADMIN`s can see or change them; members and co-organisers cannot, whatever grants they hold.

## Endpoints
- Up to**10 endpoints**per organisation.
- Each has a URL, an optional description (up to 200 characters), the event types it receives, and an on/off switch.
- Each has its own**signing secret**:`whsec_`followed by 32 random bytes (base64url). It is generated by the server, shown**once**(when the endpoint is created and each time it is rotated), and stored only as AES-256-GCM ciphertext under a key derived from`MFA_ENCRYPTION_KEY`with its own HKDF label (`spaceworks-org-webhook-signing-secret-v1`). It is never shown again, logged, or written to audit metadata.
- **Rotate secret**replaces the secret immediately; the next request is signed with the new one. Update your receiver straight after rotating.
- **Send test**sends a`ping`event now and shows the response.**Redeliver**resends a failed delivery with the same event id.
- The endpoint page lists the last 50 deliveries (time, event type, result, HTTP status, duration, attempts). Delivery history is kept for 30 days.

Creating, editing, rotating, enabling, disabling, deleting and automatic disabling are audited (`WEBHOOK_ENDPOINT_CREATED`,`WEBHOOK_ENDPOINT_UPDATED`,`WEBHOOK_SECRET_ROTATED`,`WEBHOOK_ENDPOINT_ENABLED`,`WEBHOOK_ENDPOINT_DISABLED`,`WEBHOOK_ENDPOINT_DELETED`,`WEBHOOK_ENDPOINT_AUTO_DISABLED`). Audit metadata records the host only, never the path, query, or secret. Changes share the`webhookManage`rate limit (30 per minute); test sends and redeliveries share`webhookTest`(20 per hour).

## Event types

| Type | Sent when |
| --- | --- |
| `registration.created` | Someone registers (any status: confirmed, waitlisted, pending approval, or pending payment for a paid ticket), or an organiser adds a guest |
| `registration.status_changed` | A registration is approved, declined (`REJECTED`), re-accepted, promoted from the waitlist (by an organiser or automatically after a cancellation), cancelled by the attendee (`CANCELLED`), removed by an organiser (`REMOVED`), or restored with**Undo**. On team events, whole-team changes send one event per member (`docs/TEAMS.md`) |
| `checkin.created` | An attendee is checked in at the entrance (desk, scan, door station, or offline sync) |
| `checkin.undone` | An entrance check-in is undone |
| `event.published` | An event goes live (create, edit, or the Overview**Publish event**button) |
| `event.cancelled` | An event's status is set to cancelled |
| `feedback.submitted` | Someone submits the event's feedback form |
| `application.status_changed` | An application ([Applications](https://spaceworkslabs.tech/docs/events/admission/) ) is offered a place, waitlisted, declined, accepted (a free place, or a paid place once paid), moves to the next stage (same status, new stage), expires, or is declined or withdrawn by the applicant. Its registrations also send`registration.status_changed` |
| `expense_claim.status_changed` | An expense claim is filed (`previousStatus`null), withdrawn, approved, rejected, paid, or its payment is reversed (back to`APPROVED`) (docs/FINANCE.md) |
| `ping` | **Send test**. Always delivered to the endpoint being tested; it cannot be subscribed to |

Paid tickets raise the same registration events:`registration.created`when an order is placed (pending payment),`registration.status_changed`from`PENDING_PAYMENT`when it is paid (online, by hand or waived), and`CANCELLED`when an order's tickets are cancelled (by the buyer, an organiser, or an event cancellation), including the members of a team cancelled with its team ticket.

Events are emitted from the server-side commit points only, after the database transaction has committed. Emitting only inserts queue rows in the background, so it never fails or slows the action that caused it.`event.*`covers standalone events; series status changes are not sent. Registration and check-in events cover series occurrences too (see`kind`below).

## Request format `POST /your/path HTTP/1.1 content-type: application/json user-agent: SpaceWorks-Webhooks/1 x-spaceworks-event-id: evt_3f1c0a9b7d2e4f6a8b9c0d1e2f3a4b5c x-spaceworks-event-type: registration.created x-spaceworks-signature: t=1792656000,v1=5d1c…(64 hex characters)`

Every body is one envelope: `{ "id": "evt_3f1c0a9b7d2e4f6a8b9c0d1e2f3a4b5c", "type": "registration.created", "createdAt": "2026-10-22T10:00:00.000Z", "organisation": { "id": "cmorg123", "slug": "acme" }, "data": { } }`
- `id`is stable for the event: retries and**Redeliver**send the same id, so receivers should de-duplicate on it.
- Deliveries can arrive out of order and, rarely, more than once. Use`createdAt`and the resource's own timestamps to order them.
- Respond with any`2xx`status within 10 seconds. Do the real work asynchronously if it can take longer.

## Payloads

Payloads are deliberately minimal, explicit objects that match the[machine API](https://spaceworkslabs.tech/docs/events/api/) participant and event DTOs: ids, statuses, timestamps, the event title and slug, and the attendee's display name.**They never contain email addresses or other contact details, user ids, registration or feedback answers, or ticket, check-in, certificate or invitation links and tokens.**The organisation owns its attendee data, but webhook URLs are configured by any admin and payloads leave the instance, so the same privacy line as the machine API applies; look up contact details in Space Works Events (for example the attendee CSV) when you need them.

The`event`object: `{ "kind": "event", "id": "cmevent123", "occurrenceId": null, "title": "Community Meetup", "slug": "community-meetup", "startDateTime": "2026-11-05T17:00:00.000Z", "endDateTime": "2026-11-05T19:00:00.000Z", "timezone": "Europe/London" }`

For a series occurrence,`kind`is`series_occurrence`,`id`is the series id,`occurrenceId`the occurrence id, and the times are the occurrence's.

The`registration`object (`displayName`falls back to`Participant`): `{ "id": "cmrsvp123", "status": "CONFIRMED", "displayName": "Ada Lovelace", "registeredAt": "2026-10-22T10:00:00.000Z", "checkedInAt": null, "crew": false }`

`crew`is`true`for an[event crew](https://spaceworkslabs.tech/docs/events/crew/) ticket: a free ticket for the organising team that never counts against capacity. Crew tickets are created as`CONFIRMED`(`registration.created`); converting an existing registration into a crew ticket sends`registration.status_changed`with`crew: true`(`previousStatus`can be`CONFIRMED`too); crew tickets leave as`CANCELLED`when an organiser removes the person from the crew. Receivers that count attendees against capacity should skip`crew: true`. The field was added with the event crew; receivers should ignore fields they don't know.

`status`is one of`CONFIRMED`,`WAITLISTED`,`PENDING_APPROVAL`,`PENDING_PAYMENT`(a paid ticket held while the buyer pays),`REJECTED`(declined),`CANCELLED`(cancelled by the attendee; the registration no longer exists) or`REMOVED`(removed by an organiser).

`data`per type:

| Type | `data` |
| --- | --- |
| `registration.created` | `{ event, registration }` |
| `registration.status_changed` | `{ event, registration, previousStatus }`(`registration.status`is the new status;`previousStatus`may be`null`when unknown) |
| `checkin.created` | `{ event, registration, checkedInAt }` |
| `checkin.undone` | `{ event, registration, undoneAt }` |
| `event.published`,`event.cancelled` | `{ event: { …event, status }, previousStatus }`(`status`and`previousStatus`are`DRAFT`,`PUBLISHED`,`HIDDEN`or`CANCELLED`;`previousStatus`is`null`for an event created in that state) |
| `feedback.submitted` | `{ event, feedback: { id, submittedAt } }`; no answers and no link to a registration, even for certificate-enabled feedback |
| `expense_claim.status_changed` | `{ event, claim: { id, kind, status, category, amountMinor, approvedMinor, currency, registrationId, policyId }, previousStatus }`; amounts in minor units; never the payee's name or email, the details, the note or receipts |
| `ping` | `{ endpointId, message }` |

Example`registration.status_changed`: `{ "id": "evt_9a8b7c6d5e4f30211203a4b5c6d7e8f9", "type": "registration.status_changed", "createdAt": "2026-10-22T11:30:00.000Z", "organisation": { "id": "cmorg123", "slug": "acme" }, "data": { "event": { "kind": "event", "id": "cmevent123", "occurrenceId": null, "title": "Community Meetup", "slug": "community-meetup", "startDateTime": "2026-11-05T17:00:00.000Z", "endDateTime": "2026-11-05T19:00:00.000Z", "timezone": "Europe/London" }, "registration": { "id": "cmrsvp123", "status": "CONFIRMED", "displayName": "Ada Lovelace", "registeredAt": "2026-10-22T10:00:00.000Z", "checkedInAt": null, "crew": false }, "previousStatus": "PENDING_APPROVAL" } }`

`application.status_changed`carries ids, status and stage only, never answers, scores, reviews or reviewers. Each recorded change has one event id, kept if queueing is retried, so it is queued once: `"data": { "event": { "kind": "event", "id": "cmevent123", "...": "..." }, "application": { "id": "cmapp123", "registrationId": "cmrsvp123", "teamId": null, "status": "OFFERED", "stage": { "id": "cmstage1", "position": 1, "name": "Review" } }, "previousStatus": "IN_REVIEW" }`

`registrationId`is the solo registration, or the team leader's for a team application.

The DTOs are strict Zod schemas (`lib/webhooks/payloads.ts`);`tests/unit/webhooks.test.ts`fails if a token, email, or answer field could appear.

## Verifying signatures

`x-spaceworks-signature`is`t=<unix seconds>,v1=<hex>`, where`<hex>`is the HMAC-SHA256 of the string`<t>.<raw request body>`, keyed with the full endpoint secret (including`whsec_`) as UTF-8. Verify against the**raw**body bytes before parsing JSON, compare in constant time, and reject old timestamps to limit replays: `import crypto from "node:crypto"; export function verifySpaceWorksWebhook(secret, signatureHeader, rawBody, toleranceSeconds = 300) { const parts = Object.fromEntries( String(signatureHeader ?? "").split(",").map((part) => { const index = part.indexOf("="); return [part.slice(0, index).trim(), part.slice(index + 1).trim()]; }), ); const timestamp = Number(parts.t); if (!Number.isInteger(timestamp) || !/^[0-9a-f]{64}$/.test(parts.v1 ?? "")) return false; if (Math.abs(Date.now() / 1000 - timestamp) > toleranceSeconds) return false; const expected = crypto.createHmac("sha256", secret).update(`${timestamp}.${rawBody}`, "utf8").digest(); return crypto.timingSafeEqual(expected, Buffer.from(parts.v1, "hex")); } // Express example: keep the raw body for verification. // app.post("/spaceworks-webhooks", express.raw({ type: "application/json" }), (req, res) => { // const raw = req.body.toString("utf8"); // if (!verifySpaceWorksWebhook(process.env.SPACEWORKS_WEBHOOK_SECRET, req.get("x-spaceworks-signature"), raw)) return res.sendStatus(400); // const event = JSON.parse(raw); // res.sendStatus(204); // queueWork(event); // de-duplicate on event.id // });`

`lib/webhooks/signature.ts`holds the same verifier, tested against a fixed vector.

## Delivery and retries
- Application status changes are marked sent and their deliveries queued in one transaction. Payload construction and endpoint queries use the same transaction connection, including on installations using`connection_limit=1`.
- Delivery rows (`WebhookDelivery`, one per endpoint and event) are processed every 15 seconds by the beat (`SWE_PROCESS_ROLE` `beat`or`all`), and by the protected`POST /api/internal/outbox`recovery trigger. Rows are claimed with`FOR UPDATE SKIP LOCKED`and finished under a lease, so replicas never send the same attempt twice; a lease older than 5 minutes is returned to the queue. Up to 25 rows are sent per pass, 5 at a time.
- Each request has a**10-second**timeout and a**256 KB**body cap. Redirects are**not followed**: a`3xx`is a failed delivery.
- Any`2xx`is success. Anything else (other status, timeout, connection or TLS error, blocked address) is a failure. Only a short, redacted excerpt of the response body (at most 120 characters, emails and token-like strings removed) is kept with the status code; the URL and secret never appear in errors.
- **Retries:**up to**8 attempts**over about a day. After failed attemptnthe next one waits 1 min, 5 min, 30 min, 1 h, 3 h, 6 h, then 12 h (≈ 22.6 h in total), each with ±20% jitter. After the eighth failure the delivery is marked failed; use**Redeliver**to try again.
- **Automatic disabling:**each failed attempt adds one to the endpoint's consecutive-failure counter and any success resets it. After**20 consecutive failed attempts**the endpoint is switched off (`Auto-disabled`in the UI, audited as`WEBHOOK_ENDPOINT_AUTO_DISABLED`), and its queued deliveries are marked failed. A queued delivery that had already failed keeps its own error after the switch-off (`Endpoint disabled after: HTTP 503`,`Endpoint disabled after: Blocked: …`), so the log still shows why the endpoint stopped. Nothing is emailed; the state shows on the Settings and Webhooks pages. Fix the receiver,**Send test**, then**Enable**(which resets the counter) and redeliver what you need.
- A disabled endpoint receives no new events. Switching one off marks its queued deliveries failed.
- Delivery history older than 30 days is purged by the retention job.

## Target rules (SSRF protection)

Webhook URLs are entered by tenant admins, so Space Works only sends to the public internet:
- `https://`only, on port**443**or**8443**(the common TLS ports; other ports are refused to avoid reaching arbitrary internal services through a public name).
- No user name or password in the URL; requests are authenticated by the signature instead. A`#fragment`is dropped.
- Host names`localhost`,`*.localhost`,`*.local`,`*.internal`,`*.home.arpa`,`*.localdomain`and single-label names are refused, as are IP literals in any form (decimal`2130706433`, hex`0x7f000001`, octal`0177.0.0.1`, IPv6 and IPv4-mapped IPv6 such as`[::ffff:127.0.0.1]`).
- Every address the host resolves to must be public unicast. Blocked:`0.0.0.0/8`,`10/8`,`100.64/10`(CGNAT),`127/8`,`169.254/16`(link-local and the`169.254.169.254`metadata service),`172.16/12`,`192.0.0/24`,`192.0.2/24`,`192.88.99/24`,`192.168/16`,`198.18/15`,`198.51.100/24`,`203.0.113/24`,`224/4`multicast,`240/4`reserved and broadcast; IPv6 unspecified, loopback, IPv4-compatible, anything outside`2000::/3`(ULA`fc00::/7`, link-local`fe80::/10`, site-local, multicast, discard),`2001::/23`(Teredo and protocol assignments), documentation prefixes, and IPv4-mapped, NAT64 (`64:ff9b::/96`) and 6to4 (`2002::/16`) addresses whose embedded IPv4 address is blocked. If**any**resolved address is blocked, the host is refused.
- The checks run when the URL is saved**and again before every delivery**. The request then connects only to the address that was just checked (a pinned`lookup`on Node's`http`/`https`client), so a DNS answer that changes between the check and the connection (DNS rebinding) cannot reach a private host. TLS still verifies the certificate for the host name.

### Development and tests

`WEBHOOKS_ALLOW_PRIVATE_TARGETS=1`lets development and test environments use`http://`and private or loopback receivers on any port (credentials in the URL are still refused). A production server ignores it, except in the CI-only production-build test mode (`CI=true`with`ALLOW_INSECURE_PRODUCTION_TESTS=1`) that the e2e suite uses, and`npm run production:check`fails when it is set. Never set it on a deployed instance.

## Operations
- Webhooks need outbound HTTPS (443 and 8443) from every app process to your receivers.
- Migration`20261103010000_org_webhooks`adds the`WebhookEndpoint`and`WebhookDelivery`tables; it is additive.
- If`MFA_ENCRYPTION_KEY`changes without re-encryption, deliveries fail with "Signing secret unreadable" (not counted against the endpoint); rotate each endpoint's secret.
- Not yet available: more event types (series status, invitations, schedule changes), per-endpoint ordering guarantees, and email notification of an automatic disable.

From[SpaceWorks-Events/docs/WEBHOOKS.md](https://github.com/SpaceWorks-Labs/SpaceWorks-Events/blob/4e3cf5a733517585bebd258a3cdd87d30d844863/docs/WEBHOOKS.md) at 4e3cf5a, updated 2026-10-30.[Suggest a change](https://github.com/SpaceWorks-Labs/SpaceWorks-Events/edit/main/docs/WEBHOOKS.md)  [PreviousMachine API v1](https://spaceworkslabs.tech/docs/events/api/)

On this page
- [Endpoints](#endpoints)
- [Event types](#event-types)
- [Request format](#request-format)
- [Payloads](#payloads)
- [Verifying signatures](#verifying-signatures)
- [Delivery and retries](#delivery-and-retries)
- [Target rules (SSRF protection)](#target-rules-ssrf-protection)
- [Development and tests](#development-and-tests)
- [Operations](#operations)
