API reference
Authentication
Wallet sign-in for people, API keys for code.
Base URL (sandbox, local): https://dapp.railpay.app. All bodies are JSON.
Wallet sign-in
POST /v1/auth/noncewith{ address }returns{ message }, which contains a one-time nonce valid for 10 minutes.- Sign
messagewith the wallet (EIP-191personal_sign). POST /v1/auth/verifywith{ address, signature }sets therp_sessioncookie (HttpOnly, 7 days) and returns{ account }.
POST
/v1/auth/nonceNoneGet a sign-in message for an address.
Body
{ "address": "0x…" }Response
{ "message": "…" }curl
curl -X POST https://dapp.railpay.app/v1/auth/nonce \
-H "Content-Type: application/json" \
-d '{ "address": "0x…" }'POST
/v1/auth/verifyNoneVerify the signature and start a session.
Body
{ "address": "0x…", "signature": "0x…" }Response
{ "account": { … } }curl
curl -X POST https://dapp.railpay.app/v1/auth/verify \
-H "Content-Type: application/json" \
-d '{ "address": "0x…", "signature": "0x…" }'POST
/v1/auth/logoutSessionEnd the session.
curl
curl -X POST https://dapp.railpay.app/v1/auth/logout -b "rp_session=…"API keys
Send keys as Authorization: Bearer rp_sk_…. Keys are shown once; only a SHA-256 hash is stored.
| Key | Created in | Can call |
|---|---|---|
| Account key | Developers page in the app, or POST /v1/keys | Everything for the owning account |
| Agent key | Returned when you create an agent | Only /v1/agent/*, bound by the agent's policy |