For the complete documentation index, see llms.txt. This page is also available as Markdown.

List all top-level comments posted on a space

Returns a paginated list of comments posted directly on the space (not inside a change request). To read replies to a specific comment, use the comment replies endpoint.

Available in MCP
get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
spaceIdstringRequired

A unique entity identifier

Pattern: ^[a-zA-Z0-9_-]+$
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:
statusstring · enumOptional

When provided, only comments with the given status are returned. Defaults to "all".

Default: allPossible values:
formatstring · enumOptional

Output format for the content.

Possible values:
targetPagestringOptional

The target page of the comment

authorsstring[]Optional

User IDs to filter queried comments on

Responses
200

OK

application/json
countnumberOptional

Total count of objects in the list

get/spaces/{spaceId}/comments
GET /v1/spaces/{spaceId}/comments HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

OK

{
  "next": {
    "page": "text"
  },
  "count": 1,
  "items": [
    {
      "object": "comment",
      "id": "text",
      "postedBy": {
        "object": "user",
        "id": "text",
        "displayName": "text",
        "email": "text",
        "photoURL": "text",
        "urls": {
          "location": "https://example.com"
        }
      },
      "postedAt": "2026-01-01T00:00:00.000Z",
      "editedAt": "2026-01-01T00:00:00.000Z",
      "reactions": [
        {
          "emoji": "text",
          "count": 1,
          "users": [
            {
              "user": {
                "object": "user",
                "id": "text",
                "displayName": "text",
                "email": "text",
                "photoURL": "text",
                "urls": {
                  "location": "https://example.com"
                }
              },
              "reactedAt": "2026-01-01T00:00:00.000Z"
            }
          ]
        }
      ],
      "replies": 1,
      "repliers": [
        {
          "updatedAt": "2026-01-01T00:00:00.000Z",
          "count": 1,
          "user": {
            "object": "user",
            "id": "text",
            "displayName": "text",
            "email": "text",
            "photoURL": "text",
            "urls": {
              "location": "https://example.com"
            }
          }
        }
      ],
      "body": {
        "markdown": "# Hello World\n\nThis is a markdown document linking to [another page](/pages/page_id).\n"
      },
      "target": {
        "node": {
          "id": "text"
        },
        "tableCell": {
          "record": "text",
          "definition": "text"
        },
        "changeRequest": "text",
        "review": "text",
        "page": {
          "id": "text"
        },
        "space": "text",
        "revision": "text"
      },
      "urls": {
        "location": "https://example.com"
      },
      "permissions": {
        "view": true,
        "edit": true,
        "reply": true,
        "delete": true
      },
      "status": "resolved",
      "resolvedAt": "2026-01-01T00:00:00.000Z",
      "resolvedBy": {
        "object": "user",
        "id": "text",
        "displayName": "text",
        "email": "text",
        "photoURL": "text",
        "urls": {
          "location": "https://example.com"
        }
      }
    }
  ]
}

Last updated

Was this helpful?

Powered by GitBook