Authenticate and read your Salt & Ledger data programmatically.
POST /api/auth/login accepts either an AINative account email/password or an AINative API key, and returns a session cookie used by every other endpoint below.
curl -s -c cookies.txt -X POST https://ledger.ainative.studio/api/auth/login \
-H "Content-Type: application/json" \
-d '{"email": "you@yourcompany.com", "password": "..."}'
# or with an API key instead of a password
curl -s -c cookies.txt -X POST https://ledger.ainative.studio/api/auth/login \
-H "Content-Type: application/json" \
-d '{"api_key": "sk_live_..."}'Every subsequent request in these examples reuses that cookie jar (-b cookies.txt). Your password is sent once, server-to-server, and never stored by this app.
GET /api/app/me confirms the session and returns your user/org identity.
curl -s -b cookies.txt https://ledger.ainative.studio/api/app/me
GET /api/dashboard/customers lists your organization's customer records, optionally filtered by status.
curl -s -b cookies.txt "https://ledger.ainative.studio/api/dashboard/customers?status=active"
GET /api/dashboard/metrics returns your organization's financial metric facts, optionally scoped to one reporting period.
curl -s -b cookies.txt "https://ledger.ainative.studio/api/dashboard/metrics?period_id=2026-08&limit=50"
Every endpoint, request and response shape is published as a machine-readable OpenAPI spec at /api/openapi.json.