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/transfers
  • GET /v1/channels
  • GET /v1/transactions
  • GET /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

ActionEndpointNotes
List keysGET /v1/api_keysList your API keys.
Issue a keyPOST /v1/api_keysYou can set an optional expiry.
Update a keyPOST /v1/api_keys/{id}Update an existing key.
Revoke a keyDELETE /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

CodeHTTPMeaning
err_unauthorized401Missing or invalid credentials.
err_forbidden403The action is not allowed.

Match errors on the response body's code field. See API Error Codes for the response format.


Did this page help you?