LendWorksLendWorksDocs

Connect

Borrower portal API — applications, documents, and offers.

Connect is the borrower-facing portal API. Manage funding applications, upload documents, and accept or decline financing offers on behalf of borrowers.

Endpoints

MethodPathDescription
GET/v1/connect/applications/{id}Get application detail
POST/v1/connect/documents/uploadGet presigned upload URL
POST/v1/connect/offers/{id}/acceptAccept an offer
POST/v1/connect/offers/{id}/declineDecline an offer

SDK Usage

import { LW } from '@lendworks/lwjs'

const lw = new LW({ apiKey: 'lw_live_...' })

// Get application detail
const app = await lw.connect.applications.get('app-uuid')

// Upload a document
const { uploadUrl, storagePath } = await lw.connect.documents.getUploadUrl({
  applicationId: 'app-uuid',
  filename: 'bank-statement-q4.pdf',
  contentType: 'application/pdf',
})
// PUT the file to uploadUrl using fetch or your HTTP client

// Accept an offer
await lw.connect.offers.accept('offer-uuid')

// Decline with reason
await lw.connect.offers.decline('offer-uuid', { reason: 'Better terms elsewhere' })

Document Upload Flow

Document upload is a two-step process:

  1. Get a presigned URL via POST /v1/connect/documents/upload
  2. PUT the file directly to the returned uploadUrl

The presigned URL expires after 1 hour. Supported formats: PDF, PNG, JPG.

Authentication

Connect endpoints require a platform API key with connect access and an externalContextId binding (the borrower's identity). This binding is set when the key is created and ensures the key can only access that borrower's data.