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-12T21:04:01.285Z",
  "editedAt": "2025-04-12T21:04:01.285Z",
  "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-12T21:04:01.285Z"
        }
      ]
    }
  ],
  "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-12T21:04:01.285Z",
      "updatedAt": "2025-04-12T21:04:01.285Z",
      "path": "text",
      "outdated": true
    },
    "space": "text",
    "revision": "text"
  },
  "urls": {
    "location": "https://example.com"
  },
  "status": "resolved",
  "resolvedAt": "2025-04-12T21:04:01.285Z",
  "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
curl -L \
  --url 'https://api.gitbook.com/v1/spaces/{spaceId}/change-requests/{changeRequestId}/comments' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "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-12T21:04:01.285Z",
      "editedAt": "2025-04-12T21:04:01.285Z",
      "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-12T21:04:01.285Z"
            }
          ]
        }
      ],
      "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-12T21:04:01.285Z",
          "updatedAt": "2025-04-12T21:04:01.285Z",
          "path": "text",
          "outdated": true
        },
        "space": "text",
        "revision": "text"
      },
      "urls": {
        "location": "https://example.com"
      },
      "status": "resolved",
      "resolvedAt": "2025-04-12T21:04:01.285Z",
      "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
curl -L \
  --request POST \
  --url 'https://api.gitbook.com/v1/spaces/{spaceId}/change-requests/{changeRequestId}/comments' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
    "node": "text",
    "page": "text",
    "body": {
      "markdown": "text"
    }
  }'
{
  "object": "comment",
  "id": "text",
  "postedBy": {
    "object": "user",
    "id": "text",
    "displayName": "text",
    "email": "text",
    "photoURL": "text",
    "urls": {
      "location": "https://example.com"
    }
  },
  "postedAt": "2025-04-12T21:04:01.285Z",
  "editedAt": "2025-04-12T21:04:01.285Z",
  "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-12T21:04:01.285Z"
        }
      ]
    }
  ],
  "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-12T21:04:01.285Z",
      "updatedAt": "2025-04-12T21:04:01.285Z",
      "path": "text",
      "outdated": true
    },
    "space": "text",
    "revision": "text"
  },
  "urls": {
    "location": "https://example.com"
  },
  "status": "resolved",
  "resolvedAt": "2025-04-12T21:04:01.285Z",
  "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
curl -L \
  --url 'https://api.gitbook.com/v1/spaces/{spaceId}/change-requests/{changeRequestId}/comments/{commentId}' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "object": "comment",
  "id": "text",
  "postedBy": {
    "object": "user",
    "id": "text",
    "displayName": "text",
    "email": "text",
    "photoURL": "text",
    "urls": {
      "location": "https://example.com"
    }
  },
  "postedAt": "2025-04-12T21:04:01.285Z",
  "editedAt": "2025-04-12T21:04:01.285Z",
  "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-12T21:04:01.285Z"
        }
      ]
    }
  ],
  "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-12T21:04:01.285Z",
      "updatedAt": "2025-04-12T21:04:01.285Z",
      "path": "text",
      "outdated": true
    },
    "space": "text",
    "revision": "text"
  },
  "urls": {
    "location": "https://example.com"
  },
  "status": "resolved",
  "resolvedAt": "2025-04-12T21:04:01.285Z",
  "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
curl -L \
  --request PUT \
  --url 'https://api.gitbook.com/v1/spaces/{spaceId}/change-requests/{changeRequestId}/comments/{commentId}' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
    "resolved": true,
    "body": {
      "markdown": "text"
    },
    "addedReactions": [
      "text"
    ],
    "removedReactions": [
      "text"
    ]
  }'
{
  "object": "comment",
  "id": "text",
  "postedBy": {
    "object": "user",
    "id": "text",
    "displayName": "text",
    "email": "text",
    "photoURL": "text",
    "urls": {
      "location": "https://example.com"
    }
  },
  "postedAt": "2025-04-12T21:04:01.285Z",
  "editedAt": "2025-04-12T21:04:01.285Z",
  "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-12T21:04:01.285Z"
        }
      ]
    }
  ],
  "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-12T21:04:01.285Z",
      "updatedAt": "2025-04-12T21:04:01.285Z",
      "path": "text",
      "outdated": true
    },
    "space": "text",
    "revision": "text"
  },
  "urls": {
    "location": "https://example.com"
  },
  "status": "resolved",
  "resolvedAt": "2025-04-12T21:04:01.285Z",
  "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
curl -L \
  --request DELETE \
  --url 'https://api.gitbook.com/v1/spaces/{spaceId}/change-requests/{changeRequestId}/comments/{commentId}' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'

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
curl -L \
  --url 'https://api.gitbook.com/v1/spaces/{spaceId}/change-requests/{changeRequestId}/comments/{commentId}/replies' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "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-12T21:04:01.285Z",
      "editedAt": "2025-04-12T21:04:01.285Z",
      "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-12T21:04:01.285Z"
            }
          ]
        }
      ],
      "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
curl -L \
  --request POST \
  --url 'https://api.gitbook.com/v1/spaces/{spaceId}/change-requests/{changeRequestId}/comments/{commentId}/replies' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
    "body": {
      "markdown": "text"
    }
  }'
{
  "object": "comment-reply",
  "id": "text",
  "postedBy": {
    "object": "user",
    "id": "text",
    "displayName": "text",
    "email": "text",
    "photoURL": "text",
    "urls": {
      "location": "https://example.com"
    }
  },
  "postedAt": "2025-04-12T21:04:01.285Z",
  "editedAt": "2025-04-12T21:04:01.285Z",
  "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-12T21:04:01.285Z"
        }
      ]
    }
  ],
  "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
curl -L \
  --url 'https://api.gitbook.com/v1/spaces/{spaceId}/change-requests/{changeRequestId}/comments/{commentId}/replies/{commentReplyId}' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "object": "comment-reply",
  "id": "text",
  "postedBy": {
    "object": "user",
    "id": "text",
    "displayName": "text",
    "email": "text",
    "photoURL": "text",
    "urls": {
      "location": "https://example.com"
    }
  },
  "postedAt": "2025-04-12T21:04:01.285Z",
  "editedAt": "2025-04-12T21:04:01.285Z",
  "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-12T21:04:01.285Z"
        }
      ]
    }
  ],
  "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
curl -L \
  --request PUT \
  --url 'https://api.gitbook.com/v1/spaces/{spaceId}/change-requests/{changeRequestId}/comments/{commentId}/replies/{commentReplyId}' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
    "resolved": true,
    "body": {
      "markdown": "text"
    },
    "addedReactions": [
      "text"
    ],
    "removedReactions": [
      "text"
    ]
  }'
{
  "object": "comment-reply",
  "id": "text",
  "postedBy": {
    "object": "user",
    "id": "text",
    "displayName": "text",
    "email": "text",
    "photoURL": "text",
    "urls": {
      "location": "https://example.com"
    }
  },
  "postedAt": "2025-04-12T21:04:01.285Z",
  "editedAt": "2025-04-12T21:04:01.285Z",
  "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-12T21:04:01.285Z"
        }
      ]
    }
  ],
  "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
curl -L \
  --request DELETE \
  --url 'https://api.gitbook.com/v1/spaces/{spaceId}/change-requests/{changeRequestId}/comments/{commentId}/replies/{commentReplyId}' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'

No Content

Was this helpful?