Skip to Content

Revoke an API key

Deactivates an API key so it can no longer authenticate requests.

POST
/v1/api-keys/{id}/revoke

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.

Authorization

apiKey
headerx-api-key<token>

Path Parameters

id*string
Match^key_[0-9a-hjkmnp-tv-z]{16,24}$

Response Body

SuccessResponse

application/json
  1. response
success*boolean
Example Request
import { 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