Space comments
Integrate and manage user comments in a space.
Comments are a powerful way to gather feedback on your documentation. Use this API to post, list, update, or delete comments and keep conversations organized.
The Comment object
{
"object": "comment",
"id": "text",
"postedBy": {
"object": "user",
"id": "text",
"displayName": "text",
"email": "text",
"photoURL": "text",
"urls": {
"location": "https://example.com"
}
},
"postedAt": "2025-06-21T02:26:33.754Z",
"editedAt": "2025-06-21T02:26:33.754Z",
"reactions": [
{
"emoji": "text",
"count": 1,
"users": [
{
"user": {
"object": "user",
"id": "text",
"displayName": "text",
"email": "text",
"photoURL": "text",
"urls": {
"location": "https://example.com"
}
},
"reactedAt": "2025-06-21T02:26:33.754Z"
}
]
}
],
"replies": 1,
"body": {
"markdown": "text"
},
"target": {
"node": {
"id": "text",
"preview": "text"
},
"changeRequest": "text",
"review": "text",
"page": {
"id": "text",
"title": "text",
"emoji": "🎉",
"icon": "gear",
"createdAt": "2025-06-21T02:26:33.754Z",
"updatedAt": "2025-06-21T02:26:33.754Z",
"path": "text",
"outdated": true
},
"space": "text",
"revision": "text"
},
"urls": {
"location": "https://example.com"
},
"permissions": {
"view": true,
"edit": true,
"reply": true,
"delete": true
},
"status": "resolved",
"resolvedAt": "2025-06-21T02:26:33.754Z",
"resolvedBy": {
"object": "user",
"id": "text",
"displayName": "text",
"email": "text",
"photoURL": "text",
"urls": {
"location": "https://example.com"
}
}
}
The unique id of the space
Identifier of the page results to fetch.
The number of results per page
An order for the items in the list
desc
Possible values: When provided, only comments with the given status are returned. Defaults to "all".
all
Possible values: Output format for the content.
The target page of the comment
User IDs to filter queried comments on
GET /v1/spaces/{spaceId}/comments HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
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": "2025-06-21T02:26:33.754Z",
"editedAt": "2025-06-21T02:26:33.754Z",
"reactions": [
{
"emoji": "text",
"count": 1,
"users": [
{
"user": {
"object": "user",
"id": "text",
"displayName": "text",
"email": "text",
"photoURL": "text",
"urls": {
"location": "https://example.com"
}
},
"reactedAt": "2025-06-21T02:26:33.754Z"
}
]
}
],
"replies": 1,
"body": {
"markdown": "text"
},
"target": {
"node": {
"id": "text",
"preview": "text"
},
"changeRequest": "text",
"review": "text",
"page": {
"id": "text",
"title": "text",
"emoji": "🎉",
"icon": "gear",
"createdAt": "2025-06-21T02:26:33.754Z",
"updatedAt": "2025-06-21T02:26:33.754Z",
"path": "text",
"outdated": true
},
"space": "text",
"revision": "text"
},
"urls": {
"location": "https://example.com"
},
"permissions": {
"view": true,
"edit": true,
"reply": true,
"delete": true
},
"status": "resolved",
"resolvedAt": "2025-06-21T02:26:33.754Z",
"resolvedBy": {
"object": "user",
"id": "text",
"displayName": "text",
"email": "text",
"photoURL": "text",
"urls": {
"location": "https://example.com"
}
}
}
]
}
The unique id of the space
The node to which the comment is posted, if any.
The page to which the comment is posted, if any.
The content of the comment.
POST /v1/spaces/{spaceId}/comments HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 56
{
"node": "text",
"page": "text",
"body": {
"markdown": "text"
}
}
The comment was posted.
{
"object": "comment",
"id": "text",
"postedBy": {
"object": "user",
"id": "text",
"displayName": "text",
"email": "text",
"photoURL": "text",
"urls": {
"location": "https://example.com"
}
},
"postedAt": "2025-06-21T02:26:33.754Z",
"editedAt": "2025-06-21T02:26:33.754Z",
"reactions": [
{
"emoji": "text",
"count": 1,
"users": [
{
"user": {
"object": "user",
"id": "text",
"displayName": "text",
"email": "text",
"photoURL": "text",
"urls": {
"location": "https://example.com"
}
},
"reactedAt": "2025-06-21T02:26:33.754Z"
}
]
}
],
"replies": 1,
"body": {
"markdown": "text"
},
"target": {
"node": {
"id": "text",
"preview": "text"
},
"changeRequest": "text",
"review": "text",
"page": {
"id": "text",
"title": "text",
"emoji": "🎉",
"icon": "gear",
"createdAt": "2025-06-21T02:26:33.754Z",
"updatedAt": "2025-06-21T02:26:33.754Z",
"path": "text",
"outdated": true
},
"space": "text",
"revision": "text"
},
"urls": {
"location": "https://example.com"
},
"permissions": {
"view": true,
"edit": true,
"reply": true,
"delete": true
},
"status": "resolved",
"resolvedAt": "2025-06-21T02:26:33.754Z",
"resolvedBy": {
"object": "user",
"id": "text",
"displayName": "text",
"email": "text",
"photoURL": "text",
"urls": {
"location": "https://example.com"
}
}
}
The unique id of the space
The unique id of the comment
Output format for the content.
GET /v1/spaces/{spaceId}/comments/{commentId} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
The returned comment.
{
"object": "comment",
"id": "text",
"postedBy": {
"object": "user",
"id": "text",
"displayName": "text",
"email": "text",
"photoURL": "text",
"urls": {
"location": "https://example.com"
}
},
"postedAt": "2025-06-21T02:26:33.754Z",
"editedAt": "2025-06-21T02:26:33.754Z",
"reactions": [
{
"emoji": "text",
"count": 1,
"users": [
{
"user": {
"object": "user",
"id": "text",
"displayName": "text",
"email": "text",
"photoURL": "text",
"urls": {
"location": "https://example.com"
}
},
"reactedAt": "2025-06-21T02:26:33.754Z"
}
]
}
],
"replies": 1,
"body": {
"markdown": "text"
},
"target": {
"node": {
"id": "text",
"preview": "text"
},
"changeRequest": "text",
"review": "text",
"page": {
"id": "text",
"title": "text",
"emoji": "🎉",
"icon": "gear",
"createdAt": "2025-06-21T02:26:33.754Z",
"updatedAt": "2025-06-21T02:26:33.754Z",
"path": "text",
"outdated": true
},
"space": "text",
"revision": "text"
},
"urls": {
"location": "https://example.com"
},
"permissions": {
"view": true,
"edit": true,
"reply": true,
"delete": true
},
"status": "resolved",
"resolvedAt": "2025-06-21T02:26:33.754Z",
"resolvedBy": {
"object": "user",
"id": "text",
"displayName": "text",
"email": "text",
"photoURL": "text",
"urls": {
"location": "https://example.com"
}
}
}
The unique id of the space
The unique id of the comment
Whether the comment is resolved or not.
Content of the comment.
Reactions to add to the comment.
Reactions to remove from the comment.
PUT /v1/spaces/{spaceId}/comments/{commentId} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 98
{
"resolved": true,
"body": {
"markdown": "text"
},
"addedReactions": [
"text"
],
"removedReactions": [
"text"
]
}
The comment was updated.
{
"object": "comment",
"id": "text",
"postedBy": {
"object": "user",
"id": "text",
"displayName": "text",
"email": "text",
"photoURL": "text",
"urls": {
"location": "https://example.com"
}
},
"postedAt": "2025-06-21T02:26:33.754Z",
"editedAt": "2025-06-21T02:26:33.754Z",
"reactions": [
{
"emoji": "text",
"count": 1,
"users": [
{
"user": {
"object": "user",
"id": "text",
"displayName": "text",
"email": "text",
"photoURL": "text",
"urls": {
"location": "https://example.com"
}
},
"reactedAt": "2025-06-21T02:26:33.754Z"
}
]
}
],
"replies": 1,
"body": {
"markdown": "text"
},
"target": {
"node": {
"id": "text",
"preview": "text"
},
"changeRequest": "text",
"review": "text",
"page": {
"id": "text",
"title": "text",
"emoji": "🎉",
"icon": "gear",
"createdAt": "2025-06-21T02:26:33.754Z",
"updatedAt": "2025-06-21T02:26:33.754Z",
"path": "text",
"outdated": true
},
"space": "text",
"revision": "text"
},
"urls": {
"location": "https://example.com"
},
"permissions": {
"view": true,
"edit": true,
"reply": true,
"delete": true
},
"status": "resolved",
"resolvedAt": "2025-06-21T02:26:33.754Z",
"resolvedBy": {
"object": "user",
"id": "text",
"displayName": "text",
"email": "text",
"photoURL": "text",
"urls": {
"location": "https://example.com"
}
}
}
The unique id of the space
The unique id of the comment
DELETE /v1/spaces/{spaceId}/comments/{commentId} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
The comment has been deleted.
No content
The unique id of the space
The unique id of the comment
The content of the comment.
POST /v1/spaces/{spaceId}/comments/{commentId}/replies HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 28
{
"body": {
"markdown": "text"
}
}
The reply was posted.
{
"object": "comment-reply",
"id": "text",
"postedBy": {
"object": "user",
"id": "text",
"displayName": "text",
"email": "text",
"photoURL": "text",
"urls": {
"location": "https://example.com"
}
},
"postedAt": "2025-06-21T02:26:33.754Z",
"editedAt": "2025-06-21T02:26:33.754Z",
"reactions": [
{
"emoji": "text",
"count": 1,
"users": [
{
"user": {
"object": "user",
"id": "text",
"displayName": "text",
"email": "text",
"photoURL": "text",
"urls": {
"location": "https://example.com"
}
},
"reactedAt": "2025-06-21T02:26:33.754Z"
}
]
}
],
"body": {
"markdown": "text"
},
"urls": {
"location": "https://example.com"
},
"permissions": {
"view": true,
"edit": true,
"reply": true,
"delete": true
}
}
The unique id of the space
The unique id of the comment
The unique id of the comment reply
Output format for the content.
GET /v1/spaces/{spaceId}/comments/{commentId}/replies/{commentReplyId} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
The returned comment reply.
{
"object": "comment-reply",
"id": "text",
"postedBy": {
"object": "user",
"id": "text",
"displayName": "text",
"email": "text",
"photoURL": "text",
"urls": {
"location": "https://example.com"
}
},
"postedAt": "2025-06-21T02:26:33.754Z",
"editedAt": "2025-06-21T02:26:33.754Z",
"reactions": [
{
"emoji": "text",
"count": 1,
"users": [
{
"user": {
"object": "user",
"id": "text",
"displayName": "text",
"email": "text",
"photoURL": "text",
"urls": {
"location": "https://example.com"
}
},
"reactedAt": "2025-06-21T02:26:33.754Z"
}
]
}
],
"body": {
"markdown": "text"
},
"urls": {
"location": "https://example.com"
},
"permissions": {
"view": true,
"edit": true,
"reply": true,
"delete": true
}
}
The unique id of the space
The unique id of the comment
The unique id of the comment reply
Content of the comment.
Reactions to add to the comment.
Reactions to remove from the comment.
PUT /v1/spaces/{spaceId}/comments/{commentId}/replies/{commentReplyId} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 82
{
"body": {
"markdown": "text"
},
"addedReactions": [
"text"
],
"removedReactions": [
"text"
]
}
The reply was updated.
{
"object": "comment-reply",
"id": "text",
"postedBy": {
"object": "user",
"id": "text",
"displayName": "text",
"email": "text",
"photoURL": "text",
"urls": {
"location": "https://example.com"
}
},
"postedAt": "2025-06-21T02:26:33.754Z",
"editedAt": "2025-06-21T02:26:33.754Z",
"reactions": [
{
"emoji": "text",
"count": 1,
"users": [
{
"user": {
"object": "user",
"id": "text",
"displayName": "text",
"email": "text",
"photoURL": "text",
"urls": {
"location": "https://example.com"
}
},
"reactedAt": "2025-06-21T02:26:33.754Z"
}
]
}
],
"body": {
"markdown": "text"
},
"urls": {
"location": "https://example.com"
},
"permissions": {
"view": true,
"edit": true,
"reply": true,
"delete": true
}
}
The unique id of the space
The unique id of the comment
The unique id of the comment reply
DELETE /v1/spaces/{spaceId}/comments/{commentId}/replies/{commentReplyId} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
The comment has been deleted.
No content
The unique id of the space
Identifier of the page results to fetch.
The number of results per page
GET /v1/spaces/{spaceId}/commenters HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
OK
{
"next": {
"page": "text"
},
"count": 1,
"items": [
{
"object": "member",
"id": "text",
"role": "admin",
"user": {
"object": "user",
"id": "text",
"displayName": "text",
"email": "text",
"photoURL": "text",
"urls": {
"location": "https://example.com"
}
},
"disabled": true,
"joinedAt": "2025-06-21T02:26:33.754Z",
"lastSeenAt": "2025-06-21T02:26:33.754Z",
"sso": true,
"spaces": 1,
"teams": 1
}
]
}
Was this helpful?