Authentication
Authenticate Due API requests and scope calls to sub-accounts and delegated users.
Authenticate API calls with your API key and scope platform requests to the account or delegated user you act for.
1. Get an API key
In the platform dashboard, open Developers > API keys. In the business portal, open Settings > API keys. For sandbox URLs and key setup, see Sandbox configuration.
2. Send the authorization header
API keys start with dk_. Send your key in the HTTP header:
Authorization: Bearer dk_...API keys do not need TOTP (time-based one-time password). The Due-Totp-Code header applies only to dashboard user sessions.
3. Scope platform requests
Sub-accounts
As a platform, send Due-Account-Id: <accountId> to act for one of your accounts.
This header is required on account-scoped routes:
- KYC
- Recipients
- Virtual accounts
- Wallets
- Webhook endpoints
- Transfer creation, quotes, and estimates
The header is optional on these lists:
GET /v1/transfersGET /v1/channelsGET /v1/transactionsGET /v1/information_requests
Delegated users
Send Due-Delegated-User-Id to scope /v1/vaults calls to a delegated user.
Optional: Manage API keys through the API
| Action | Endpoint | Notes |
|---|---|---|
| List keys | GET /v1/api_keys | List your API keys. |
| Issue a key | POST /v1/api_keys | You can set an optional expiry. |
| Update a key | POST /v1/api_keys/{id} | Update an existing key. |
| Revoke a key | DELETE /v1/api_keys/{id} | Revoke an existing key. |
There is a per-account key limit. If you reach it, the API returns err_api_key_limit_reached.
Authentication errors
| Code | HTTP | Meaning |
|---|---|---|
err_unauthorized | 401 | Missing or invalid credentials. |
err_forbidden | 403 | The action is not allowed. |
Match errors on the response body's code field. See API Error Codes for the response format.
Updated about 2 hours ago