Delete a custom role
DELETE
/v1/roles/{roleId}
const url = 'https://api.varman.io/v1/roles/rol_abc123';const options = {method: 'DELETE', headers: {'X-API-Key': '<X-API-Key>'}};
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.varman.io/v1/roles/rol_abc123 \ --header 'X-API-Key: <X-API-Key>'Delete a custom role in Varman. Create custom roles and resolve permission sets for organization-level access control.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”roleId
required
string
Example
rol_abc123Role ID
Responses
Section titled “Responses”Role deleted successfully
Media typeapplication/json
object
success
boolean
message
string
Example generated
{ "success": true, "message": "example"}Cannot delete - members assigned to role
Unauthorized
Role not found