API reference
Webhooks
When something happens in the workspace, Luceryn posts a signed JSON message to an address of yours. You choose the events for each address.
The basics
| Item | Detail |
|---|---|
| Direction | Out of Luceryn. Luceryn calls your address. |
| Protocol | HTTPS POST, one message for each event. |
| Format | JSON. |
| Set up at | Admin, Webhooks, by a person who holds Manage organization: the address, a label and the events to send. Each webhook can be paused, tested and deleted there. |
| Authentication | Each message is signed with the webhook's own secret (HMAC-SHA256) in X-Luceryn-Signature. Luceryn sends no other credential. |
| Dependencies | An https address reachable from the internet. No middleware. |
The message
Headers
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
Content-Type | string | Yes | application/json. | application/json |
User-Agent | string | Yes | Luceryn-Webhooks/1. | Luceryn-Webhooks/1 |
X-Luceryn-Event | string | Yes | The event name, the same as event in the body. | project.created |
X-Luceryn-Signature | string | Yes | sha256= followed by the HMAC-SHA256 of the raw request body, keyed with the webhook's signing secret, in lower-case hexadecimal. | sha256=5d41402abc4b2a76b9719d911017c592... |
Body
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
event | string | Yes | The event name, one of the names in the table below. | project.created |
delivered_at | string (ISO 8601, UTC) | Yes | When Luceryn sent the delivery. | 2026-11-20T15:04:05.123Z |
payload | object | Yes | The event's own fields (see each event). | { ... } |
test | boolean | No | true only on a delivery sent by the Test button on the admin page. A test delivery is a project.created event with made-up values. | true |
POST /luceryn-events HTTP/1.1
Host: hooks.example.edu
Content-Type: application/json
User-Agent: Luceryn-Webhooks/1
X-Luceryn-Event: project.created
X-Luceryn-Signature: sha256=3f2a9c0d6b1e4f7a8c5d2e9b0a1f6c3d4e7b8a9c0d1e2f3a4b5c6d7e8f9a0b1c
{"event":"project.created","delivered_at":"2026-11-20T15:04:05.123Z","payload":{"project_id":"9a1c7f2e-3b4d-4e5f-8a6b-7c8d9e0f1a2b","name":"Science building roof replacement","short_code":"CAP-014","department":"Facilities","methodology":"Waterfall","priority":"high","start_date":"2026-09-01","end_date":"2027-06-30","overall_status":"on_track","created_by":"7d2f1c5e-8a41-4a0e-9a57-2f0f6f0b1c22"}}The signature in the example is for illustration and will not match: compute your own with the secret of your webhook.
Verifying the signature
- Take the body exactly as it arrived, byte for byte, before parsing it. Compute its HMAC-SHA256 with the webhook's signing secret as the key, write it in lower-case hexadecimal, and put
sha256=in front. - Compare the result with
X-Luceryn-Signatureusing a constant-time comparison. Refuse the message when they differ. - The signing secret is created with the webhook. An administrator copies it from the webhook's row under Admin, Webhooks. It is stored encrypted. To change it, delete the webhook and add it again.
- The message carries no timestamp inside the signature, so the signature alone does not stop a captured message being sent again. Use
delivered_atand the ids inpayloadif you need to recognise a repeat.
import { createHmac, timingSafeEqual } from "node:crypto";
// rawBody: the request body exactly as received (a Buffer or a string), before any JSON parsing.
// header: the value of X-Luceryn-Signature.
// secret: the webhook's signing secret from Admin, Webhooks.
export function isFromLuceryn(rawBody, header, secret) {
const expected = "sha256=" + createHmac("sha256", secret).update(rawBody).digest("hex");
const a = Buffer.from(expected);
const b = Buffer.from(header ?? "");
return a.length === b.length && timingSafeEqual(a, b);
}# Prints the value X-Luceryn-Signature should have for a saved body.
printf 'sha256=%s\n' "$(openssl dgst -sha256 -hmac "$WEBHOOK_SECRET" -hex < body.json | sed 's/^.* //')"Events and payloads
These are the events Luceryn sends today, with the fields of payload for each.
| Event | Sent when |
|---|---|
| project.created | A project is created. |
| status_report.submitted | A status report is submitted for review. |
| status_report.approved | A status report is approved. |
| status_report.published | A status report is published. |
| raid.created | A risk, action, issue or decision is added to a project's log. |
| document.approved | A project document reaches approved. |
| deal.created | A CRM deal is created by hand. |
| deal.stage_changed | A CRM deal moves to another stage. |
| deal.won | A CRM deal is marked won. |
| deal.lost | A CRM deal is marked lost. |
| project.asset_handoff.prepared | An asset hand-off package is prepared for a project and announced: by a person pressing the button on the project's Asset hand-off page, or automatically when a project reaches its Closing stage and the workspace has Prepare automatically ticked. Send again on that page sends the same package again, with the same handoff_id. Unlike the other events it carries the whole package, asset and cost data included. |
Events listed on the admin page that are not sent today
project.status_changed, raid.escalated, milestone.completed can be ticked when a webhook is added, but nothing in the product sends them yet. Do not build on them.
project.created
A project is created.
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
project_id | string (UUID) | Yes | The new project's id. | 9a1c7f2e-3b4d-4e5f-8a6b-7c8d9e0f1a2b |
name | string | Yes | The project's name. | Science building roof replacement |
short_code | string or null | Yes | The project's short code. | CAP-014 |
department | string or null | Yes | The department named on the project. | Facilities |
methodology | string or null | Yes | The delivery method chosen. | Waterfall |
priority | string or null | Yes | low, medium, high or critical. | high |
start_date | string (YYYY-MM-DD) or null | Yes | Planned start. | 2026-09-01 |
end_date | string (YYYY-MM-DD) or null | Yes | Planned finish. | 2027-06-30 |
overall_status | string or null | Yes | The project's overall status. | on_track |
created_by | string (UUID) | Yes | The id of the person who created it. | 7d2f1c5e-8a41-4a0e-9a57-2f0f6f0b1c22 |
status_report.submitted
A status report is submitted for review.
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
report_id | string (UUID) | Yes | The status report's id. | c2d3e4f5-a6b7-4c8d-9e0f-1a2b3c4d5e6f |
project_label | string | Yes | The project's short code, or its name when it has no code. | CAP-014 |
reporting_period | string or null | Yes | The period the report covers, as written on the report. | November 2026 |
overall_status | string or null | Yes | The report's overall status, for example on_track, at_risk or off_track. | on_track |
url | string | Yes | Address of the report in Luceryn. | https://luceryn.example.com/reports/c2d3e4f5-a6b7-4c8d-9e0f-1a2b3c4d5e6f |
status_report.approved
A status report is approved.
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
report_id | string (UUID) | Yes | The status report's id. | c2d3e4f5-a6b7-4c8d-9e0f-1a2b3c4d5e6f |
project_label | string | Yes | The project's short code, or its name when it has no code. | CAP-014 |
reporting_period | string or null | Yes | The period the report covers, as written on the report. | November 2026 |
overall_status | string or null | Yes | The report's overall status, for example on_track, at_risk or off_track. | on_track |
url | string | Yes | Address of the report in Luceryn. | https://luceryn.example.com/reports/c2d3e4f5-a6b7-4c8d-9e0f-1a2b3c4d5e6f |
status_report.published
A status report is published.
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
report_id | string (UUID) | Yes | The status report's id. | c2d3e4f5-a6b7-4c8d-9e0f-1a2b3c4d5e6f |
project_label | string | Yes | The project's short code, or its name when it has no code. | CAP-014 |
reporting_period | string or null | Yes | The period the report covers, as written on the report. | November 2026 |
overall_status | string or null | Yes | The report's overall status, for example on_track, at_risk or off_track. | on_track |
url | string | Yes | Address of the report in Luceryn. | https://luceryn.example.com/reports/c2d3e4f5-a6b7-4c8d-9e0f-1a2b3c4d5e6f |
raid.created
A risk, action, issue or decision is added to a project's log.
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
project_label | string | Yes | The project's short code, or its name when it has no code. | CAP-014 |
raid_type | string | Yes | risk, action, issue or decision. | risk |
ref_id | string | Yes | The item's reference in the log. | R004 |
description | string | Yes | The item's text. | Roofing membrane delivery may slip two weeks |
severity | string or null | Yes | The item's severity, when it has one. | High |
url | string | Yes | Address of the project's RAID log in Luceryn. | https://luceryn.example.com/projects/9a1c7f2e-3b4d-4e5f-8a6b-7c8d9e0f1a2b/raid |
document.approved
A project document reaches approved.
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
document_id | string (UUID) | Yes | The document's id. | b1c2d3e4-f5a6-4b7c-8d9e-0f1a2b3c4d5e |
title | string | Yes | The document's title. | Project charter |
project_label | string | Yes | The project's short code, or its name when it has no code. | CAP-014 |
version_label | string | Yes | The version that was approved. | v1.0 |
url | string | Yes | Address of the document in Luceryn. | https://luceryn.example.com/documents/b1c2d3e4-f5a6-4b7c-8d9e-0f1a2b3c4d5e |
deal.created
A CRM deal is created by hand.
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
deal_name | string | Yes | The deal's name. | Campus signage refresh |
value_label | string | No | The deal's value with its currency, as text. Left out when the deal has no value. | CAD 48,000 |
url | string | Yes | Address of the deal in Luceryn. | https://luceryn.example.com/crm/deals/5e6f7a8b-9c0d-4e1f-a2b3-c4d5e6f7a8b9 |
deal.stage_changed
A CRM deal moves to another stage.
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
deal_name | string | Yes | The deal's name. | Campus signage refresh |
to_stage | string | Yes | The name of the stage the deal moved to. | Proposal |
value_label | string | No | The deal's value with its currency, as text. Left out when the deal has no value. | CAD 48,000 |
url | string | Yes | Address of the deal in Luceryn. | https://luceryn.example.com/crm/deals/5e6f7a8b-9c0d-4e1f-a2b3-c4d5e6f7a8b9 |
deal.won
A CRM deal is marked won.
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
deal_name | string | Yes | The deal's name. | Campus signage refresh |
account | string | No | The client's name, when the deal has a client. | Northfield College |
value_label | string | No | The deal's value with its currency, as text. Left out when the deal has no value. | CAD 48,000 |
reason | string | No | Left out for a won deal. | |
url | string | Yes | Address of the deal in Luceryn. | https://luceryn.example.com/crm/deals/5e6f7a8b-9c0d-4e1f-a2b3-c4d5e6f7a8b9 |
deal.lost
A CRM deal is marked lost.
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
deal_name | string | Yes | The deal's name. | Campus signage refresh |
account | string | No | The client's name, when the deal has a client. | Northfield College |
value_label | string | No | The deal's value with its currency, as text. Left out when the deal has no value. | CAD 48,000 |
reason | string | No | The reason given for the loss. | Budget withdrawn |
url | string | Yes | Address of the deal in Luceryn. | https://luceryn.example.com/crm/deals/5e6f7a8b-9c0d-4e1f-a2b3-c4d5e6f7a8b9 |
project.asset_handoff.prepared
An asset hand-off package is prepared for a project and announced: by a person pressing the button on the project's Asset hand-off page, or automatically when a project reaches its Closing stage and the workspace has Prepare automatically ticked. Send again on that page sends the same package again, with the same handoff_id. Unlike the other events it carries the whole package, asset and cost data included.
This event must be ticked
It is sent only to a webhook that has project.asset_handoff.prepared ticked under Admin, Webhooks. It starts unticked on a new webhook, and a webhook saved to receive everything does not get it. It is offered and sent only while the workspace's Closeout asset hand-off switch is on. The receiver sees the project's asset and cost data, so tick it only for an address that may.
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
schema | string | Yes | The name and version of this layout. | luceryn.asset_handoff.v1 |
handoff_id | string (UUID) | Yes | The id of this package in Luceryn's hand-off log. Use it to recognise a package you have already loaded. | 2b3c4d5e-6f70-4a81-9b92-a3b4c5d6e7f8 |
trigger | string | Yes | manual when a person prepared it, automatic when the scheduled run did. | manual |
prepared_at | string (ISO 8601, UTC) | Yes | When the package was prepared. | 2026-11-20T15:04:05.123Z |
prepared_by | string | Yes | The person's name, or Luceryn (automatic). | Sam Rivera |
project | object | Yes | id, name, code, department, stage, status, start_date, end_date, currency, buildings (each with name, code, campus, address) and link (the project in Luceryn, behind sign-in). | |
cost_summary | object or null | Yes | gross_floor_area_m2, gross_floor_area_sqft and rows; each row has key, label, budget, actual, budget_per_m2, actual_per_m2, budget_per_sqft and actual_per_sqft. The floor area and per-area figures are null unless the workspace's Floor area and cost per square metre switch is on. | |
funding | array or null | Yes | Funding lines, each with fund, fiscal_year and amount. | |
layout | array | Yes | The columns the workspace chose for the asset table, in order: key, header and fixed (a fixed value, when the column has one). Set under Admin, Asset hand-off layout. | |
assets | array | Yes | One entry for each asset, ordered by tag. luceryn_asset_id; columns (the row exactly as the files carry it, under the workspace's own headers); record (the same asset under Luceryn's fixed names: tag, name, classification, class_code, category, location, department, attributes, manufacturer, model, serial_number, in_service_date, purchase_date, cost, currency, vendor, warranty_start, warranty_end, warranty_documents, external_ref, link); and warnings (the checks this asset did not pass). | |
documents | array | Yes | The closeout documents: kind, title, system, vendor, status, warranty_start, warranty_end, files (each with name and url) and url (the register entry in Luceryn, behind sign-in). | |
warnings | array | Yes | The checks that did not pass, each with kind (no_classification, no_location, no_cost, no_warranty_document or class_not_mapped), asset_id, tag and message. A warning never stops a package. | |
counts | object | Yes | assets, documents and warnings. | { "assets": 42, "documents": 9, "warnings": 3 } |
project_label | string | Yes | The project's short code, or its name when it has no code. Empty text when it has neither. | CAP-014 |
url | string | Yes | Address of the project's Asset hand-off page in Luceryn (behind sign-in). | https://luceryn.example.com/projects/9a1c7f2e-3b4d-4e5f-8a6b-7c8d9e0f1a2b/asset-handoff |
files | array of { kind, name, bytes, sha256 } | Yes | The files of the package as kept in Luceryn: kind is workbook (the Excel file), assets-csv, project-csv, documents-csv or json; sha256 is the fingerprint of each file. The files themselves are downloaded in Luceryn by a signed-in person. | |
latest_api | string | Yes | The address that returns the latest package of this project to a reporting token (see Other interfaces). | https://luceryn.example.com/api/assets/handoff/latest?project=9a1c7f2e-3b4d-4e5f-8a6b-7c8d9e0f1a2b |
Delivery, timeouts and retries
- One POST for each event to each active webhook that subscribes to it.
- An event that carries a data package (project.asset_handoff.prepared) goes only to a webhook that has that event ticked. It starts unticked on a new webhook, is offered on the admin page only while its switch is on, and is never sent to an older webhook saved to receive everything.
- Timeout: 5 seconds for each delivery. Answer with any 2xx status as soon as you have the body; do the work afterwards.
- No retries. A delivery that fails (a status that is not 2xx, a timeout, a connection error) is not sent again. The admin page shows the time and the reason of the last failure on that webhook until a later delivery succeeds.
- No ordering guarantee and no delivery id. Use the ids inside payload to recognise an event you have already handled.
- Deliveries for one event go out one after another, in no promised order between webhooks.
- The address must be https and must resolve to a public address. Private, loopback and link-local addresses are refused, when the webhook is saved and again on every delivery. Up to 4 redirects are followed and each hop is checked the same way.
- An address on hooks.slack.com gets a Slack message, and an address on *.webhook.office.com, *.logic.azure.com or *.api.powerplatform.com gets a Microsoft Teams card, instead of the JSON envelope. Those bodies are text for people and are not described here.
Delivery is best effort. A webhook is a prompt to look, not a ledger: where you must not miss a change, read the data on a schedule as well (the OData feed is the read interface).
Inbound webhooks
Luceryn also receives calls from other systems. The ones a customer sets up (the finance feed, Salesforce closed-won intake, Jira issue updates, web form lead capture) are described on the Finance feed and Other interfaces pages. There is no general purpose inbound webhook that accepts an arbitrary message.
A question about an interface?
These pages are written from the code that serves each interface. If something here does not match what you see, tell us and we will check it.
hello@luceryn.com