Quickstart
Get your keys
Ask Ligo for a sandbox key. It starts with ligo_test_ and comes with a client_id and a client_secret, shown once: keep them in your secret manager. Live keys come later, through a one-time claim code.
Get an access token
Exchange the key for an access token that lasts one hour. You can also send the key itself as the bearer.
curl https://api.ligoapi.com/oauth/token \ -u "$LIGO_CLIENT_ID:$LIGO_CLIENT_SECRET" \ -d grant_type=client_credentials { "access_token": "ligo_test_at_8Kc2pQx7Vd0mZr4TnY1sWbHeLu9aFj3G", "token_type": "Bearer", "expires_in": 3600} Add your accounts
Ligo sets up your integration, your connection to the bank, and GET /v1/integrations gives you its ID. Add every account the bank lists with the bank credentials in X-Bank-Credentials. In the sandbox, test_ok returns the test data:
BANK_CREDENTIALS=$(printf '{"int_YUdNP6Ksih3yCEgVKy2tzg":{"api_key":"test_ok"}}' \ | base64 | tr '+/' '-_' | tr -d '=\n') curl https://api.ligoapi.com/v1/accounts \ -H "Authorization: Bearer $LIGO_ACCESS_TOKEN" \ -H "X-Bank-Credentials: $BANK_CREDENTIALS" \ -H "Content-Type: application/json" \ -d '{ "integration_id": "int_YUdNP6Ksih3yCEgVKy2tzg", "all": true }' { "data": [ { "id": "acc_WHE4iXdNcTEs4Vn-L8t7keTjCyR8mWRORj5p-LkJHedfj8zSgfYKuZk-vBqGp4RLPOA-", "integration_id": "int_YUdNP6Ksih3yCEgVKy2tzg", "entity_id": "ent_nLoIRHnCnA27JwIA_oUXBA", "bank": "sandbox", "number": "0399994821130", "type": "checking", "currency": "USD", "source": "api", "enabled": true, "refresh_interval_minutes": 240, "created_at": "2026-11-11T15:04:05.123Z", "updated_at": "2026-11-11T15:04:05.123Z" }, { "id": "acc_Gl6D6C_lAlrga_xKl3Vuboi8Mz8-LLZoFC6C6WDo_Z_jfgLGjO8YyqTDQuxoUjc8a5Lq", "integration_id": "int_YUdNP6Ksih3yCEgVKy2tzg", "entity_id": "ent_nLoIRHnCnA27JwIA_oUXBA", "bank": "sandbox", "number": "0399994821131", "type": "savings", "currency": "USD", "source": "api", "enabled": true, "refresh_interval_minutes": 240, "created_at": "2026-11-11T15:04:05.123Z", "updated_at": "2026-11-11T15:04:05.123Z" } ]} Refresh balances and transactions
Ligo fetches the latest balance and the last 31 days of transactions from the bank, and stores them:
BANK_CREDENTIALS=$(printf '{"int_YUdNP6Ksih3yCEgVKy2tzg":{"api_key":"test_ok"}}' \ | base64 | tr '+/' '-_' | tr -d '=\n') curl https://api.ligoapi.com/v1/accounts/refresh \ -H "Authorization: Bearer $LIGO_ACCESS_TOKEN" \ -H "X-Bank-Credentials: $BANK_CREDENTIALS" \ -H "Content-Type: application/json" \ -d '{ "all": true }' { "data": [ { "id": "acc_WHE4iXdNcTEs4Vn-L8t7keTjCyR8mWRORj5p-LkJHedfj8zSgfYKuZk-vBqGp4RLPOA-", "integration_id": "int_YUdNP6Ksih3yCEgVKy2tzg", "entity_id": "ent_nLoIRHnCnA27JwIA_oUXBA", "bank": "sandbox", "number": "0399994821130", "type": "checking", "currency": "USD", "source": "api", "enabled": true, "refresh_interval_minutes": 240, "refreshed": true, "created_at": "2026-11-11T15:04:05.123Z", "updated_at": "2026-11-11T15:04:05.123Z", "balance": { "type": "interim_booked", "amount": { "value": "1250.00", "currency": "USD" }, "credit_debit": "credit", "date": "2026-11-15", "fetched_at": "2026-11-15T14:32:09.418Z" } } ]} Read transactions
Read the stored transactions by booking date, a page at a time. This never calls the bank:
curl "https://api.ligoapi.com/v1/transactions?account_id=acc_WHE4iXdNcTEs4Vn-L8t7keTjCyR8mWRORj5p-LkJHedfj8zSgfYKuZk-vBqGp4RLPOA-&from=2026-11-14&to=2026-11-15&limit=2" \ -H "Authorization: Bearer $LIGO_ACCESS_TOKEN" { "data": [ { "id": "txn_3f9a1c07be5d42e8a6c0d1b97e4f2a55", "account_id": "acc_WHE4iXdNcTEs4Vn-L8t7keTjCyR8mWRORj5p-LkJHedfj8zSgfYKuZk-vBqGp4RLPOA-", "status": "booked", "credit_debit": "credit", "amount": { "value": "1250.00", "currency": "USD" }, "booking_date": "2026-11-14", "value_date": "2026-11-14", "description": "Invoice 1042 payment", "references": [{ "type": "invoice", "value": "1042" }], "balance_after": { "amount": { "value": "6410.25", "currency": "USD" }, "credit_debit": "credit" }, "source": "api" }, { "id": "txn_b2d6e4810c3a47f9915e7a0d6c8f3b12", "account_id": "acc_WHE4iXdNcTEs4Vn-L8t7keTjCyR8mWRORj5p-LkJHedfj8zSgfYKuZk-vBqGp4RLPOA-", "status": "booked", "credit_debit": "debit", "amount": { "value": "86.40", "currency": "USD" }, "booking_date": "2026-11-14", "description": "Office supplies", "source": "api" } ], "next_cursor": "eyJ2IjoxLC…"}