Skip to main content
Use this endpoint to retrieve all roles that have been configured on your Shogun account. Each role carries a set of permissions that control what actions team members assigned to that role can perform. Use the role IDs returned here when inviting new members or updating an existing member’s role.

Endpoint

POST /api/v1/auth/web/fetch_roles

Authentication

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

Request Body

No request body is required. You may send an empty JSON object {} or omit the body entirely.

Response

{
  "status": true,
  "response_code": "00",
  "message": "Roles fetched successfully",
  "data": [
    {
      "id": "r1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "name": "Finance Manager",
      "description": "Can initiate and approve transfers up to the defined limit.",
      "permissions": [
        {
          "code": "transfer.initiate",
          "name": "Initiate Transfer"
        },
        {
          "code": "transfer.approve",
          "name": "Approve Transfer"
        }
      ],
      "created_at": "2026-01-05T10:00:00Z"
    }
  ]
}
FieldTypeDescription
idUUIDUnique identifier for the role
namestringHuman-readable name of the role
descriptionstringOptional description of what the role is for
permissionsarrayList of permission objects attached to this role
created_atdatetimeWhen the role was created

Example

curl -X POST https://baasapi.payrepmfb.com/api/v1/auth/web/fetch_roles \
  -H "Authorization: Bearer <access_token>" \
  -H "Content-Type: application/json" \
  -d '{}'