REST API

Build on OpenShut

Full REST API. Create deals, generate documents, and run compliance checks from your own systems. Every module, every jurisdiction, every document type.

See Pricing

Quick start

Three steps to your first API call.

01

Get your API key

Generate a key in your dashboard Settings. Set per-module permissions and rate limits. Keys start with sk_live_.

02

Create a deal

POST to /api/v1/deals with your deal data. The response includes a deal ID and status.

curl -X POST https://api.openshut.me/api/v1/deals \
  -H "Authorization: Bearer sk_live_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "module": "capital",
    "name": "Growth Fund I",
    "fundName": "Growth Fund I LP",
    "fundType": "VENTURE_CAPITAL",
    "gpEntityName": "Growth GP LLC",
    "targetRaise": 50000000,
    "country": "US"
  }'
03

Poll for status

GET /api/v1/deals/{id} to check progress. When status is complete, each document includes a presigned download URL (expires in 1 hour).

Get your API key

Generate a key and start making requests. Set per-module permissions and rate limits.

Loading...

Authentication

Every request requires a Bearer token in the Authorization header. Create API keys in your dashboard under Settings. Each key can be scoped to specific modules (lending, capital, ma, syndication, compliance) and has its own rate limit.

Default rate limit: 30 requests/min. Document generation endpoints are limited to 10 requests/min. You can configure custom limits per key.

Authorization: Bearer sk_live_your_key

Core endpoints

14 endpoints covering deal lifecycle, document generation, compliance checks, and key management.

POST/api/v1/deals

Create a deal

Create a deal in any module. Triggers document generation automatically. Pass module (required) plus module-specific fields in the request body. Returns the new deal with status "processing" and an estimated completion time.

Response (201 Created):
{
  "id": "clx...",
  "module": "capital",
  "status": "processing",
  "createdAt": "2026-03-09T12:00:00Z",
  "documents": [],
  "estimatedCompletionSeconds": 120
}
GET/api/v1/deals

List deals

List deals with pagination. Query params: module (filter by module), page (default 1), limit (max 100, default 20).

Response:
{
  "deals": [...],
  "total": 47,
  "page": 1,
  "totalPages": 3
}
GET/api/v1/deals/{id}

Get deal status + documents

Get full deal data including status, all generated documents with presigned download URLs, and compliance check results. Works across all modules. Each document in the documents array includes downloadUrl (presigned, expires in 1 hour), docType, version, and complianceChecks.
GET/api/v1/deals/{id}/documents

List documents for a deal

List all generated documents for a deal. Each document includes downloadUrl (presigned S3 URL, expires in 1 hour), docType, version, createdAt, and complianceChecks array.
GET/api/v1/deals/{id}/documents/{docId}

Get a single document

Get a single document by its ID. Returns full document metadata, presigned download URL (1 hour expiry), and compliance check results for that document.
POST/api/v1/deals/{id}/regenerate

Regenerate documents

Regenerate documents for a deal. Optional body: { "documents": ["ppm", "subscription_agreement"] } to regenerate specific types, or omit the body to regenerate all. Returns updated deal with status "processing".
GET/api/v1/programs

List available programs

List available programs and deal types per module. Query: ?module=lending. Returns program IDs, names, required and optional fields, and output document types for each program.
POST/api/v1/documents/generate

Synchronous document generation

Generate a single document synchronously. Pass module, docType, country, and projectData in the body. Returns the base64-encoded document plus inline compliance checks. Rate limited to 10 requests/min.
GET/api/v1/documents/available

Available document types

Get available document types for a module and country. Query: ?country=US&module=capital. Returns the list of document types that can be generated, with their names and required fields.
GET/api/v1/documents/jurisdictions

Supported jurisdictions

List all supported jurisdictions with country codes, names, and which modules are available in each jurisdiction. Currently 12 jurisdictions across all 5 modules.
POST/api/v1/documents/compliance-check

Run compliance checks only

Run compliance checks without generating a document. Pass module, docType, country, and projectData. Returns the full compliance checklist with pass/fail results for each provision. Useful for pre-validation before generation.
POST/api/v1/keys

Create an API key

Create a new API key. Body: { "name": "Production", "permissions": { "lending": true, "capital": true, "ma": false, "syndication": true, "compliance": true }, "rateLimit": 30 }. The key value is returned once in the response. Max 10 keys per organization.
GET/api/v1/keys

List API keys

List all API keys for your organization. Returns key metadata (name, permissions, rate limit, created date, last used) but not the key values themselves.
DELETE/api/v1/keys/{id}

Revoke an API key

Permanently revoke an API key. Any requests using this key will immediately return 401 Unauthorized. This action cannot be undone.

Webhooks

Register HTTPS endpoints in your dashboard to receive real-time notifications. All payloads are HMAC-signed with SHA-256 using your webhook secret. Delivery history is viewable in the dashboard, and a test endpoint is available for development.

Events

  • deal.completed
  • document.generated
  • compliance.check_complete

Example payload

{
  "event": "deal.completed",
  "dealId": "clx...",
  "module": "capital",
  "documents": [
    { "id": "clx...", "docType": "ppm", "downloadUrl": "https://..." }
  ],
  "timestamp": "2026-03-09T12:00:00Z"
}

Module fields

Required and optional fields for POST /api/v1/deals by module. Required fields are marked with *.

lending

Lending

borrowerName*
loanAmountnumber
loanPurpose
programIdfrom GET /api/v1/programs
propertyAddress
countrydefault US
subdivisionstate/province code
currencydefault USD
terms{ interestRate, termMonths, amortizationMonths, ltv, baseRateType, spread, interestOnly, prepaymentPenalty, personalGuaranty }
documentsstring[] of doc types to generate
capital

Capital (Fund Formation)

name*
fundName*
fundType*PRIVATE_EQUITY | VENTURE_CAPITAL | REAL_ESTATE | HEDGE_FUND | CREDIT | INFRASTRUCTURE
gpEntityName*
targetRaisenumber
minInvestmentnumber
managementFeedecimal, e.g. 0.02
carriedInterestdecimal, e.g. 0.20
preferredReturndecimal, e.g. 0.08
countrydefault US
subdivision
currencydefault USD
ma

M&A

name*
transactionType*STOCK_PURCHASE | ASSET_PURCHASE | MERGER | ...
buyerName*
sellerName*
targetCompany*
purchasePricenumber
countrydefault US
subdivision
currencydefault USD
syndication

Syndication

name*
entityName*
sponsorName*
propertyAddress*
propertyType*MULTIFAMILY | OFFICE | RETAIL | INDUSTRIAL | HOTEL | SELF_STORAGE | ...
totalEquityRaisenumber
minInvestmentnumber
purchasePricenumber
countrydefault US
subdivision
currencydefault USD
compliance

Compliance (Investor Reporting)

name*
reportType*QUARTERLY | ANNUAL | K1 | CAPITAL_CALL | DISTRIBUTION | FORM_ADV
fundName*
countrydefault US
subdivision
currencydefault USD

Response format

All responses are JSON. Deal creation returns the deal object with a status field that progresses through four states.

{
  "id": "clx...",
  "module": "capital",
  "status": "processing",
  "createdAt": "2026-03-09T12:00:00Z",
  "documents": [],
  "estimatedCompletionSeconds": 120
}

Status values

createdDeal saved, document generation not yet triggered.
processingDocuments are being generated.
completeAll documents ready. Download URLs are live.
errorGeneration failed. Check the errors array for details.

Rate limits and errors

Rate limit headers are included in every response: X-RateLimit-Remaining and Retry-After (seconds, included when rate-limited).

StatusMeaning
200OK
201Created
400Bad Request
401Unauthorized
402Payment Required
403Forbidden
429Too Many Requests
500Internal Server Error

When you receive a 429, back off for the number of seconds in the Retry-After header. Repeated violations within a short window may result in temporary key suspension.

Start building

Full REST API across 5 modules and 12 jurisdictions. Generate your API key and create your first deal in minutes.

See Pricing