Change request comments

Engage in threaded conversations on proposed changes.

This API powers the inline discussion around any new or updated documentation. Participate in comment threads and resolve them after reaching consensus.

The Comment object

Attributes
all ofoptional

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-04-16T05:52:20.539Z",
  "editedAt": "2025-04-16T05:52:20.539Z",
  "reactions": [
    {
      "emoji": "text",
      "count": 1,
      "users": [
        {
          "user": {
            "object": "user",
            "id": "text",
            "displayName": "text",
            "email": "text",
            "photoURL": "text",
            "urls": {
              "location": "https://example.com"
            }
          },
          "reactedAt": "2025-04-16T05:52:20.539Z"
        }
      ]
    }
  ],
  "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-04-16T05:52:20.539Z",
      "updatedAt": "2025-04-16T05:52:20.539Z",
      "path": "text",
      "outdated": true
    },
    "space": "text",
    "revision": "text"
  },
  "urls": {
    "location": "https://example.com"
  },
  "status": "resolved",
  "resolvedAt": "2025-04-16T05:52:20.539Z",
  "resolvedBy": {
    "object": "user",
    "id": "text",
    "displayName": "text",
    "email": "text",
    "photoURL": "text",
    "urls": {
      "location": "https://example.com"
    }
  }
}

List all change request comments

get
Authorizations
Path parameters
spaceIdstringrequired

The unique id of the space

changeRequestIdstringrequired

The unique ID of the change request or its number identifier in the space

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: descAvailable options:
formatstring · enumoptional

Output format for the content.

Available options:
statusstring · enumoptional

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

Default: allAvailable options:
targetPagestringoptional

The target page of the comment

Responses
application/json
all ofoptional
get
GET /v1/spaces/{spaceId}/change-requests/{changeRequestId}/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": "2025-04-16T05:52:20.539Z",
      "editedAt": "2025-04-16T05:52:20.539Z",
      "reactions": [
        {
          "emoji": "text",
          "count": 1,
          "users": [
            {
              "user": {
                "object": "user",
                "id": "text",
                "displayName": "text",
                "email": "text",
                "photoURL": "text",
                "urls": {
                  "location": "https://example.com"
                }
              },
              "reactedAt": "2025-04-16T05:52:20.539Z"
            }
          ]
        }
      ],
      "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-04-16T05:52:20.539Z",
          "updatedAt": "2025-04-16T05:52:20.539Z",
          "path": "text",
          "outdated": true
        },
        "space": "text",
        "revision": "text"
      },
      "urls": {
        "location": "https://example.com"
      },
      "status": "resolved",
      "resolvedAt": "2025-04-16T05:52:20.539Z",
      "resolvedBy": {
        "object": "user",
        "id": "text",
        "displayName": "text",
        "email": "text",
        "photoURL": "text",
        "urls": {
          "location": "https://example.com"
        }
      }
    }
  ]
}

Create a change request comment

post
Authorizations
Path parameters
spaceIdstringrequired

The unique id of the space

changeRequestIdstringrequired

The unique ID of the change request or its number identifier in the space

Body
nodestringoptional

The node to which the comment is posted, if any.

pagestringoptional

The page to which the comment is posted, if any.

bodyone ofrequired

The content of the comment.

Responses
application/json
all ofoptional
post
POST /v1/spaces/{spaceId}/change-requests/{changeRequestId}/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"
  }
}
200

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-04-16T05:52:20.539Z",
  "editedAt": "2025-04-16T05:52:20.539Z",
  "reactions": [
    {
      "emoji": "text",
      "count": 1,
      "users": [
        {
          "user": {
            "object": "user",
            "id": "text",
            "displayName": "text",
            "email": "text",
            "photoURL": "text",
            "urls": {
              "location": "https://example.com"
            }
          },
          "reactedAt": "2025-04-16T05:52:20.539Z"
        }
      ]
    }
  ],
  "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-04-16T05:52:20.539Z",
      "updatedAt": "2025-04-16T05:52:20.539Z",
      "path": "text",
      "outdated": true
    },
    "space": "text",
    "revision": "text"
  },
  "urls": {
    "location": "https://example.com"
  },
  "status": "resolved",
  "resolvedAt": "2025-04-16T05:52:20.539Z",
  "resolvedBy": {
    "object": "user",
    "id": "text",
    "displayName": "text",
    "email": "text",
    "photoURL": "text",
    "urls": {
      "location": "https://example.com"
    }
  }
}

Get a change request comment

get
Authorizations
Path parameters
spaceIdstringrequired

The unique id of the space

changeRequestIdstringrequired

The unique ID of the change request or its number identifier in the space

commentIdstringrequired

The unique id of the comment

Query parameters
formatstring · enumoptional

Output format for the content.

Available options:
Responses
application/json
all ofoptional
get
GET /v1/spaces/{spaceId}/change-requests/{changeRequestId}/comments/{commentId} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

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-04-16T05:52:20.539Z",
  "editedAt": "2025-04-16T05:52:20.539Z",
  "reactions": [
    {
      "emoji": "text",
      "count": 1,
      "users": [
        {
          "user": {
            "object": "user",
            "id": "text",
            "displayName": "text",
            "email": "text",
            "photoURL": "text",
            "urls": {
              "location": "https://example.com"
            }
          },
          "reactedAt": "2025-04-16T05:52:20.539Z"
        }
      ]
    }
  ],
  "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-04-16T05:52:20.539Z",
      "updatedAt": "2025-04-16T05:52:20.539Z",
      "path": "text",
      "outdated": true
    },
    "space": "text",
    "revision": "text"
  },
  "urls": {
    "location": "https://example.com"
  },
  "status": "resolved",
  "resolvedAt": "2025-04-16T05:52:20.539Z",
  "resolvedBy": {
    "object": "user",
    "id": "text",
    "displayName": "text",
    "email": "text",
    "photoURL": "text",
    "urls": {
      "location": "https://example.com"
    }
  }
}

Update a change request comment

put
Authorizations
Path parameters
spaceIdstringrequired

The unique id of the space

changeRequestIdstringrequired

The unique ID of the change request or its number identifier in the space

commentIdstringrequired

The unique id of the comment

Body
resolvedbooleanoptional

Whether the comment is resolved or not.

bodyone ofoptional

Content of the comment.

addedReactionsstring[]optional

Reactions to add to the comment.

removedReactionsstring[]optional

Reactions to remove from the comment.

Responses
application/json
all ofoptional
put
PUT /v1/spaces/{spaceId}/change-requests/{changeRequestId}/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"
  ]
}
200

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-04-16T05:52:20.539Z",
  "editedAt": "2025-04-16T05:52:20.539Z",
  "reactions": [
    {
      "emoji": "text",
      "count": 1,
      "users": [
        {
          "user": {
            "object": "user",
            "id": "text",
            "displayName": "text",
            "email": "text",
            "photoURL": "text",
            "urls": {
              "location": "https://example.com"
            }
          },
          "reactedAt": "2025-04-16T05:52:20.539Z"
        }
      ]
    }
  ],
  "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-04-16T05:52:20.539Z",
      "updatedAt": "2025-04-16T05:52:20.539Z",
      "path": "text",
      "outdated": true
    },
    "space": "text",
    "revision": "text"
  },
  "urls": {
    "location": "https://example.com"
  },
  "status": "resolved",
  "resolvedAt": "2025-04-16T05:52:20.539Z",
  "resolvedBy": {
    "object": "user",
    "id": "text",
    "displayName": "text",
    "email": "text",
    "photoURL": "text",
    "urls": {
      "location": "https://example.com"
    }
  }
}

Delete a change request comment

delete
Authorizations
Path parameters
spaceIdstringrequired

The unique id of the space

changeRequestIdstringrequired

The unique ID of the change request or its number identifier in the space

commentIdstringrequired

The unique id of the comment

Responses
delete
DELETE /v1/spaces/{spaceId}/change-requests/{changeRequestId}/comments/{commentId} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
205

The comment has been deleted.

No Content

List all change request comment replies

get
Authorizations
Path parameters
spaceIdstringrequired

The unique id of the space

changeRequestIdstringrequired

The unique ID of the change request or its number identifier in the space

commentIdstringrequired

The unique id of the comment

Query parameters
pagestringoptional

Identifier of the page results to fetch.

limitnumber · max: 1000optional

The number of results per page

formatstring · enumoptional

Output format for the content.

Available options:
Responses
application/json
all ofoptional
get
GET /v1/spaces/{spaceId}/change-requests/{changeRequestId}/comments/{commentId}/replies HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

OK

{
  "next": {
    "page": "text"
  },
  "count": 1,
  "items": [
    {
      "object": "comment-reply",
      "id": "text",
      "postedBy": {
        "object": "user",
        "id": "text",
        "displayName": "text",
        "email": "text",
        "photoURL": "text",
        "urls": {
          "location": "https://example.com"
        }
      },
      "postedAt": "2025-04-16T05:52:20.539Z",
      "editedAt": "2025-04-16T05:52:20.539Z",
      "reactions": [
        {
          "emoji": "text",
          "count": 1,
          "users": [
            {
              "user": {
                "object": "user",
                "id": "text",
                "displayName": "text",
                "email": "text",
                "photoURL": "text",
                "urls": {
                  "location": "https://example.com"
                }
              },
              "reactedAt": "2025-04-16T05:52:20.539Z"
            }
          ]
        }
      ],
      "body": {
        "markdown": "text"
      },
      "urls": {
        "location": "https://example.com"
      }
    }
  ]
}

Create a change request comment reply

post
Authorizations
Path parameters
spaceIdstringrequired

The unique id of the space

changeRequestIdstringrequired

The unique ID of the change request or its number identifier in the space

commentIdstringrequired

The unique id of the comment

Query parameters
formatstring · enumoptional

Output format for the content.

Available options:
Body
bodyone ofrequired

The content of the comment.

Responses
application/json
objectoptional
post
POST /v1/spaces/{spaceId}/change-requests/{changeRequestId}/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"
  }
}
200

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-04-16T05:52:20.539Z",
  "editedAt": "2025-04-16T05:52:20.539Z",
  "reactions": [
    {
      "emoji": "text",
      "count": 1,
      "users": [
        {
          "user": {
            "object": "user",
            "id": "text",
            "displayName": "text",
            "email": "text",
            "photoURL": "text",
            "urls": {
              "location": "https://example.com"
            }
          },
          "reactedAt": "2025-04-16T05:52:20.539Z"
        }
      ]
    }
  ],
  "body": {
    "markdown": "text"
  },
  "urls": {
    "location": "https://example.com"
  }
}

Get a change request comment reply

get
Authorizations
Path parameters
spaceIdstringrequired

The unique id of the space

changeRequestIdstringrequired

The unique ID of the change request or its number identifier in the space

commentIdstringrequired

The unique id of the comment

commentReplyIdstringrequired

The unique id of the comment reply

Query parameters
formatstring · enumoptional

Output format for the content.

Available options:
Responses
application/json
objectoptional
get
GET /v1/spaces/{spaceId}/change-requests/{changeRequestId}/comments/{commentId}/replies/{commentReplyId} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

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-04-16T05:52:20.539Z",
  "editedAt": "2025-04-16T05:52:20.539Z",
  "reactions": [
    {
      "emoji": "text",
      "count": 1,
      "users": [
        {
          "user": {
            "object": "user",
            "id": "text",
            "displayName": "text",
            "email": "text",
            "photoURL": "text",
            "urls": {
              "location": "https://example.com"
            }
          },
          "reactedAt": "2025-04-16T05:52:20.539Z"
        }
      ]
    }
  ],
  "body": {
    "markdown": "text"
  },
  "urls": {
    "location": "https://example.com"
  }
}

Update a change request comment reply

put
Authorizations
Path parameters
spaceIdstringrequired

The unique id of the space

changeRequestIdstringrequired

The unique ID of the change request or its number identifier in the space

commentIdstringrequired

The unique id of the comment

commentReplyIdstringrequired

The unique id of the comment reply

Body
resolvedbooleanoptional

Whether the comment is resolved or not.

bodyone ofoptional

Content of the comment.

addedReactionsstring[]optional

Reactions to add to the comment.

removedReactionsstring[]optional

Reactions to remove from the comment.

Responses
application/json
objectoptional
put
PUT /v1/spaces/{spaceId}/change-requests/{changeRequestId}/comments/{commentId}/replies/{commentReplyId} 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"
  ]
}
200

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-04-16T05:52:20.539Z",
  "editedAt": "2025-04-16T05:52:20.539Z",
  "reactions": [
    {
      "emoji": "text",
      "count": 1,
      "users": [
        {
          "user": {
            "object": "user",
            "id": "text",
            "displayName": "text",
            "email": "text",
            "photoURL": "text",
            "urls": {
              "location": "https://example.com"
            }
          },
          "reactedAt": "2025-04-16T05:52:20.539Z"
        }
      ]
    }
  ],
  "body": {
    "markdown": "text"
  },
  "urls": {
    "location": "https://example.com"
  }
}

Delete a change request comment reply

delete
Authorizations
Path parameters
spaceIdstringrequired

The unique id of the space

changeRequestIdstringrequired

The unique ID of the change request or its number identifier in the space

commentIdstringrequired

The unique id of the comment

commentReplyIdstringrequired

The unique id of the comment reply

Responses
delete
DELETE /v1/spaces/{spaceId}/change-requests/{changeRequestId}/comments/{commentId}/replies/{commentReplyId} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
205

The comment has been deleted.

No Content

Was this helpful?