Use this endpoint to immediately prevent it from being used for authentication with your Rewards App.
Revoking an API key immediately prevents it from being used for authentication. Any services using this key will no longer be able to access your Rewards App.
If Send Reward v2 is using this API key, it will stop working once the key is revoked, as the key becomes invalid.
Permanent Action. Once revoked, an API key cannot be reactivated. You will need to create a new API key if needed.
Configuration
Client identifier (use “developer-dashboard” )
Bearer token for authentication Format: Bearer {JWT_TOKEN}
Path Parameters
The ID of the API key to revoke
Get this ID from the “List API Keys” endpoint
{
"success" : true ,
"message" : "API key revoked successfully."
}
400 - Bad Request
401 - Unauthorized
403 - Forbidden
404 - Not Found
500 - Server Error
{
"success" : false ,
"message" : "Invalid UUID"
}
Response Fields
Field Type Description
successboolean Whether the revocation was successful messagestring Confirmation message
Response Status Codes
Code Description
200API key revoked successfully 400Bad request - invalid UUID 401Unauthorized - authentication required 403Forbidden - developer does not own this app 404API key not found or does not belong to this app 500Internal server error
Code Examples
const rewardsAppId = 'YOUR_REWARDS_APP_ID' ;
const apiKeyId = 'YOUR_API_KEY_ID' ;
const jwtToken = 'YOUR_JWT_TOKEN' ;
async function revokeApiKey ( rewardsAppId , apiKeyId ) {
const response = await fetch (
`https://api.zbdpay.com/api/v1/rewards/app/ ${ rewardsAppId } /api-key/ ${ apiKeyId } ` ,
{
method: 'DELETE' ,
headers: {
'z-client' : 'developer-dashboard' ,
'Authorization' : `Bearer ${ jwtToken } `
}
}
);
const data = await response . json ();
if ( data . success ) {
console . log ( '✅ API key revoked successfully!' );
console . log ( 'This key can no longer be used for authentication.' );
return data ;
} else {
throw new Error ( `Failed: ${ data . message } ` );
}
}
// Revoke key
await revokeApiKey (
'b28e0306-2c06-4092-8d56-a1623d6b97fb' ,
'78b411d8-1f61-4824-97c6-e3c3a571f1c5'
);
What Happens After Revocation?
Before Revocation API Key Active Key can be used for authentication
After Revocation API Key Revoked Key can no longer authenticate
Try It Out
Ready to revoke an API key? Use our API playground on the right to test with your JWT token.