API General
Base conventions for the FonProxy API: authentication, headers, error format, pagination, IDs, currency and rate limiting.

Base URL:
https://api.fonproxy.io
Authentication
All protected endpoints require an API key:
| Method | Header/Param | Example |
|---|---|---|
| API Key (header) | x-api-key: <key> | x-api-key: fnp_3eab... |
| API Key (query) | ?apikey=<key> | /api/v1/resource?apikey=fnp_3eab... |
Generate an API key in your account: API Keys.
Locale
The API uses the fp-locale header to determine the user's language.
fp-locale: ukBehaviour
- Every request: the backend reads
fp-localeand uses it for server-rendered content (emails, Telegram notifications). - Logged-in users: if the header value differs from the stored locale, the backend automatically updates the user's locale in the database (fire-and-forget, no extra request needed).
- Supported locales:
en(English, default),uk(Ukrainian). - Get current locale list at runtime:
GET /locales - Fallback: if the header is missing or the locale is unknown,
enis used.
What Gets Translated
| Channel | Translated by | How |
|---|---|---|
| Email (subjects, body) | Backend | Translated before rendering to HTML |
| Telegram messages | Backend | Translated before sending |
| API error messages | Frontend | Backend returns raw keys (e.g. order.not_found), frontend translates |
| In-app notifications | Frontend | Backend stores raw keys in DB, frontend renders |
The locale field is always returned in the user profile (GET /user/me) so the frontend can initialise its own i18n accordingly.
Common Headers
| Header | Required | Description |
|---|---|---|
x-api-key | Yes (protected routes) | API key for authentication |
fp-locale | No | UI locale code (en, uk). Auto-synced to user profile. |
Content-Type | Yes (POST/PATCH) | application/json |
Response Format
All responses are JSON. Success responses return the relevant data directly:
{
"user": { "id": "k5Xz9qR2Wp", "name": "John", ... }
}Error responses:
{
"message": "order.not_found",
"path": "/orders/80-12345",
"timestamp": "2026-04-01T12:00:00.000Z"
}The message field is a translation key — the frontend resolves it to a human-readable string.
| Entity | Example ID | Format |
|---|---|---|
| User | k5Xz9qR2Wp | Alphanumeric |
| Order | 80-472109 | X0-YYYYY (numeric) |
| API Key | QxPYVp4dy9 | Alphanumeric |
| Transaction | aBcDeFgH | Alphanumeric |
| Topup | xYzAbCdE | Alphanumeric |
Pagination
Paginated endpoints accept:
| Param | Default | Max | Description |
|---|---|---|---|
page | 1 | — | Page number (1-based) |
limit | 20 | 100 | Items per page |
Response includes:
{
"items": [ ... ],
"total": 142,
"page": 1,
"pages": 8
}Currency
- All prices and balances are stored in USD internally.
- Display values are converted using live exchange rates.
- The user's preferred display currency is set via
PATCH /user/settings { "currency": "UAH" }. - Endpoints that return monetary values include both
*Usdand*Displayfields.
Rate Limiting
Throttled by IP address. Default: 60 requests / minute for most endpoints, 5 / minute for auth endpoints.
When rate-limited, the API returns 429 Too Many Requests:
{ "message": "error.rate_limit" }Locales
GET /locales
Returns all currently supported locale codes with their display names.
Response:
{
"locales": [
{ "code": "en", "name": "English", "nativeName": "English" },
{ "code": "uk", "name": "Ukrainian", "nativeName": "Українська" }
]
}Currency
GET /currencies
Returns all supported currency codes. Public, no authentication required.
Response:
{
"currencies": ["USD", "EUR", "GBP", "PLN", "CZK", "HUF", "RON", "SEK", "NOK", "DKK", "CHF", "HRK", "BGN", "UAH", "TRY"]
}GET /currencies/rates
Returns the latest exchange rates keyed by currency code. Each value is "1 base = N target" — with base=USD, "EUR": 0.92 means 1 USD buys 0.92 EUR. Public, no authentication required.
Query Parameters
| Name | Type | Description | Required |
|---|---|---|---|
base | string | Base currency code (one of GET /currencies, case-insensitive). Defaults to USD. | No |
Response:
{
"base": "USD",
"rates": {
"USD": 1,
"EUR": 0.92,
"UAH": 41.2,
...
}
}Errors:
| Status | message | Reason |
|---|---|---|
400 | currency.invalid_base | base is not a supported currency code |
API Reference
Public
| Service | Docs |
|---|---|
| Authentication (sessions) | API Auth |
| User & Settings | API User |
| Orders | API Order |
| Payments | API Payment |
| API Keys | API Keys |
| Notifications | API Notifications |
| Geo (countries) | API Geo |
| Referral | API Referral |
| Analytics | API Analytics |
| Search | API Search |
| Health & Status | API Health & Status |
Admin
| Service | Docs |
|---|---|
| Admin overview | API Admin |
| Users | API Admin Users |
| Orders | API Admin Orders |
| Transactions | API Admin Transactions |
| Pools | API Admin Pools |
| Sources | API Admin Sources |
| IPs | API Admin IPs |
| Peers | API Admin Peers |
| Notifications | API Admin Notifications |
| Referrals | API Admin Referrals |
| Geo | API Admin Geo |
| Visitors | API Admin Visitors |
| Status Monitor | API Admin Status |
| Block Rules | API Admin Block Rules |
| Translations | API Admin Translations |