A webhook tells your app when something happens in Workspace369, so you do not have to keep asking. When an event you chose occurs, Workspace369 sends a signed HTTPS POST to a URL you control. Your server checks the signature, does its work, and answers with a 2xx status.
Webhooks are available on every plan: Cadet, Voyager, Specialist, Commander and Enterprise. You manage them in the app. Automation platforms can also create and remove them with a personal access token; see the REST hooks reference. To start a Zap, use the Workspace369 app for Zapier (beta); Webhooks by Zapier also works. See Connect Workspace369 to Zapier.
Create a webhook
- Open Settings, then under Data choose Webhooks.
- Choose New webhook.
- Enter the Endpoint URL. It must be an
https://address on the standard port, with no username or password, on a public host. - Under Events, select at least one event.
- Leave Active on, then choose Create webhook.
- Copy the Signing secret now. It starts with
whsec_and is shown only once.
Creating, changing, and rotating webhooks needs the Manage webhooks permission, which Managers and above have. To subscribe to a lead.* event you also need access to Requests, because those events carry the lead's contact details. To subscribe to a booking.* event you need access to the calendar and to every client's appointments, because a booking isn't limited to the clients you can see. To subscribe to a client.* event you need to see every client, so a member limited to their own clients can't. Owners and admins always have that.
To replace a secret, choose Rotate secret on the webhook. The new secret is shown once and the old one stops working. Deleting a webhook stops its events immediately.
Events
Only these 27 events exist.
| Event | Sent when |
|---|---|
time_entry.created | A time entry is created. |
time_entry.updated | A time entry is changed. |
time_entry.deleted | A time entry is deleted. |
timesheet.submitted | A timesheet is submitted for approval. |
timesheet.approved | A timesheet is approved. |
timesheet.rejected | A timesheet is rejected. |
invoice.created | An invoice is created. |
invoice.paid | An invoice moves into Paid. Partial payments and reversals do not send it. |
invoice.status_changed | An invoice's status changes to any other status. A move into Paid sends this event first, then invoice.paid. |
proposal.sent | A proposal is sent. |
proposal.accepted | A client accepts a proposal. |
proposal.declined | A client declines a proposal. |
contract.sent | A contract is sent for signature. |
contract.recipient_completed | One recipient finishes signing. |
contract.completed | Every recipient has signed. |
contract.declined | A recipient declines. |
contract.voided | A contract is voided. |
contract.expired | A contract expires before it is signed. |
lead.created | A new request arrives. |
lead.converted | A request is converted to a client. |
lead.archived | A request is archived. |
booking.created | A booking from a booking page is confirmed: when it is booked, or once paid or approved when the page asks for that. Each seat in a group or class session sends its own event. |
booking.rescheduled | A confirmed booking moves to a new time. |
booking.cancelled | A confirmed booking is cancelled. |
booking.no_show | A booking is marked as a no-show. |
client.created | A client is added, including clients created by an import or a converted request. |
client.stage_changed | A client moves to a different pipeline stage. A save that leaves the stage as it was does not send it. |
A client.* event carries workspace_id and a client object: id, name, email, stage (id and name), lifecycle_stage, created_at and updated_at. client.stage_changed also has previous_stage. Notes, custom fields and deal amounts are not included; read them with a tool. There are no events for projects or tasks. To read those, call Workspace369 with a tool. See Call Workspace369 from your app over HTTPS.
What you receive
Each delivery is a POST with a JSON body and these headers:
| Header | Value |
|---|---|
Content-Type | application/json |
X-Webhook-Id | A unique id for this event. The same event always has the same id, including on retries. |
X-Webhook-Timestamp | The send time in milliseconds since 1970, as text. |
X-Webhook-Signature | A hex HMAC-SHA256 signature. |
The body is an envelope:
{
"webhook_id": "...",
"event_type": "invoice.paid",
"entity_id": "...",
"workspace_id": "...",
"subscription_id": "...",
"data": { }
}
webhook_idis the same value as theX-Webhook-Idheader.entity_idis the id of the invoice, proposal, contract, time entry, timesheet, or request the event is about.dataholds the details of the record. Log a few real deliveries and build against what you see. Treat any field you do not recognize as optional.
Verify the signature
The signature is the HMAC-SHA256, in hex, of the raw request body followed immediately by the timestamp header text, using the whole signing secret as the key. The key includes the whsec_ prefix.
signature = hex( HMAC_SHA256( secret, rawBody + timestamp ) )
Compute it over the raw bytes you received. Do not parse the JSON and write it back out, because that can change the text and break the match.
import crypto from "node:crypto";
import express from "express";
const SECRET = process.env.WORKSPACE369_WEBHOOK_SECRET; // whsec_...
const MAX_AGE_MS = 5 * 60 * 1000;
const seen = new Set(); // use a database or cache in production
const app = express();
app.post("/webhooks/workspace369", express.raw({ type: "application/json" }), (req, res) => {
const rawBody = req.body.toString("utf8");
const timestamp = req.get("X-Webhook-Timestamp") ?? "";
const signature = req.get("X-Webhook-Signature") ?? "";
const id = req.get("X-Webhook-Id") ?? "";
const expected = crypto
.createHmac("sha256", SECRET)
.update(rawBody + timestamp)
.digest("hex");
const a = Buffer.from(expected, "utf8");
const b = Buffer.from(signature, "utf8");
if (a.length !== b.length || !crypto.timingSafeEqual(a, b)) {
return res.status(401).send("bad signature");
}
if (Math.abs(Date.now() - Number(timestamp)) > MAX_AGE_MS) {
return res.status(401).send("stale");
}
if (seen.has(id)) return res.status(200).send("duplicate");
seen.add(id);
const event = JSON.parse(rawBody);
// Hand off the work quickly, then answer.
console.log(event.event_type, event.entity_id);
res.status(200).send("ok");
});
app.listen(3000);
The timestamp check is a safeguard we recommend. Workspace369 signs a fresh timestamp on every attempt, so a retry passes the check.
Retries and failures
- Answer with any 2xx status within 10 seconds. Anything else counts as a failure, including a timeout, a redirect, or a connection error. Redirects are not followed.
- After a failure, Workspace369 retries up to 5 more times, with longer waits between attempts. The same
X-Webhook-Idis used each time, so use it to ignore duplicates. - After the last attempt fails, the event is marked as dead and is not sent again.
- If the address can never be reached safely, such as a host that resolves to a private network address, Workspace369 switches the webhook off and notifies the workspace once.
- Events can arrive more than once and not always in order. Make your handler safe to run twice.
Recent deliveries
To see whether your events are arriving, open Settings, then under Data choose Webhooks, and select a webhook. Recent deliveries lists the latest events sent to that endpoint, newest first.
- The list shows 20 at a time. Choose Show more for older ones.
- Deliveries are kept for 30 days.
- An event shows up once it's finished: delivered, failed after its last retry, or skipped. While Workspace369 is still retrying, it isn't listed yet.
- Opening the list needs the Manage webhooks permission, like the rest of the webhook settings.
Each row shows the event, such as Invoices · Paid, when it was sent, how many attempts it took when there was more than one, and its status:
| Status | What it means |
|---|---|
| Delivered | Your endpoint answered with a 2xx status. |
| Failed | Every attempt failed. The row says, for example, Tried 6 times. It won't be sent again. Nothing resends it, so fix the endpoint and let the next event through. |
| Skipped | Workspace369 didn't send it, for example because The person who set up this webhook is no longer in the workspace. |
Select a failed or skipped row to see why. On a phone, the reason opens in a dialog. The common reasons are:
- Your endpoint no longer exists. The endpoint answered 404 or 410. In Zapier this usually means the Zap was turned off or deleted. If the Zap uses the Workspace369 app for Zapier (beta), turn it on again to create a new webhook.
- Your endpoint refused the request. It answered 401 or 403. Check its authentication settings.
- Your endpoint asked us to slow down. It answered 429.
- Your endpoint had an error. It answered with a 5xx status.
- We couldn't reach your endpoint. The request timed out or the connection failed.
- This address can't receive webhooks, so the webhook was paused.
- The person who set up this webhook can no longer see requests, or can no longer see all bookings. See Plans and permissions.
- No details were recorded. No reason was saved, for example because the webhook was switched off when the event happened.
Any other status shows as Your endpoint answered HTTP with the code. The list never shows the request body, the URL or your secret.
Plans and permissions
- Every plan. If a workspace no longer has a plan, its webhooks stop sending and are kept as they were. They send again once it subscribes.
- Lead events.
lead.*events are sent only while the person who created the webhook still belongs to the workspace and can view Requests. If they lose that access, those events are skipped. - Client events.
client.*events are sent only while the person who created the webhook can still see every client. If they lose that access, those events are skipped.
Check your webhook
- Create a test webhook that points at your server and subscribes to one event, such as
proposal.sent. - Trigger the event in Workspace369.
- Confirm your server received the request, the signature check passed, and it answered with 200. In Workspace369, Recent deliveries on the webhook shows it as Delivered.
- Send the same event again from your tool and confirm the duplicate is ignored.
If webhooks do not arrive
- Confirm the workspace has an active plan.
- Confirm the webhook is Active and lists the event.
- Check Recent deliveries on the webhook. A Failed or Skipped row says why.
- Confirm the URL is
https://on the standard port and that your server answers within 10 seconds. - A signature mismatch is almost always caused by parsing the body before computing the signature, or by using a rotated-out secret.