Permissions

Permissions decide what each secret key can do. Every operation requires one permission, such as deposit.read or payout.create. A key holds the permissions you chose when you created it in the Stridge dashboard, and it can call an operation only if it holds that operation's permission.

Each operation's page names its permission beside its credential. If you work from the OpenAPI document, every operation carries it as x-stridge-permission.

The request names a key
Authorization: Bearer sk_live_…
The key holds the permissions it was created with.
The operation names a permission
POST/payouts
requires payout.create
The result
The key holds it: the operation runs.
The key lacks it:403permission_deniedwith the messageinsufficient permissions: the api key does not hold payout.create
How a secret-key request is checked, using Create a payout as the example.

A call from a key without the operation's permission returns 403 permission_denied. The error's message names the missing permission for whoever reads the log, for example insufficient permissions: the api key does not hold payout.create. Branch on code, never on message. See Errors.

What a key holds

A key holds what you created it with, plus a few permissions it gets automatically:

  • Every key holds reference.read and simulation.read. They cover the reference data, and in a sandbox its simulations.
  • A sandbox key also holds sandbox.simulate, which runs the test helpers that simulate deposits. Only a sandbox key can hold it.
  • A key holding payout.create can also quote a payout (payout.quote), because a payout can name the quote it was priced at.

Some permissions can be given to live keys only: webhook.read and webhook.write. Only live keys reach the operations that require them, so a sandbox key never holds them.

A second factor for live keys

A few permissions get an extra check on live keys. When someone creates, rolls or widens a live key that holds one of them, the dashboard asks that person for a fresh second factor. A sandbox never asks.

uda.writepayout.createpayout.quote
An authenticator code, or a backup code
webhook.write
Any second factor, an emailed code included

The publishable key

The publishable key holds no permission. On its own it reaches only the reference data a browser shows, such as a deposit quote, the supported assets and prices. Publishable keys lists the operations it takes, and which of them also need a session for one of your customers.

Giving a key its permissions

Give each key only what its job needs, and give each service its own key. This is the principle of least privilege (opens in a new tab). A key that only reads deposits and settlements cannot move money, even if it leaks.

Every permission

The catalogue below lists every permission a secret key can hold, grouped by what it governs, with the operations that require it.

  • A permission is marked when only live keys or only sandbox keys can hold it. Every other permission can be given to both.
  • Link to a permission as /reference/permissions#<name>, such as #payout.create.
Show the permissions a key can hold
22 permissions

Deposit addresses

Deposits and transactions

Payouts

Vaults and treasuries

Webhooks and events

Reference data

Sandbox