bankstract

API reference

Every endpoint at a glance.

Base URL: https://bankstract.logickoder.dev. All /v1 endpoints take Authorization: Bearer <key> unless noted. Errors use the envelope.

An interactive, always-current reference generated from the OpenAPI spec is coming. The raw spec is committed at apps/docs/openapi.json and served by the worker at /openapi.json.

Parse

POST /v1/parse

Parse a statement. multipart/form-data with pdf=<file>.

  • Query: format=json|csv (default json)
  • Form: bank=<name> (optional), redact=true (optional)
  • 200ParseResponse JSON, or CSV / redacted bytes · 401 402 413 422 500

Account

GET /v1/banks

List supported banks + engine version.

GET /v1/usage

Current billing-period parse count + projected invoice for the calling key.

GET /v1/status

Worker and engine version. No auth.

Keys (admin)

Gated by an admin token, not a bsk_ key. A key can never mint more keys.

POST /v1/keys

Issue a live key. Body: { name, owner? } (env is always live). env=test409; test keys are provisioned via POST /v1/keys/test. Returns the raw key once. Owners may hold many live keys.

POST /v1/keys/test

Provision or rotate the owner's single test key. Revokes the existing test key and issues a new one. Returns the raw key once.

GET /v1/keys?owner=

List key metadata (never the raw key or hash). Optional owner filter.

DELETE /v1/keys/{id}

Revoke a key (soft delete: 204, or 404 if already revoked).

Health

GET /healthz

Liveness. No auth.

GET /readyz

Readiness: engine loaded + DB reachable. No auth.

On this page