CapLens
CapLens
Debt AdvisoryInvestorsLendersResources
Log in
Resources

API Documentation

Load existing portfolios and debt books into CapLens.

API reference for importing assets, existing loans, maturities, and lender relationship context into CapLens. Review authentication, request fields, and example responses before connecting your systems.

View OpenAPI JSONJump to import endpoint

Delta-safe by design

Repeated pushes update records instead of duplicating assets.

organization + sourceSystem + externalId = existing CapLens capital record

Endpoints

POST/api/sponsor/portfolio/importValidate or upsert a sponsor portfolioPOST/api/sponsor/api-keysCreate an organization API keyDELETE/api/sponsor/api-keys/{id}Revoke an API keyPOST/api/sponsor/portfolio/{id}/start-refinanceStart refinance from an imported loanPOST/api/sponsor/portfolio/{id}/lender-appetite-linkRequest lender appetite update
Auth

Use Bearer caplens_sk_... for automated portfolio pushes.

Validation

Dry-run mode returns issues and warnings before saving.

Scope

Keys are organization-scoped and revocable in CapLens.

POST/api/sponsor/portfolio/import

Validate or upsert a sponsor portfolio

Load current assets and existing loans. Use dry-run to validate, then createRecords to create or update monitored capital records.

Protected
Auth: Bearer sponsor API key or authenticated CapLens session

Start with dryRun: true to validate your data. The example below uses createRecords: true and saves records; switch to that mode only after reviewing validation results.

cURL
curl https://app.caplens.io/api/sponsor/portfolio/import \
  -H "Authorization: Bearer caplens_sk_..." \
  -H "Content-Type: application/json" \
  -d @portfolio-import.json
Request body
{
  "dryRun": false,
  "createRecords": true,
  "sourceSystem": "11Capital BI",
  "fileName": "debt-book-export.xlsx",
  "assets": [
    {
      "externalId": "11C-SEA-014",
      "propertyName": "Harbor Ridge Apartments",
      "market": "Seattle, WA",
      "units": 184,
      "sponsorName": "11Capital",
      "currentLoan": {
        "lenderName": "Pacific Crest Bank",
        "lenderType": "Bank",
        "lenderContactName": "Jordan Lee",
        "lenderContactEmail": "jordan@pacificcrest.example",
        "loanAmount": 21400000,
        "interestRate": 6.18,
        "rateType": "fixed-index-spread",
        "maturityDate": "2027-11-15",
        "extensionNoticeDate": "2027-05-15",
        "prepaymentType": "yield-maintenance",
        "prepaymentSummary": "Yield maintenance through 2027; open final 90 days",
        "depositRequirements": "Tax, insurance, and replacement reserves",
        "recentLenderConversation": "Bank open to reviewing refi 9 months before maturity.",
        "noi": 1825000,
        "dscr": 1.31,
        "occupancy": 94.2,
        "debtYield": 8.5
      }
    }
  ]
}
Response
{
  "status": "published",
  "mode": "upserted_records",
  "summary": {
    "totalRows": 1,
    "readyRows": 1,
    "warningRows": 0,
    "blockedRows": 0,
    "createdRecords": 0,
    "updatedRecords": 1
  },
  "rows": [
    {
      "rowNumber": 1,
      "status": "ready",
      "createdDealId": "4b0f8cf8-6f8b-4129-94fd-aaf4b7c09dc7",
      "importAction": "updated"
    }
  ]
}

Schema

Portfolio asset fields

Required fields
externalId

Stable asset id from the sponsor system of record.

propertyName

Asset name shown in CapLens.

market

Market label, such as Seattle, WA.

units

Unit count for the asset.

sponsorName

Sponsor or borrower name.

currentLoan.lenderName

Current lender relationship.

currentLoan.loanAmount

Current loan balance or amount.

currentLoan.maturityDate

Current loan maturity date.

High-value optional fields
currentLoan.extensionNoticeDate

Refi or extension trigger date.

currentLoan.prepaymentSummary

Yield maintenance, defeasance, stepdown, or open-period context.

currentLoan.depositRequirements

Deposits, reserves, escrows, or lender-controlled accounts.

currentLoan.recentLenderConversation

Institutional memory from the latest lender call.

currentLoan.dscr / noi / occupancy

Operating snapshot for monitoring and refinance readiness.

rawData

Untouched source payload retained for traceability.

POST/api/sponsor/api-keys

Create an organization API key

Create a one-time sponsor integration token from a logged-in CapLens session.

Protected
Auth: Authenticated CapLens session
DELETE/api/sponsor/api-keys/{id}

Revoke an API key

Soft-revoke a sponsor API key so old integrations stop working without losing audit history.

Protected
Auth: Authenticated CapLens session
POST/api/sponsor/portfolio/{id}/start-refinance

Start refinance from an imported loan

Create or reuse a draft refinance workflow from an active sponsor portfolio record.

Protected
Auth: Authenticated CapLens session
POST/api/sponsor/portfolio/{id}/lender-appetite-link

Request lender appetite update

Generate a private lender package link anchored to the lender criteria update form.

Protected
Auth: Authenticated CapLens session

OpenAPI preview

Machine-readable contract

The full JSON spec is exposed at /api/public/openapi for technical review and future developer tooling.

{
  "openapi": "3.1.0",
  "info": {
    "title": "CapLens Sponsor Portfolio API",
    "version": "2026-07-04",
    "summary": "Load existing CRE debt portfolios and convert assets into monitored capital records.",
    "description": "Use the Sponsor Portfolio API to validate, import, and update existing debt books from BI tools, spreadsheets, data warehouses, and sponsor systems of record."
  },
  "paths": {
    "/api/sponsor/portfolio/import": {
      "post": {
        "tags": [
          "Sponsor Portfolio"
        ],
        "summary": "Validate, save, or upsert an existing sponsor debt portfolio",
        "description": "Validates portfolio rows and optionally creates or updates monitored capital records. Delta updates are keyed by organization, sourceSystem, and externalId.",
        "security": [
          {
            "SponsorApiKey": []
          },
          {
            "CapLensSession": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SponsorPortfolioImportRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Validation or import result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SponsorPortfolioImportResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid JSON or missing assets"
          },
          "401": {
            "description": "Missing or invalid sponsor API key/session"
          },
          "403": {
            "description": "API key missing required scope or organization access"
          }
        }
      }
    }
  }
}

Implementation support

Plan your portfolio integration.

Bring your source fields, organization setup, and validation questions. Our team can help you prepare the import.

Contact implementation supportLog in
CapLens

Opportunity, capital, and the intelligence to move forward.

Get started

Find lenders for a deal
Why CapLens
Pricing
Lending programs
Create your free lender profile

For your team

Debt Advisory
Investors
Lenders

Help & resources

Resources
Contact support
Log in

© 2026 CapLens. All rights reserved.