API reference
Other interfaces
The remaining ways data moves between Luceryn and other systems, and a list of the addresses under /api that are not interfaces, with the reason for each.
Closeout asset hand-off
- A package reaches your systems three ways: this endpoint (your job asks), the project.asset_handoff.prepared webhook (Luceryn tells a webhook that ticked the event, with the whole package, signed), and the files (an Excel workbook, CSV files and the JSON document) that a signed-in person who may see the project's money downloads from the project's Asset hand-off page.
- An optional email notice carries a link to that page and no asset or cost data.
- The columns of the asset table, their headers and order, and the class code for each asset type are set by an administrator under Admin, Asset hand-off layout, so the files fit the receiving system's import layout. The record object of each asset keeps Luceryn's fixed names whatever the layout.
- Luceryn holds no connection to the asset management system and no credential for it. Loading the package there, and telling Luceryn it was acknowledged, are done on your side and by a person.
Latest asset hand-off package of a project
GET/api/assets/handoff/latest
When a project closes, Luceryn prepares a package of the assets it delivered (schema luceryn.asset_handoff.v1) for your asset management system. This endpoint returns the most recently prepared package of one project as JSON, for your own integration job. Read only: acknowledging a hand-off is done by a person in Luceryn. Luceryn does not connect to the asset management system itself.
Authentication. The workspace's reporting token (it starts with rpt_), the same token as the OData reporting feed, sent as Authorization: Bearer, as the password of Authorization: Basic, or as ?token=. The Closeout asset hand-off switch must be on (off by default).
Request: Query string
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
project | string | Yes | The project's id (a UUID), or its short code as Luceryn shows it (capitals do not matter). At most 80 characters. Projects in the bin are not found. | CAP-014 |
token | string | No | The reporting token, for a client that cannot send a header. Prefer the header: a token in the address is written to logs. |
Answer: 200: { "handoff": { ... }, "package": { ... } }. The log entry
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
handoff.id | string (UUID) | Yes | The id of the package in the hand-off log; the same value as package.handoff_id. | 2b3c4d5e-6f70-4a81-9b92-a3b4c5d6e7f8 |
handoff.status | string | Yes | prepared, sent (a webhook delivery or the email notice went out) or acknowledged (a person in Luceryn recorded that the receiving system took it). | sent |
handoff.trigger | string | Yes | manual or automatic. | manual |
handoff.prepared_at | string (ISO 8601) | Yes | When the package was prepared. | 2026-11-20T15:04:05.123+00:00 |
handoff.prepared_by | string | Yes | The person's name, or Luceryn (automatic). | Sam Rivera |
handoff.assets | integer | Yes | How many assets the package holds. | 42 |
handoff.documents | integer | Yes | How many closeout documents it lists. | 9 |
handoff.warnings | integer | Yes | How many checks did not pass. | 3 |
handoff.sent_at | string (ISO 8601) or null | Yes | When it was first announced. | 2026-11-20T15:04:07.512+00:00 |
handoff.acknowledged_at | string (ISO 8601) or null | Yes | When a person recorded the acknowledgement. | |
handoff.files | array of { kind, name, bytes, sha256 } | Yes | The files of the package and the SHA-256 fingerprint of each. kind is workbook (the Excel file), assets-csv, project-csv, documents-csv or json. The files are downloaded in Luceryn by a signed-in person; this endpoint returns the JSON only. |
Answer: 200: the package
The same JSON the project.asset_handoff.prepared webhook carries (without the four fields the webhook adds: project_label, url, files and latest_api).
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
package.schema | string | Yes | The name and version of this layout. | luceryn.asset_handoff.v1 |
package.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 |
package.trigger | string | Yes | manual when a person prepared it, automatic when the scheduled run did. | manual |
package.prepared_at | string (ISO 8601, UTC) | Yes | When the package was prepared. | 2026-11-20T15:04:05.123Z |
package.prepared_by | string | Yes | The person's name, or Luceryn (automatic). | Sam Rivera |
package.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). | |
package.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. | |
package.funding | array or null | Yes | Funding lines, each with fund, fiscal_year and amount. | |
package.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. | |
package.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). | |
package.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). | |
package.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. | |
package.counts | object | Yes | assets, documents and warnings. | { "assets": 42, "documents": 9, "warnings": 3 } |
Errors
| Status | Message | When |
|---|---|---|
401 | Unauthorized. Supply a reporting token (Authorization: Bearer). | No token, an unknown token or a revoked token. The answer carries WWW-Authenticate: Bearer realm="Luceryn". |
403 | Closeout asset hand-off is switched off for this workspace. | The token is valid and the switch is off. |
400 | Name the project: ?project=<project code or id>. | No project, or one longer than 80 characters. |
400 | More than one project has that code. Use the project id instead. | Two projects of the workspace share the short code. |
404 | No such project in this workspace. | No project with that id or code in the token's workspace. |
404 | No asset hand-off has been prepared for this project yet. | The project exists and no package has been prepared for it. |
Limits
- A package holds at most 5,000 assets of one project.
- One project in one request, and only its latest package. Earlier packages stay in the log in Luceryn.
- Never cached (Cache-Control: private, no-store). No request rate limit is applied by Luceryn on this interface.
- Errors come as { "error": "..." }.
curl "https://luceryn.example.com/api/assets/handoff/latest?project=CAP-014" \
-H "Authorization: Bearer rpt_EXAMPLE_TOKEN_REPLACE_ME"{
"handoff": {
"id": "2b3c4d5e-6f70-4a81-9b92-a3b4c5d6e7f8",
"status": "sent",
"trigger": "manual",
"prepared_at": "2026-11-20T15:04:05.123+00:00",
"prepared_by": "Sam Rivera",
"assets": 1,
"documents": 1,
"warnings": 0,
"sent_at": "2026-11-20T15:04:07.512+00:00",
"acknowledged_at": null,
"files": [
{ "kind": "json", "name": "CAP-014-asset-handoff-2026-11-20.json", "bytes": 4210, "sha256": "9f2c0d6b1e4f7a8c5d2e9b0a1f6c3d4e7b8a9c0d1e2f3a4b5c6d7e8f9a0b1c2d" }
]
},
"package": {
"schema": "luceryn.asset_handoff.v1",
"prepared_at": "2026-11-20T15:04:05.123Z",
"prepared_by": "Sam Rivera",
"project": {
"id": "9a1c7f2e-3b4d-4e5f-8a6b-7c8d9e0f1a2b",
"name": "Science building roof replacement",
"code": "CAP-014",
"department": "Facilities",
"stage": "closing",
"status": "on track",
"start_date": "2026-09-01",
"end_date": "2027-06-30",
"currency": "CAD",
"buildings": [{ "name": "Science Building", "code": "SCI", "campus": "Main", "address": null }],
"link": "https://luceryn.example.com/projects/9a1c7f2e-3b4d-4e5f-8a6b-7c8d9e0f1a2b"
},
"cost_summary": null,
"funding": null,
"layout": [{ "key": "tag", "header": "Asset tag", "fixed": null }, { "key": "name", "header": "Asset name", "fixed": null }],
"assets": [
{
"luceryn_asset_id": "6d7e8f90-a1b2-4c3d-8e4f-5a6b7c8d9e0f",
"columns": { "Asset tag": "AHU-0042", "Asset name": "Air handling unit, roof" },
"record": {
"tag": "AHU-0042", "name": "Air handling unit, roof", "classification": "Air handling unit", "class_code": "HVAC-AHU", "category": "equipment",
"location": "Roof", "department": "Facilities", "attributes": { "Capacity": "40 kW" },
"manufacturer": "Northfield Mechanical", "model": "NM-40", "serial_number": "SN-48213",
"in_service_date": "2027-06-15", "purchase_date": "2027-03-02", "cost": 125000, "currency": "CAD",
"vendor": "Northfield Mechanical Ltd", "warranty_start": "2027-06-15", "warranty_end": "2029-06-14",
"warranty_documents": [{ "name": "AHU warranty.pdf", "url": "https://luceryn.example.com/api/project-files/0f1e2d3c-4b5a-4698-8776-655443322110" }],
"external_ref": null, "link": "https://luceryn.example.com/assets/6d7e8f90-a1b2-4c3d-8e4f-5a6b7c8d9e0f"
},
"warnings": []
}
],
"documents": [
{ "kind": "Warranty", "title": "AHU warranty", "system": "HVAC", "vendor": "Northfield Mechanical Ltd", "status": "Accepted", "warranty_start": "2027-06-15", "warranty_end": "2029-06-14", "files": [{ "name": "AHU warranty.pdf", "url": "https://luceryn.example.com/api/project-files/0f1e2d3c-4b5a-4698-8776-655443322110" }], "url": "https://luceryn.example.com/projects/9a1c7f2e-3b4d-4e5f-8a6b-7c8d9e0f1a2b/construction?tab=closeout" }
],
"warnings": [],
"counts": { "assets": 1, "documents": 1, "warnings": 0 },
"handoff_id": "2b3c4d5e-6f70-4a81-9b92-a3b4c5d6e7f8",
"trigger": "manual"
}
}MaintainX work orders (Luceryn reads from MaintainX)
| Item | Detail |
|---|---|
| Direction | Out of Luceryn, read only. Luceryn calls MaintainX's API to read the work orders people have linked to a project, and shows their status on the project. Every request is a GET: nothing is ever created or changed in MaintainX. |
| Address | https://api.getmaintainx.com/v1, fixed. Nobody types an address and no other host is called. Redirects are not followed. |
| Authentication | A MaintainX API key that an administrator who holds Manage organization pastes on the MaintainX card under Admin, Connections, sent to MaintainX as Authorization: Bearer; when the key covers several MaintainX organizations, the organization id is sent as x-organization-id. Luceryn stores the key encrypted (AES-256-GCM), never shows it again (the card shows its last four characters) and removes it from any error text it keeps. |
- Switched on by MaintainX work orders (Admin, Industry and features; off by default). Off, nothing is read; links already made are kept.
- Read for each linked work order: its number, title, status, priority, assignees, location, asset, due date and completed date. A change of status is written to the project's activity, and the project manager can be told when a work order is completed.
- Linked work orders are read again every hour, oldest read first, at most 60 for a workspace in one run, and whenever someone presses Refresh on the project.
- Timeout: 10 seconds for each request. Luceryn stops a batch while 5 requests are still left in MaintainX's own rate limit window, and stops refreshing after MaintainX has refused the key 3 times in a row, until the connection is tested again.
- At most 200 work orders linked to one project; a search by title shows at most 25.
- Dependency: a MaintainX plan with API access and a key created in your MaintainX account. No middleware.
- Built from MaintainX's published API description and not yet run against real work orders: the connection is confirmed against your own MaintainX account during setup, with Test connection on the card.
Personal calendar feed (iCalendar)
| Item | Detail |
|---|---|
| Direction | Out of Luceryn. A calendar application (Outlook, Google Calendar, Apple Calendar) subscribes to an address and reads it on its own schedule. |
| Address | GET /api/calendar/{token}.ics (the .ics ending is optional). Content-Type text/calendar. |
| Authentication | The token in the address is the credential. Each person creates their own under Settings, Calendar, and can replace it there; the old address then stops working. Luceryn looks the token up by its SHA-256 hash and keeps an encrypted copy so the person's settings page can show the address again. |
- Holds the plan tasks the person owns whose start date is between 90 days ago and 365 days ahead, and the milestones that name the person as owner. Cancelled items are left out.
- Only items of projects the person can read are included. Items of archived projects are left out.
- Every event is an all-day event. The summary is the project's short code or name, then the task's WBS code and name.
- At most 500 tasks and 500 milestones.
- Calendar applications are asked to refresh every 15 minutes (Cache-Control: private, max-age=900); how often they do is up to them.
- Answers: 404 Invalid token for a token shorter than 16 characters; 404 Not found for an unknown token, which includes an address that has been replaced; 410 for a token marked revoked.
Audit log streaming to a SIEM
| Item | Detail |
|---|---|
| Direction | Out of Luceryn. Luceryn posts batches of audit events to a collector you run. |
| Address | An https address you enter under Admin, SIEM. Two kinds of destination: a generic HTTPS collector, or a Splunk HTTP Event Collector. |
| Authentication | Generic HTTPS: every batch carries X-Luceryn-Source: siem and X-Luceryn-Signature: sha256= followed by the HMAC-SHA256 of the raw body, keyed with the destination's secret (verify it the way a webhook is verified). Splunk: the secret is sent as Authorization: Splunk followed by the token. The secret is stored encrypted. |
- Three sources can be streamed: the admin audit log, the AI activity ledger and AI actions.
- A generic batch is one JSON object: destination, delivered_at, event_count and events. Each event has id, time, source, org_id, action, actor, target, status and detail.
- A Splunk batch is one line for each event, each a JSON object with time, sourcetype (luceryn: followed by the source), source and event.
- New events are collected every five minutes, in batches of up to 200 events.
- Timeout: 10 seconds for each batch. A failed batch is tried again after 2, 4, 8 and so on minutes, never more than six hours apart; after 8 failed attempts it is set aside, and an administrator can send the set-aside batches again from the admin page.
- The address must be https and must not be a private, local or internal address.
Public request form (web page and embed)
| Item | Detail |
|---|---|
| Direction | Into Luceryn. People outside the workspace fill in a web page; each submission becomes a request in the workspace's intake. |
| Address | GET /request/{public id}, a web page. It can be shown inside your own website with an iframe; the form's settings give the snippet to paste. |
| Authentication | None for the visitor: the public id in the address selects the form. Replacing the link in the form's settings makes the old address stop working. |
- This is a page for people, not a machine endpoint: there is no API for posting a submission from another system.
- Embedding is refused by default. Only the website origins listed in the form's settings may frame the page (https only, up to 20, a leading *. allows every subdomain).
- At most 20 attempts in 10 minutes from one network address for each form.
- A cap on submissions in any 24 hours for each form: 200 unless the administrator sets another number, never more than 5,000.
- No file uploads. Short answers up to 300 characters, long answers up to 4,000.
- A form that is switched off, unpublished or unknown shows the same notice, so the page does not say whether an address ever existed.
CRM API
For workspaces that use the CRM module. Tokens are created on the CRM settings page by a person who holds Administer CRM; each is shown once and stored as a SHA-256 hash, and can be revoked there. Errors are JSON of the form { "error": "message" }.
List contacts
GET/api/crm/v1/contacts
The workspace's CRM contacts, in name order.
Authentication. Authorization: Bearer followed by a CRM API token (it starts with crm_). The workspace's CRM must be switched on.
Request: Query string
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
limit | integer | No | How many to return. Default 100, at most 500. | 100 |
email | string | No | Return only the contact with this email address. Capitals do not matter. | sam.rivera@example.edu |
Answer: 200: { "contacts": [ ... ] }, each contact
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
id | string (UUID) | Yes | The contact's id. | 4c5d6e7f-8a9b-4c0d-9e1f-2a3b4c5d6e7f |
full_name | string | Yes | The contact's name. | Sam Rivera |
title | string or null | Yes | Job title. | Director, Capital Planning |
email | string or null | Yes | Email address. | sam.rivera@example.edu |
phone | string or null | Yes | Phone number. | 204-555-0100 |
client_id | string (UUID) or null | Yes | The id of the client the contact belongs to. | |
last_activity_at | string (ISO 8601) or null | Yes | When the contact last had activity. | |
created_at | string (ISO 8601) | Yes | When the contact was created. | 2026-11-20T15:04:05.123+00:00 |
Errors
| Status | Message | When |
|---|---|---|
401 | Unauthorized | No token, an unknown or revoked token, or the CRM is switched off. |
500 | Query failed | The contacts could not be read. |
Limits
- At most 500 contacts in one request. There is no paging: narrow the request with email.
- No request rate limit is applied by Luceryn on this interface.
curl "https://luceryn.example.com/api/crm/v1/contacts?limit=50" \
-H "Authorization: Bearer crm_EXAMPLE_TOKEN_REPLACE_ME"{
"contacts": [
{
"id": "4c5d6e7f-8a9b-4c0d-9e1f-2a3b4c5d6e7f",
"full_name": "Sam Rivera",
"title": "Director, Capital Planning",
"email": "sam.rivera@example.edu",
"phone": "204-555-0100",
"client_id": null,
"last_activity_at": null,
"created_at": "2026-11-20T15:04:05.123+00:00"
}
]
}Create a contact
POST/api/crm/v1/contacts
Adds a contact. When a contact with the same email address already exists, nothing is added and that contact is returned with merged: true.
Authentication. Authorization: Bearer followed by a CRM API token (it starts with crm_). The workspace's CRM must be switched on.
Request: JSON body
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
full_name | string | Yes | The contact's name. Cut to 120 characters. | Sam Rivera |
title | string | No | Job title. Cut to 120 characters. | Director, Capital Planning |
email | string | No | Email address. Used to find an existing contact first. | sam.rivera@example.edu |
phone | string | No | Phone number. Cut to 40 characters. | 204-555-0100 |
Answer: 201: { "contact": { ... } }. 200 with "merged": true when the email already existed. The contact
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
id | string (UUID) | Yes | The contact's id. | 4c5d6e7f-8a9b-4c0d-9e1f-2a3b4c5d6e7f |
full_name | string | Yes | The contact's name. | Sam Rivera |
title | string or null | Yes | Job title. | Director, Capital Planning |
email | string or null | Yes | Email address. | sam.rivera@example.edu |
phone | string or null | Yes | Phone number. | 204-555-0100 |
client_id | string (UUID) or null | Yes | The id of the client the contact belongs to. | |
last_activity_at | string (ISO 8601) or null | Yes | When the contact last had activity. | |
created_at | string (ISO 8601) | Yes | When the contact was created. | 2026-11-20T15:04:05.123+00:00 |
Errors
| Status | Message | When |
|---|---|---|
401 | Unauthorized | No token, an unknown or revoked token, or the CRM is switched off. |
400 | Invalid JSON | The body does not parse. |
400 | full_name is required | No full_name. |
500 | Insert failed | The contact could not be saved. |
Limits
- One contact in one request.
curl -X POST "https://luceryn.example.com/api/crm/v1/contacts" \
-H "Authorization: Bearer crm_EXAMPLE_TOKEN_REPLACE_ME" \
-H "Content-Type: application/json" \
-d '{ "full_name": "Sam Rivera", "email": "sam.rivera@example.edu" }'{
"contact": {
"id": "4c5d6e7f-8a9b-4c0d-9e1f-2a3b4c5d6e7f",
"full_name": "Sam Rivera",
"title": null,
"email": "sam.rivera@example.edu",
"phone": null,
"client_id": null,
"last_activity_at": null,
"created_at": "2026-11-20T15:04:05.123+00:00"
}
}List deals
GET/api/crm/v1/deals
The workspace's deals, newest first. Deleted deals are left out.
Authentication. Authorization: Bearer followed by a CRM API token (it starts with crm_). The workspace's CRM must be switched on.
Request: Query string
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
status | string | No | open, won or lost. Any other value is ignored. | open |
limit | integer | No | How many to return. Default 100, at most 200. | 100 |
Answer: 200: { "deals": [ ... ] }, each deal
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
id | string (UUID) | Yes | The deal's id. | 5e6f7a8b-9c0d-4e1f-a2b3-c4d5e6f7a8b9 |
name | string | Yes | The deal's name. | Campus signage refresh |
value | number or null | Yes | The deal's value. | 48000 |
currency | string or null | Yes | Three letter currency code. | CAD |
status | string | Yes | open, won or lost. | open |
probability | number or null | Yes | Chance of winning, in percent. | 20 |
expected_close | string (YYYY-MM-DD) or null | Yes | Expected close date. | 2027-03-31 |
forecast_category | string or null | Yes | The forecast category chosen for the deal. | |
client_id | string (UUID) or null | Yes | The id of the client. | |
owner_id | string (UUID) or null | Yes | The id of the person who owns the deal. | |
source | string or null | Yes | Where the deal came from. | api |
next_step | string or null | Yes | The next step noted on the deal. | |
lost_reason | string or null | Yes | The reason given when the deal was lost. | |
created_at | string (ISO 8601) | Yes | When the deal was created. | 2026-11-20T15:04:05.123+00:00 |
won_at | string (ISO 8601) or null | Yes | When the deal was won. | |
last_activity_at | string (ISO 8601) or null | Yes | When the deal last had activity. |
Errors
| Status | Message | When |
|---|---|---|
401 | Unauthorized | No token, an unknown or revoked token, or the CRM is switched off. |
500 | Query failed | The deals could not be read. |
Limits
- At most 200 deals in one request. There is no paging.
- No request rate limit is applied by Luceryn on this interface.
curl "https://luceryn.example.com/api/crm/v1/deals?status=open" \
-H "Authorization: Bearer crm_EXAMPLE_TOKEN_REPLACE_ME"{
"deals": [
{
"id": "5e6f7a8b-9c0d-4e1f-a2b3-c4d5e6f7a8b9",
"name": "Campus signage refresh",
"value": 48000,
"currency": "CAD",
"status": "open",
"probability": 20,
"expected_close": "2027-03-31",
"forecast_category": null,
"client_id": null,
"owner_id": null,
"source": "api",
"next_step": null,
"lost_reason": null,
"created_at": "2026-11-20T15:04:05.123+00:00",
"won_at": null,
"last_activity_at": "2026-11-20T15:04:05.123+00:00"
}
]
}Create a deal
POST/api/crm/v1/deals
Adds a deal in the first open stage of the workspace's pipeline. No webhook event is sent for a deal created this way.
Authentication. Authorization: Bearer followed by a CRM API token (it starts with crm_). The workspace's CRM must be switched on.
Request: JSON body
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
name | string | Yes | The deal's name. Cut to 140 characters. | Campus signage refresh |
value | number | No | The deal's value. | 48000 |
expected_close | string (YYYY-MM-DD) | No | Expected close date. Any other form is ignored. | 2027-03-31 |
source | string | No | Where the deal came from. Cut to 60 characters. Default api. | website |
description | string | No | Notes. Cut to 2,000 characters. | Asked for a quote by email |
Answer: 201: { "deal": { ... } }. The deal
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
id | string (UUID) | Yes | The deal's id. | 5e6f7a8b-9c0d-4e1f-a2b3-c4d5e6f7a8b9 |
name | string | Yes | The deal's name. | Campus signage refresh |
value | number or null | Yes | The deal's value. | 48000 |
currency | string or null | Yes | Three letter currency code. | CAD |
status | string | Yes | open, won or lost. | open |
probability | number or null | Yes | Chance of winning, in percent. | 20 |
expected_close | string (YYYY-MM-DD) or null | Yes | Expected close date. | 2027-03-31 |
forecast_category | string or null | Yes | The forecast category chosen for the deal. | |
client_id | string (UUID) or null | Yes | The id of the client. | |
owner_id | string (UUID) or null | Yes | The id of the person who owns the deal. | |
source | string or null | Yes | Where the deal came from. | api |
next_step | string or null | Yes | The next step noted on the deal. | |
lost_reason | string or null | Yes | The reason given when the deal was lost. | |
created_at | string (ISO 8601) | Yes | When the deal was created. | 2026-11-20T15:04:05.123+00:00 |
won_at | string (ISO 8601) or null | Yes | When the deal was won. | |
last_activity_at | string (ISO 8601) or null | Yes | When the deal last had activity. |
Errors
| Status | Message | When |
|---|---|---|
401 | Unauthorized | No token, an unknown or revoked token, or the CRM is switched off. |
400 | Invalid JSON | The body does not parse. |
400 | name is required | No name. |
500 | Insert failed | The deal could not be saved. |
Limits
- One deal in one request.
curl -X POST "https://luceryn.example.com/api/crm/v1/deals" \
-H "Authorization: Bearer crm_EXAMPLE_TOKEN_REPLACE_ME" \
-H "Content-Type: application/json" \
-d '{ "name": "Campus signage refresh", "value": 48000, "expected_close": "2027-03-31" }'{
"deal": {
"id": "5e6f7a8b-9c0d-4e1f-a2b3-c4d5e6f7a8b9",
"name": "Campus signage refresh",
"value": 48000,
"currency": null,
"status": "open",
"probability": 20,
"expected_close": "2027-03-31",
"forecast_category": null,
"client_id": null,
"owner_id": null,
"source": "api",
"next_step": null,
"lost_reason": null,
"created_at": "2026-11-20T15:04:05.123+00:00",
"won_at": null,
"last_activity_at": "2026-11-20T15:04:05.123+00:00"
}
}Web form lead capture
Web form lead capture
POST/api/crm/lead-capture
A form on your own website posts an enquiry here and it becomes a CRM lead with the source web_form. The endpoint answers browsers on any site (Access-Control-Allow-Origin: *).
Authentication. The workspace's web form token, in the query string (?token=) or as token in the body. The token is shown to CRM administrators on the CRM settings page. It is meant to sit in the source of a public web page, so it is a form identifier, not a secret. The CRM and the Web lead capture switch must both be on.
Request: JSON body
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
full_name | string | Yes | The person's name (name is accepted too). Cut to 120 characters. | Sam Rivera |
company | string | No | Cut to 300 characters. | Northfield College |
title | string | No | Cut to 300 characters. | Director, Capital Planning |
email | string | No | Cut to 300 characters. | sam.rivera@example.edu |
phone | string | No | Cut to 300 characters. | 204-555-0100 |
message | string | No | The enquiry (notes is accepted too). Cut to 300 characters. | Please call about the spring program. |
token | string | No | The web form token, when it is not in the query string. |
Answer: 201
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
ok | boolean | Yes | true. The lead's id is not returned. | true |
Errors
| Status | Message | When |
|---|---|---|
400 | Invalid JSON. | The body does not parse. |
401 | Missing token. | No token in the query string or the body. |
401 | Unknown or disabled capture token. | The token matches no workspace, or the workspace's CRM is off. |
403 | Lead capture is switched off for this workspace. | The Web lead capture switch is off. |
400 | full_name is required. | Neither full_name nor name. |
429 | Daily capture limit reached. | 200 web form leads have arrived for the workspace in the last 24 hours. |
500 | Couldn't record the lead. | The lead could not be saved. |
Limits
- 200 leads for a workspace in any 24 hours.
- Errors come as { "ok": false, "error": "..." }.
curl -X POST "https://luceryn.example.com/api/crm/lead-capture?token=EXAMPLE_FORM_TOKEN_REPLACE_ME" \
-H "Content-Type: application/json" \
-d '{ "full_name": "Sam Rivera", "email": "sam.rivera@example.edu", "message": "Please call about the spring program." }'{ "ok": true }Salesforce
Salesforce closed-won intake
POST/api/integrations/salesforce/intake
A Salesforce Flow posts a won opportunity here and Luceryn creates the delivery project, linked to the client with the same account name (created when new) and managed by the person whose email matches the owner.
Authentication. X-Luceryn-Secret header carrying the workspace's Salesforce shared secret (it starts with sf_), created on the Salesforce card under Admin, Connections.
Request: JSON body: { "opportunity": { ... } }
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
opportunity.name | string | Yes | Becomes the project's name. Cut to 140 characters. | Science building roof replacement |
opportunity.amount | number | No | Becomes the project's total budget and is written into its description. | 250000 |
opportunity.account_name | string | No | The client. Matched by name without regard to capitals; created when there is none. | Northfield College |
opportunity.owner_email | string | No | Becomes the project manager when a person with this email exists in the workspace. | sam.rivera@example.edu |
opportunity.description | string | No | Written into the project's description. Cut to 1,500 characters. | Three year maintenance program |
opportunity.close_date | string (YYYY-MM-DD) | No | Accepted and not used. The project's start date is the day the request arrives (Eastern time). | 2026-11-20 |
Answer: 201, or 200 with deduped: true
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
ok | boolean | Yes | true. | true |
project_id | string (UUID) | Yes | The project created, or the one found. | 9a1c7f2e-3b4d-4e5f-8a6b-7c8d9e0f1a2b |
deduped | boolean | No | true when a project with the same name was created in the last 24 hours; nothing new was created. | true |
Errors
| Status | Message | When |
|---|---|---|
401 | Unauthorized | No X-Luceryn-Secret header, one that does not start with sf_, or one that matches no active Salesforce connection. |
400 | Invalid JSON | The body does not parse. |
400 | opportunity.name is required | No opportunity name. |
422 | <the plan's project limit message> | The workspace has reached the number of active projects its plan allows. |
500 | Couldn't create the project | The project could not be saved. |
Limits
- One opportunity in one request.
- The same opportunity name within 24 hours returns the first project instead of creating a second.
- Errors come as { "error": "..." }.
curl -X POST "https://luceryn.example.com/api/integrations/salesforce/intake" \
-H "X-Luceryn-Secret: sf_EXAMPLE_SECRET_REPLACE_ME" \
-H "Content-Type: application/json" \
-d '{ "opportunity": { "name": "Science building roof replacement", "amount": 250000, "account_name": "Northfield College" } }'{ "ok": true, "project_id": "9a1c7f2e-3b4d-4e5f-8a6b-7c8d9e0f1a2b" }Jira issue updates (inbound webhook)
| Item | Detail |
|---|---|
| Direction | Into Luceryn. Jira Cloud calls Luceryn when a linked issue changes, so the linked RAID item follows the issue's status. |
| Address | POST /api/integrations/jira/webhook?token= followed by the token, registered in Jira for the Issue updated event. |
| Authentication | The token in the address, created on the Jira page under Admin. Jira Cloud does not sign its calls, so the token is the credential; Luceryn stores only its SHA-256 hash. |
- Fields read from Jira's body: issue.key, issue.fields.status.name and issue.fields.status.statusCategory.key. Nothing else is used.
- Only RAID items of this workspace's own live projects that are linked to that issue key are changed.
- A well formed call always answers 200, even when nothing matched. 401 for a missing or unknown token or a paused connection; 400 for a body that is not JSON.
Health check
Health check
GET/api/health
For an uptime monitor: says whether the application and its database are answering. It returns no workspace data.
Authentication. None.
Answer: 200 when healthy, 503 when the database cannot be reached within 3 seconds
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
status | string | Yes | ok or degraded. | ok |
db | string | Yes | ok or unreachable. | ok |
took_ms | integer | Yes | How long the check took, in milliseconds. | 41 |
Limits
- Never cached (Cache-Control: no-store).
curl "https://luceryn.example.com/api/health"{ "status": "ok", "db": "ok", "took_ms": 41 }Addresses under /api that are not interfaces
Everything else under /api serves the app itself, a provider that Luceryn connects to, or a signed-in person's download. They are listed so the reference is complete; none of them is meant to be called by a customer's system.
| Address begins | What it is | Why it is not an interface |
|---|---|---|
/api/cron/ | Scheduled jobs (among them the hourly MaintainX refresh and the automatic asset hand-off) | Called only by Luceryn's own scheduler with a secret the service holds. |
/api/webhooks/ | Calls from Microsoft Graph, the meeting recorder, Slack and Microsoft Teams | Each is called by that provider and verified with that provider's own signature or shared state. They are set up from the connection cards, not by calling them. |
/api/billing/webhook | The payment provider's notifications | Called by the payment provider and verified with its signature. |
/api/integrations/atlassian/oauth | Sign-in return address for Atlassian | Part of connecting an account in the browser. |
/api/integrations/google/oauth | Sign-in return address for Google | Part of connecting an account in the browser. |
/api/integrations/salesforce/oauth | Sign-in return address for Salesforce | Part of connecting an account in the browser. |
/api/integrations/slack/ | Slack sign-in return addresses and slash commands | Called by Slack and verified with Slack's signature. |
/api/admin/ | Maintenance actions and the workspace export download | Used by the admin screens with a signed-in session. |
/api/teams/app-package | The Microsoft Teams app package download | A file download from the Teams connection card. |
/api/version | Build identity | Says which build is running. Used by Luceryn's own release checks; it carries no workspace data. |
/api/itsm/csat | Satisfaction rating links | Opened by a person from a signed link in a service desk email. |
/api/inbound-email/lazy | Mail catch-up trigger | Called by the app itself with a signed-in session. |
/api/lyrian/chat | The assistant's chat stream | Called by the app itself with a signed-in session. |
/api/quickstart/ | Project quick start | Called by the app itself with a signed-in session. |
/api/documents/ | Word and PowerPoint downloads of a document, and draft streaming | Downloads and streams for a signed-in person; they need a browser session, not a token. |
/api/status-report-requests/predraft | Status report drafting | Called by the app itself with a signed-in session. |
/api/project-files/ | File downloads and previews | Downloads for a signed-in person, checked against that person's access. |
/api/plan-export/ | Plan PowerPoint export | A download for a signed-in person. |
/api/raid/ | RAID log Excel export | A download for a signed-in person. |
/api/construction/ | Construction registers Excel export | A download for a signed-in person. |
/api/bluebeam/ | Review markups Excel export | A download for a signed-in person. |
/api/assets/xlsx | Asset register export | A download for a signed-in person. |
/api/assets/stocktake/ | Stocktake export | A download for a signed-in person. |
/api/assets/handoff/[id]/ | The files of an asset hand-off package (Excel, CSV, JSON) | Downloads for a signed-in person who can read the project and see its money. A system reads the package from /api/assets/handoff/latest or receives it by webhook. |
/api/capital/cost-summary | Cost summary and cost list export (CSV or Excel) | A download for a signed-in person who holds View financials. |
/api/portfolio-benefits/export | Benefit measurements export (CSV or Excel) | A download for a signed-in person who holds View financials. |
/api/scoring/ranking/export | Project and proposal ranking export (Excel) | A download for a signed-in person, checked against that person's access to scoring. |
/api/stage-gates/decision-log | Gate decision log export (Excel) | A download for a signed-in person, checked against that person's access to the project. |
/api/sustainability/export | Sustainability tracking export (CSV or Excel) | A download for a signed-in person. |
/api/vendors/evaluations/export | Contractor evaluations export | A download for a signed-in person. |
/api/reports/custom/ | Custom report export | A download for a signed-in person. |
/api/invoices/ | Invoice print view | A page for a signed-in person. |
/api/accounting/export | Invoice export for QuickBooks or Xero (CSV) | A download for a signed-in person who holds the invoices permission, so the export is tied to a person. It is a file hand-off, not a token interface. |
/api/resources/ | Assignment history | Called by the app itself with a signed-in session. |
/api/map/background | Campus map background image | An image for a signed-in person. |
/api/crm/documents/ | CRM document download | A download for a signed-in person. |
/api/crm/rfp-convert | RFP conversion | Called by the app itself with a signed-in session. |
/api/crm/rfp/ | RFP package download | A download for a signed-in person. |
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