Grants
Terminate Grants (Bulk)
Terminates multiple grants for an employee by external ID.
POSThttps://app.toku.com/api/tokuApi/v1/terminateGrants
This is the v1 (legacy) API. The current API is in the API reference.
curl --request POST \
--url 'https://app.toku.com/api/tokuApi/v1/terminateGrants' \
--header 'Authorization: Bearer <token>' \
--header 'x-role-type: CLIENT_ORG_ADMIN' \
--header 'Content-Type: application/json' \
--data '{
"externalEmployeeID": "string",
"terminationDate": "2026-01-01T00:00:00Z",
"grantIDs": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
]
}'200 response
{
"data": {
"terminatedGrantIDs": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"skippedGrantIDs": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"failedGrantIDs": [
{
"grantID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"reason": "string"
}
]
},
"error": null
}Authorizations
AuthorizationstringheaderrequiredBearer authentication header of the form Bearer <token>, where <token> is your API token.
Headers
x-role-typestringrequiredSeat role the token acts as. The token's creator must hold this role in the token's org; TOKU_ADMIN and unknown values are refused with 401. This operation accepts CLIENT_ORG_ADMIN only; other roles get 403.
Available options: CLIENT_ORG_ADMIN
Body
application/json
externalEmployeeIDstringrequiredterminationDatestring<date-time>requiredgrantIDsstring<uuid>[]requiredAllowed: at least 1 items
Response
200Grants terminated
dataobjectrequiredShow child attributes
terminatedGrantIDsstring<uuid>[]skippedGrantIDsstring<uuid>[]Already terminated
failedGrantIDsobject[]Show child attributes
grantIDstring<uuid>reasonstringerrorobject | nullrequiredAlways null on success
401The token is missing, invalid or expired
errorstringrequiredWhat went wrong
403The token's seat doesn't have the permission this operation needs
errorobjectrequiredShow child attributes
messagestringrequired429Too many requests from this address or token. Wait for the number of seconds in the Retry-After header, then retry.
errorstringrequiredWhat went wrong
500The operation failed. This includes input that doesn't match what the operation accepts; error.message says what was wrong.
errorobjectrequiredShow child attributes
messagestringrequiredWas this page helpful? Suggest edits