curl -X DELETE https://api.companyflow.com/roles/550e8400-e29b-41d4-a716-446655440000 \
-H "Authorization: Bearer YOUR_TOKEN"
const response = await fetch(
'https://api.companyflow.com/roles/550e8400-e29b-41d4-a716-446655440000',
{
method: 'DELETE',
headers: {
'Authorization': 'Bearer YOUR_TOKEN'
}
}
);
const data = await response.json();
import requests
url = "https://api.companyflow.com/roles/550e8400-e29b-41d4-a716-446655440000"
headers = {
"Authorization": "Bearer YOUR_TOKEN"
}
response = requests.delete(url, headers=headers)
data = response.json()
{
"success": true,
"message": "role deleted"
}
{
"success": false,
"message": "invalid role id"
}
{
"success": false,
"message": "unauthorized"
}
Roles & Permissions
Delete Role
Delete a role by ID
DELETE
/
roles
/
{id}
curl -X DELETE https://api.companyflow.com/roles/550e8400-e29b-41d4-a716-446655440000 \
-H "Authorization: Bearer YOUR_TOKEN"
const response = await fetch(
'https://api.companyflow.com/roles/550e8400-e29b-41d4-a716-446655440000',
{
method: 'DELETE',
headers: {
'Authorization': 'Bearer YOUR_TOKEN'
}
}
);
const data = await response.json();
import requests
url = "https://api.companyflow.com/roles/550e8400-e29b-41d4-a716-446655440000"
headers = {
"Authorization": "Bearer YOUR_TOKEN"
}
response = requests.delete(url, headers=headers)
data = response.json()
{
"success": true,
"message": "role deleted"
}
{
"success": false,
"message": "invalid role id"
}
{
"success": false,
"message": "unauthorized"
}
Permanently delete a role. Requires Super Admin or HR Manager permissions.
This action cannot be undone. Ensure you want to delete this role before proceeding.
Path Parameters
string
required
The unique identifier of the role (UUID format)Example:
"550e8400-e29b-41d4-a716-446655440000"Response
boolean
Indicates if the request was successful
string
Confirmation message
curl -X DELETE https://api.companyflow.com/roles/550e8400-e29b-41d4-a716-446655440000 \
-H "Authorization: Bearer YOUR_TOKEN"
const response = await fetch(
'https://api.companyflow.com/roles/550e8400-e29b-41d4-a716-446655440000',
{
method: 'DELETE',
headers: {
'Authorization': 'Bearer YOUR_TOKEN'
}
}
);
const data = await response.json();
import requests
url = "https://api.companyflow.com/roles/550e8400-e29b-41d4-a716-446655440000"
headers = {
"Authorization": "Bearer YOUR_TOKEN"
}
response = requests.delete(url, headers=headers)
data = response.json()
{
"success": true,
"message": "role deleted"
}
{
"success": false,
"message": "invalid role id"
}
{
"success": false,
"message": "unauthorized"
}