https://sandbox-api.hevn.finance/dapi/v1/openapi.json, with Swagger UI at
https://sandbox-api.hevn.finance/dapi/v1/docs — so the running deployment is always the authority for a field.
It is the machine-readable half of the Whitelabel guide. The guide explains
the model — your integrator account, the client accounts your customers link to it through Sign in with
HEVN, the developer key that logs your backend in. This reference is the exact contract for every call, and its
groups follow the guide’s order: log in, link a client, submit its verification, open a rail, move money, operate
escrow.
Whitelabel overview
What you can build, and the object graph behind it.
Quickstart
Ten steps in the sandbox, from an empty account to money that moved on chain.
Servers
The document the API serves declares one relative server,
/dapi/v1, so the host decides which of the two rows
above you are talking to; the copy published in this tab names both hosts so the playground can pick one. Every path in
this reference hangs off that base: a full URL is https://api.hevn.finance/dapi/v1/banks, and
so is every Location header and every pollUrl the API answers with — both are absolute paths from the host root
that already begin /dapi/v1. The two deployments have separate accounts, and a token issued by one is refused by the
other, so pick the host before you send a request.
The operations tagged sandbox exist on the sandbox host only; production answers 404 for them.
Everything else exists on both.
The bearer model
Every operation but the three under auth takes one header:platform and it carries a
developer_key_id claim naming the developer key that established the session; a request under /dapi/v1 carrying
anything else — no bearer, an ordinary API token, or the platform-refresh token — is refused before it reaches a
route, with 401 unauthenticated or 403 forbidden and details.reason: "developerSessionRequired". Ordinary
/api/v1 routes refuse a platform token just as firmly, in the other direction.
An API key belongs to remote transfers and can never authenticate here, because the
boundary refuses the request before the key is read.
HEVN re-reads the developer key on every request: it must still exist, the request must arrive from an address inside
the immutable allowlist set when the key was created. A deleted key or a new egress IP is a 403 on every operation,
whatever the token says — see
Developer key.
To act for one of your clients, send that client’s id in a second header instead of minting a second
token:
/client, /client/balance, /client/kyb
and /client/kyb/complete require it — the spec marks it required: true, and omitting it is a
422 validation_failed on a missing header, not a read of your own account. Operations that are about your own account
by definition — POST /clients/link, GET /clients, POST /connect/sessions and all of escrow — refuse it with 400 account_scope_conflict and
details.reason: "selfScopedRoute". The three under auth ignore it: a login has no account to act for yet. The
full table is in Sessions.
One error envelope
Every refusal, on every route, has the same body:code is a stable lowercase slug — branch on it, never on message. The spec publishes the whole slug enum as
PlatformErrorCode, not a per-operation list, so the registry with what to do about each is in
Errors. Every response carries an X-Request-ID; quote it in a support request.
Conventions this reference assumes
Bodies, query parameters and response fields are camelCase; unknown keys are refused rather than ignored; null fields are omitted, so absent and null are the same thing. Money is always a decimal string in the asset’s major unit ("500.00"), never a JSON number. Ids are opaque and prefixed by
what they name. Lists page with a cursor. Idempotency-Key is accepted on every write and required
on none. All seven rules, in one page:
Conventions.
Money movement is signed
Reading data, writing metadata and booking a client’s payout need only a token. Every money movement needs a signature from the wallet’s owner:
The holder’s side is Sign in with HEVN; your key’s side is one
mechanism, described once in Signing.
Authentication
The two login calls, the two tokens, and the header that picks the account.
HTTP client
A working client in Python, Node and Go: login, retries, signing, polling.