Soft-delete a custom role
DELETE
/v1/tenants/me/roles/{slug}
const url = 'https://api.emite.cr/v1/tenants/me/roles/example';const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://api.emite.cr/v1/tenants/me/roles/example \ --header 'Authorization: Bearer <token>'Refused with 409 CUSTOM_ROLE_IN_USE while any active member still holds the role. Reassign the members first (PATCH /tenants/me/members/:userId) and retry.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”slug
required
string
Custom role slug.
Responses
Section titled “Responses”Role soft-deleted.
Missing or invalid JWT.
Custom role management is JWT-only and requires roles:read / roles:manage.
CUSTOM_ROLE_NOT_FOUND.
CUSTOM_ROLE_IN_USE.