Unirail v1 API reference
The v1 API has 23 endpoints at api.unirail.dev, grouped here by what they do. The OpenAPI document and the docs describe each one in full, with request and response schemas.
Basics
- Base URL
https://api.unirail.dev- Auth
Authorization: Bearer ur_test_sk_…, sent from your server only. Request early access to get a key.- Version
unirail-version: 2026-10-08. The SDK sends it for you.- Writes
- Every write takes an
Idempotency-Key. A retry with the same key can't create a second payment. - Accounts
- Given as
payto://addresses and returned masked. Decide mode takesfp_fingerprints.
Endpoints
23 of 23 endpoints
Decide mode
Get routing decisions from masked metadata, report outcomes and read the snapshot that a self-hosted engine uses (self-hosting is by arrangement). How Decide mode works.
-
POST
/v1/outcomesReport how a decided operation went (updates reliability and contract usage) -
POST
/v1/route_decisionsDecide the rail and cost for an operation from masked metadata (no names or account numbers) -
GET
/v1/routing_snapshotGet everything the decision engine reads, for running @unirail/router yourself (no secrets)
Payments
Price the routes between two accounts and create a payment from the quote your user accepted. Pay by bank.
-
POST
/v1/payment_intentsCreate a payment intent from an accepted quote (your provider moves the money) -
GET
/v1/payment_intentsList payment intents -
GET
/v1/payment_intents/{id}Retrieve a payment intent -
POST
/v1/payment_intents/{id}/advanceContinue after the user returns from approving -
POST
/v1/payment_intents/{id}/cancelCancel a payment intent -
POST
/v1/route_quotesFind and price the routes between two accounts
Link sessions
Link a customer's bank account through a provider and continue the session when they come back. Open banking API.
-
POST
/v1/link_sessionsStart linking a customer's bank account -
GET
/v1/link_sessions/{id}Retrieve a link session -
POST
/v1/link_sessions/{id}/advanceContinue after the user returns from the provider
Accounts
Register account details a payee gave you and list the accounts your customers linked, with addresses masked.
-
POST
/v1/accountsRegister account details a payee gave you (not linked through a provider) -
GET
/v1/accountsList accounts -
GET
/v1/accounts/{id}Retrieve an account
Addresses
Check and mask a payto:// address before you use it, without storing it.
-
POST
/v1/addresses/parseValidate and mask a payto:// address without storing it
Customers
Create one customer for each user id in your system to keep that user's links and accounts together.
-
POST
/v1/customersCreate or return the customer for your user id -
GET
/v1/customersList customers -
GET
/v1/customers/{id}Retrieve a customer
Institutions
List the banks your environment's connections can reach.
-
GET
/v1/institutionsList the banks reachable through this environment's connections
Rails
List the provider catalogue, with integrated and listed rails. Browse providers.
-
GET
/v1/railsList the integrated and listed rails in the provider catalogue
Events
Read every event in order. Webhooks deliver the same events, signed.
-
GET
/v1/eventsList events in order; page with `after` to replay anything a webhook missed -
GET
/v1/events/{id}Retrieve an event
No endpoint matches that filter. Clear it or search the docs.