Skip to content

Delete organization discussion

DELETE /api/v5/orgs/{org}/discuss/{number}

This endpoint deletes a discussion under the specified organization. It locates the target discussion by organization path and discussion number, and returns status code 200 with an empty response body on success.

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
org path string Yes Organization path (path)
number path integer Yes Discussion number; must be a non-negative integer (@PositiveNumber)
access_token query string Yes User authorization code

Request example

Parameter description

Replace <org> with the organization address path (the path of an enterprise, organization, or individual); Replace <number> with the discussion number of the organization discussion to delete (a non-negative integer); Replace <token> with your AtomGit user access token.

cURL

curl -X DELETE 'https://api.atomgit.com/api/v5/orgs/<org>/discuss/<number>?access_token=<token>'

JavaScript

// Native fetch (Node.js 18+ / browser)
const response = await fetch("https://api.atomgit.com/api/v5/orgs/<org>/discuss/<number>?access_token=<token>", {
  method: "DELETE",
});

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

console.log(`Deleted successfully: HTTP ${response.status}`);

Python

import requests

resp = requests.delete(
    "https://api.atomgit.com/api/v5/orgs/<org>/discuss/<number>",
    params={"access_token": "<token>"},
    timeout=10,
)
resp.raise_for_status()

print(resp.status_code)

Response parameters

After the discussion is deleted successfully, this endpoint returns 200 OK with an empty response body and no returned fields.

Response example

Status code: 200

{} 

Error response

When the request fails, the endpoint returns the corresponding HTTP status code, and the response body contains the error message (the field names are subject to what is actually returned).

400 Parameter error

{
  "errorCode": 400,
  "errorCodeName": "BAD_REQUEST",
  "errorMessage": "Parameter type error",
  "traceId": ""
}

401 Unauthenticated

{
  "errorCode": 401,
  "errorCodeName": "UNAUTHORIZED",
  "errorMessage": "Unauthorized",
  "traceId": ""
}

404 Not found

{
  "errorCode": 404,
  "errorCodeName": "NOT_FOUND",
  "errorMessage": "Not Found",
  "traceId": ""
}

HTTP response status codes

Status code Description
200 Success (OK), deleted successfully
400 Parameter error (Bad Request)
401 Authentication required (Requires authentication)
403 Access forbidden (Forbidden)
404 Organization or discussion not found (Not Found)
429 Too many requests
500 Internal server error

Error codes

Error code Description
400 Parameter error or unparsable request
401 Unauthenticated or invalid credentials (missing/invalid access credentials)
403 You do not have permission to perform the delete operation
404 Organization or discussion does not exist
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