# Post a GitHub Issue Comment API

> Post one comment on a GitHub issue or pull request as the supplied token's account. Returns the new comment id and URL. Bring your own GitHub token: a fine-grained PAT with the 'Issues' repository permission (write), plus 'Pull requests' (write) for a pull request, or a classic PAT with 'public_repo' (broad). The token is used for this one call, never stored; sent only to api.github.com. Never retried here, so a client retry can post a duplicate comment and bill twice: over the HTTP API, send an Idempotency-Key header and reuse it on every retry; MCP callers should check for an existing comment before retrying.

Category: [Developer Tools APIs](https://upapi.io/apis/developer-tools) · Last updated 2026-11-07

## How to call it

- Endpoint: `POST https://api.upapi.io/github-issue-comment.post`, key in the `X-Api-Key` header, JSON body.
- Cost: 1 weighted unit per call.
- Timeout: 30 seconds.
- Cache: none; every call runs the operation.
- Try it without writing code: https://app.upapi.io/try/github-issue-comment.post

```bash
curl -X POST https://api.upapi.io/github-issue-comment.post \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: YOUR_API_KEY' \
  -d '{ "body": "example", "repo": "playwright", "owner": "microsoft", "token": "example", "issueNumber": 1 }'
```

## Request parameters

- `body` (string, required) — Comment body (GitHub-flavoured markdown)
- `repo` (string, required) — Repo name
- `owner` (string, required) — Repo owner (user or org)
- `token` (string, required) — GitHub token of the account that will comment. Fine-grained PAT: 'Issues' repository permission (write), plus 'Pull requests' (write) to comment on a pull request; classic PAT: 'public_repo' ('repo' for a private repository; broad, prefer fine-grained). Used for this one call, never stored; sent only to api.github.com.
- `proxyUrl` (string) — Optional proxy URL. Use the same one across related calls when the upstream expects a consistent IP.
- `issueNumber` (integer, required) — Issue or pull request number

## Response fields

- `author` (string, required)
- `htmlUrl` (string, required)
- `postedAt` (string, required)
- `commentId` (integer, required)
- `createdAt` (string, required)
- `rateLimit` (object, required) — The rate-limit headers GitHub returned on THIS response, surfaced so the caller
can pace itself instead of the operation sleeping on its behalf.
- `rateLimit.limit` (integer, required) — X-RateLimit-Limit: requests allowed per window
- `rateLimit.resetAt` (string, required) — X-RateLimit-Reset as an ISO-8601 UTC timestamp
- `rateLimit.resource` (string, required) — X-RateLimit-Resource: which bucket (core, search, graphql, ...)
- `rateLimit.remaining` (integer, required) — X-RateLimit-Remaining: requests left
- `rateLimit.resetEpoch` (integer, required) — X-RateLimit-Reset as unix seconds

## Example request and response

The example response is generated from the published output schema: it shows the shape and field names, not values from a recorded call.

```json
{
  "body": "example",
  "repo": "playwright",
  "owner": "microsoft",
  "token": "example",
  "issueNumber": 1
}
```

```json
{
  "author": "example",
  "htmlUrl": "example",
  "postedAt": "example",
  "commentId": 1,
  "createdAt": "example",
  "rateLimit": {
    "limit": 5,
    "resetAt": "example",
    "resource": "example",
    "remaining": 1,
    "resetEpoch": 1
  }
}
```

## Frequently asked questions

### How much does the Post a GitHub Issue Comment API cost per call?

Each call spends 1 weighted unit of your plan's monthly quota. Full pricing is at https://upapi.io/pricing.

### How do I authenticate to the Post a GitHub Issue Comment API?

Send your key in the X-Api-Key header. A free guest key is available without creating an account.

### Are Post a GitHub Issue Comment API responses cached?

No — every call runs the operation live; responses are not cached.

## More Developer Tools APIs

- [React to a GitHub Issue Comment](https://upapi.io/apis/developer-tools/github-comment-reaction)
- [List GitHub Issue Comments](https://upapi.io/apis/developer-tools/github-issue-comments)
- [Search GitHub Issues](https://upapi.io/apis/developer-tools/github-search-issues)
- [Star or Unstar a GitHub Repository](https://upapi.io/apis/developer-tools/github-repo-star)
- [Follow or Unfollow a GitHub User](https://upapi.io/apis/developer-tools/github-user-follow)
- [List GitHub Repository Issues](https://upapi.io/apis/developer-tools/github-repo-issues)
- [Search GitHub Discussions](https://upapi.io/apis/developer-tools/github-search-discussions)
- [Search GitHub Repositories](https://upapi.io/apis/developer-tools/github-search-repos)
