API General API

FonProxy API General API reference documentation.

Base URL: https://api.fonproxy.io

Authentication

All protected endpoints require an API key:

MethodHeader/ParamExample
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: uk

Behaviour

  • Every request: the backend reads fp-locale and 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).
  • Fallback: if the header is missing or the locale is unknown, en is used.

What Gets Translated

ChannelTranslated byHow
Email (subjects, body)BackendTranslated before rendering to HTML
Telegram messagesBackendTranslated before sending
API error messagesFrontendBackend returns raw keys (e.g. order.not_found), frontend translates
In-app notificationsFrontendBackend 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

HeaderRequiredDescription
x-api-keyYes (protected routes)API key for authentication
fp-localeNoUI locale code (en, uk). Auto-synced to user profile.
Content-TypeYes (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.

EntityExample IDFormat
Userk5Xz9qR2WpAlphanumeric
Order80-472109X0-YYYYY (numeric)
API KeyQxPYVp4dy9Alphanumeric
TransactionaBcDeFgHAlphanumeric
TopupxYzAbCdEAlphanumeric

Pagination

Paginated endpoints accept:

ParamDefaultMaxDescription
page1β€”Page number (1-based)
limit20100Items 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 *Usd and *Display fields.

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" }

API Reference

Public

ServiceDocs
Authentication (sessions)API Auth
User & SettingsAPI User
OrdersAPI Order
PaymentsAPI Payment
API KeysAPI Keys
NotificationsAPI Notifications
Geo (countries)API Geo
ReferralAPI Referral
AnalyticsAPI Analytics
SearchAPI Search
HealthAPI Health

Admin

ServiceDocs
Admin overviewAPI Admin
UsersAPI Admin Users
OrdersAPI Admin Orders
TransactionsAPI Admin Transactions
PoolsAPI Admin Pools
SourcesAPI Admin Sources
IPsAPI Admin IPs
PeersAPI Admin Peers
NotificationsAPI Admin Notifications
ReferralsAPI Admin Referrals
GeoAPI Admin Geo
VisitorsAPI Admin Visitors

Internal

ServiceDocs
Auth login flows & OAuthAuth Internal
Visitor trackingTracking Internal
CMS endpointsCMS Internal
Orders discount tokensOrders Internal
OG image generationAPI OG Internal
Telegram webhooksAPI Telegram Internal
Pricing formulasPricing Internal
ChangelogAPI Changes Internal
API General API β€” FonProxy