ApiKeys
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. 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}Related documentation
List API keys
Returns the organization's API keys, newest first, filterable by status and a search term matched against name and description.
Rotate an API key
Issues a replacement with the same owner, name, and access, then deactivates the existing key. Returns the new key, including the plaintext secret.