/{app_slug}/v1/admin/permissions/{permission_key}AuthDelete a custom permission
The `permissionKey` path parameter is the literal `<resource>.<action>` string. System permissions cannot be deleted — attempts return 403. Removing a permission also removes every `role_permission` row that bound it (cascade); role lookups dropped of that perm on the next request.
Path parameters
app_slug*stringSlug of the app.
permission_key*stringPermission key, `resource.action` (e.g. `invoice.read`).
Response · 204
Permission deleted.
Example
Request
DELETE https://api.auth.productcraft.co/{app_slug}/v1/admin/permissions/{permission_key}
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.consumer("my-app").permissions.delete("invoice.read");auth.consumer(…).permissions.delete(permissionKey, options?): void