Skip to main content

Install

Base URL

Every example below runs against http://localhost:3000. See self-hosting to bring that up, or swap in your production URL.

Authenticate

Every request needs an API key, sent as either Authorization: Bearer <key> or X-Api-Key: <key>. Keys are ml_live_* (production) or ml_test_* (sandbox).
All three SDKs read MONEYLINE_API_KEY from the environment, so you rarely pass the key in code:
One naming rule worth knowing up front. The API takes snake_case request bodies and returns camelCase response fields. You send external_id, you read back externalId. The Node and Python SDKs pass your parameters through verbatim, so their create and update params are snake_case too. This trips up nearly everyone once.
1

Create a submission

A submission is the container for one applicant’s documents and analysis.
The response is wrapped in a data envelope:
The SDKs unwrap data for you and hand back the object directly.
2

Upload a document

Documents are uploaded as multipart/form-data and classified automatically — bank statement, tax return, P&L, and so on — then queued for parsing.
Pass document_class if you already know the type and want to skip classification.
3

Wait for processing

Parsing and enrichment are asynchronous. Poll the submission until it leaves the processing states — the TypeScript and Python SDKs ship a helper that does exactly this.
In production, prefer webhooks over polling: subscribe to submission.processed and react to the event.
4

List the extracted transactions

Transactions come back enriched — categorized, merchant-matched, and deduplicated.
5

Read the analytics

Every calculation lives on the analytics resource — not on submissions.
There are fifteen analytics methods in every SDK — balances, anomalies, forecasts, recurring payments, merchant summaries, categories, and more. See the SDK reference for the full list.

Next steps

Concepts

The data model behind submissions, documents, and transactions.

Webhooks

React to processing events instead of polling.

Pagination

Cursor pagination, and the auto-paging helpers in each SDK.

Errors

The error envelope, and the typed errors each SDK raises.

Next

Ship it

You have a submission, a parsed document, and analytics. Next: react to events instead of polling, and give every write an idempotency key.