Sample - GitHub REST API
PATCH/repos/{owner}/{repo}/issues/comments/{comment_id}

Update an issue comment

You can use the REST API to update comments on issues and pull requests. Every pull request is an issue, but not every issue is a pull request.

This endpoint supports the following custom media types. For more information, see "Media types."

  • application/vnd.github.raw+json: Returns the raw markdown body. Response will include body. This is the default if you do not pass any specific media type.
  • application/vnd.github.text+json: Returns a text only representation of the markdown body. Response will include body_text.
  • application/vnd.github.html+json: Returns HTML rendered from the body's markdown. Response will include body_html.
  • application/vnd.github.full+json: Returns raw, text, and HTML representations. Response will include body, body_text, and body_html.
  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

3 parameters · 1 body field
ownerstringrequired
The account owner of the repository. The name is not case sensitive.
repostringrequired
The name of the repository without the `.git` extension. The name is not case sensitive.
comment_idintegerrequired
The unique identifier of the comment.
bodystringrequired
The contents of the comment.

2 status codes
200Response
idintegerrequired
Unique identifier of the issue comment
node_idstringrequired
urlstringrequired
URL for the issue comment
bodystringoptional
Contents of the issue comment
body_textstringoptional
body_htmlstringoptional
html_urlstringrequired
userobjectrequired
A GitHub user.
created_atstringrequired
updated_atstringrequired
issue_urlstringrequired
author_associationstringoptional
How the author is associated with the repository.
Allowed:COLLABORATORCONTRIBUTORFIRST_TIMERFIRST_TIME_CONTRIBUTORMANNEQUINMEMBERNONEOWNER
performed_via_github_appobjectoptional
GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub.
reactionsobjectoptional
pinobjectoptional
Context around who pinned an issue comment and when it was pinned.
minimizedobjectoptional
Details about why an issue comment was minimized.
422Validation failed, or the endpoint has been spammed.
messagestringrequired
documentation_urlstringrequired
errorsarray<object>optional

Error handling

A 422 is returned: Validation failed, or the endpoint has been spammed.