x-api-key header.
Get an API key
- Log in to the Dashboard.
- Go to Developer and open the API Keys tab.
- Generate a key, choose its permissions, and store it securely.
Send the key
Permissions
A business can have several API keys, and each key has its own set of permissions, such as reading transactions or creating deposits. You choose the permissions when you create a key. To remove a key’s access, delete the key. Manage your keys under Developer → API keys in the dashboard.- A key that is missing the permission an endpoint needs is rejected with
401 Unauthorized. - An unrecognised, malformed, or revoked key returns
401 Unauthorizedas well.
These two cases look the same on purpose. If a request that used to work starts returning
401, check the key’s permissions in the dashboard before you assume the key itself is bad.IP allowlist
One allowlist covers every API key in your business. Once you add an address, the API accepts requests only from the addresses on your list. See IP allowlisting.Request signing
Some businesses have payload signing enabled. When it is, send the request signature in the optionalx-api-signature header:
Protecting your keys
- Keep API keys on your server. Never put one in a mobile app, a browser, or a public repository.
- Use sandbox keys against the sandbox and production keys against production.
- Give each key only the permissions it needs. If a key may be exposed, rotate it straight away.
- Restrict API access to your servers with an IP allowlist.
Rotate a key
Rotate a key on a schedule, when someone with access to it leaves, or straight away if it may have been exposed. A business can hold several keys at once, so you can switch with no downtime:1
Create the new key
In the dashboard, go to Developer → API keys, click Create new keys, give the key the same permissions as the old one, and click Generate key. Copy it into your secret store.
2
Deploy it
Point every server that calls the API at the new key, and deploy.
3
Check that nothing still uses the old key
Confirm your requests succeed with the new key and that nothing in your logs still sends the old one.
4
Revoke the old key
Click Revoke on the old key and confirm. Revoking takes effect at once and can’t be undone, and any request that still sends the old key gets
401.