Account
Roles
Get Role

Get Role API

Welcome to the documentation for the Get Role API. This API returns a single role.

Base URL

{baseURL}/v1/accounts/settings/roles/:roleId | GET

Authorization

Include the following Authorization header in your HTTP requests using a Bearer token:

Authorization: Bearer YOUR_ACCESS_TOKEN

Sample Request

curl -X GET {baseURL}/v1/accounts/settings/roles/64f4b7b31dca9276ea1f786b \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \

Sample 200 Response

{
  "message": "Role fetched successfully",
  "data": {
    "_id": "64f4b7b31dca9276ea1f786b",
    "account_id": "650335d818515d90244388c7",
    "name": "admin",
    "slug": "admin",
    "permissions": [],
    "createdAt": "2023-09-03T16:43:31.033Z",
    "updatedAt": "2023-09-03T16:43:31.033Z",
    "__v": 0,
    "role_id": "64f4b7b31dca9276ea1f786b"
  },
  "success": true
}