/{app_slug}/v1/admin/roles/{role_name}AuthDelete a custom role
System roles (`owner`, `admin`, `member`) cannot be deleted — attempts return 403. Roles currently assigned to any member return 409 `ROLE_IN_USE`; reassign the affected members first.
Path parameters
app_slug*stringSlug of the app.
role_name*stringName of the role (e.g. `admin`).
Response · 204
Role deleted.
Example
Request
DELETE https://api.auth.productcraft.co/{app_slug}/v1/admin/roles/{role_name}
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").roles.delete("admin");auth.consumer(…).roles.delete(roleName, options?): void