Webhook Payload Reference
Every event is one HTTPS POST request with a JSON body. All events share the same envelope, so a single receiver (or middleware) can handle every module and trigger.
Headers
POST /hooks/facilio HTTP/1.1
Content-Type: application/json; charset=UTF-8
User-Agent: Facilio-Webhooks/1.0
X-Facilio-Event: workorder.created
X-Facilio-Delivery: evt_48614874db2c4d5cad0e7035a86aa83a
X-Facilio-Signature: t=1795517652,v1=f2f38cfe218a6d9e3fa6efcba0596a257d0951753c1d0fa59f2fe80e20bfbca9
| Header | Meaning |
|---|---|
X-Facilio-Event | The event name, the same as event in the body. |
X-Facilio-Delivery | The event ID, the same as id in the body. The same on every retry of the event: use it to ignore duplicates. |
X-Facilio-Signature | t = when the request was signed (Unix seconds), v1 = the signature. See Verifying the Signature. |
X-Facilio-Test | true on test events sent from Send test. Absent on real events. |
Body
| Field | Always | Meaning |
|---|---|---|
id | Yes | Event ID (evt_...). Unique per event, unchanged on retries. |
event | Yes | <moduleName>.<what happened>, for example workorder.created, invoice.updated, serviceRequest.add_ticket_note. See Event Names. |
moduleName | Yes | The module's API name. |
webhookId | Yes | The webhook that sent it. |
trigger | Yes | {"linkName": "..."}: the trigger that fired. Use it to route events when one URL serves several webhooks. |
occurredAt | Yes | When the change happened, UTC (2026-11-24T10:54:12Z). |
data | Yes | The record, or the comment or attachment for comment and attachment events. |
changes | Update events | What this save changed. See Changes. |
record | Comment and attachment events | {"id": ...}: the record the comment or file is on. |
test | Test events | true. |
Record Events
For Create, Edit, Create Or Edit, field-change and most other triggers, data is the record, exactly as GET /api/v5/{moduleName}/{id} returns it: the module's standard and custom fields, with lookups (site, space, requester ...) expanded.
A new work order (workorder.created):
{
"id": "evt_48614874db2c4d5cad0e7035a86aa83a",
"event": "workorder.created",
"moduleName": "workorder",
"webhookId": 16,
"trigger": { "linkName": "create" },
"occurredAt": "2026-11-24T10:54:12Z",
"data": {
"id": 15015522,
"serialNumber": 30,
"subject": "Leaking tap in car park",
"moduleState": "Submitted",
"priority": "High",
"sourceType": "Web Work Order",
"siteId": { "id": 2388922, "name": "Harbour Tower", "siteType": "Office" },
"resource": { "id": 2388926, "name": "Harbour Tower - Car Park", "resourceTypeEnum": "SPACE" },
"noOfAttachments": 0,
"createdTime": "2026-11-24T10:54:11Z",
"createdBy": { "id": 2388590, "name": "Integration User", "email": "integration.user@example.com" },
"modifiedTime": "2026-11-24T10:54:11Z"
}
}
(Shortened: the real data has every field of the record.)
A new invoice (invoice.created) has the same envelope; data is what GET /api/v5/invoice/{id} returns for that invoice:
{
"id": "evt_9a0e5c...",
"event": "invoice.created",
"moduleName": "invoice",
"webhookId": 17,
"trigger": { "linkName": "create" },
"occurredAt": "2026-11-24T11:02:40Z",
"data": { "id": 3201, "...": "every field of the invoice" }
}
Changes
Update events (<module>.updated) carry changes: one entry for every field the save changed, in name order.
{
"id": "evt_36704ad323c64e9f80f5653e59a451ce",
"event": "workorder.updated",
"moduleName": "workorder",
"webhookId": 16,
"trigger": { "linkName": "edit" },
"occurredAt": "2026-11-24T10:54:54Z",
"changes": {
"description": { "from": null, "to": "Plumber booked for Thursday morning." },
"modifiedTime": { "from": "2026-11-24T10:54:11Z", "to": "2026-11-24T10:54:54Z" },
"priority": { "from": "High", "to": "Medium" }
},
"data": { "id": 15015522, "priority": "Medium", "...": "..." }
}
{"from": ..., "to": ...}gives the old and new value, in the same format asdata: dates as UTC strings, picklists (status, priority, category ...) as their name, lookups as{"id": ...}.fromisnullwhen the field was empty.{"changed": true}means the field changed but its values are not included. This is what long text fields, file fields, multi-value fields and values over 2000 characters get. The new value is indata.- A status change shows up as a change of the status field (
moduleStateon work orders). changesis absent on created and deleted events, and on custom triggers invoked from a script.
Event Names
| Trigger | event |
|---|---|
| Create | <module>.created |
| Edit | <module>.updated |
| Create Or Edit | <module>.created or <module>.updated, for what the save did |
| Field change (custom) | <module>.updated, or <module>.created when the field was set while creating the record |
| Delete | <module>.deleted |
| Any other trigger | <module>.<the trigger's event type>, for example workorder.close_work_order, workorder.assign_ticket, workorder.solve_work_order, <module>.custom_trigger |
The event type of each trigger is in GET /platform/webhook/{moduleName}/triggers (see Choosing a Trigger).
Deleted Events
data holds only the ID, because the record no longer exists:
{ "id": "evt_...", "event": "workorder.deleted", "moduleName": "workorder", "webhookId": 16,
"trigger": { "linkName": "delete" }, "occurredAt": "2026-11-24T11:20:00Z", "data": { "id": 15015522 } }
Comment and Attachment Events
For comment and attachment triggers, what happened is the comment or the file, so data is that item, record is the record it belongs to, and there is no changes.
A comment (<module>.add_ticket_note):
{
"id": "evt_04154a0cbb2c4fbeb703b07bc93b95f0",
"event": "workorder.add_ticket_note",
"moduleName": "workorder",
"webhookId": 12,
"trigger": { "linkName": "addcomment" },
"occurredAt": "2026-11-22T21:37:01Z",
"record": { "id": 21494010 },
"data": {
"id": 1256836,
"body": "Spare part ordered, arriving Friday",
"bodyHTML": "<p>Spare part ordered, arriving Friday</p>",
"createdTime": "2026-11-22T21:37:01Z",
"createdBy": { "id": 4875594, "name": "Asha Rao", "email": "asha.rao@example.com" },
"notifyRequester": false,
"sharedWith": []
}
}
A comment has id, body, bodyHTML, externalId (when set), createdTime, createdBy, and who can see it: sharedWith (the portals it is shared with; empty means your team only) and notifyRequester. A reply also has parentCommentId.
An attachment (<module>.add_ticket_attachments) has id, fileName, fileSize, contentType, type, externalId, createdTime and createdBy:
{
"id": "evt_...", "event": "serviceRequest.add_ticket_attachments", "moduleName": "serviceRequest",
"webhookId": 21, "trigger": { "linkName": "addattachment" }, "occurredAt": "2026-11-24T09:12:30Z",
"record": { "id": 52011 },
"data": { "id": 88120, "fileName": "leak-photo.jpg", "fileSize": 248113, "contentType": "image/jpeg",
"createdTime": "2026-11-24T09:12:30Z", "createdBy": { "id": 7, "name": "Asha Rao" } }
}
To get the file itself, call GET /api/v5/{moduleName}/{record.id}/attachments/{data.id}/download with your API key (not after an Attachment Deleted event: the file is gone).
| Trigger | event | data |
|---|---|---|
| Add Comment | <module>.add_ticket_note | The comment (also sent when a comment is edited) |
| Add Comment With Notify Requester (work orders) | workorder.add_note_requester | The comment |
| Comment Deleted | <module>.comment_deleted | The comment as it was |
| Comment Visibility Changed (work orders) | workorder.comment_visibility_changed | The comment, with its new sharedWith |
| Add Attachment | <module>.add_ticket_attachments | The attachment. One event per file when several are added |
| Attachment Deleted | <module>.attachment_deleted | The attachment as it was |
Unlike a record, a comment or attachment in data is as it was when the event happened, also on retries.
Test and Ping Events
- Ping (Send test > Ping):
"event": "ping"and"data": {"webhookId": 16}. - Record test (Send test > Record): a normal event for the chosen record, with
"test": true, anX-Facilio-Test: trueheader and an ID startingevt_test_. Your receiver should answer2xxand not act on it.
Verifying the Signature
Each webhook has a signing secret (whsec_...), shown once when the webhook is created or its secret is rotated. Facilio signs every request with it, so the receiver can check that the event came from Facilio and was not changed:
v1inX-Facilio-Signatureis the hex HMAC-SHA256 of the string"<t>.<raw request body>", keyed with the whole secret (includingwhsec_).- Compute it over the raw body exactly as received, before parsing the JSON, and compare in constant time.
- Reject requests whose
tis more than a few minutes old, so a captured request cannot be replayed later.
Python
import hmac, hashlib, time
def verify(secret: str, signature_header: str, raw_body: bytes, tolerance: int = 300) -> bool:
parts = dict(p.split("=", 1) for p in signature_header.split(","))
signed = parts["t"].encode() + b"." + raw_body
expected = hmac.new(secret.encode(), signed, hashlib.sha256).hexdigest()
fresh = abs(time.time() - int(parts["t"])) <= tolerance
return fresh and hmac.compare_digest(expected, parts["v1"])
Node.js
const crypto = require('crypto');
function verify(secret, signatureHeader, rawBody, toleranceSeconds = 300) {
const parts = Object.fromEntries(signatureHeader.split(',').map((p) => p.split('=', 2)));
const expected = crypto.createHmac('sha256', secret)
.update(`${parts.t}.${rawBody}`)
.digest('hex');
const fresh = Math.abs(Date.now() / 1000 - Number(parts.t)) <= toleranceSeconds;
return fresh && expected.length === parts.v1.length
&& crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(parts.v1));
}
What Facilio Expects Back
- Answer with any
2xxstatus as soon as you have stored the event; do slow work afterwards. Facilio gives up on an attempt when the receiver takes more than 5 seconds to accept the connection, stays silent for 10 seconds, or has not finished answering after 30 seconds. 408,429and5xxanswers, timeouts and connection errors are retried. Any other answer (4xx, or a redirect) marks the event as failed straight away.- Only the first 4 KB of your answer is read and kept in the delivery log, so a short message like
{"ok": true}is enough.
See Deliveries, Retries and Logs for the retry schedule.