Complete reference for all ILAL API endpoints.
https://ilal-mvp-production.up.railway.app/api/v1Individual API keys can have a custom limit via PATCH /apikeys/:id { rateLimit }. Effective limit = max(plan limit, key limit). On 429, the response includes retryAfter and the current plan/limit.
/healthNo AuthService health check — database connectivity status.
{ status: "ok", database: "connected" }/auth/registerNo AuthRegister a new user account.
{ user, accessToken, refreshToken }/auth/loginNo AuthLogin with email and password.
{ user, accessToken, refreshToken }/auth/refreshNo AuthRefresh an expired access token.
{ accessToken: string }/auth/meJWT RequiredGet the currently authenticated user profile.
{ user: { id, email, name, plan, walletAddress } }/apikeysJWT RequiredList all your API keys (hashed for security).
{ apiKeys: [...], limits: { maxApiKeys, remaining } }/apikeysJWT RequiredCreate a new API key. The raw key is only shown once — store it immediately.
{ apiKey: "ilal_live_...", keyPrefix, id }/apikeys/:idJWT RequiredUpdate an API key name or rate limit.
{ success: true, key: {...} }/apikeys/:idJWT RequiredRevoke and permanently delete an API key.
{ success: true }/onboarding/registerJWT or API KeyRegister a wallet as a compliant institution (mock KYC — auto-approved). Safe to call multiple times; re-registers if wallet belongs to another account in demo mode.
{ success, institutionId, status: "approved", walletAddress, merkleIndex }/onboarding/activate-session-demoJWT or API KeyTESTNET / DEV — Activate a 24h compliance session without a ZK proof. The ILAL relayer pays gas. Call after /onboarding/register. Idempotent — returns existing session info if already active.
{ success, txHash, expiresAt, gasUsed } or { alreadyActive: true, remainingSeconds }/onboarding/activate-sessionJWT or API KeyPRODUCTION — Server-side ZK proof generation + on-chain session activation. Requires circuit files on the server.
{ success, txHash, sessionExpiry, expiresAt }/onboarding/status/:addressJWT or API KeyCheck institution onboarding status for a wallet.
{ success, status: "approved"|"pending"|"not_registered", institutionId, merkleIndex }/onboarding/attestation/:addressJWT or API KeyGet a fresh IssuerAttestation + Merkle proof for ZK proof generation.
{ success, attestation: { userAddress, merkleRoot, merkleProof, merkleIndex, sigR8x, sigR8y, sigS, issuerAx, issuerAy } }/testnet/activateJWT or API KeyTESTNET ONLY — Register + activate session in one call. No ZK proof needed. If wallet is already registered the registration step is skipped; if session is already active the activation step is skipped. Idempotent and safe to call repeatedly.
{ success, walletAddress, txHash, expiresAt, gasUsed } or { success, alreadyActive: true, remainingSeconds }/testnet/activate-batchJWT or API KeyTESTNET ONLY — Activate up to 20 wallets in a single request. Processes sequentially to avoid nonce conflicts. Returns per-wallet results even if some fail.
{ total, succeeded, failed, results: [{ walletAddress, success, txHash | error }] }/preflight/:addressJWT or API KeyEnvironment self-check. Returns session status, token balances, all allowances, and readiness in one call. Use before broadcasting to diagnose issues without on-chain trial-and-error.
{ session: { active, remainingSeconds }, tokens: { WETH: { balance, decimals }, tUSDC: { balance, decimals } }, allowances: { WETH_to_SwapRouter, tUSDC_to_PositionManager, ... }, readiness: { canSwap, canAddLiquidity, issues: [] } }/defi/swapJWT or API KeyBuild an unsigned Uniswap V4 swap transaction. Returns calldata + preflight session + allowance check. Returns 412 SESSION_NOT_ACTIVE by default when session is inactive. Pass ?buildOnly=true to get unsigned TX data without session enforcement (useful for testing).
{ success, transaction: { to, data, value, chainId, gas }, preflight: { sessionActive, canBroadcastSafely, tokenSupported, allowanceSufficient, warning? }, authMethod }/defi/liquidityJWT or API KeyBuild an unsigned Uniswap V4 add-liquidity transaction. token0 must be < token1 (Uniswap sort order: WETH < tUSDC). Returns 412 SESSION_NOT_ACTIVE by default if session is inactive.
{ success, transaction: { to, data, value, chainId, gas }, preflight: { sessionActive, allowanceSufficient }, authMethod }/usage/statsJWT or API KeyGet API usage statistics for the current billing period.
{ usage: { totalCalls, successfulCalls, failedCalls, totalCost, byEndpoint }, quota: { limit, remaining, resetDate }, plan: { current, limits } } Note: limit = -1 means unlimited./billing/plansNo AuthList available subscription plans and their limits.
{ plans: [{ id, name, price, features }] }200 OK201 Created400 Bad Request401 Unauthorized403 Forbidden404 Not Found412 Precondition Failed429 Too Many Requests500 Internal Server Error