Authentication
API keys, environments, and how requests are authorized
Every request to the Integrations API carries your organisation's API key
in the x-api-key header. There is no OAuth flow, no bearer token exchange
— the key is the credential.
curl https://api.uverusbanking.com/api/v1/customers \
-H "x-api-key: sk_sandbox_c6b6b7b0..."Key format
A key looks like sk_<environment>_<id>_<secret>:
| Prefix | Environment |
|---|---|
sk_live_ | Real customers, real money |
sk_sandbox_ | Test data, no real money ever moves |
The prefix is checked against the key's own environment on every request —
a sk_live_-prefixed key can never authenticate against a sandbox-issued
key record, and vice versa. There is no way to accidentally point a live
key at sandbox behavior or a sandbox key at live data by editing the
prefix yourself.
What the key grants
An API key is scoped to one organisation — every customer, wallet, and transaction it can see or create belongs to that organisation. It cannot read or act on another organisation's data no matter what ID you pass.
Within that scope, the key carries a set of permissions (view customers,
create customers, make transfers, and so on). A request for an action your
key was not granted returns 403, not a partial result.
IP allowlist
A key can be pinned to the servers that are allowed to use it. Set the
list with PATCH /api/v1/org/api-keys/{id}/allowed-ips (organisation staff
login, not the API key itself):
{ "allowed_ips": ["203.0.113.10", "198.51.100.0/24"] }Entries are single IPv4 or IPv6 addresses or CIDR ranges. Ranges wider than
/16 (IPv4) or /48 (IPv6) are refused, and a key holds at most 20
entries. Sending an empty list removes the restriction.
| Allowlist | What the key can do |
|---|---|
| Not set | Everything it has permission for, except transfers on a live key. |
| Set | Every call, but only from a listed IP. Any other IP gets 403 IP_NOT_ALLOWED. |
The check runs after the key itself is verified, and it applies to sandbox keys as well once you set a list on them. Calls must come from your server — a request relayed through a customer's browser or phone arrives from the customer's IP, not yours.
Error responses
Authentication and authorization failures use plain, unwrapped error
bodies — they do not go through the usual { status, message, data }
envelope, since the request never reached a point where there is a
data to wrap:
// 401 — missing or invalid key
{ "message": "Invalid API Key", "statusCode": 401 }// 403 — valid key, missing permission
{ "message": "Forbidden resource", "statusCode": 403 }| Status | Meaning |
|---|---|
401 | The x-api-key header is missing, malformed, or does not match an active key. |
403 | The key is valid but lacks the permission the endpoint requires, or fails the IP allowlist (code: IP_NOT_ALLOWED or IP_ALLOWLIST_REQUIRED). |
Sandbox vs. live
Build and test your entire integration against a sandbox key first. The request/response shape, validation, and error handling are identical between environments — a flow that works against a sandbox key is the same flow against a live one once you swap the key.
Keep your live key out of client-side code, logs, and version control — it is a direct credential for moving real money, with no second factor.