/v1/apps/{app_id}/api-keys/{key_id}AuthRevoke an API key. The key stops authenticating immediately; the row is kept (soft delete) so the list and the audit trail can still answer who revoked it and when.
Path parameters
app_id*stringId of the app.
key_id*stringId of the key.
Response · 204
API key revoked. Idempotent — revoking twice is still a 204 and does not overwrite the first revoker.
Example
Request
DELETE https://api.auth.productcraft.co/v1/apps/{app_id}/api-keys/{key_id}
Authorization: Bearer YOUR_TOKENimport { Auth } from "@productcraft/auth";
// Admin routes read PRODUCTCRAFT_API_KEY; consumer routes need no key
const auth = new Auth();
await auth.admin.app("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f").apiKeys.delete("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f");auth.admin.app(…).apiKeys.delete(keyId, options?): void