localsDocs Get sandbox keys
Get started/Environments and keys

Environments and keys

Two environments with the same API, each with its own keys and data. A key only works on its own environment.

Base URL

https://api.locals.money/v1

That is the live environment, and every path in these docs is relative to it. The version is part of the path: breaking changes ship as a new version, additions land in v1 and are listed in the Changelog.

Sandbox runs on its own deployment, with its own base URL and its own data. Ask us for it with your sandbox keys, and use it in place of https://api.locals.money in the examples.

Sandbox and live

SandboxLive
Keyslk_test_…lk_live_…
MoneySimulated. Nothing moves.Real bank transfers and onchain settlement.
DepositsPOST/v1/test/routes/{id}/simulateYour customers' real transfers
VerificationTest documents, faster review for individualsReal KYC and KYB
Allowed IPsOptional: a key without any works from anywhereRequired: a key without any does not work
Test endpointsEnabledReturn 404

Build and test everything in sandbox, then switch the base URL and the key. Endpoints and payloads are the same. Objects never cross environments: a customer created in sandbox does not exist in live.

Authentication

Send your secret key as a Bearer token on every request:

curl https://api.locals.money/v1/routes \
  -H "Authorization: Bearer $LOCALS_KEY"
Warning

Secret keys can move money. Keep them on your servers. Never put them in a browser, a mobile app or a repository.

Allowed IPs

Each key works only from the addresses you allow for it: IPs or CIDR ranges, IPv4 or IPv6, up to 100 per key. You set them in the backoffice when you create the key, and change them there later.

{
  "statusCode": 403,
  "code": "ip_not_allowed",
  "message": "Requests from 203.0.113.7 are not allowed for this key",
  "requestId": "req_5d02aa"
}

If your servers sit behind a NAT or a hosting provider, allow the address your traffic leaves from, which the message shows.

Rate limits

Each key has its own limit of requests per minute, 120 by default; past it, 429 rate_limited with Retry-After. See Rate limits.

Data you see

Each partner sees only its own customers, routes, transfers and events: lists are filtered by the key that calls them, and ids that belong to someone else return 404, the same as an id that does not exist.

A suspended account gets 403 forbidden on every request, and its backoffice is read only.

Network

All traffic is HTTPS. Locals settles to the address you put on each route; check it before you create the route, because deposits are sent there automatically.