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:

LevelBase ClassWho Can Call
Any authenticated userAuthorisedOperationAny seat in the organization; each seat only sees the data it has access to
Admin onlyAdminOperationCLIENT_ORG_ADMIN
Client Admin onlyTokuClientAdminOperationCLIENT_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.

EndpointMethodPermission
listGrantsGETAdmin
listGrantConfigurationsGETAdmin
getEmployeeGrantsGETAdmin
getPayrollEmployeeIDGETAdmin
addSingleGrantPOSTAdmin
createGrantForNewHirePOSTCLIENT_ORG_ADMIN only
terminateGrantPOSTAdmin
terminateGrantsPOSTAdmin
terminateEmployeeGrantsPOSTAdmin
revertGrantTerminationPOSTAdmin
revertEmployeeGrantTerminationPOSTAdmin
revertEmployeeGrantsPOSTAdmin

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.

EndpointMethodPermission
getAllWalletsGETAny user
getCurrentWalletGETAny user
getUserCurrentWalletsGETAny user
getHistoricalWalletsGETAny user
getAllHistoricalWalletsGETAny user
getAllWalletsForAllRecipientsGETAny user
getPendingWalletsGETAny user
getPendingWalletRequestGETAny user
getTestTxnApprovalPendingWalletsGETAny user
getOrgWalletInfoGETAny user
getEmployeeWalletsGETAdmin
getEmployeeHistoricalWalletsGETAdmin
getPendingWalletRequestsGETAdmin
getVerifiedWalletTestRequestsGETAdmin
getPendingWalletTestRequestsGETAdmin
addWalletPOSTAny user (adds a wallet for the caller's own seat)
updateWalletPOST/PUTAny user
markWalletAsNotCurrentPOSTAny user
reactivateWalletPOSTAny user
rejectWalletPOSTOwn or admin
approveWalletRequestPOSTOwn or admin
rejectWalletRequestPOSTOwn or admin
cancelWalletRequestPOSTAny user
bulkUploadMultipleWalletsPOSTAdmin
sendTestTransactionPOSTAdmin
addTestTxnToWalletPOSTAdmin
resendTestTxnEmailToWalletOwnerPOSTOwn or admin

Wallet Distribution (Any Authenticated User)#

EndpointMethodPermission
getWalletReferencesWithNetworksGETAny user
configureWalletRefsDistributionForGrantPOSTAny user
setTokenWalletRefsDistributionPOSTAny user

Employees (Admin Required)#

EndpointMethodPermission
getUserRoleInOrgGETAdmin
listCountryHiringGuidesGETAdmin
createUserRoleInOrgPOSTAdmin
updateUserRoleInOrgPUTAdmin
batchUpdateRoleInOrgPUTAdmin

Tokens & Networks#

EndpointMethodPermission
getWalletTypesGETAny user
getTokenTypesGETAny user
getTokenTypesNewGETAny user
getNetworksGETAny user
getNetworksNewGETAny user
deleteWalletTypeDELETEAdmin
deleteNetworkDELETEAdmin

Invoices (Admin Required)#

EndpointMethodPermission
submitBulkInvoicePaymentsPOSTAdmin
markInvoicePaymentAsSettledPOSTAdmin

Organization#

EndpointMethodPermission
helloGETCLIENT_ORG_ADMIN only
getOrgWalletInfoGETAny user
updateOrgTokenAddressPOSTAdmin

updateTestTransactionConfiguration and createSCPV2DemoOrg are Toku-only and can't be called with an API token.

Authentication (CLIENT_ORG_ADMIN Only)#

EndpointMethodPermission
createUserApiTokenPOSTCLIENT_ORG_ADMIN only
refreshUserApiTokenPOSTCLIENT_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:

{ "error": "Invalid token or insufficient permissions" }

If the seat exists but its role can't call the endpoint, the response is 403:

{ "error": { "message": "You do not have permission to perform this operation" } }

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.

Was this page helpful? Suggest edits