Guides
Roles & Permissions
Which API endpoints each role can access
Overview#
Every API request includes an x-role-type header that determines what the caller can do. Your API token must belong to a user with a seat of that role in the organization.
There are three permission levels in the Toku API:
| Level | Base Class | Who Can Call |
|---|---|---|
| Any authenticated user | AuthorisedOperation | Any seat in the organization; each seat only sees the data it has access to |
| Admin only | AdminOperation | CLIENT_ORG_ADMIN |
| Client Admin only | TokuClientAdminOperation | CLIENT_ORG_ADMIN |
For 3rd party integrations, use CLIENT_ORG_ADMIN. It can call every endpoint in the API. Other roles have more limited scope.
Permissions by Endpoint#
Grants (Admin Required)#
All grant write operations require admin access.
| Endpoint | Method | Permission |
|---|---|---|
listGrants | GET | Admin |
listGrantConfigurations | GET | Admin |
getEmployeeGrants | GET | Admin |
getPayrollEmployeeID | GET | Admin |
addSingleGrant | POST | Admin |
createGrantForNewHire | POST | CLIENT_ORG_ADMIN only |
terminateGrant | POST | Admin |
terminateGrants | POST | Admin |
terminateEmployeeGrants | POST | Admin |
revertGrantTermination | POST | Admin |
revertEmployeeGrantTermination | POST | Admin |
revertEmployeeGrants | POST | Admin |
Wallets (Mostly Any Authenticated User)#
Most wallet operations are available to any authenticated user — this allows recipients to manage their own wallets. "Own or admin" means a recipient can act on their own wallet, and CLIENT_ORG_ADMIN or FINANCE_ADMIN on anyone's.
| Endpoint | Method | Permission |
|---|---|---|
getAllWallets | GET | Any user |
getCurrentWallet | GET | Any user |
getUserCurrentWallets | GET | Any user |
getHistoricalWallets | GET | Any user |
getAllHistoricalWallets | GET | Any user |
getAllWalletsForAllRecipients | GET | Any user |
getPendingWallets | GET | Any user |
getPendingWalletRequest | GET | Any user |
getTestTxnApprovalPendingWallets | GET | Any user |
getOrgWalletInfo | GET | Any user |
getEmployeeWallets | GET | Admin |
getEmployeeHistoricalWallets | GET | Admin |
getPendingWalletRequests | GET | Admin |
getVerifiedWalletTestRequests | GET | Admin |
getPendingWalletTestRequests | GET | Admin |
addWallet | POST | Any user (adds a wallet for the caller's own seat) |
updateWallet | POST/PUT | Any user |
markWalletAsNotCurrent | POST | Any user |
reactivateWallet | POST | Any user |
rejectWallet | POST | Own or admin |
approveWalletRequest | POST | Own or admin |
rejectWalletRequest | POST | Own or admin |
cancelWalletRequest | POST | Any user |
bulkUploadMultipleWallets | POST | Admin |
sendTestTransaction | POST | Admin |
addTestTxnToWallet | POST | Admin |
resendTestTxnEmailToWalletOwner | POST | Own or admin |
Wallet Distribution (Any Authenticated User)#
| Endpoint | Method | Permission |
|---|---|---|
getWalletReferencesWithNetworks | GET | Any user |
configureWalletRefsDistributionForGrant | POST | Any user |
setTokenWalletRefsDistribution | POST | Any user |
Employees (Admin Required)#
| Endpoint | Method | Permission |
|---|---|---|
getUserRoleInOrg | GET | Admin |
listCountryHiringGuides | GET | Admin |
createUserRoleInOrg | POST | Admin |
updateUserRoleInOrg | PUT | Admin |
batchUpdateRoleInOrg | PUT | Admin |
Tokens & Networks#
| Endpoint | Method | Permission |
|---|---|---|
getWalletTypes | GET | Any user |
getTokenTypes | GET | Any user |
getTokenTypesNew | GET | Any user |
getNetworks | GET | Any user |
getNetworksNew | GET | Any user |
deleteWalletType | DELETE | Admin |
deleteNetwork | DELETE | Admin |
Invoices (Admin Required)#
| Endpoint | Method | Permission |
|---|---|---|
submitBulkInvoicePayments | POST | Admin |
markInvoicePaymentAsSettled | POST | Admin |
Organization#
| Endpoint | Method | Permission |
|---|---|---|
hello | GET | CLIENT_ORG_ADMIN only |
getOrgWalletInfo | GET | Any user |
updateOrgTokenAddress | POST | Admin |
updateTestTransactionConfiguration and createSCPV2DemoOrg are Toku-only and can't be called with an API token.
Authentication (CLIENT_ORG_ADMIN Only)#
| Endpoint | Method | Permission |
|---|---|---|
createUserApiToken | POST | CLIENT_ORG_ADMIN only |
refreshUserApiToken | POST | CLIENT_ORG_ADMIN only |
Permission Levels Explained#
Any Authenticated User (AuthorisedOperation)#
Requires a valid API token and a seat in the organization. Any role works — CLIENT_ORG_ADMIN, FINANCE_ADMIN, USER (recipient), INVESTOR and so on — but a non-admin seat only sees and changes its own data.
Admin (AdminOperation)#
Requires CLIENT_ORG_ADMIN. (TOKU_ADMIN is the only other role these accept, and an API token can never act as TOKU_ADMIN.)
CLIENT_ORG_ADMIN Only (TokuClientAdminOperation)#
Strictly requires the CLIENT_ORG_ADMIN role. No other role is accepted.
Error When Permission Denied#
If the token's user has no seat with the role in x-role-type (or the token is invalid), the request is refused with 401:
If the seat exists but its role can't call the endpoint, the response is 403:
Recommendation#
For a complete 3rd party integration that manages grants, wallets, and employees, create your API token with CLIENT_ORG_ADMIN. This is the only role that works with every endpoint in the API.