/v1/apps/{app_id}/tenant-api-keys/{key_id}AuthRevoke a tenant's API key
Immediate and final; recorded as revoked by you (`revoked_by_type: platform_user`) in the key and in the audit log. Idempotent: revoking a revoked key is a 204 that changes nothing. Requires `auth.revoke` on the app.
Path parameters
app_id*stringApp UUID (or slug).
key_id*stringKey id (UUID) or display id (`tak_…`).
Response · 204
Revoked (or already revoked).
Example
Request
DELETE https://api.auth.productcraft.co/v1/apps/{app_id}/tenant-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").tenantApiKeys.delete("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f");auth.admin.app(…).tenantApiKeys.delete(keyId, options?): void