Skip to content

List Roles

GET/web/v1/workspaces/{workspaceId}/roles JWT

Lists all roles defined in a workspace, including both OWNER and CUSTOM roles.

Required Headers

HeaderExample ValueDescription
Content-Typeapplication/jsonRequest content type
Acceptapplication/jsonExpected response type
X-Client-HashClient device fingerprint
Accept-Languageen, zh, zh-Hant, ja, viResponse language (default: en)
AuthorizationBearerJWT access token
X-Workspace-IdTarget workspace ID

Request Parameters

NameTypeRequiredInDescription
workspaceIdStringRequiredpathBusiness ID of the workspace

Success Response

Status: 200 OK

Returns an array of role objects.

Success 200
{
  "version": "1.3.0",
  "timestamp": 1709337600000,
  "success": true,
  "code": "2000",
  "message": "SUCCESS",
  "data": [
    {
      "bizId": "ROLE_OWNER_TEST_001",
      "workspaceBizId": "WS_ROLE_TEST_001",
      "roleName": "Owner",
      "roleType": {
        "value": 10010901,
        "name": "OWNER",
        "code": "OWNER"
      },
      "description": "Workspace owner with full permissions",
      "permissionCodes": null,
      "createdAt": "2026-03-22T10:30:00Z",
      "updatedAt": "2026-03-22T10:30:00Z"
    },
    {
      "bizId": "ROLE_CUSTOM_TEST_001",
      "workspaceBizId": "WS_ROLE_TEST_001",
      "roleName": "Member",
      "roleType": {
        "value": 10010902,
        "name": "CUSTOM",
        "code": "CUSTOM"
      },
      "description": "Default member role",
      "permissionCodes": null,
      "createdAt": "2026-03-22T10:35:00Z",
      "updatedAt": "2026-03-22T10:35:00Z"
    }
  ]
}

Response Item Fields

FieldTypeDescription
bizIdStringUnique role business ID
workspaceBizIdStringParent workspace business ID
roleNameStringRole display name
roleTypeObjectRole type enum: OWNER (10010901) or CUSTOM (10010902)
descriptionStringRole description
permissionCodesArrayPermission codes (nullable in list view)
createdAtStringISO 8601 creation timestamp
updatedAtStringISO 8601 last update timestamp

Error Responses

Unauthorized 401
{
  "success": false,
  "code": "4010",
  "message": "Invalid or expired token"
}

Notes

  • Every workspace has at least one OWNER role (created automatically).
  • Requires workspace:role:read permission.

SlaunchX Internal Documentation