Docs/User API/Roles/List

List roles

Preview
GET/user/v1/roles

List roles.

query parameters

  • pageSize

    int32

    The maximum number of roles to return. The API may return fewer than this value.

    If unspecified, at most 20 roles will be returned. The maximum value is 100; values above 100 will be coerced to 100.

  • pageToken

    string

    A page token, received from a previous list roles call. Provide this to retrieve the subsequent page.

    When paginating, all other parameters provided to list roles must match the call that provided the page token.

  • orderBy

    string

    A comma-separated list of fields to order by.

Returns

  • roles

    Role[]

    The list of roles.

  • nextPageToken

    string

    A token, which can be sent as pageToken to retrieve the next page. If this field is omitted, there are no subsequent pages.

  • previousPageToken

    string

    A token, which can be sent as pageToken to retrieve the previous page. If this field is absent, there are no preceding pages. If this field is an empty string then the previous page is the first result.

curl https://api.userhub.com/user/v1/roles \
  -H "UserHub-Api-Key: $USERHUB_USER_KEY" \
  -H "Authorization: Bearer $USER_ACCESS_TOKEN"
Response bodyJSON
{
  "roles": [
    {
      "id": "role_2mD13uXP",
      "uniqueId": "member",
      "displayName": "Member",
      "type": "MEMBER",
      "description": "Can see every member in the organization",
      "seatPolicy": "DEFAULT",
      "permissionSets": [
        "members.invite"
      ],
      "default": true
    },
    {
      "id": "role_51jav4KK",
      "uniqueId": "admin",
      "displayName": "Admin",
      "type": "MEMBER",
      "description": "Can manage members of the organization",
      "seatPolicy": "DEFAULT",
      "permissionSets": [
        "billing.readonly",
        "members.readwrite"
      ],
      "default": false
    },
    {
      "id": "role_4NNSzkhn",
      "uniqueId": "owner",
      "displayName": "Owner",
      "type": "OWNER",
      "description": "Has full administrative access to the entire organization",
      "seatPolicy": "DEFAULT",
      "permissionSets": [],
      "default": false
    }
  ]
}
PreviousThe role object
NextSession

Build software thatmonetizes
$

Subscribe to monthly product updates

© 2025 UserHub

Integrations

    UserHub & Auth0UserHub & Stripe BillingUserHub & Google CloudUserHub & FirebaseUserHub & custom auth