Revoke an API key
Deactivates an API key so it can no longer authenticate requests.
POST
Deactivates an API key so it can no longer authenticate requests. Restricted members can revoke only keys stored in their namespace. Revocation is final: a revoked key never authenticates again. Its record stays listable, so the messages it sent stay attributed to it.
apiKeyheader
x-api-key<token>id*stringMatch
^key_[0-9a-hjkmnp-tv-z]{16,24}$SuccessResponse
application/json- response
success*booleanimport { createClient } from "samva";
const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });
const result = await samva.apiKeys.revoke({
"id": "example"
});Example Response
{
"success": true
}