📘 API Reference
Logical contracts consumed by the mobile app's services/api/*.api.ts layer (see config/endpoints.ts). Paths are relative to EXPO_PUBLIC_API_BASE_URL.
Auth
| Method | Path | Description |
|---|
| /auth/register | Create an account (first/last name, email, password, optional referral code). |
| /auth/login | Email + password login → access + refresh token. |
| /auth/google | Exchanges a Google OAuth/OIDC id token for a session. |
| /auth/forgot-password | Sends a reset email. |
| /auth/reset-password | Completes the reset with a token + new password. |
| /auth/refresh | Exchanges a refresh token for a new access token. |
| /auth/logout | Invalidates the current session server-side. |
Profile & User
| Method | Path | Description |
|---|
| /user/profile | Current user profile. |
| /user/profile/update | Update name / phone number. |
| /user/profile/photo | Multipart upload of a profile photo. |
| /user/profile/setup-progress | Account-completion percentage + remaining steps. |
| /account/delete | Requests account deletion with a reason. |
Wallet
| Method | Path | Description |
|---|
| /wallet/balance | NGN and USD balances. |
| /wallet/transactions | Paginated history, filterable by type. |
| /wallet/transactions/:id | Single transaction detail. |
| /wallet/withdraw | Withdraw to a saved bank account. |
| /wallet/transfer | Transfer to another user. |
Trade
| Method | Path | Description |
|---|
| /trade/assets | All supported crypto assets, with price / 24h change / market cap. |
| /trade/assets/:id | Asset detail incl. 24h high/low/volume. |
| /trade/quote | Locks a rate + fee for an amount, expires after 30s. |
| /trade/buy | Executes a buy against a quote. Idempotent via clientTransactionId. |
| /trade/sell | Executes a sell. Idempotent. |
| /trade/swap | Asset-to-asset swap. |
Gift Cards
| Method | Path | Description |
|---|
| /giftcards | Supported brands + indicative rate per unit. |
| /giftcards/countries | Countries a card can be issued in. |
| /giftcards/history | The user's past submissions and status. |
| /giftcards/submit | Multipart: brand, country, value, notes, front/back images. |
KYC · Banks · Referrals · Config
| Method | Path | Description |
|---|
| /kyc/status | Current KYC level + status. |
| /kyc/submit | Multipart: document type/image, selfie, address. |
| /banks | Saved bank accounts. |
| /banks/validate | Bank-name-enquiry: account number → account name. |
| /banks/add | Saves a validated bank account. |
| /banks/:id | Removes a bank account. |
| /referrals/stats | Referral code, totals, earnings. |
| /api/mobile/configuration | Remote feature flags, nav visibility, currencies, min app version. |
| /notifications/register-token | Registers an Expo push token. |
Website mock routes
| Method | Path | Description |
|---|
| /api/assets | Mock CryptoAsset[] for the homepage ticker and Rates page. |
| /api/gift-cards | Mock GiftCard[] for the Gift Cards page. |
| /api/bills | Mock BillCategory[] for the Bills Payment page. |
Example: login
curl -X POST $API_BASE_URL/auth/login \
-H "Content-Type: application/json" \
-d '{"email":"ada@example.com","password":"••••••••"}'
{
"success": true,
"message": "Login successful",
"data": {
"user": { "id": "usr_001", "firstName": "Ada", "kycLevel": 2, "kycStatus": "verified" },
"tokens": { "accessToken": "…", "refreshToken": "…" }
}
}
Standard envelope & errors
// success
{ "success": true, "message": "…", "data": { } }
// error
{ "success": false, "message": "Insufficient balance", "code": "INSUFFICIENT_BALANCE", "errors": [] }
The mobile client normalizes every error through services/api/client.ts before it reaches a screen — raw HTTP codes are never shown to the user.