Skip to content

Delete a specific Issue comment

DELETE /api/v5/repos/{owner}/{repo}/issues/comments/{id}

This endpoint deletes a specific comment under an issue in the specified repository, making it easy to remove unwanted or outdated discussion content. After a successful operation, the comment is no longer displayed.

Access token support

  • AtomGit user access token (AtomGit user access tokens)

Anonymous access

This endpoint does not allow anonymous access.

Request parameters

Parameter Location Type Required Description
owner path string Yes Namespace address that owns the repository (path of an organization or personal address)
repo path string Yes Repository path (path)
id path string Yes Comment ID
access_token query string Yes User access token

Response parameters

On success, the endpoint returns an empty JSON object {} with no response fields.

Error responses

401 Unauthenticated

{
  "error": "unauthorized",
  "message": "Missing or invalid access token"
}

404 Comment not found

{
  "error": "not_found",
  "message": "Comment not found"
}

Note: The field structure of the above error responses is illustrative; the actual response is subject to the server.

HTTP response status codes

Status code Description
200 Success (OK)
401 Requires authentication
404 Comment not found (Not found)

Request example

Parameter notes

Replace <owner> with the namespace address that owns the repository (path of an organization or personal address); replace <repo> with the repository path (path); replace <id> with the comment ID; replace <token> with your AtomGit user access token.

cURL

curl -X DELETE 'https://api.atomgit.com/api/v5/repos/<owner>/<repo>/issues/comments/<id>?access_token=<token>' \
  -H 'Accept: application/json'

JavaScript

// Native fetch (Node.js 18+ / browser)
const response = await fetch(
  "https://api.atomgit.com/api/v5/repos/<owner>/<repo>/issues/comments/<id>?access_token=<token>",
  {
    method: "DELETE",
    headers: {
      "Accept": "application/json",
    },
  }
);

if (!response.ok) {
  throw new Error(`Request failed: ${response.status}`);
}

const data = await response.json();
console.log(data);

Python

import requests

resp = requests.delete(
    "https://api.atomgit.com/api/v5/repos/<owner>/<repo>/issues/comments/<id>",
    params={"access_token": "<token>"},
    headers={"Accept": "application/json"},
    timeout=10,
)
resp.raise_for_status()

print(resp.json())

Response example

Status code: 200

{}

Error codes

Error code Description
401 Unauthenticated or invalid credentials (missing/invalid access credentials)
404 Request path not found or comment not found
429 Too many requests; rate limit triggered
500 Internal server error

Markdown source: View on AtomGit·Content from the open-source project gitcode-dev/atomgit-api-doc