Create an issue comment
/repos/{owner}/{repo}/issues/{issue_number}/comments You can use the REST API to create comments on issues and pull requests. Every pull request is an issue, but not every issue is a pull request.
This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "Rate limits for the API" and "Best practices for using the REST API."
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 includebody. 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 includebody_text.application/vnd.github.html+json: Returns HTML rendered from the body's markdown. Response will includebody_html.application/vnd.github.full+json: Returns raw, text, and HTML representations. Response will includebody,body_text, andbody_html.
Parameters
path Path Parameters
| Name | Type |
|---|---|
owner
required
The account owner of the repository. The name is not case sensitive. | string |
repo
required
The name of the repository without the | string |
issue_number
required
The number that identifies the issue. | number |
Request Body
Responses
Response
id: number;
node_id: string;
url: string;
body?: string;
body_text?: string;
body_html?: string;
html_url: string;
user:
created_at: string;
updated_at: string;
issue_url: string;
author_association?:
performed_via_github_app?:
reactions?:
}
Client Errors
Forbidden
message?: string;
documentation_url?: string;
url?: string;
status?: string;
}
Resource not found
message?: string;
documentation_url?: string;
url?: string;
status?: string;
}
Gone
message?: string;
documentation_url?: string;
url?: string;
status?: string;
}
Validation failed, or the endpoint has been spammed.
message: string;
documentation_url: string;
errors?: {
resource?: string;
field?: string;
message?: string;
code: string;
index?: number;
value?: string[] | string | number | null;
}[];
}