Skip to main content
Use this endpoint to permanently delete a custom role from your Shogun account. Before you can delete a role, every team member currently assigned to it must be reassigned to a different role. The API will reject the request if any members still hold the role. Additionally, you cannot delete the role currently assigned to your own account.

Endpoint

POST /api/v1/auth/web/delete_role

Authentication

This endpoint requires a valid Dashboard JWT. Pass the token in the Authorization header:
Authorization: Bearer <access_token>

Request Body

role_id
string (UUID)
required
The unique identifier of the role you want to delete. Use Fetch Roles to retrieve role IDs.

Response

{
  "status": true,
  "response_code": "00",
  "message": "Role deleted successfully",
  "data": {}
}

Example

curl -X POST https://baasapi.payrepmfb.com/api/v1/auth/web/delete_role \
  -H "Authorization: Bearer <access_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "role_id": "r1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }'
You must reassign all team members currently holding this role to a different role before the delete request will succeed. Use Edit Member Role to update individual member assignments, then retry the delete. You also cannot delete the role assigned to your own account.