Quickstart

Go from zero to your first underwriting result in under 5 minutes. This guide walks you through installing the SDK, creating a deal, uploading a bank statement, and reading the analysis results.

You will need an API key to follow along. If you do not have one yet, create it from the API Keys page in your dashboard.

Walkthrough

1

Install the SDK

Choose your preferred language. If you prefer raw HTTP, cURL works out of the box.

# cURL is pre-installed on macOS and most Linux distros.
# No installation needed — just grab your API key.
curl --version
2

Authenticate

Pass your API key as a Bearer token in the Authorization header. All keys start with bk_live_ or bk_test_.

curl https://api.banklyze.com/v1/deals \
  -H "Authorization: Bearer bk_live_your_api_key_here"
3

Create a deal

A deal represents a funding application. It groups all uploaded documents and analysis results for a single merchant.

curl -X POST https://api.banklyze.com/v1/deals \
  -H "Authorization: Bearer bk_live_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "business_name": "Acme Trucking LLC",
    "entity_type": "llc",
    "funding_amount_requested": 50000
  }'
4

Upload a document

Upload a bank statement PDF to the deal. Banklyze will automatically extract text, parse transactions with AI, and run risk screening.

curl -X POST https://api.banklyze.com/v1/deals/42/documents \
  -H "Authorization: Bearer bk_live_your_api_key_here" \
  -F "file=@bank-statement-jan.pdf" \
  -F "document_type=bank_statement"

You can upload multiple documents per deal. Processing happens asynchronously — the upload returns immediately with a processing status.

5

Check results

Poll the deal endpoint until the status changes to ready, or configure a webhook to be notified automatically.

# Poll the deal until status is "ready"
curl https://api.banklyze.com/v1/deals/42 \
  -H "Authorization: Bearer bk_live_your_api_key_here"

# Response includes health_score, risk_grade, and recommendation
# {
#   "data": {
#     "id": 42,
#     "status": "ready",
#     "health_score": 72.5,
#     "risk_grade": "B",
#     ...
#   }
# }

Complete Example

Here is the entire flow in a single Python script:

quickstart.py
from banklyze import Banklyze

client = Banklyze(api_key="bk_live_your_api_key_here")

# 1. Create a deal
deal = client.deals.create(
    business_name="Acme Trucking LLC",
    entity_type="llc",
    funding_amount_requested=50000,
)

# 2. Upload a bank statement
with open("bank-statement-jan.pdf", "rb") as f:
    client.documents.upload(
        deal_id=deal.id,
        file=f,
        document_type="bank_statement",
    )

# 3. Wait for results
import time
while True:
    deal = client.deals.get(deal.id)
    if deal.status == "ready":
        break
    time.sleep(3)

# 4. Read the underwriting result
print(f"Health Score: {deal.health_score}")
print(f"Risk Grade:   {deal.risk_grade}")

What’s Next