Skip to main content
Use this endpoint to modify an existing role on your Shogun account. You can update the role’s name, description, or replace its set of permissions. Changes apply immediately and affect every team member who currently holds that role — their effective permissions are updated on their next authenticated request.

Endpoint

POST /api/v1/auth/web/update_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 update. Use Fetch Roles to retrieve role IDs.
name
string
The updated name for the role. Maximum 255 characters.
description
string
An updated description explaining what this role is intended for.
permission_codes
array
A replacement set of permission code strings for this role (e.g. ["transfer.initiate", "account.view"]). When provided, this fully replaces the existing permission set. Use Fetch Permissions to retrieve valid codes.
permission_data
array
An optional array of detailed permission objects with Maker-Checker metadata. Replaces the existing permission data when provided.

Response

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

Example

curl -X POST https://baasapi.payrepmfb.com/api/v1/auth/web/update_role \
  -H "Authorization: Bearer <access_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "role_id": "r1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "name": "Senior Finance Manager",
    "description": "Can initiate, review, and approve all transfers.",
    "permission_codes": ["transfer.initiate", "transfer.approve", "account.view"]
  }'