List all sites users permissions

get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
organizationIdstringRequired

A unique entity identifier

Pattern: ^[a-zA-Z0-9_-]+$
siteIdstringRequired

The unique id of the site

Query parameters
pagestringOptional

Identifier of the page results to fetch.

limitnumber · max: 1000Optional

The number of results per page

orderstring · enumOptional

An order for the items in the list

Default: descPossible values:
roleone ofOptional

The role to filter the list by

string · enumOptional

"The role of a member in an organization. "admin": Can administrate the content: create, delete spaces, ... "create": Can create content. "review": Can review content. "edit": Can edit the content (live or change requests). "comment": Can access the content and its discussions. "read": Can access the content, but cannot update it in any way.

Possible values:
searchstringOptional

A query to filter the list by display name and email

sortstring · enumOptional

The property to sort the list by

Default: joinedAtPossible values:
teamstringOptional

Team identifier. Filter the list to members of a specific team.

Responses
200

Listing of users who can access the site.

application/json
countnumberOptional

Total count of objects in the list

membersCountintegerRequired

Number of users with a role in the site, guests excluded. It ignores the filters and the pagination of the request.

get/orgs/{organizationId}/sites/{siteId}/permissions/aggregate
GET /v1/orgs/{organizationId}/sites/{siteId}/permissions/aggregate HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

Listing of users who can access the site.

{
  "next": {
    "page": "text"
  },
  "count": 1,
  "membersCount": 1,
  "items": [
    {
      "permission": "admin",
      "user": {
        "object": "user",
        "id": "text",
        "displayName": "text",
        "email": "text",
        "photoURL": "text",
        "urls": {
          "location": "https://example.com"
        }
      },
      "origin": {
        "type": "space",
        "space": "text"
      },
      "disabled": false,
      "lastSeenAt": "2026-01-01T00:00:00.000Z"
    }
  ]
}

Last updated

Was this helpful?

Powered by GitBook