LendLucid API · v1
API reference
Create applications, upload statements, embed bank connections in your app, run analysis, and read the same evidence-linked results your team sees in the workspace.
Scoped keys
Bearer ll_live_ keys limited to one organization.
Signed events
HMAC-SHA256 signatures with stable event IDs.
Safe retries
Idempotency-Key on every create.
Quickstart
- Get an organization key from Workspace → API & webhooks (or from your partner provisioning call).
- Create an application with your existing authorization references under an enabled upstream partner arrangement, or use the merchant/company authority paths.
- Add data: upload statement PDFs, embed a bank connection, or both.
- Upstream-authorized cases process new statement uploads and usable bank imports automatically; other cases start a job explicitly. Read the saved result or receive
analysis.completed.
https://lendlucid.com/api/public/v1Authentication
Send Authorization: Bearer ll_live_…. Keys belong to one organization and carry explicit scopes; every request only sees that organization's data. Keys are stored as hashes and can be revoked at any time.
Applications
Create an application
/applicationsCreate a file for one business. Send your own external_ref to match it to your system.
- scope:
applications:writeIdempotency-Key supportedParameters (15)
external_ref / external_case_idstring · at least one required · 1–120- Trimmed, unique within your organization. external_case_id is an alias stored as external_ref; if both supplied they must match. Duplicate returns 409 external_ref_exists.
authorization_reference / authorization_signed_at / authorization_document_sha256optional together · string / timestamp / SHA-256- For enabled upstream partner arrangements, send all three: reference 1–200 characters, actual nonfuture ISO timestamp and 64 hex document hash. Captures existing authority with case creation; not a signature or legal acceptance. Requires analysis:run in addition to applications:write.
vendor_id / tenant_idstring · optional · max 120 each- Only with upstream evidence. Vendor must match partner name/UUID; tenant must match linked external_company_id. Credentials, not these identifiers, scope all access.
businessobject · required- Create requires legal_name.
requested_amountnumber · optional · 0–1,000,000,000 dollars- Omitted stores null; explicit null is rejected on create.
purposestring · optional · max 500- Trimmed; omission stores null. Explicit null is rejected on create.
business.legal_namestring · 1–200 characters- Required on create; optional on update. Trimmed; cannot be null or empty.
business.dba / industry / industry_codestring | null · optional- Trimmed maximum lengths: 200 / 120 / 10 characters respectively.
business.statestring | null · optional- Exactly two letters after trimming; stored uppercase. Not a state-code allowlist.
business.entity_typestring | null · optional · max 40- Trimmed free text, not an enum.
business.formed_onstring | null · optional- YYYY-MM-DD pattern; current validator does not check calendar validity.
business.tax_id_last4string | null · optional- Exactly four digits. Never send a full tax ID.
business.external_refstring | null · optional · max 120- Business-level reference; distinct from the application external_ref. Accepted but not returned in the public business projection.
loan_productstring | null · optional · max 120- Trimmed free text, not a fixed product enum. null clears the value on update.
bodystrict JSON · max 20,000 characters- Unknown top-level or business properties rejected; excessive text returns 413 payload_too_large.
Response fields (6)
data.id / external_refstring / string | null- Application ID and your application reference. Organization and business IDs are not returned.
data.status / analysis_statusstring- Stored file and analysis states, separate from job.state. Neither is a funding approval.
data.requested_amountnumber | null · dollars- Requested financing amount; not cents.
data.purpose / loan_productstring | null- Stored purpose and loan product.
data.created_at / updated_atstring- Stored application timestamps; business-only updates do not necessarily advance the application timestamp.
data.businessobject | null- legal_name, dba, industry, industry_code, state, entity_type, formed_on and tax_id_last4. Optional business fields may be null.
- Returns 201 with the business projection. Creation with valid upstream references records application evidence; no separate signature/instruction is needed. It does not connect a bank, extract a document or record legal acceptance.
- New bank-statement uploads on upstream-authorized cases automatically queue/coalesce analysis; bank imports wait for usable history. Cases using only existing merchant/company paths keep explicit analysis behavior.
- Preserve the same Idempotency-Key and identical body when retrying an uncertain request.
curl -X POST "https://lendlucid.com/api/public/v1/applications" \
-H "Authorization: Bearer $LENDLUCID_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{ "external_ref": "deal_1042", "business": { "legal_name": "Acme Bakery LLC", "state": "NY", "entity_type": "llc", "formed_on": "2019-04-01", "industry_code": "311811", "tax_id_last4": "1234" }, "requested_amount": 75000, "loan_product": "mca" }'{
"data": {
"id": "app_uuid",
"external_ref": "deal_1042",
"status": "open",
"analysis_status": "pending",
"requested_amount": 75000,
"purpose": null,
"loan_product": "mca",
"created_at": "2026-10-26T00:00:00Z",
"updated_at": "2026-10-26T00:00:00Z",
"business": {
"legal_name": "Acme Bakery LLC",
"dba": null,
"industry": null,
"industry_code": "311811",
"state": "NY",
"entity_type": "llc",
"formed_on": "2019-04-01",
"tax_id_last4": "1234"
}
}
}Applications
List applications
/applications?limit=25&offset=0Page through your organization's applications, newest first.
- scope:
applications:readParameters (3)
limitnumber · default 25 · max 100- Use positive integers. Zero/nonnumeric input defaults to 25; negative values clamp to 1.
offsetnumber · default 0- Zero-based offset; negative values clamp to 0. Use nonnegative integers.
external_refstring · optional- Exact application reference match. Nonempty query is truncated to 120 characters, not trimmed.
Response fields (8)
dataobject[]- Newest created first. No total count is returned; stop paging when fewer than limit rows return.
data[].id / external_refstring / string | null- Application ID and your application reference. Organization and business IDs are not returned.
data[].status / analysis_statusstring- Stored file and analysis states, separate from job.state. Neither is a funding approval.
data[].requested_amountnumber | null · dollars- Requested financing amount; not cents.
data[].purpose / loan_productstring | null- Stored purpose and loan product.
data[].created_at / updated_atstring- Stored application timestamps; business-only updates do not necessarily advance the application timestamp.
data[].businessobject | null- legal_name, dba, industry, industry_code, state, entity_type, formed_on and tax_id_last4. Optional business fields may be null.
limit / offsetnumber- Effective page settings returned at the top level.
- List rows do not include analysis or latest_job. Read the application detail for those pointers.
curl -X GET "https://lendlucid.com/api/public/v1/applications?limit=25&offset=0" \
-H "Authorization: Bearer $LENDLUCID_KEY"{
"data": [
{
"id": "app_uuid",
"external_ref": "deal_1042",
"status": "open",
"analysis_status": "pending",
"requested_amount": 75000,
"purpose": null,
"loan_product": "mca",
"created_at": "2026-10-26T00:00:00Z",
"updated_at": "2026-10-26T00:00:00Z",
"business": {
"legal_name": "Acme Bakery LLC",
"dba": null,
"industry": null,
"industry_code": "311811",
"state": "NY",
"entity_type": "llc",
"formed_on": "2019-04-01",
"tax_id_last4": "1234"
}
}
],
"limit": 25,
"offset": 0
}Applications
Retrieve an application
/applications/{id}Business details, status and latest analysis pointer.
- scope:
applications:readResponse fields (10)
data.id / external_refstring / string | null- Application ID and your application reference. Organization and business IDs are not returned.
data.status / analysis_statusstring- Stored file and analysis states, separate from job.state. Neither is a funding approval.
data.requested_amountnumber | null · dollars- Requested financing amount; not cents.
data.purpose / loan_productstring | null- Stored purpose and loan product.
data.created_at / updated_atstring- Stored application timestamps; business-only updates do not necessarily advance the application timestamp.
data.businessobject | null- legal_name, dba, industry, industry_code, state, entity_type, formed_on and tax_id_last4. Optional business fields may be null.
data.analysisobject | null- Latest saved analysis pointer, or null: version, engine_version, nullable as_of, created_at, source_mix, nullable summary and signals[].
data.analysis.summaryJSON | null- Stored internal summary, not the standardized full financial response. Retrieve the saved analysis version for the public financial schema.
data.analysis.signals[]object- code, nullable severity and nullable title. Full signal detail and evidence are available in the analysis endpoint.
data.latest_jobobject | null- Latest created job, or null: id, state, stage and created_at. Read /jobs/{id} for full progress, usage and error fields.
- There is no latest_analysis_version field; use data.analysis.version. No saved analysis yields analysis:null, not a fabricated zero-valued result.
curl -X GET "https://lendlucid.com/api/public/v1/applications/app_uuid" \
-H "Authorization: Bearer $LENDLUCID_KEY"{
"data": {
"id": "app_uuid",
"external_ref": "deal_1042",
"status": "open",
"analysis_status": "pending",
"requested_amount": 75000,
"purpose": null,
"loan_product": "mca",
"created_at": "2026-10-26T00:00:00Z",
"updated_at": "2026-10-26T00:00:00Z",
"business": {
"legal_name": "Acme Bakery LLC",
"dba": null,
"industry": null,
"industry_code": "311811",
"state": "NY",
"entity_type": "llc",
"formed_on": "2019-04-01",
"tax_id_last4": "1234"
},
"analysis": null,
"latest_job": null
}
}Applications
Update an application
/applications/{id}Change business details, requested amount or loan product.
- scope:
applications:writeIdempotency-Key supportedParameters (12)
businessobject · optional- Partial business update. Omitted fields remain unchanged; legal_name cannot be cleared.
requested_amountnumber | null · optional · 0–1,000,000,000 dollars- null clears the value; omission leaves it unchanged.
purposestring | null · optional · max 500- Trimmed; null clears the value.
business.legal_namestring · 1–200 characters- Required on create; optional on update. Trimmed; cannot be null or empty.
business.dba / industry / industry_codestring | null · optional- Trimmed maximum lengths: 200 / 120 / 10 characters respectively.
business.statestring | null · optional- Exactly two letters after trimming; stored uppercase. Not a state-code allowlist.
business.entity_typestring | null · optional · max 40- Trimmed free text, not an enum.
business.formed_onstring | null · optional- YYYY-MM-DD pattern; current validator does not check calendar validity.
business.tax_id_last4string | null · optional- Exactly four digits. Never send a full tax ID.
business.external_refstring | null · optional · max 120- Business-level reference; distinct from the application external_ref. Accepted but not returned in the public business projection.
loan_productstring | null · optional · max 120- Trimmed free text, not a fixed product enum. null clears the value on update.
bodystrict JSON · max 20,000 characters- Unknown top-level or business properties rejected; excessive text returns 413 payload_too_large.
Response fields (6)
data.id / external_refstring / string | null- Application ID and your application reference. Organization and business IDs are not returned.
data.status / analysis_statusstring- Stored file and analysis states, separate from job.state. Neither is a funding approval.
data.requested_amountnumber | null · dollars- Requested financing amount; not cents.
data.purpose / loan_productstring | null- Stored purpose and loan product.
data.created_at / updated_atstring- Stored application timestamps; business-only updates do not necessarily advance the application timestamp.
data.businessobject | null- legal_name, dba, industry, industry_code, state, entity_type, formed_on and tax_id_last4. Optional business fields may be null.
- Returns 200 with the application/business projection, without analysis or latest_job. The handler supports Idempotency-Key replay.
- Application external_ref, status and analysis_status cannot be changed through this body. Empty updates are accepted. Re-read the file to confirm changes; current handler does not check every intermediate update error.
curl -X PATCH "https://lendlucid.com/api/public/v1/applications/app_uuid" \
-H "Authorization: Bearer $LENDLUCID_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{ "requested_amount": 90000 }'{
"data": {
"id": "app_uuid",
"external_ref": "deal_1042",
"status": "open",
"analysis_status": "pending",
"requested_amount": 90000,
"purpose": null,
"loan_product": "mca",
"created_at": "2026-10-26T00:00:00Z",
"updated_at": "2026-10-26T00:00:00Z",
"business": {
"legal_name": "Acme Bakery LLC",
"dba": null,
"industry": null,
"industry_code": "311811",
"state": "NY",
"entity_type": "llc",
"formed_on": "2019-04-01",
"tax_id_last4": "1234"
}
}
}Applications
Record application closure
/applications/{id}/closureRecord an unfunded, withdrawn or declined file's closure and start its 90-day retention window. This does not immediately delete the file.
- scope:
applications:writeIdempotency-Key supportedParameters (3)
reasonstring · required- Exactly one of unfunded, withdrawn or declined. Any other value returns 422 validation_failed.
closed_atstring · required · ISO 8601 with timezone- Must not be in the future; future dates return 422. Retention dates are computed from this value.
bodystrict JSON · max 2,000 characters- Unknown properties are rejected; oversized bodies return 413 payload_too_large.
Response fields (6)
data.kindstring- Always closure for this endpoint; terminations are a separate partner operation.
data.reasonunfunded | withdrawn | declined- The closure reason you sent, stored verbatim.
data.effective_atstring- The closed_at timestamp you sent; retention dates are computed from it.
data.statestring- Lifecycle state, scheduled while the retention window runs.
data.purge_afterstring- effective_at + 89 days. Financial records become eligible for removal after this date.
data.delete_bystring- effective_at + 90 days. The file must be deleted by this deadline.
- Returns 201 with the stored lifecycle row. This records closure and starts the 90-day window; it does not immediately delete the file.
- Existing lifecycle dates cannot be overwritten silently; a file that already has lifecycle dates returns a conflict rather than a changed date.
- New ingestion and processing stop after closure. Deletion may still be blocked by a documented hold or active processing.
- Idempotency-Key is supported; replay the same key and body after an uncertain response instead of posting again.
curl -X POST "https://lendlucid.com/api/public/v1/applications/app_uuid/closure" \
-H "Authorization: Bearer $LENDLUCID_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{ "reason": "withdrawn", "closed_at": "2026-10-25T00:00:00Z" }'{
"data": {
"kind": "closure",
"reason": "withdrawn",
"effective_at": "2026-10-25T00:00:00Z",
"state": "scheduled",
"purge_after": "2027-01-22T00:00:00.000Z",
"delete_by": "2027-01-23T00:00:00.000Z"
}
}Applications
Delete an application
/applications/{id}Request immediate deletion of a file, its financial records and bank connections. A completed deletion returns a receipt; minimal authority evidence and the receipt are retained for six years.
- scope:
applications:deleteResponse fields (5)
data.receipt_idstring- ID of the stored deletion receipt. Keep it as proof of deletion.
data.application_idstring- The deleted application.
data.deleted_atstring- Deletion timestamp; the six-year evidence window runs from this date.
data.deletedobject- Counts of removed records: documents, transactions, analyses and bank_connections.
data.retainedobject- What is kept: minimal authorization evidence and the deletion receipt, each retained six years from deletion with no financial files.
- Returns 200 with the receipt after completed deletion. A documented hold returns 409 legal_hold; a running job returns 409 job_running — retry after it finishes.
- Failed provider or file removal is not reported as completed deletion; a 200 receipt means removal finished.
- Deletion removes the file, its financial records and bank connections, and emits the application.deleted webhook event. It is separate from closure, which only starts the retention window.
- Requires the applications:delete scope, which is not granted by default to all keys.
curl -X DELETE "https://lendlucid.com/api/public/v1/applications/app_uuid" \
-H "Authorization: Bearer $LENDLUCID_KEY"{
"data": {
"receipt_id": "receipt_uuid",
"application_id": "app_uuid",
"deleted_at": "2026-10-25T00:00:00Z",
"deleted": {
"documents": 1,
"transactions": 17,
"analyses": 1,
"bank_connections": 0
},
"retained": {
"authorization_evidence": "Minimal evidence retained for six years from deletion; no financial files.",
"deletion_receipt": "Minimal receipt retained for six years from deletion."
}
}
}Applications
Read processing authority
/applications/{id}/processing-instructionGet the company notice, hash, required operations and combined authority status for this file.
- scope:
applications:readParameters (1)
id (path)UUID- Application owned by the organization key; inaccessible files return 404.
Response fields (19)
data.versionstring- Current company-instruction version.
data.notice_textstring- Exact party-bound company notice.
data.notice_hash64 lowercase hex characters- Current notice fingerprint to echo on POST.
data.required_operationsstring[]- All five required operations from the current notice.
data.statusenum- Company-path status: missing, revoked, instruction_changed, not_yet_valid, expired, active or merchant_withdrawn. Not the combined permission.
data.permittedboolean- Combined merchant/company permission, false when lifecycle blocks processing.
data.active_pathstring | null- merchant_authorization, company_instruction or null; merchant path takes precedence.
data.merchant_authorization_activeboolean- Merchant evidence check; lifecycle blocking is reflected separately in permitted.
data.merchant_action_requiredboolean- True for merchant_withdrawn.
data.blocked_reasonstring | null- application_closed for lifecycle blocking, null if permitted, otherwise company-path status.
data.latest_eventobject | null- Latest company event, not the merchant event; null when absent.
data.latest_event.idUUID- Append-only evidence event identifier.
data.latest_event.actionstring- Event action, not a funding decision.
data.latest_event.recorded_atISO timestamp- Server-recorded time, distinct from the claimed acceptance time.
data.latest_event.versionstring- Stored notice version.
data.latest_event.notice_hashstring- Stored hash; empty on revocation.
data.latest_event.valid_fromISO timestamp | null- Authority start; null on revocation.
data.latest_event.expires_atISO timestamp | null- Authority expiry; null on revocation.
data.latest_event.syntheticboolean- Label only, never bypasses checks.
- All parties, evidence references and hashes in these examples are fictional. GET the actual file's current notice; retain the real capture record privately. No consent is recorded by reading this page.
- Read failures return 503 authorization_unavailable. A missing instruction returns 200; a valid independent merchant path may still permit processing when company status is missing or revoked.
curl -X GET "https://lendlucid.com/api/public/v1/applications/app_uuid/processing-instruction" \
-H "Authorization: Bearer $LENDLUCID_KEY"{
"data": {
"version": "company-processing-v1.0",
"notice_text": "COMPANY PROCESSING INSTRUCTION\nVersion: company-processing-v1.0\nBusiness: Acme Bakery LLC\nInstructing organization: Acme Capital\n\nThe instructing organization directs FundSuite and LendLucid LLC to process deliberately supplied business bank or processor statements for this application's business-financing review. Processing includes private statement upload, extraction (including necessary AI transcription), deterministic cash-flow analysis and source-linked evidence/reports. This instruction is not a merchant signature or legal finding. The organization must have an existing, unexpired documented agreement or authority covering this business, application, purpose, these recipients and all these operations; the instructing staff member must be authorized by that organization. Retain the actual agreement and supporting evidence in controlled company records and supply only opaque references here, not financial records or unnecessary personal information.\n\nNo consumer credit inquiry, personal eligibility decision, bank connection, recurring bank access, post-funding monitoring, marketing, resale, unrelated-company sharing or additional financing recipient is authorized. Those require their own appropriate authority and disclosures. LendLucid supports human review and does not approve financing or make credit decisions.\n\nThe organization must not use this instruction to circumvent a merchant's withdrawal or disputed authority. Missing scope, expired authority or a merchant withdrawal blocks this path; resolve the documented basis or obtain genuine merchant action where needed. Changes to parties, purpose, operations, agreement version or this notice require a new instruction. Revocation blocks future work; steps already executing may finish. Deletion and explicit closure/termination retention remain separate. Minimal instruction evidence is retained for six years from completed application deletion, subject to documented holds. Financial data is not retained in the evidence reference. Privacy contact: support@lendlucid.com.\n\nAn authorized company staff member attests that the referenced records actually establish the stated processing authority and instructs processing on the company's behalf. No merchant consent boxes, identity or electronic signature are manufactured by this instruction.",
"notice_hash": "58b65bc1b8fe13df71bdf585d97673b8e526105ffb586949b7805db5edb0ff20",
"required_operations": [
"statement_upload",
"statement_extraction",
"ai_transcription",
"cash_flow_analysis",
"evidence_reports"
],
"status": "missing",
"permitted": false,
"active_path": null,
"merchant_authorization_active": false,
"merchant_action_required": false,
"blocked_reason": "missing",
"latest_event": null
}
}Applications
Record company processing instruction
/applications/{id}/processing-instructionAn authorized staff member records existing documented company authority for deliberately supplied statement processing. This is not a merchant signature.
- scope:
applications:writeIdempotency-Key supported- Use the actual current GET notice hash and real agreement evidence. All five operations and all three recipients are required; authority must be current.
- The notice excludes bank connection, recurring access and post-funding monitoring; arrange their appropriate authority separately.
- A merchant withdrawal blocks this path. Optional synthetic labels never bypass safeguards.
Parameters (16)
id (path)UUID- Application owned by the organization key; inaccessible files return 404.
versionliteral string- company-processing-v1.0
notice_hash64 lowercase hex characters- Current GET hash; mismatch returns 409 instruction_changed.
staff_refstring · 1–200- Trimmed opaque authorized staff reference.
staff_capacityenum- company_admin or assigned_sales_rep.
purposeliteral string- business_financing_review.
agreement_refstring · 1–300- Opaque reference to existing documented authority.
agreement_versionstring · 1–120- Trimmed agreement version.
evidence_refstring · 1–300- Opaque private evidence reference.
authority_basisliteral string- existing_documented_agreement.
authority_attestedliteral true- Company staff attestation, never a merchant signature.
operationsenum[] · exactly 5 unique- statement_upload, statement_extraction, ai_transcription, cash_flow_analysis, evidence_reports
recipientsenum[] · exactly 3 unique- instructing_organization, fundsuite, lendlucid_and_disclosed_processors.
valid_fromISO timestamp with timezone- Must not be in the future.
expires_atISO timestamp with timezone- Must follow valid_from and be later than now.
syntheticboolean · default false- Optional test label; never bypasses authority or lifecycle safeguards.
Response fields (8)
data.idUUID- Append-only evidence event identifier.
data.actionstring- Event action, not a funding decision.
data.recorded_atISO timestamp- Server-recorded time, distinct from the claimed acceptance time.
data.versionstring- Stored company version.
data.valid_fromISO timestamp- Authority start.
data.expires_atISO timestamp- Authority expiry.
data.syntheticboolean- Stored label.
notestring- Top-level reminder that attestation is not a merchant signature or legal verification.
- POST accepts strict JSON with at most 10,000 characters as measured by the handler (not a byte limit). Invalid JSON returns 400 invalid_json; oversize input returns 413 payload_too_large.
- All parties, evidence references and hashes in these examples are fictional. GET the actual file's current notice; retain the real capture record privately. No consent is recorded by reading this page.
- 201 returns the stored event. Invalid fields/scope return 422 insufficient_authority_scope. Current-time failures return 422 authority_expired_or_future; withdrawal returns 403 merchant_action_required.
- Idempotency-Key is supported. Merchant identity/signature fields are rejected. The notice does not authorize bank connection, recurring access or monitoring.
curl -X POST "https://lendlucid.com/api/public/v1/applications/app_uuid/processing-instruction" \
-H "Authorization: Bearer $LENDLUCID_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{ "version": "company-processing-v1.0", "notice_hash": "58b65bc1b8fe13df71bdf585d97673b8e526105ffb586949b7805db5edb0ff20", "staff_ref": "staff_42", "staff_capacity": "assigned_sales_rep", "purpose": "business_financing_review", "agreement_ref": "agreement_1042", "agreement_version": "1", "evidence_ref": "evidence_1042", "authority_basis": "existing_documented_agreement", "authority_attested": true, "operations": [ "statement_upload", "statement_extraction", "ai_transcription", "cash_flow_analysis", "evidence_reports" ], "recipients": [ "instructing_organization", "fundsuite", "lendlucid_and_disclosed_processors" ], "valid_from": "2026-10-25T00:00:00Z", "expires_at": "2027-10-25T00:00:00Z" }'{
"data": {
"id": "instruction_uuid",
"action": "instructed",
"version": "company-processing-v1.0",
"recorded_at": "2026-10-25T00:00:01Z",
"valid_from": "2026-10-25T00:00:00Z",
"expires_at": "2027-10-25T00:00:00Z",
"synthetic": false
},
"note": "Company attestation recorded, not a merchant signature or legal verification. Synthetic labels never bypass safeguards."
}Applications
Revoke a company instruction
/applications/{id}/processing-instructionAppend a revocation without erasing history. A separately valid merchant authorization remains independent.
- scope:
applications:writeIdempotency-Key supported- Already executing steps may finish. Closing or deleting the file is separate.
Parameters (1)
id (path)UUID- Application owned by the organization key; inaccessible files return 404.
Response fields (5)
data.idUUID- Append-only evidence event identifier.
data.actionstring- Event action, not a funding decision.
data.recorded_atISO timestamp- Server-recorded time, distinct from the claimed acceptance time.
data.versionstring- Company-instruction version.
notestring- Top-level reminder that independent merchant permission remains and closure/deletion are separate.
- No request body is used; returns 200 with action:revoked. Idempotency-Key is supported using a fixed revocation payload.
- Appends history rather than erasing it. Revoke affects company authority only; separately valid merchant authorization may still permit processing. Already executing steps may finish.
curl -X DELETE "https://lendlucid.com/api/public/v1/applications/app_uuid/processing-instruction" \
-H "Authorization: Bearer $LENDLUCID_KEY" \
-H "Idempotency-Key: $(uuidgen)"{
"data": {
"id": "instruction_uuid",
"action": "revoked",
"version": "company-processing-v1.0",
"recorded_at": "2026-10-25T00:00:01Z"
},
"note": "Company instruction revoked. A separately valid merchant authorization remains independent. Already executing steps may finish; deletion and closure are separate."
}Documents
Upload a statement PDF
/applications/{id}/documentsSend the PDF as the raw body (Content-Type: application/pdf, up to 25 MB). Scans and any bank are supported. Duplicates are detected by file hash.
- scope:
documents:writeIdempotency-Key supportedParameters (4)
Content-Typeheader · application/pdf · required- Raw PDF bytes, not JSON, base64 or multipart. Wrong media type returns 415 unsupported_media_type.
bodybinary · 5–26,214,400 bytes- Must start with %PDF-. Oversized files return 413 file_too_large; invalid PDF signature returns 422 not_a_pdf.
X-File-Nameheader · optional- Defaults to statement.pdf; unsupported characters replaced with underscores and name truncated to 150 characters.
X-Content-SHA256header · optional- SHA-256 of the exact bytes; a mismatch returns 422 hash_mismatch.
Response fields (3)
data.id / file_name / sha256 / status / created_atstored document fields- Returned for both new and duplicate documents.
data.duplicateboolean- false for newly recorded uploads; true for an existing same-file hash in this application.
data.size_bytesnumber · new upload only- Actual byte length. Duplicate responses omit this field.
- New upload returns 201; a detected duplicate returns 200 with the existing document and its current status. Idempotent replay can retain the original response.
- Upstream-authorized partner cases automatically coalesce new uploads into an analysis job; duplicate-only uploads do not create new work. Merchant/company-instruction-only cases retain explicit analysis. Use List documents and job status for progress; tax returns/P&L are not bank-statement inputs.
curl -X POST "https://lendlucid.com/api/public/v1/applications/app_uuid/documents" \
-H "Authorization: Bearer $LENDLUCID_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/pdf" \
--data-binary @statement.pdf{
"data": {
"id": "doc_uuid",
"file_name": "statement.pdf",
"sha256": "fictional_sha256",
"status": "uploaded",
"created_at": "2026-10-26T00:00:00Z",
"size_bytes": 1024,
"duplicate": false
}
}Documents
List documents
/applications/{id}/documentsEvery statement with reading status and progress, including bank-delivered statements.
- scope:
applications:readResponse fields (7)
dataobject[]- Documents ordered by created_at ascending; no pagination or total field.
data[].id / file_name / sha256 / originstring- Stored document identity, name, file hash and provenance; API uploads use origin api.
data[].size_bytesnumber- Stored byte length.
data[].statusstring- Stored reading state, including uploaded, ready, needs_review or error.
data[].status_detail / progress_stagestring | null- Stored status detail and reading stage.
data[].progress_pctnumber | null- Stored reading progress; not a guarantee that analysis is complete.
data[].created_at / updated_atstring- Stored timestamps.
- Bank-delivered statement PDFs and manually uploaded statements appear in this same list. An empty list is valid.
curl -X GET "https://lendlucid.com/api/public/v1/applications/app_uuid/documents" \
-H "Authorization: Bearer $LENDLUCID_KEY"{
"data": [
{
"id": "doc_uuid",
"file_name": "statement.pdf",
"size_bytes": 1024,
"sha256": "fictional_sha256",
"status": "uploaded",
"status_detail": null,
"progress_stage": null,
"progress_pct": 0,
"origin": "api",
"created_at": "2026-10-26T00:00:00Z",
"updated_at": "2026-10-26T00:00:00Z"
}
]
}Documents
Download a document
/applications/{id}/documents/{docId}/downloadReturns a signed link to the original file, valid for 5 minutes.
- scope:
results:readParameters (1)
docIdUUID · path- Document must belong to the named application and organization.
Response fields (4)
data.idstring- Document ID.
data.file_namestring- Original stored filename.
data.urlstring · signed HTTPS URL- Temporary bearer download link; keep it private and do not log or persist it as a permanent public URL.
data.expires_innumber · seconds- 300 seconds. Request a new URL when expired.
- This endpoint returns JSON, not PDF bytes. Fetch the signed URL to obtain the original file. A missing document or storage path returns 404.
curl -X GET "https://lendlucid.com/api/public/v1/applications/app_uuid/documents/doc_uuid/download" \
-H "Authorization: Bearer $LENDLUCID_KEY"{ "data": { "id": "doc_uuid", "file_name": "statement.pdf", "url": "https://…", "expires_in": 300 } }Bank connections
Start an embedded bank connection
/applications/{id}/link-sessionsGet a link_token and open Plaid Link inside your own app. Pass connection_id to reconnect an existing bank, and redirect_uri so OAuth banks return the merchant to your app.
- scope:
applications:write- Open Plaid Link with the link_token using Plaid's web, iOS or Android SDK.
- On success, Plaid gives your app a one-time public_token. Send it to Complete a bank connection.
- Bank logins and access tokens never reach your servers.
- redirect_uri is optional and must exactly match a registered partner return address (see field reference); unregistered addresses are rejected with 422.
Parameters (3)
connection_idUUID · optional- Omit for create mode. Send an existing connection ID for update mode. null is rejected; an empty object is valid. Unknown fields are rejected.
client_namestring · optional · 1–30 characters after trimming- Company display name passed to Plaid Link in create and update mode. Defaults to LendLucid when omitted. Empty, null and overlength values return 422. Display branding only: it does not select a company, authorize access or replace the organization key.
redirect_uriHTTPS URL · optional · max 500- Return address for banks that sign in on their own site (OAuth banks such as Chase or Capital One). Must exactly match a registered partner return address — currently https://app.fundsuite.ai/client/application and https://fundsuite-app.lovable.app/client/application — or the request fails with 422 validation_failed. Omit it to use LendLucid's own return page. Each partner address must also be registered in the bank provider's dashboard before it works live.
Response fields (3)
data.link_tokenstring- Short-lived token for Plaid Link, not an access token or API key.
data.expirationstring- Provider-issued expiration timestamp.
data.modecreate | update- Determined by whether connection_id was supplied.
- Create: open Plaid Link with link_token; send its successful public_token to Complete a bank connection.
- Update: open Link for the existing connection; after success refresh that same connection. Do not exchange a new public_token as if creating a new connection.
- Keep organization keys on your server. Only pass the Link token to the browser. Handle Link exit without creating a connection; obtain a fresh session if its token expires.
- Processing authority (upstream authority, company instruction or merchant authorization) must already be recorded on the case before a link session is issued; partner cases that pass their onboarding authorization reference at case creation satisfy this with no extra call.
curl -X POST "https://lendlucid.com/api/public/v1/applications/app_uuid/link-sessions" \
-H "Authorization: Bearer $LENDLUCID_KEY" \
-H "Content-Type: application/json" \
-d '{ "client_name": "Acme Capital", "redirect_uri": "https://app.fundsuite.ai/client/application" }'{ "data": { "link_token": "link-production-…", "expiration": "2026-10-26T18:00:00Z", "mode": "create" } }Bank connections
Complete a bank connection
/applications/{id}/bank-connectionsExchange the public_token. LendLucid imports up to 24 months of transactions, balances and bank statements, then emits bank.connected.
- scope:
applications:writeIdempotency-Key supportedParameters (4)
public_tokenstring · required · 1–500 characters- One-time token from successful create-mode Plaid Link.
institution_idstring | null · optional · max 100- Institution ID from Link metadata.
institution_namestring | null · optional · max 200- Institution name; defaults to Connected bank when empty or absent.
bodystrict JSON · max 5,000 characters- Unknown properties are rejected; larger text returns 413 payload_too_large.
Response fields (6)
data.idstring- LendLucid connection ID; use it for update sessions, refresh and disconnect.
data.institution_name / institution_idstring | null- Stored institution metadata.
data.status / error_codestring / string | null- Stored connection state and provider error code.
data.last_synced_atstring | null- Last recorded sync timestamp.
data.initial_sync_completed / historical_sync_completedboolean- Import completion flags; initial connection success does not imply history is complete.
data.created_atstring- Connection creation timestamp.
- Returns 201 with the saved connection row, not accounts or a sync result. Re-read List bank connections for state/accounts. Upstream-authorized cases automatically queue analysis when history is complete and posted transactions are usable; other cases queue explicitly.
- 409 already_connected indicates the bank login is already linked. 400 invalid_public_token indicates an invalid or expired token. Preserve the same Idempotency-Key for retries of the identical request.
- Requested history depends on provider availability and permissions. A bank.connected event does not certify complete statement or transaction coverage.
curl -X POST "https://lendlucid.com/api/public/v1/applications/app_uuid/bank-connections" \
-H "Authorization: Bearer $LENDLUCID_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{ "public_token": "public-production-…", "institution_id": "ins_127991", "institution_name": "Wells Fargo" }'{
"data": {
"id": "conn_uuid",
"institution_name": "Wells Fargo",
"institution_id": "ins_example",
"status": "syncing",
"error_code": null,
"last_synced_at": null,
"initial_sync_completed": false,
"historical_sync_completed": false,
"created_at": "2026-10-26T00:00:00Z"
}
}Bank connections
List bank connections
/applications/{id}/bank-connectionsConnections with accounts, masked numbers and current balances. needs_reconnect tells you to open Link in update mode.
- scope:
applications:readResponse fields (9)
dataobject[]- Connections ordered by creation time ascending. No pagination or total field.
data[].idstring- LendLucid connection ID; use it for update sessions, refresh and disconnect.
data[].institution_name / institution_idstring | null- Stored institution metadata.
data[].status / error_codestring / string | null- Stored connection state and provider error code.
data[].last_synced_atstring | null- Last recorded sync timestamp.
data[].initial_sync_completed / historical_sync_completedboolean- Import completion flags; initial connection success does not imply history is complete.
data[].created_atstring- Connection creation timestamp.
data[].needs_reconnectboolean- True when stored status is reconnect or error. Consult error_code; this flag does not guarantee the issue is recoverable.
data[].accounts[]object- id, nullable bank/last4/account_name/account_subtype, current_balance_cents, available_balance_cents and balance_as_of. Balances/date may be null. These are cents, not dollars; routing/account numbers are not returned.
- Accounts may be empty while import is pending. No Plaid access token, encrypted token, login or full account number is returned.
curl -X GET "https://lendlucid.com/api/public/v1/applications/app_uuid/bank-connections" \
-H "Authorization: Bearer $LENDLUCID_KEY"{
"data": [
{
"id": "conn_uuid",
"institution_name": "Example Bank",
"institution_id": "ins_example",
"status": "connected",
"error_code": null,
"last_synced_at": "2026-10-26T00:05:00Z",
"initial_sync_completed": true,
"historical_sync_completed": false,
"created_at": "2026-10-26T00:00:00Z",
"needs_reconnect": false,
"accounts": [
{
"id": "acct_uuid",
"bank": "Example Bank",
"last4": "4821",
"account_name": "Checking",
"account_subtype": "checking",
"current_balance_cents": 1250000,
"available_balance_cents": null,
"balance_as_of": "2026-10-26T00:05:00Z"
}
]
}
]
}Bank connections
Refresh a connection
/applications/{id}/bank-connections/{connectionId}Pull the latest transactions and read any waiting bank statements.
- scope:
applications:writeParameters (1)
connectionIdUUID · path- Existing connection in this application. No JSON body is required.
Response fields (3)
data.addednumber- Added or modified transaction count handled during this sync.
data.removednumber- Removed transaction count handled during this sync.
data.accountsnumber- Number of provider accounts returned, not an account array.
- Refresh calls the bank provider and can incur bank-call usage. It also attempts to read waiting bank statements; a successful sync response is not proof every statement read succeeded. Check document progress separately.
- Changed usable bank data on upstream-authorized cases queues automatic analysis; other cases require an explicit analysis request.
curl -X POST "https://lendlucid.com/api/public/v1/applications/app_uuid/bank-connections/connection_uuid" \
-H "Authorization: Bearer $LENDLUCID_KEY"{ "data": { "added": 42, "removed": 0, "accounts": 2 } }Bank connections
Disconnect a bank
/applications/{id}/bank-connections/{connectionId}Revokes the bank link and removes its accounts and transactions. Emits bank.disconnected.
- scope:
applications:writeParameters (1)
connectionIdUUID · path- Connection belonging to this application. No request body.
Response fields (2)
data.idstring- Requested connection ID.
data.disconnectedboolean- true on successful completion.
- Disconnect revokes the provider item and removes its account rows and connection. This response is not an application-deletion receipt or confirmation that all financial evidence was purged. Use application deletion for that lifecycle.
curl -X DELETE "https://lendlucid.com/api/public/v1/applications/app_uuid/bank-connections/connection_uuid" \
-H "Authorization: Bearer $LENDLUCID_KEY"{ "data": { "id": "conn_uuid", "disconnected": true } }Bank connections
Create a hosted connect link
/applications/{id}/connect-linksPrefer not to embed? Send the borrower a single-use LendLucid page (valid 7 days).
- scope:
applications:writeIdempotency-Key supportedParameters (2)
borrower_emailstring | null · optional · valid email · max 255- Stored lowercase. Omit or send null when you will deliver the link yourself.
bodystrict JSON · max 5,000 characters- Unknown properties are rejected; an empty body or {} is accepted.
Response fields (3)
data.idstring- Connect request ID; use the list endpoint to follow its status.
data.urlstring- Single-use hosted page URL. The bearer token appears only in this response — only its hash is stored, so it cannot be recovered later.
data.expires_atstring- Link expiry, 7 days after creation by default.
- Returns 201. The borrower opens the URL without a LendLucid account and connects their bank through the hosted page.
- Each link is single-use: once completed it cannot connect a second bank. Create a new link for another connection.
- Idempotency-Key is supported; replay the same key and body after an uncertain response.
curl -X POST "https://lendlucid.com/api/public/v1/applications/app_uuid/connect-links" \
-H "Authorization: Bearer $LENDLUCID_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{ "borrower_email": "owner@acme.test" }'{
"data": {
"id": "req_uuid",
"url": "https://lendlucid.com/connect/AbCdEf…",
"expires_at": "2026-11-01T00:00:00Z"
}
}Bank connections
List hosted connect links
/applications/{id}/connect-linksRead link status and expiry for the file. Expired pending links are reported as expired; bearer URLs are not returned.
- scope:
applications:readResponse fields (4)
dataobject[]- Up to 50 connect requests, newest created first. No pagination parameters.
data[].id / borrower_emailstring / string | null- Request ID and the borrower email you supplied, if any.
data[].statusstring- Stored status; a pending link whose expires_at has passed is reported as expired.
data[].expires_at / completed_at / created_atstring / string | null / string- Expiry, completion and creation timestamps.
- Bearer URLs are never returned by this endpoint; the URL exists only in the creation response.
- Use this to confirm a borrower completed the hosted connection before running analysis.
curl -X GET "https://lendlucid.com/api/public/v1/applications/app_uuid/connect-links" \
-H "Authorization: Bearer $LENDLUCID_KEY"{
"data": [
{
"id": "req_uuid",
"borrower_email": "owner@acme.test",
"status": "pending",
"expires_at": "2026-11-01T00:00:00Z",
"completed_at": null,
"created_at": "2026-10-25T00:00:00Z"
}
]
}Analysis
Run an analysis
/applications/{id}/analysis-jobsQueues a durable job over every source: statements, bank connections, or both. The same engine produces the same results whatever the source.
- scope:
analysis:runIdempotency-Key supportedResponse fields (11)
data.id / application_idstring- Job ID (not job_id) and owning application.
data.statequeued | running | needs_review | completed | failed | cancelled- Uses state, not status; successful completion is completed, not succeeded.
data.stagestring | null- Stored processing stage (queued, extracting, analyzing, done). For numbers, use data.progress.
data.progressobject · GET /jobs/{id} only- Live progress on the job status endpoint: step (queued | reading_statements | analyzing | done | failed | cancelled), step_detail (human label such as "Reading statement 4 of 7"), documents_processed, documents_total and percent_complete (integer 0–100).
data.progress.percent_completenumber · 0–100- Real estimate: 0 queued; 10–80 while reading statements, scaled by documents processed out of total; 85 while analyzing; 100 when done. Never decreases within a stage.
data.progress.documents_totalnumber- Current document count on the application. Documents uploaded mid-run are counted in the total but are processed by the next job, so a finished job can show processed below total.
data.attemptsnumber- Stored execution attempt count.
data.analysis_versionnumber | null- Saved application-local version when available; retrieve that version using the analysis endpoint.
data.errorobject | null- When present: code and nullable message from stored error_code/error_detail.
data.usage.documents_processed / ai_documentsnumber- Stored document counters for this job; not total organization usage or an invoice.
data.created_at / started_at / finished_atstring / string | null / string | null- Creation, start and terminal timestamps; queued jobs have no start/finish timestamp.
- Returns 202 with the full queued job view; no body is required. This is acceptance of work, not proof that an analysis completed.
- 409 job_already_active means a queued/running job exists. A conflict may include job; poll it instead of repeatedly starting work.
- 422 no_documents means neither a document nor a bank connection exists. A connection alone satisfies enqueue eligibility, but does not establish ready/complete data.
- Poll /jobs/{id} until terminal. completed or needs_review can include analysis_version; inspect the saved result. failed/cancelled are not success. Existing authority and retention rules still apply.
curl -X POST "https://lendlucid.com/api/public/v1/applications/app_uuid/analysis-jobs" \
-H "Authorization: Bearer $LENDLUCID_KEY" \
-H "Idempotency-Key: $(uuidgen)"{
"data": {
"id": "job_uuid",
"application_id": "app_uuid",
"state": "queued",
"stage": "queued",
"attempts": 0,
"analysis_version": null,
"error": null,
"usage": {
"documents_processed": 0,
"ai_documents": 0
},
"created_at": "2026-10-26T00:00:00Z",
"started_at": null,
"finished_at": null
}
}Analysis
One-click analyze
/applications/{id}/analyzeThe simplest way to power an Analyze button: starts an analysis, or returns the one already running. Safe to press repeatedly.
- scope:
analysis:runIdempotency-Key supported- Returns 202 with reused: false when a new job starts, or 200 with reused: true and the active job — never 409 job_already_active.
- Same sources, gates and engine as Run an analysis; 422 no_documents when no statement or bank connection exists.
- Poll Check a job or listen for the analysis webhook, then read the latest analysis or the PDF report.
curl -X POST "https://lendlucid.com/api/public/v1/applications/app_uuid/analyze" \
-H "Authorization: Bearer $LENDLUCID_KEY" \
-H "Idempotency-Key: $(uuidgen)"{
"data": {
"id": "job_uuid",
"application_id": "app_uuid",
"state": "queued",
"stage": "queued",
"attempts": 0,
"analysis_version": null,
"error": null,
"usage": {
"documents_processed": 0,
"ai_documents": 0
},
"created_at": "2026-10-26T00:00:00Z",
"started_at": null,
"finished_at": null
},
"reused": false
}Analysis
Run a payment scenario
/applications/{id}/scenariosTest a proposed amount, payback, term and frequency against the saved analysis: payment size, share of revenue, coverage after the payment and projected lowest balance. Read-only; never re-runs the analysis or calls a bank.
- scope:
results:read- Uses the latest analysis unless analysis_version is given; 404 when none exists.
- payback must be at least amount; term_days 1–3650.
- Numbers only. LendLucid does not approve or decline.
curl -X POST "https://lendlucid.com/api/public/v1/applications/app_uuid/scenarios" \
-H "Authorization: Bearer $LENDLUCID_KEY" \
-H "Content-Type: application/json" \
-d '{ "amount": 50000, "payback": 67500, "term_days": 180, "frequency": "daily" }'{
"data": {
"analysis": {
"id": "ana_123",
"version": 4,
"engine_version": "analysis-2.0"
},
"input": {
"amount": 50000,
"payback": 67500,
"term_days": 180,
"frequency": "daily"
},
"payment_count": 124,
"payment_amount": 544.35,
"monthly_payment": 11431.35,
"factor_rate": 1.35,
"new_payment_share_of_revenue_pct": 9.5,
"total_debt_share_of_revenue_pct": 14.2,
"coverage_after": 1.62,
"projected_lowest_balance": 3120.4,
"projected_negative_days": 0,
"method": "Replays the saved daily balances with the new payment withdrawn evenly from the first day; assumes revenue and spending repeat history.",
"note": "Scenario figures support review; they are not a credit decision."
}
}Analysis
Check a job
/jobs/{id}Status, progress and the resulting analysis version.
- scope:
applications:readResponse fields (11)
data.id / application_idstring- Job ID (not job_id) and owning application.
data.statequeued | running | needs_review | completed | failed | cancelled- Uses state, not status; successful completion is completed, not succeeded.
data.stagestring | null- Stored processing stage (queued, extracting, analyzing, done). For numbers, use data.progress.
data.progressobject · GET /jobs/{id} only- Live progress on the job status endpoint: step (queued | reading_statements | analyzing | done | failed | cancelled), step_detail (human label such as "Reading statement 4 of 7"), documents_processed, documents_total and percent_complete (integer 0–100).
data.progress.percent_completenumber · 0–100- Real estimate: 0 queued; 10–80 while reading statements, scaled by documents processed out of total; 85 while analyzing; 100 when done. Never decreases within a stage.
data.progress.documents_totalnumber- Current document count on the application. Documents uploaded mid-run are counted in the total but are processed by the next job, so a finished job can show processed below total.
data.attemptsnumber- Stored execution attempt count.
data.analysis_versionnumber | null- Saved application-local version when available; retrieve that version using the analysis endpoint.
data.errorobject | null- When present: code and nullable message from stored error_code/error_detail.
data.usage.documents_processed / ai_documentsnumber- Stored document counters for this job; not total organization usage or an invoice.
data.created_at / started_at / finished_atstring / string | null / string | null- Creation, start and terminal timestamps; queued jobs have no start/finish timestamp.
- Queued/running jobs are not terminal. needs_review is a review outcome, not approval. No public lease, actor ID, API key or organization credential is exposed.
curl -X GET "https://lendlucid.com/api/public/v1/jobs/job_uuid" \
-H "Authorization: Bearer $LENDLUCID_KEY"{
"data": {
"id": "job_uuid",
"application_id": "app_uuid",
"state": "completed",
"stage": "done",
"attempts": 1,
"analysis_version": 4,
"error": null,
"usage": {
"documents_processed": 1,
"ai_documents": 0
},
"created_at": "2026-10-26T00:00:00Z",
"started_at": "2026-10-26T00:01:00Z",
"finished_at": "2026-10-26T00:02:00Z",
"progress": {
"step": "done",
"step_detail": "Analysis complete",
"documents_processed": 1,
"documents_total": 1,
"percent_complete": 100
}
}
}Analysis
Cancel a job
/jobs/{id}/cancelStops a queued or running job.
- scope:
analysis:runResponse fields (11)
data.id / application_idstring- Job ID (not job_id) and owning application.
data.statequeued | running | needs_review | completed | failed | cancelled- Uses state, not status; successful completion is completed, not succeeded.
data.stagestring | null- Stored processing stage (queued, extracting, analyzing, done). For numbers, use data.progress.
data.progressobject · GET /jobs/{id} only- Live progress on the job status endpoint: step (queued | reading_statements | analyzing | done | failed | cancelled), step_detail (human label such as "Reading statement 4 of 7"), documents_processed, documents_total and percent_complete (integer 0–100).
data.progress.percent_completenumber · 0–100- Real estimate: 0 queued; 10–80 while reading statements, scaled by documents processed out of total; 85 while analyzing; 100 when done. Never decreases within a stage.
data.progress.documents_totalnumber- Current document count on the application. Documents uploaded mid-run are counted in the total but are processed by the next job, so a finished job can show processed below total.
data.attemptsnumber- Stored execution attempt count.
data.analysis_versionnumber | null- Saved application-local version when available; retrieve that version using the analysis endpoint.
data.errorobject | null- When present: code and nullable message from stored error_code/error_detail.
data.usage.documents_processed / ai_documentsnumber- Stored document counters for this job; not total organization usage or an invoice.
data.created_at / started_at / finished_atstring / string | null / string | null- Creation, start and terminal timestamps; queued jobs have no start/finish timestamp.
- Returns 200 when a queued/running job is marked cancelled. Already terminal jobs return 409 job_not_cancellable and the current job view; missing/wrong-organization IDs return 404.
- Cancellation is not rollback: already executing work can finish and previously saved work remains. It does not delete documents, revoke authority or disconnect banks.
curl -X POST "https://lendlucid.com/api/public/v1/jobs/job_uuid/cancel" \
-H "Authorization: Bearer $LENDLUCID_KEY"{
"data": {
"id": "job_uuid",
"application_id": "app_uuid",
"state": "cancelled",
"stage": "queued",
"attempts": 0,
"analysis_version": null,
"error": null,
"usage": {
"documents_processed": 0,
"ai_documents": 0
},
"created_at": "2026-10-26T00:00:00Z",
"started_at": null,
"finished_at": "2026-10-26T00:01:00Z"
}
}Results
List analysis versions
/applications/{id}/analysesEvery saved version; older versions are never overwritten.
- scope:
results:readResponse fields (8)
dataobject[]- Up to 100 saved versions, newest version first. No pagination parameters or total field are returned.
data[].idstring- Saved analysis ID.
data[].versionnumber- Application-local saved version.
data[].engine_versionstring- Engine version that produced this result.
data[].as_ofstring | null- Saved analysis cutoff date.
data[].created_atstring- Saved creation timestamp.
data[].source_fingerprintstring- Saved input hash; useful for change detection.
data[].source_mixJSON- Saved source-mix metadata, not a guarantee that each source has complete coverage.
- Use a listed version in the retrieve endpoint to pin financial metrics to that saved run.
curl -X GET "https://lendlucid.com/api/public/v1/applications/app_uuid/analyses" \
-H "Authorization: Bearer $LENDLUCID_KEY"{
"data": [
{
"id": "analysis_uuid",
"version": 4,
"engine_version": "analysis-1.2",
"created_at": "2026-10-01T00:00:00Z",
"as_of": "2026-09-30",
"source_fingerprint": "fictional_source_fingerprint",
"source_mix": {
"plaid": 1,
"statement": 0
}
}
]
}Results
Retrieve an analysis
/applications/{id}/analyses/{version}Full result (schema lendlucid.analysis.v1): revenue, deposits, daily and monthly balances, financing payments, NSFs, risk flags, review status and the transaction IDs behind each figure. Use latest for the newest.
- scope:
results:readParameters (1)
versionpath · latest or 1–6 digits- latest selects the highest saved version. Other values, or missing versions, return 404.
Response fields (24)
data.schema_versionstring- lendlucid.analysis.v1. The result is wrapped in data, not returned as a top-level metrics object.
data.application_idstring- Owning application ID.
data.external_refstring | null- Your application's external reference.
data.analysisobject- id, version, engine_version, created_at, nullable as_of, source_fingerprint and source_mix from the saved run.
data.review_statusclear | needs_review- Document error/needs_review or an UNRECONCILED signal requires review. clear is not an approval or credit decision.
data.coverageobject- months, missing_months, nullable balance_provenance and period, accounts and statements.
data.coverage.accounts[]object- id, nullable bank and nullable last4. No bank credentials.
data.coverage.statements[]object- id, document_id, account_id, account_last4, period_start, period_end, reconciled, opening_balance_cents and closing_balance_cents. Linkages, dates and balances may be null; these balances are cents.
data.summaryobject- months, average_monthly_deposits, average_operating_revenue, total_excluded_deposits, revenue_trend_pct_per_month, revenue_trend, revenue_volatility_pct, average_daily_balance, lowest_balance, negative_days, nsf_items, estimated_monthly_debt_service, estimated_holdback_pct, active_positions and dscr_estimate.
data.monthly[]object- month, sources, total_deposits, deposit_count, operating_revenue, excluded_deposits, withdrawals, nsf_items, first_day_end_balance, last_day_end_balance, average_balance, minimum_balance, negative_days, balance_days_covered, missing_balance_days and evidence.
data.monthly[].evidenceobject- revenue_transaction_ids, excluded_transaction_ids and nsf_transaction_ids; resolve with the ledger IDs query.
data.exclusionsobject- internal_transfers has count, total and transaction_ids. financing_proceeds has transaction_id, date, amount, nullable provider and heuristic detection.
data.financing_positions[]object- provider; detection.method/basis; observed.payment_count/first_payment/last_payment/active/cadence; estimated.typical_payment/monthly_burden; unverified.principal/payoff_balance/factor_rate/term/note; evidence.transaction_ids.
data.daily_balances[]object- date and end_of_day_balance in dollars for every day with complete combined coverage; days without full coverage are omitted, never estimated.
data.revenue_sourcesobject- top_payer_share_pct and top[] (payer, total in dollars, share_pct, evidence.transaction_ids) for the five largest operating-revenue payers.
data.funding_review.depositsobject- average_count_per_month, median_deposit, deposit_days_per_month, largest[] (top five) and unusual[] (up to ten) deposits, each with transaction_id, date, amount, description.
data.funding_review.returned_payments[]object- Returned or reversed financing payments with transaction_id, date, amount, description.
data.funding_review.room_for_new_payments[]object- For holdback_pct 10, 15 and 20: monthly, weekly and daily dollars left after current estimated financing payments (never negative). An estimate to support review, not an offer or credit decision.
data.funding_review.balance_by_month[]object- month, average, low and ending combined balance from covered days.
data.funding_reviewobject- Also recent, cash_flow, new_positions, ended_positions, activity_flags (cash, gambling, levies, tax, payroll, overdraft fees with count, total, transaction_ids) and days_below_1000.
data.signals[]object- code, severity, title, detail and evidence.transaction_ids from the saved analysis.
data.policyobject | null- Latest policy run linked to this saved analysis: policy_id, policy_version, engine, outcome, evaluated_at, findings and note. No matching run yields null.
data.documents[]object- id, file_name, status, nullable status_detail, sha256 and origin.
data.corrections[]object- id, transaction_id, nullable field, from/to JSON values, nullable reason and actor_user_id, and created_at.
- Money is in dollars except fields explicitly suffixed _cents. Percentages and counts are not monetary values; dscr_estimate is a ratio.
- Missing summary estimates and monthly balance values remain null. Balance day coverage is explicit; do not turn unknown balances into zero. Empty collections remain arrays.
- Financing detection is heuristic. Principal, payoff balance, factor rate and term remain null without contract evidence; observed payments are not verified financing terms.
- Financial metrics come from the saved run. Documents, account/statement links and correction history are read at retrieval time; the entire response is not an immutable evidence snapshot.
curl -X GET "https://lendlucid.com/api/public/v1/applications/app_uuid/analyses/latest" \
-H "Authorization: Bearer $LENDLUCID_KEY"{
"data": {
"schema_version": "lendlucid.analysis.v1",
"application_id": "app_uuid",
"external_ref": "deal_1042",
"analysis": {
"id": "analysis_uuid",
"version": 4,
"engine_version": "analysis-1.2",
"created_at": "2026-10-01T00:00:00Z",
"as_of": "2026-09-30",
"source_fingerprint": "fictional_source_fingerprint",
"source_mix": {
"plaid": 1,
"statement": 0
}
},
"review_status": "clear",
"coverage": {
"months": [
{
"month": "2026-09",
"sources": [
"plaid"
]
}
],
"missing_months": [],
"balance_provenance": null,
"period": null,
"accounts": [
{
"id": "acct_uuid",
"bank": "Example Bank",
"last4": "4821"
}
],
"statements": []
},
"summary": {
"months": 1,
"average_monthly_deposits": 1000,
"average_operating_revenue": 1000,
"total_excluded_deposits": 0,
"revenue_trend_pct_per_month": null,
"revenue_trend": null,
"revenue_volatility_pct": null,
"average_daily_balance": null,
"lowest_balance": null,
"negative_days": null,
"nsf_items": 0,
"estimated_monthly_debt_service": null,
"estimated_holdback_pct": null,
"active_positions": 0,
"dscr_estimate": null
},
"monthly": [
{
"month": "2026-09",
"sources": [
"plaid"
],
"total_deposits": 1000,
"deposit_count": 1,
"operating_revenue": 1000,
"excluded_deposits": 0,
"withdrawals": 450,
"nsf_items": 0,
"first_day_end_balance": null,
"last_day_end_balance": null,
"average_balance": null,
"minimum_balance": null,
"negative_days": null,
"balance_days_covered": 0,
"missing_balance_days": null,
"evidence": {
"revenue_transaction_ids": [
"revenue_txn_uuid"
],
"excluded_transaction_ids": [],
"nsf_transaction_ids": []
}
}
],
"exclusions": {
"internal_transfers": {
"count": 0,
"total": 0,
"transaction_ids": []
},
"financing_proceeds": []
},
"financing_positions": [],
"daily_balances": [],
"revenue_sources": {
"top_payer_share_pct": null,
"top": []
},
"funding_review": {
"recent": null,
"cash_flow": null,
"deposits": null,
"returned_payments": [],
"new_positions": [],
"ended_positions": [],
"activity_flags": {},
"balance_by_month": [],
"days_below_1000": null,
"room_for_new_payments": []
},
"insights": null,
"signals": [],
"policy": null,
"documents": [],
"corrections": []
}
}Results
List transactions
/applications/{id}/transactions?limit=500&offset=0The standardized ledger from every source, with category, source, exclusions and duplicate links. Supports limit, offset and ids.
- scope:
results:readParameters (3)
limitnumber · default 500- Page size capped at 1,000. Use positive integers; zero or nonnumeric input falls back to 500, negative values clamp to 1.
offsetnumber · default 0- Zero-based offset, clamped to at least 0. Use nonnegative integers.
idscomma-separated IDs · optional- At most 500 matching 36-character hex/hyphen IDs are used. Invalid entries are filtered, not rejected. A supplied list with no valid entries matches no rows.
Response fields (19)
dataobject[]- Ledger rows ordered by date, then ID, ascending. Empty when no rows match.
totalnumber- Exact matching row count before pagination, including any IDs filter.
limit / offsetnumber- The effective page settings. Advance offset by the returned row count until the total is reached.
data[].idstring- Transaction ID used by analysis evidence references.
data[].datestring · YYYY-MM-DD- Stored transaction date.
data[].descriptionstring | null- Stored transaction description.
data[].amountnumber · dollars- Signed amount: deposits positive, withdrawals negative. Not amount_cents.
data[].sourcestring- Stored source, including plaid or statement.
data[].account_idstring | null- Account linkage when available.
data[].statement_period_idstring | null- Statement period linkage when available.
data[].statement_linenumber | null- Statement line number; null if no stored line exists.
data[].categorystring | null- Effective category: reviewer override takes precedence over engine category.
data[].engine_categorystring | null- Stored engine category before reviewer override.
data[].excludedboolean- Effective exclusion: reviewer override takes precedence over stored exclusion reason.
data[].excluded_reasonstring | null- Stored reason; can remain present even when a reviewer includes the row.
data[].correctedboolean- True when either category or exclusion has a reviewer override.
data[].duplicate_ofstring | null- Reference to a matched transaction; this endpoint does not hide duplicates.
data[].pendingboolean- Stored pending flag; this endpoint does not hide pending rows.
data[].end_of_day_balancenumber | null · dollars- Stored balance when available; not an invented reconstruction for this row.
- Rows include excluded, duplicate and pending entries. Do not sum the raw ledger and assume it equals operating revenue; use the saved analysis for underwriting metrics.
curl -X GET "https://lendlucid.com/api/public/v1/applications/app_uuid/transactions?limit=500&offset=0" \
-H "Authorization: Bearer $LENDLUCID_KEY"{
"data": [
{
"id": "txn_uuid",
"date": "2026-09-02",
"description": "ACH PAYMENT",
"amount": -450,
"source": "plaid",
"account_id": "acct_uuid",
"statement_period_id": null,
"statement_line": null,
"category": "expense",
"engine_category": "expense",
"excluded": false,
"excluded_reason": null,
"corrected": false,
"duplicate_of": null,
"pending": false,
"end_of_day_balance": null
}
],
"total": 1,
"limit": 500,
"offset": 0
}Results
Latest policy check
/applications/{id}/decision-runs/latestYour lender policy evaluated against the saved analysis. Missing data refers; it never passes.
- scope:
results:readParameters (1)
id (path)UUID · required- Application belonging to the organization key. Missing or foreign files return 404 not_found.
Response fields (19)
dataobject- Latest stored policy evaluation by created_at descending; no run is generated by this request.
data.idUUID- Saved policy evaluation ID.
data.analysis_idUUID | null- Saved analysis pointer when present. The stored column permits null.
data.policy_idUUID- Policy record used for this evaluation.
data.policy_versioninteger- Version of the lender's policy, not the analysis version.
data.enginestring- Saved evaluation engine version.
data.outcomemeets_policy | refer | outside_policy- Policy outcome supporting human review; not funding approval.
data.resultsobject- Saved evaluation payload returned without recalculating or reshaping its contents.
data.results.engine / data.results.outcomestring- Engine version and outcome within the saved result.
data.results.rulesobject[]- Evaluated rules in stored order.
data.results.rules[].rule_id / data.results.rules[].reason_codestring- Lender rule identifier and configured reason code.
data.results.rules[].labelstring- Rule label for review.
data.results.rules[].statuspass | refer | outside_policy | missing- Missing metric data refers to a reviewer; it does not pass.
data.results.rules[].actualnumber | null- Metric value in that metric's units; null for missing metrics and signal rules. No universal cents conversion.
data.results.rules[].expectedstring- Human-readable requirement, not a machine-readable policy definition.
data.results.rules[].evidencestring[]- Saved signal evidence references. Metric rules can have an empty array; do not invent transaction citations.
data.results.reason_codesstring[]- Distinct reason codes for non-passing rules.
data.created_atISO timestamp- When this evaluation was saved.
data.notestring- Reminder that findings support review, not a credit decision.
- Requires an organization ll_live_ key with results:read. These endpoints read saved records only; they do not start analysis, run monitoring or call a bank.
- No saved evaluation returns 404 not_found, not data: null. Latest policy evaluation is not guaranteed to use the newest analysis or currently active policy; compare its pointers before relying on it.
- This endpoint does not create, edit or activate lender policies, trigger evaluations or return historical runs. Full policy workflow API parity remains open.
curl -X GET "https://lendlucid.com/api/public/v1/applications/app_uuid/decision-runs/latest" \
-H "Authorization: Bearer $LENDLUCID_KEY"{
"data": {
"id": "decision_uuid",
"analysis_id": "analysis_uuid",
"policy_id": "policy_uuid",
"policy_version": 7,
"engine": "decision-1.0",
"outcome": "refer",
"results": {
"engine": "decision-1.0",
"outcome": "refer",
"rules": [
{
"rule_id": "daily_balance",
"reason_code": "BALANCE_MISSING",
"label": "Average daily balance",
"status": "missing",
"actual": null,
"expected": "at least 1000",
"evidence": []
}
],
"reason_codes": [
"BALANCE_MISSING"
]
},
"created_at": "2026-10-26T00:00:00Z",
"note": "Policy findings support review; they are not a credit decision."
}
}Results
Download the underwriting report (PDF)
/applications/{id}/reportA ready-to-share PDF report generated from the latest saved analysis — the same figures as the workspace printable report.
- scope:
results:read- The response body is the PDF file itself (Content-Type: application/pdf), not JSON. The example shows the response metadata only.
- No saved analysis returns 404 no_analysis — run an analysis first.
Parameters (1)
id (path)UUID · required- Application belonging to the organization key. Missing or foreign files return 404 not_found.
Response fields (3)
response bodyapplication/pdf- The generated underwriting report PDF itself, returned as the raw response body — not a JSON envelope. Save or stream the bytes directly.
Content-Disposition (header)string- attachment; filename="lendlucid-report-v{version}.pdf" — the analysis version is in the filename.
Cache-Control (header)no-store- Reports are generated on demand from the latest saved analysis and are never cached.
- Requires an organization ll_live_ key with results:read. These endpoints read saved records only; they do not start analysis, run monitoring or call a bank.
- The report is generated from the latest saved analysis only; it never re-runs the engine or calls a bank. No saved analysis returns 404 no_analysis — run an analysis first.
- Sections mirror the workspace printable report: summary figures, signals, month-by-month, balances, financing positions and proceeds, review flags, revenue concentration and data coverage, with the same traceability footer.
- All money figures are formatted in whole dollars inside the PDF; the underlying dollar-decimal values are available from the get-analysis operation.
- Read failures return 500 server_error as a JSON error envelope, not a partial PDF.
curl -X GET "https://lendlucid.com/api/public/v1/applications/app_uuid/report" \
-H "Authorization: Bearer $LENDLUCID_KEY" \
-o lendlucid-report.pdf{
"content_type": "application/pdf",
"content_disposition": "attachment; filename=\"lendlucid-report-v4.pdf\"",
"analysis_version": 4
}Results
Card processing statements
/applications/{id}/merchantflowProcessor statements read for the file: gross sales, refunds, chargebacks, fees and net deposits.
- scope:
results:readParameters (1)
id (path)UUID · required- Application belonging to the organization key. Missing or foreign files return 404 not_found.
Response fields (14)
dataobject[]- All stored processor statements ordered by period_start ascending. No pagination, total or ready-only filter.
data[].idUUID- Processor statement ID, not a bank document ID.
data[].file_namestring- Original processor statement filename.
data[].statusuploaded | reading | ready | needs_review | error- Reading state; non-ready rows are included.
data[].status_detailstring | null- Stored processing detail or error; null when absent.
data[].processorstring | null- Processor name when extracted.
data[].merchant_id_last4string | null- Last four merchant identifier characters, not a full identifier.
data[].period_start / data[].period_endYYYY-MM-DD | null- Extracted statement period; either date may be missing.
data[].gross_sales_centsinteger | null · cents- Stored gross card sales. 3,100,000 represents $31,000; not the dollar units used by the transaction API.
data[].refunds_cents / data[].chargebacks_centsinteger | null · cents- Stored refund and chargeback totals.
data[].fees_centsinteger | null · cents- Stored processor fees.
data[].net_deposits_centsinteger | null · cents- Stored net settlement total, not bank-matched deposits.
data[].transaction_countinteger | null- Processor transaction count when extracted.
data[].created_atISO timestamp- When the processor statement record was created.
- Requires an organization ll_live_ key with results:read. These endpoints read saved records only; they do not start analysis, run monitoring or call a bank.
- An empty data array means no processor statements are stored, not zero card revenue. Missing amounts remain null, never infer zero.
- This endpoint returns statement figures only: bank transaction IDs, variance, rates, matched deposits, findings and aggregate totals come from the merchantflow-reconciliation operation. It also omits storage paths and extracted deposit rows.
- Upload, download and delete processor statements with the processor-statements operations; bank-statement document endpoints are separate. For reconciliation against bank deposits (variance, rates, matched bank transaction IDs, findings), use the merchantflow-reconciliation operation.
- Read failures return 500 server_error, not an empty successful result.
curl -X GET "https://lendlucid.com/api/public/v1/applications/app_uuid/merchantflow" \
-H "Authorization: Bearer $LENDLUCID_KEY"{
"data": [
{
"id": "processor_uuid",
"file_name": "processor-september.pdf",
"status": "ready",
"status_detail": null,
"processor": "Square",
"merchant_id_last4": "4821",
"period_start": "2026-09-01",
"period_end": "2026-09-30",
"gross_sales_cents": 3100000,
"refunds_cents": 50000,
"chargebacks_cents": 10000,
"fees_cents": 90000,
"net_deposits_cents": 2950000,
"transaction_count": 620,
"created_at": "2026-10-01T00:00:00Z"
}
]
}Results
Card processing reconciliation
/applications/{id}/merchantflow/reconciliationProcessor statements reconciled to bank deposits on demand: variance, rates, matched bank transaction IDs, findings and totals.
- scope:
results:readParameters (1)
id (path)UUID · required- Application belonging to the organization key. Missing or foreign files return 404 not_found.
Response fields (19)
dataobject- Reconciliation computed on demand from saved processor statements and bank transactions by the deterministic engine. Nothing is stored by this request.
data.versionstring- Engine version, currently merchantflow-1.0.
data.statementsobject[]- One result per ready or needs_review statement with a period; uploaded/reading/error rows and rows without period dates are skipped.
data.statements[].id / data.statements[].file_nameUUID / string- Processor statement identity.
data.statements[].processorstring | null- Statement processor; null matches any recognized processor deposit in the bank data.
data.statements[].period_start / data.statements[].period_endYYYY-MM-DD- Statement period. Bank deposits are matched from period_start + 1 day through period_end + 4 days (settlements land 1–3 business days after the sale).
data.statements[].gross_sales_cents / data.statements[].net_deposits_centsinteger | null · cents- Statement-printed figures.
data.statements[].bank_deposits_centsinteger · cents- Sum of matched bank deposits for this statement.
data.statements[].variance_cents / data.statements[].variance_pctinteger | null / number | null- Bank deposits minus statement net deposits, absolute and as a fraction. Null when the statement has no net deposit figure.
data.statements[].refund_rate / data.statements[].chargeback_rate / data.statements[].fee_ratenumber | null- Refunds, chargebacks and fees as a fraction of gross sales; null when either figure is missing.
data.statements[].matched_depositsinteger- Processor-printed deposit rows matched to a same-amount bank deposit within 5 days. 0 when the statement printed no deposit rows (the whole window is then attributed).
data.statements[].unmatched_processor_depositsobject[]- Printed deposit rows with no same-amount bank deposit within 5 days: { date, amount_cents }.
data.statements[].bank_transaction_idsstring[]- Bank transaction IDs backing bank_deposits_cents; resolve them through the transactions endpoint.
data.findingsobject[]- Deterministic findings sorted issue, caution, info. Keys are stable per statement and condition (var:, none:, unm:, cb:, rf:, no-stmt).
data.findings[].severityissue | caution | info- Variance above 15% of net deposits is an issue, above 5% a caution; chargebacks above 2% of sales are an issue, above 1% a caution; refunds above 10% a caution.
data.findings[].statementIds / data.findings[].transactionIdsstring[]- Evidence references; may be empty. Do not parse title or detail as structured metrics.
data.processorsInBankobject[]- Recognized processor deposits found in the bank data, highest total first: { name, total_cents, count, transaction_ids }. Present even with no statements uploaded.
data.totals.gross_sales_cents / data.totals.net_deposits_cents / data.totals.bank_deposits_centsinteger · cents- Aggregates across reconciled statements (bank_deposits_cents covers all recognized processor deposits, not only matched ones).
data.totals.card_share_of_depositsnumber | null- Recognized processor deposits as a fraction of total categorized revenue; null when no revenue is categorized.
- Requires an organization ll_live_ key with results:read. These endpoints read saved records only; they do not start analysis, run monitoring or call a bank.
- Computed on every request from current saved data; re-run it after uploading statements or importing bank transactions. Pending, duplicate and excluded bank transactions never count.
- A bank deposit is attributed to at most one statement; overlapping statements never double-count the same deposit.
- An empty statements array with card deposits in the bank returns a no-stmt info finding naming the processors seen.
- Statement or transaction read failures return 500 server_error, not an empty successful result.
curl -X GET "https://lendlucid.com/api/public/v1/applications/app_uuid/merchantflow/reconciliation" \
-H "Authorization: Bearer $LENDLUCID_KEY"{
"data": {
"version": "merchantflow-1.0",
"statements": [
{
"id": "processor_uuid",
"file_name": "processor-september.pdf",
"processor": "Square",
"period_start": "2026-09-01",
"period_end": "2026-09-30",
"gross_sales_cents": 3100000,
"net_deposits_cents": 2950000,
"bank_deposits_cents": 2945000,
"variance_cents": -5000,
"variance_pct": -0.00169,
"refund_rate": 0.0161,
"chargeback_rate": 0.0032,
"fee_rate": 0.029,
"matched_deposits": 20,
"unmatched_processor_deposits": [
{
"date": "2026-09-30",
"amount_cents": 5000
}
],
"bank_transaction_ids": [
"txn_uuid_1",
"txn_uuid_2"
]
}
],
"findings": [
{
"key": "unm:processor_uuid",
"severity": "caution",
"title": "Square 2026-09-01 – 2026-09-30: 1 processor deposits not found in the bank",
"detail": "These settlement amounts printed on the processor statement have no same-amount bank deposit within 5 days.",
"statementIds": [
"processor_uuid"
],
"transactionIds": []
}
],
"processorsInBank": [
{
"name": "Square",
"total_cents": 2945000,
"count": 21,
"transaction_ids": [
"txn_uuid_1",
"txn_uuid_2"
]
}
],
"totals": {
"gross_sales_cents": 3100000,
"net_deposits_cents": 2950000,
"bank_deposits_cents": 2945000,
"card_share_of_deposits": 0.42
}
}
}Results
Upload a processor statement
/applications/{id}/processor-statementsSend a card-processor statement PDF as the raw body. It is read immediately and the response carries the final saved figures.
- scope:
documents:writeIdempotency-Key supported- Raw PDF body with Content-Type: application/pdf; optional X-File-Name and X-Content-SHA256 headers. 25 MB maximum.
- Returns 201 with the final figures, or 200 with duplicate: true when the same bytes were already uploaded.
Parameters (5)
id (path)UUID · required- Application belonging to the organization key. Missing or foreign files return 404 not_found.
Content-Type (header)application/pdf · required- Send the PDF as the raw request body. Any other content type returns 415 unsupported_media_type.
X-File-Name (header)string · optional- Original filename; sanitized to 150 characters. Defaults to processor-statement.pdf.
X-Content-SHA256 (header)hex string · optional- SHA-256 of the exact bytes. A mismatch returns 422 hash_mismatch; omitting it skips the check.
Idempotency-Key (header)string · optional- Replays the original response on retry instead of uploading and reading again.
Response fields (3)
dataobject- The saved processor statement after reading, with the same fields as the merchantflow list plus duplicate.
data.statusready | needs_review | error- Final reading state. ready: period and net deposits printed and consistent. needs_review: figures incomplete or deposits do not sum to the printed net total. error: not a processor statement or unreadable; see status_detail.
data.duplicateboolean- true when the same file bytes (SHA-256) were already on this application; the existing row is returned with 200 and nothing is re-read.
- Requires documents:write and a recorded per-deal authority (merchant authorization or processing instruction), same as bank statement upload.
- PDF must be 25 MB or smaller (413 file_too_large) and start with %PDF- (422 not_a_pdf). Scanned PDFs are accepted; the reader handles image-based pages.
- The statement is read synchronously before the response: 201 means the figures in data are final. AI only transcribes printed figures; reconciliation against bank deposits stays in the deterministic engine.
- Uploading the same bytes twice never creates a second row; safe to retry with the same Idempotency-Key.
curl -X POST "https://lendlucid.com/api/public/v1/applications/app_uuid/processor-statements" \
-H "Authorization: Bearer $LENDLUCID_KEY" \
-H "Idempotency-Key: $(uuidgen)"{
"data": {
"id": "processor_uuid",
"file_name": "processor-september.pdf",
"status": "ready",
"status_detail": null,
"processor": "Square",
"merchant_id_last4": "4821",
"period_start": "2026-09-01",
"period_end": "2026-09-30",
"gross_sales_cents": 3100000,
"refunds_cents": 50000,
"chargebacks_cents": 10000,
"fees_cents": 90000,
"net_deposits_cents": 2950000,
"transaction_count": 620,
"created_at": "2026-10-01T00:00:00Z",
"duplicate": false
}
}Results
Download a processor statement
/applications/{id}/processor-statements/{statementId}/download5-minute signed link to the original uploaded processor statement PDF.
- scope:
results:readParameters (2)
id (path)UUID · required- Application belonging to the organization key. Missing or foreign files return 404 not_found.
statementId (path)UUID · required- Processor statement ID from the merchantflow list. Missing or foreign statements return 404 not_found.
Response fields (3)
data.id / data.file_nameUUID / string- Statement identity.
data.urlstring- Signed download link for the original uploaded PDF.
data.expires_ininteger · seconds- Link lifetime: 300 seconds (5 minutes).
- Requires results:read. The link expires after 5 minutes; request a fresh one instead of storing it.
curl -X GET "https://lendlucid.com/api/public/v1/applications/app_uuid/processor-statements/statementId_uuid/download" \
-H "Authorization: Bearer $LENDLUCID_KEY"{
"data": {
"id": "processor_uuid",
"file_name": "processor-september.pdf",
"url": "https://example.test/signed/processor-september.pdf",
"expires_in": 300
}
}Results
Delete a processor statement
/applications/{id}/processor-statements/{statementId}Remove a processor statement and its stored file. Saved analyses are not changed.
- scope:
documents:writeParameters (2)
id (path)UUID · required- Application belonging to the organization key. Missing or foreign files return 404 not_found.
statementId (path)UUID · required- Processor statement ID. Missing or foreign statements return 404 not_found.
Response fields (2)
data.idUUID- Deleted statement ID.
data.deletedboolean · true- The row and stored PDF were removed.
- Requires documents:write. Deletion removes the statement and its stored file; saved analyses that already used its figures are not changed.
curl -X DELETE "https://lendlucid.com/api/public/v1/applications/app_uuid/processor-statements/statementId_uuid" \
-H "Authorization: Bearer $LENDLUCID_KEY"{
"data": {
"id": "processor_uuid",
"deleted": true
}
}Results
Monitor alerts
/applications/{id}/monitor-alertsPost-funding alerts such as new financing or balance drops, newest first.
- scope:
results:readParameters (1)
id (path)UUID · required- Application belonging to the organization key. Missing or foreign files return 404 not_found.
Response fields (7)
dataobject[]- Up to 200 saved alerts, newest created_at first. No pagination, total or continuation token.
data[].idUUID- Stored alert ID; use for client-side deduplication.
data[].codestring- Current engine codes: DATA_STALE, REVENUE_DROP, NEGATIVE_DAYS, NEW_FINANCING. Case-sensitive; allow future codes.
data[].severityissue | caution | info- Saved alert severity.
data[].title / data[].detailstring- Stored human-readable finding. Do not parse these strings as structured metrics.
data[].acknowledged_atISO timestamp | null- Acknowledgment time; null means not acknowledged. Acknowledged rows are still returned.
data[].created_atISO timestamp- When the alert was stored, not the newest transaction date.
- Requires an organization ll_live_ key with results:read. These endpoints read saved records only; they do not start analysis, run monitoring or call a bank.
- An empty array is not proof of fresh data, no risk or an active watch; this endpoint does not return watch configuration or monitoring run status.
- Baseline/current analysis IDs, watch ID, fingerprint and acknowledged_by are not returned. Use the monitor-watch operations for watch state and the acknowledge operation to clear alerts.
- The 200-row cap cannot be paged through with limit/offset. Full alert history export remains open; use signed monitor.alert events for new event notifications.
- Read failures return 500 server_error, not an empty successful result.
curl -X GET "https://lendlucid.com/api/public/v1/applications/app_uuid/monitor-alerts" \
-H "Authorization: Bearer $LENDLUCID_KEY"{
"data": [
{
"id": "alert_uuid",
"code": "NEW_FINANCING",
"severity": "caution",
"title": "New financing: Example Funding",
"detail": "1 active financing position not present at funding.",
"acknowledged_at": null,
"created_at": "2026-10-26T00:00:00Z"
}
]
}Results
Get monitor watch
/applications/{id}/monitor-watchRead the post-funding monitor watch for an application, including its funding-baseline analysis.
- scope:
results:readParameters (1)
id (path)UUID · required- Application belonging to the organization key. Missing or foreign files return 404 not_found.
Response fields (6)
data.idUUID- Monitor watch ID.
data.application_idUUID- Watched application.
data.baseline_analysis_idUUID- Saved analysis used as the funding baseline. Starting a watch always re-baselines to the latest saved analysis.
data.activeboolean- false after a stop; stopped watches remain stored.
data.last_checked_atISO timestamp | null- Last monitoring run; null until the first check.
data.created_atISO timestamp- When the watch was first created.
- GET requires results:read and returns 404 not_found when the application is not monitored. POST (start) and DELETE (stop) require applications:write.
- Start returns 201 with the watch row and supports Idempotency-Key replay. It fails with 422 no_analysis when no saved analysis exists — run an analysis first; it becomes the funding baseline.
- Stop returns 200 with the updated watch row, or 404 when no active watch exists. Stopping never deletes stored alerts or analyses.
- Monitoring compares saved analyses and transaction dates only; it never re-runs analysis or calls a bank.
curl -X GET "https://lendlucid.com/api/public/v1/applications/app_uuid/monitor-watch" \
-H "Authorization: Bearer $LENDLUCID_KEY"{
"data": {
"id": "watch_uuid",
"application_id": "app_uuid",
"baseline_analysis_id": "analysis_uuid",
"active": true,
"last_checked_at": "2026-10-26T00:00:00Z",
"created_at": "2026-10-20T00:00:00Z"
}
}Results
Start monitoring
/applications/{id}/monitor-watchStart post-funding monitoring. The latest saved analysis becomes the funding baseline.
- scope:
applications:writeIdempotency-Key supported- Returns 201. Fails with 422 no_analysis when no saved analysis exists — run an analysis first.
Parameters (1)
id (path)UUID · required- Application belonging to the organization key. Missing or foreign files return 404 not_found.
Response fields (6)
data.idUUID- Monitor watch ID.
data.application_idUUID- Watched application.
data.baseline_analysis_idUUID- Saved analysis used as the funding baseline. Starting a watch always re-baselines to the latest saved analysis.
data.activeboolean- false after a stop; stopped watches remain stored.
data.last_checked_atISO timestamp | null- Last monitoring run; null until the first check.
data.created_atISO timestamp- When the watch was first created.
- GET requires results:read and returns 404 not_found when the application is not monitored. POST (start) and DELETE (stop) require applications:write.
- Start returns 201 with the watch row and supports Idempotency-Key replay. It fails with 422 no_analysis when no saved analysis exists — run an analysis first; it becomes the funding baseline.
- Stop returns 200 with the updated watch row, or 404 when no active watch exists. Stopping never deletes stored alerts or analyses.
- Monitoring compares saved analyses and transaction dates only; it never re-runs analysis or calls a bank.
curl -X POST "https://lendlucid.com/api/public/v1/applications/app_uuid/monitor-watch" \
-H "Authorization: Bearer $LENDLUCID_KEY" \
-H "Idempotency-Key: $(uuidgen)"{
"data": {
"id": "watch_uuid",
"application_id": "app_uuid",
"baseline_analysis_id": "analysis_uuid",
"active": true,
"last_checked_at": "2026-10-26T00:00:00Z",
"created_at": "2026-10-20T00:00:00Z"
}
}Results
Stop monitoring
/applications/{id}/monitor-watchStop the active monitor watch. Stored alerts and analyses are preserved.
- scope:
applications:writeParameters (1)
id (path)UUID · required- Application belonging to the organization key. Missing or foreign files return 404 not_found.
Response fields (6)
data.idUUID- Monitor watch ID.
data.application_idUUID- Watched application.
data.baseline_analysis_idUUID- Saved analysis used as the funding baseline. Starting a watch always re-baselines to the latest saved analysis.
data.activeboolean- false after a stop; stopped watches remain stored.
data.last_checked_atISO timestamp | null- Last monitoring run; null until the first check.
data.created_atISO timestamp- When the watch was first created.
- GET requires results:read and returns 404 not_found when the application is not monitored. POST (start) and DELETE (stop) require applications:write.
- Start returns 201 with the watch row and supports Idempotency-Key replay. It fails with 422 no_analysis when no saved analysis exists — run an analysis first; it becomes the funding baseline.
- Stop returns 200 with the updated watch row, or 404 when no active watch exists. Stopping never deletes stored alerts or analyses.
- Monitoring compares saved analyses and transaction dates only; it never re-runs analysis or calls a bank.
curl -X DELETE "https://lendlucid.com/api/public/v1/applications/app_uuid/monitor-watch" \
-H "Authorization: Bearer $LENDLUCID_KEY"{
"data": {
"id": "watch_uuid",
"application_id": "app_uuid",
"baseline_analysis_id": "analysis_uuid",
"active": false,
"last_checked_at": "2026-10-26T00:00:00Z",
"created_at": "2026-10-20T00:00:00Z"
}
}Results
Acknowledge an alert
/applications/{id}/monitor-alerts/{alertId}/acknowledgeClear a monitor alert from the open list without deleting it. Re-acknowledging returns the original timestamp.
- scope:
applications:writeParameters (2)
id (path)UUID · required- Application belonging to the organization key. Missing or foreign files return 404 not_found.
alertId (path)UUID · required- Alert from the monitor-alerts list. Missing or foreign alerts return 404 not_found.
Response fields (3)
data.idUUID- Acknowledged alert ID.
data.code / data.severity / data.titlestring- Stored alert identity, matching the monitor-alerts list.
data.acknowledged_atISO timestamp- Acknowledgment time. Re-acknowledging an already acknowledged alert returns 200 with the original timestamp, not a new one.
- Requires applications:write. Acknowledgment clears the alert from the open list without deleting it; append-only alert history is preserved.
- Acknowledgment does not change the watch, the alert fingerprint or future alerts for the same condition.
curl -X POST "https://lendlucid.com/api/public/v1/applications/app_uuid/monitor-alerts/alertId_uuid/acknowledge" \
-H "Authorization: Bearer $LENDLUCID_KEY"{
"data": {
"id": "alert_uuid",
"code": "NEW_FINANCING",
"severity": "caution",
"title": "New financing: Example Funding",
"acknowledged_at": "2026-10-26T01:00:00Z"
}
}Webhooks
Register a webhook
/webhooksReceive signed events: analysis.completed, analysis.needs_review, analysis.failed, document.processed, bank.connected, bank.disconnected, monitor.alert, application.deleted. document.processed includes a progress block (documents_processed, documents_total, percent_complete, step_detail) for live progress bars.
- scope:
webhooks:manageIdempotency-Key supported- Each delivery carries LendLucid-Signature: t=<unix>,v1=<hex>. Compute HMAC-SHA256 of `${t}.${body}` with your secret and compare.
- Reject timestamps older than 5 minutes. Retries reuse the same event id.
Parameters (4)
urlHTTPS URL · required · max 500- Trimmed valid URL starting with https://. Delivery does not follow redirects; register the final public destination.
eventsstring[] · optional · 1–10 entries- Allowed: analysis.completed, analysis.needs_review, analysis.failed, document.processed, application.deleted, monitor.alert, bank.connected, bank.disconnected, test.ping. Empty lists and unknown events rejected. Duplicates are not rejected; wildcard * is not accepted by this API.
bodystrict JSON- Unknown properties rejected. Malformed JSON returns 400 invalid_json; invalid fields return 422 validation_failed with issues[].
Idempotency-Keyheader · optional- Preserve the same key and identical JSON text on a retry. Replayed responses can contain the original secret; keep keys and responses server-side.
Response fields (7)
data.idstring- Receiver ID used for rotation and removal.
data.urlstring- Stored HTTPS destination.
data.eventsstring[]- Subscribed event types; omitted create events defaults to all supported business events except test.ping.
data.activeboolean- Stored receiver activation flag.
data.created_atstring- Receiver creation timestamp.
data.secretstring- Signing secret returned at creation; not included in list responses. Store encrypted on your server, never in browser code or logs.
data.secret_notestring- Server-side storage reminder.
- Returns 201. Registration does not send a verification ping. test.ping is supported as an event type, but there is no public v1 send-test or delivery-history endpoint.
- Delivery is an HTTPS POST with Content-Type: application/json. Envelope: id (stable event UUID), type (event name), created_at (event timestamp), organization_id (owning organization), data (event-specific object). It is not wrapped in data like API responses.
- Headers: LendLucid-Event equals the event type; LendLucid-Event-Id equals the stable envelope id; LendLucid-Signature is t=<Unix seconds>,v1=<hex HMAC-SHA256>, with a second v1 during rotation.
- Verify HMAC-SHA256 over the exact raw request body prefixed by t and a period: t.rawBody. Do not parse/reformat JSON before verification. Compare signatures in constant time; accept a valid signature from either currently trusted secret during rotation.
- Receiver recommendation: reject timestamps outside a five-minute tolerance, including far-future timestamps. Check envelope organization_id against your stored customer mapping; do not infer identity from an unsigned header alone.
- Delivery is at-least-once, not ordered or exactly-once. Persist the event id and deduplicate before side effects; acknowledge with 2xx only after durable acceptance, then process asynchronously. Fetch the saved analysis version from an analysis event rather than treating its payload as the full financial result.
- Normal business events have at most 6 attempts at absolute event-time offsets of 0, 60, 300, 1800, 7200, 21600 seconds. These are scheduled targets, not punctual delivery guarantees; worker delays can make retries late. Failed test pings are not retried.
- Any 2xx response completes delivery. Redirects, non-2xx responses and network failures are unsuccessful; each request has a ten-second timeout. Retry attempts preserve event id/payload but generate a new signature timestamp. There is no per-event guarantee that other events have arrived first.
- Repeated rotation replaces the single previous-secret slot. Avoid rotating again before the current overlap completes; rotation is not idempotent and an uncertain response should not be blindly retried.
curl -X POST "https://lendlucid.com/api/public/v1/webhooks" \
-H "Authorization: Bearer $LENDLUCID_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{ "url": "https://example.test/hooks/lendlucid", "events": ["analysis.completed", "bank.connected"] }'{
"data": {
"id": "wh_uuid",
"url": "https://example.test/hooks/lendlucid",
"events": [
"analysis.completed",
"bank.connected"
],
"active": true,
"created_at": "2026-10-26T00:00:00Z",
"secret": "whsec_fictional_example_only",
"secret_note": "Shown once. Store it server-side."
}
}Webhooks
Rotate a webhook secret
/webhooks/{id}/rotateBoth secrets sign deliveries during the overlap window.
- scope:
webhooks:manageParameters (1)
idUUID · path- Receiver belonging to your organization. No body is read; no idempotent replay is implemented.
Response fields (3)
data.idstring- Rotated receiver ID.
data.secretstring- New secret returned in this response; preserve it securely before switching your receiver.
data.previous_secret_valid_untilstring- Old secret remains a second signing value for 24 hours from rotation. Expiry is exclusive; delivery uses only the new secret afterward.
- Returns 200; missing, malformed or foreign receiver ID returns 404 not_found. List reports previous_secret_expires_at instead of previous_secret_valid_until.
- Rotation cannot recover a lost current secret; it issues a replacement. Do not retry blindly or rotate repeatedly during the overlap. The current handler does not check its intermediate update error; deployment verification and a separate reliability fix remain needed.
curl -X POST "https://lendlucid.com/api/public/v1/webhooks/webhook_uuid/rotate" \
-H "Authorization: Bearer $LENDLUCID_KEY"{
"data": {
"id": "wh_uuid",
"secret": "whsec_fictional_replacement_only",
"previous_secret_valid_until": "2026-10-27T00:00:00Z"
}
}Webhooks
List webhook receivers
/webhooksList your organization's registered receivers, subscribed events and secret-overlap expiry. Signing secrets are not returned.
- scope:
webhooks:manageResponse fields (7)
dataobject[]- Receivers ordered by created_at ascending. No pagination or total field.
data[].idstring- Receiver ID used for rotation and removal.
data[].urlstring- Stored HTTPS destination.
data[].eventsstring[]- Subscribed event types; omitted create events defaults to all supported business events except test.ping.
data[].activeboolean- Stored receiver activation flag.
data[].created_atstring- Receiver creation timestamp.
data[].previous_secret_expires_atstring | null- Stored expiry of the previous signing secret, not the secret itself. The rotation response uses the distinct name previous_secret_valid_until.
- No current or previous signing secret is returned. This is receiver configuration, not event or delivery history.
curl -X GET "https://lendlucid.com/api/public/v1/webhooks" \
-H "Authorization: Bearer $LENDLUCID_KEY"{
"data": [
{
"id": "wh_uuid",
"url": "https://example.test/hooks/lendlucid",
"events": [
"analysis.completed",
"bank.connected"
],
"active": true,
"created_at": "2026-10-26T00:00:00Z",
"previous_secret_expires_at": null
}
]
}Webhooks
Remove a webhook receiver
/webhooks/{id}Remove a registered receiver belonging to your organization.
- scope:
webhooks:manageParameters (1)
idUUID · path- Receiver belonging to your organization. No request body.
Response fields (2)
data.idstring- Removed receiver ID.
data.deletedboolean- true for successful removal.
- Returns 200; missing, malformed, foreign or already removed receiver returns 404 not_found. This removes receiver configuration, not an application or its financial records. It does not recall requests already sent.
curl -X DELETE "https://lendlucid.com/api/public/v1/webhooks/webhook_uuid" \
-H "Authorization: Bearer $LENDLUCID_KEY"{ "data": { "id": "wh_uuid", "deleted": true } }Partners
Provision a customer organization
/partner/organizationsPartner keys (ll_partner_) create one isolated organization per customer company and issue its scoped keys.
- scope:
orgs:provisionIdempotency-Key supported- Then POST /partner/organizations/{id}/keys to issue that organization's ll_live_ key (shown once).
Parameters (2)
external_company_idstring · required · 1–120 characters- Trimmed; identify the customer company, not a deal or user.
namestring · required · 2–120 characters- Trimmed customer organization name. Unknown JSON properties are rejected.
Response fields (3)
data.organization_idUUID- Save the mapping to your customer company. Use this ID when issuing keys or managing lifecycle.
data.namestring- Stored organization name.
data.external_company_idstring- Your trimmed company identifier, unique within this partner.
- Requires a server-side ll_partner_ key with orgs:provision. Organization ll_live_ keys cannot call partner endpoints; partner keys cannot read customer files or results.
- Returns 201 on creation. Provisioning does not return an API key; issue one separately.
- An already-linked external_company_id returns 409 company_already_linked, not the existing organization as success. The error may include organization_id; reconcile through the partner list if it does not.
- For uncertain creation responses, replay with the same Idempotency-Key and identical body. Do not generate a new retry key.
curl -X POST "https://lendlucid.com/api/public/v1/partner/organizations" \
-H "Authorization: Bearer $LENDLUCID_PARTNER_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{ "external_company_id": "fs_co_77", "name": "Acme Capital" }'{
"data": {
"organization_id": "org_uuid",
"name": "Acme Capital",
"external_company_id": "fs_co_77"
}
}Partners
List partner organizations
/partner/organizationsList only the customer companies linked to your partner, including their suspension status.
- scope:
orgs:provision- Requires a server-side ll_partner_ key. Partner credentials cannot read customer files or results.
Response fields (6)
dataobject[]- All linked companies ordered by link creation ascending. No limit, offset or total is returned.
data[].organization_idUUID- Save the mapping to your customer company. Use this ID when issuing keys or managing lifecycle.
data[].namestring- Stored organization name.
data[].external_company_idstring- Your trimmed company identifier, unique within this partner.
data[].suspendedboolean- Derived from suspended_at only; not a full active-status or termination indicator.
data[].linked_atISO timestamp- When the customer was linked to this partner.
- Requires a server-side ll_partner_ key with orgs:provision. Organization ll_live_ keys cannot call partner endpoints; partner keys cannot read customer files or results.
- List responses contain no customer financial data or API credentials.
curl -X GET "https://lendlucid.com/api/public/v1/partner/organizations" \
-H "Authorization: Bearer $LENDLUCID_PARTNER_KEY"{
"data": [
{
"organization_id": "org_uuid",
"name": "Acme Capital",
"external_company_id": "fs_co_77",
"suspended": false,
"linked_at": "2026-10-25T00:00:00Z"
}
]
}Partners
Issue an organization key
/partner/organizations/{id}/keysIssue a scoped organization key for one of your linked customer companies. The raw key is shown once.
- scope:
orgs:provisionIdempotency-Key supported- Requires ll_partner_. Omitted scopes grant all supported organization scopes; explicitly request only the scopes needed.
- Idempotency-Key is supported: replay an uncertain request with the same key and identical body instead of issuing a second key.
Parameters (3)
id (path)UUID · required- LendLucid organization ID, not external_company_id. Must be linked to the authenticated partner; otherwise 404 not_found.
namestring · optional · 2–60 characters- Trimmed; defaults to FundSuite. An empty request body is accepted.
scopesstring[] · optional · minimum 1- Supported values: applications:read, applications:write, documents:write, analysis:run, results:read, applications:delete, webhooks:manage. Omission grants all seven. orgs:provision is not an organization scope. Unknown body properties are rejected.
Response fields (5)
data.key_idUUID- Keep this ID for later revocation.
data.keystring · secret- Full ll_live_ key returned once. Example is fictional. Store encrypted server-side; never place it in a browser, log, URL or customer-visible message.
data.prefixstring- First 12 characters of the issued key; not a usable credential.
data.scopesstring[]- Granted organization permissions; no implicit partner provisioning permission.
data.key_notestring- One-time credential storage reminder.
- Requires a server-side ll_partner_ key with orgs:provision. Organization ll_live_ keys cannot call partner endpoints; partner keys cannot read customer files or results.
- Returns 201. Idempotency-Key is supported: replay an uncertain request with the same key and identical body instead of issuing a second key.
- An issued key remains subject to organization status, suspension and termination; issuing a new key does not bypass those restrictions.
curl -X POST "https://lendlucid.com/api/public/v1/partner/organizations/org_uuid/keys" \
-H "Authorization: Bearer $LENDLUCID_PARTNER_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{ "name": "FundSuite integration", "scopes": ["applications:read", "results:read"] }'{
"data": {
"key_id": "key_uuid",
"key": "ll_live_FICTIONAL_NOT_A_CREDENTIAL",
"prefix": "ll_live_FICT",
"scopes": [
"applications:read",
"results:read"
],
"key_note": "Shown once. Store it server-side, encrypted."
}
}Partners
Revoke an organization key
/partner/organizations/{id}/keys?key_id=key_uuidRevoke a specific key belonging to a linked organization. Pass its key_id in the query string.
- scope:
orgs:provision- Requires ll_partner_. Wrong-company, missing or already-revoked keys return 404.
Parameters (2)
id (path)UUID · required- LendLucid organization ID, not external_company_id. Must be linked to the authenticated partner; otherwise 404 not_found.
key_id (query)UUID · required- The key ID returned at issuance, not its prefix or raw secret.
Response fields (2)
data.key_idUUID- Revoked organization key ID.
data.revokedboolean- True on successful revocation.
- Requires a server-side ll_partner_ key with orgs:provision. Organization ll_live_ keys cannot call partner endpoints; partner keys cannot read customer files or results.
- Returns 200. Missing, malformed, wrong-company or already-revoked key IDs return 404. Revocation does not delete customer records.
curl -X DELETE "https://lendlucid.com/api/public/v1/partner/organizations/org_uuid/keys?key_id=key_uuid" \
-H "Authorization: Bearer $LENDLUCID_PARTNER_KEY"{ "data": { "key_id": "key_uuid", "revoked": true } }Partners
Suspend or reinstate an organization
/partner/organizations/{id}/suspendSuspend a linked customer's API access or reinstate it by sending suspended: false. Suspension does not delete financial records.
- scope:
orgs:provision- Requires ll_partner_. Send an explicit boolean; an empty body defaults to suspension, and any present body must be exactly {"suspended": true|false}.
Parameters (2)
id (path)UUID · required- LendLucid organization ID, not external_company_id. Must be linked to the authenticated partner; otherwise 404 not_found.
suspendedboolean · send explicitly- Send true to suspend, false to reinstate. An empty body defaults to suspension; any present body must be exactly {"suspended": true|false} — other values or properties return 422 validation_failed.
Response fields (2)
data.organization_idUUID- Linked customer organization ID.
data.suspendedboolean- Requested suspension value; suspension does not delete files.
- Requires a server-side ll_partner_ key with orgs:provision. Organization ll_live_ keys cannot call partner endpoints; partner keys cannot read customer files or results.
- Organization API requests are denied with 403 organization_suspended while suspended, including read/export requests. Do not suspend during an intended export window.
- Reinstatement clears suspension only. It does not reverse termination, reactivate another inactive status or restore revoked keys.
curl -X POST "https://lendlucid.com/api/public/v1/partner/organizations/org_uuid/suspend" \
-H "Authorization: Bearer $LENDLUCID_PARTNER_KEY" \
-H "Content-Type: application/json" \
-d '{ "suspended": true }'{ "data": { "organization_id": "org_uuid", "suspended": true } }Partners
Record customer termination
/partner/organizations/{id}/terminationStart the linked customer's 30-day export window and deletion schedule, with deletion due within 60 days of termination.
- scope:
orgs:provisionIdempotency-Key supported- Requires ll_partner_. terminated_at must not be in the future; a conflicting lifecycle instruction returns 409 lifecycle_already_recorded.
- New ingestion and processing stop. Documented holds or provider failures require staff review; termination is not an immediate deletion receipt.
Parameters (2)
id (path)UUID · required- LendLucid organization ID, not external_company_id. Must be linked to the authenticated partner; otherwise 404 not_found.
terminated_atISO timestamp · required- Must include timezone and not be in the future. Strict JSON object; body limit 2,000 characters.
Response fields (15)
data.idUUID- Lifecycle instruction ID, not a deletion receipt.
data.organization_idUUID- Customer organization under termination.
data.application_idnull- Termination applies to the company, not a single application.
data.kind / data.reasonstring- termination / customer_termination.
data.effective_atISO timestamp- Recorded termination date.
data.export_untilISO timestamp- Read-only export deadline, 30 days after effective_at.
data.purge_afterISO timestamp- Deletion becomes due after the 30-day export period.
data.delete_byISO timestamp- Deletion deadline, 60 days after effective_at.
data.statescheduled | deleting | completed | blocked- Current lifecycle state; recording termination is not completed deletion.
data.lease_untilISO timestamp | null- Internal deletion-worker lease expiry.
data.hold_reason / data.hold_authoritystring | null- Documented hold and its authority, if present.
data.hold_review_atISO timestamp | null- Scheduled hold review.
data.last_errorstring | null- Last recorded deletion error.
data.completed_atISO timestamp | null- Completion time when cleanup finishes.
data.created_atISO timestamp- When the lifecycle instruction was stored.
- Requires a server-side ll_partner_ key with orgs:provision. Organization ll_live_ keys cannot call partner endpoints; partner keys cannot read customer files or results.
- Returns 201 with the stored lifecycle row, including when an identical date/reason already exists. A conflicting date returns 409 lifecycle_already_recorded; dates cannot be silently overwritten.
- New work stops immediately. Existing read-scoped organization keys can export before export_until, subject to normal permissions and suspension. applications:delete remains allowed by the termination gate; other reads stop at the deadline.
- A backdated termination can have an already-expired export window. Holds, active jobs and provider failures require operational follow-up; scheduled dates do not prove deletion completed.
curl -X POST "https://lendlucid.com/api/public/v1/partner/organizations/org_uuid/termination" \
-H "Authorization: Bearer $LENDLUCID_PARTNER_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{ "terminated_at": "2026-10-25T00:00:00Z" }'{
"data": {
"id": "retention_uuid",
"organization_id": "org_uuid",
"application_id": null,
"kind": "termination",
"reason": "customer_termination",
"effective_at": "2026-10-25T00:00:00Z",
"export_until": "2026-11-24T00:00:00.000Z",
"purge_after": "2026-11-24T00:00:00.000Z",
"delete_by": "2026-12-24T00:00:00.000Z",
"state": "scheduled",
"lease_until": null,
"hold_reason": null,
"hold_authority": null,
"hold_review_at": null,
"last_error": null,
"completed_at": null,
"created_at": "2026-10-26T00:00:00Z"
}
}Errors
Errors are JSON: { "error": { "code", "message", "retryable" } }.
| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_json | Body isn't valid JSON. |
| 401 | invalid_api_key | Missing, malformed or revoked key. |
| 401 | api_key_expired | The key passed its expiry date (for example after a rotation grace period). Switch to the replacement key. |
| 403 | insufficient_scope | The key lacks the scope this endpoint needs. |
| 403 | authorization_required | Only when the company has "Require signed agreement" on: record authority for this application first, or the merchant withdrew authorization. |
| 404 | not_found | Not found in your organization. |
| 409 | idempotency_conflict | Same Idempotency-Key, different input. |
| 409 | already_connected | That bank login is already connected. |
| 422 | validation_failed | See issues[] for the fields. |
| 429 | rate_limited | Slow down; honor retry-after. |
| 502 | bank_provider_error | The bank data provider failed; safe to retry. |
| 500 | server_error | Unexpected error; safe to retry. |
Changelog
- 2026-10-28Staff usage reporting now separates requests by partner, company, key, operation, response status and UTC day, including failures and idempotent replays. Recorded provider-cost estimates remain separate from requests, monthly bank fees and customer billing. Historical key attribution is not inferred; request bodies and credentials are never logged.
- 2026-10-28Keys can now carry an expiry date. Rotating a key issues a replacement and keeps the old key working for a chosen grace period; afterwards calls return 401 api_key_expired.
- 2026-10-28Embedded link-sessions accepts optional client_name (1–30 characters) for company branding in Plaid Link; company-key isolation and authority checks remain unchanged.
- 2026-10-28link-sessions accepts an optional redirect_uri so OAuth banks (Chase, Capital One, …) return the merchant to the partner's own app. Exact-match partner allowlist; unregistered addresses are rejected.
- 2026-10-27Onboarded partner upstream-authorization references at case creation, read/renew/revoke evidence endpoints, and automatic analysis for new statement uploads and usable bank imports. No duplicate signature or staff instruction; withdrawal, bank permission and company isolation remain enforced.
- 2026-10-26Embedded bank connections (link-sessions, bank-connections), document downloads, MerchantFlow and monitor alert endpoints, bank.connected / bank.disconnected events.
- 2026-10-26Analysis engine 1.2: one balance layer for statements, bank connections or both; coverage.balance_provenance added.
- 2026-10-20Business details, loan product, hosted connect links and monitor.alert webhook.
- 2026-10-14v1 launch: applications, documents, durable analysis jobs, versioned results, signed webhooks, partner provisioning.
