Skip to content

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

Webhook basics
ItemDetail
DirectionOut of Luceryn. Luceryn calls your address.
ProtocolHTTPS POST, one message for each event.
FormatJSON.
Set up atAdmin, 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.
AuthenticationEach message is signed with the webhook's own secret (HMAC-SHA256) in X-Luceryn-Signature. Luceryn sends no other credential.
DependenciesAn https address reachable from the internet. No middleware.

The message

Headers

Webhook headers
FieldTypeRequiredDescriptionExample
Content-TypestringYesapplication/json.application/json
User-AgentstringYesLuceryn-Webhooks/1.Luceryn-Webhooks/1
X-Luceryn-EventstringYesThe event name, the same as event in the body.project.created
X-Luceryn-SignaturestringYessha256= followed by the HMAC-SHA256 of the raw request body, keyed with the webhook's signing secret, in lower-case hexadecimal.sha256=5d41402abc4b2a76b9719d911017c592...

Body

Webhook body
FieldTypeRequiredDescriptionExample
eventstringYesThe event name, one of the names in the table below.project.created
delivered_atstring (ISO 8601, UTC)YesWhen Luceryn sent the delivery.2026-11-20T15:04:05.123Z
payloadobjectYesThe event's own fields (see each event).{ ... }
testbooleanNotrue 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
Example delivery
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-Signature using 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_at and the ids in payload if you need to recognise a repeat.
Verify in Node.js
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);
}
Compute the expected header in a shell
# 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.

Webhook events sent
EventSent when
project.createdA project is created.
status_report.submittedA status report is submitted for review.
status_report.approvedA status report is approved.
status_report.publishedA status report is published.
raid.createdA risk, action, issue or decision is added to a project's log.
document.approvedA project document reaches approved.
deal.createdA CRM deal is created by hand.
deal.stage_changedA CRM deal moves to another stage.
deal.wonA CRM deal is marked won.
deal.lostA CRM deal is marked lost.
project.asset_handoff.preparedAn 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.

project.created payload
FieldTypeRequiredDescriptionExample
project_idstring (UUID)YesThe new project's id.9a1c7f2e-3b4d-4e5f-8a6b-7c8d9e0f1a2b
namestringYesThe project's name.Science building roof replacement
short_codestring or nullYesThe project's short code.CAP-014
departmentstring or nullYesThe department named on the project.Facilities
methodologystring or nullYesThe delivery method chosen.Waterfall
prioritystring or nullYeslow, medium, high or critical.high
start_datestring (YYYY-MM-DD) or nullYesPlanned start.2026-09-01
end_datestring (YYYY-MM-DD) or nullYesPlanned finish.2027-06-30
overall_statusstring or nullYesThe project's overall status.on_track
created_bystring (UUID)YesThe id of the person who created it.7d2f1c5e-8a41-4a0e-9a57-2f0f6f0b1c22

status_report.submitted

A status report is submitted for review.

status_report.submitted payload
FieldTypeRequiredDescriptionExample
report_idstring (UUID)YesThe status report's id.c2d3e4f5-a6b7-4c8d-9e0f-1a2b3c4d5e6f
project_labelstringYesThe project's short code, or its name when it has no code.CAP-014
reporting_periodstring or nullYesThe period the report covers, as written on the report.November 2026
overall_statusstring or nullYesThe report's overall status, for example on_track, at_risk or off_track.on_track
urlstringYesAddress of the report in Luceryn.https://luceryn.example.com/reports/c2d3e4f5-a6b7-4c8d-9e0f-1a2b3c4d5e6f

status_report.approved

A status report is approved.

status_report.approved payload
FieldTypeRequiredDescriptionExample
report_idstring (UUID)YesThe status report's id.c2d3e4f5-a6b7-4c8d-9e0f-1a2b3c4d5e6f
project_labelstringYesThe project's short code, or its name when it has no code.CAP-014
reporting_periodstring or nullYesThe period the report covers, as written on the report.November 2026
overall_statusstring or nullYesThe report's overall status, for example on_track, at_risk or off_track.on_track
urlstringYesAddress of the report in Luceryn.https://luceryn.example.com/reports/c2d3e4f5-a6b7-4c8d-9e0f-1a2b3c4d5e6f

status_report.published

A status report is published.

status_report.published payload
FieldTypeRequiredDescriptionExample
report_idstring (UUID)YesThe status report's id.c2d3e4f5-a6b7-4c8d-9e0f-1a2b3c4d5e6f
project_labelstringYesThe project's short code, or its name when it has no code.CAP-014
reporting_periodstring or nullYesThe period the report covers, as written on the report.November 2026
overall_statusstring or nullYesThe report's overall status, for example on_track, at_risk or off_track.on_track
urlstringYesAddress 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.

raid.created payload
FieldTypeRequiredDescriptionExample
project_labelstringYesThe project's short code, or its name when it has no code.CAP-014
raid_typestringYesrisk, action, issue or decision.risk
ref_idstringYesThe item's reference in the log.R004
descriptionstringYesThe item's text.Roofing membrane delivery may slip two weeks
severitystring or nullYesThe item's severity, when it has one.High
urlstringYesAddress 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.

document.approved payload
FieldTypeRequiredDescriptionExample
document_idstring (UUID)YesThe document's id.b1c2d3e4-f5a6-4b7c-8d9e-0f1a2b3c4d5e
titlestringYesThe document's title.Project charter
project_labelstringYesThe project's short code, or its name when it has no code.CAP-014
version_labelstringYesThe version that was approved.v1.0
urlstringYesAddress of the document in Luceryn.https://luceryn.example.com/documents/b1c2d3e4-f5a6-4b7c-8d9e-0f1a2b3c4d5e

deal.created

A CRM deal is created by hand.

deal.created payload
FieldTypeRequiredDescriptionExample
deal_namestringYesThe deal's name.Campus signage refresh
value_labelstringNoThe deal's value with its currency, as text. Left out when the deal has no value.CAD 48,000
urlstringYesAddress 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.

deal.stage_changed payload
FieldTypeRequiredDescriptionExample
deal_namestringYesThe deal's name.Campus signage refresh
to_stagestringYesThe name of the stage the deal moved to.Proposal
value_labelstringNoThe deal's value with its currency, as text. Left out when the deal has no value.CAD 48,000
urlstringYesAddress of the deal in Luceryn.https://luceryn.example.com/crm/deals/5e6f7a8b-9c0d-4e1f-a2b3-c4d5e6f7a8b9

deal.won

A CRM deal is marked won.

deal.won payload
FieldTypeRequiredDescriptionExample
deal_namestringYesThe deal's name.Campus signage refresh
accountstringNoThe client's name, when the deal has a client.Northfield College
value_labelstringNoThe deal's value with its currency, as text. Left out when the deal has no value.CAD 48,000
reasonstringNoLeft out for a won deal.
urlstringYesAddress of the deal in Luceryn.https://luceryn.example.com/crm/deals/5e6f7a8b-9c0d-4e1f-a2b3-c4d5e6f7a8b9

deal.lost

A CRM deal is marked lost.

deal.lost payload
FieldTypeRequiredDescriptionExample
deal_namestringYesThe deal's name.Campus signage refresh
accountstringNoThe client's name, when the deal has a client.Northfield College
value_labelstringNoThe deal's value with its currency, as text. Left out when the deal has no value.CAD 48,000
reasonstringNoThe reason given for the loss.Budget withdrawn
urlstringYesAddress 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.

project.asset_handoff.prepared payload
FieldTypeRequiredDescriptionExample
schemastringYesThe name and version of this layout.luceryn.asset_handoff.v1
handoff_idstring (UUID)YesThe 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
triggerstringYesmanual when a person prepared it, automatic when the scheduled run did.manual
prepared_atstring (ISO 8601, UTC)YesWhen the package was prepared.2026-11-20T15:04:05.123Z
prepared_bystringYesThe person's name, or Luceryn (automatic).Sam Rivera
projectobjectYesid, 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_summaryobject or nullYesgross_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.
fundingarray or nullYesFunding lines, each with fund, fiscal_year and amount.
layoutarrayYesThe 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.
assetsarrayYesOne 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).
documentsarrayYesThe 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).
warningsarrayYesThe 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.
countsobjectYesassets, documents and warnings.{ "assets": 42, "documents": 9, "warnings": 3 }
project_labelstringYesThe project's short code, or its name when it has no code. Empty text when it has neither.CAP-014
urlstringYesAddress 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
filesarray of { kind, name, bytes, sha256 }YesThe 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_apistringYesThe 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