
Delete an Origin Pull Request Comment via the API
Remove a pull request comment by its Origin id with DELETE https://api.cursor.com/v1/origin/repos/{ownerSlug}/{repoName}/pulls/comments/{commentId}. Official reference: Origin API → Delete Pull Request Comment (OpenAPI OriginService_DeletePullRequestComment). Changelog: September 22, 2026.
Origin is in Early Beta and subject to change. Authenticate with an installation access token (oit_…) or a user access token that carries repository:pull_requests:reviews:write. Availability: Early Beta per the API overview.
The comment's author can always delete it. Any other caller must also hold write access to the repository through repository:contents:write, or the call returns PermissionDenied (HTTP 403). Deleting the last comment of a thread removes the thread. Deleting any other comment leaves the thread in place. The comment's reactions and edit history go with it. An unknown or already-deleted id returns 404.
Cost: 5 points against the principal budget (ordinary write).
Path parameters
| Param | Required | Meaning |
|---|---|---|
ownerSlug |
yes | Owning entity's unique slug |
repoName |
yes | Repo name, unique to the owner |
commentId |
yes | Origin comment id |
curl --request DELETE \
--url 'https://api.cursor.com/v1/origin/repos/OWNER_SLUG/REPO_NAME/pulls/comments/COMMENT_ID' \
--header 'Authorization: Bearer YOUR_ORIGIN_TOKEN'
Response
204 with an empty body.
Related
- Create a comment: Create an Origin Pull Request Comment via the API.
- Update a comment: Update an Origin Pull Request Comment via the API.
- List comments: List Origin Pull Request Comments via the API.
Pitfalls
- A 404 never confirms the comment is gone versus unreachable to this credential.
- Non-authors need
repository:contents:writein addition to reviews write, or they get 403.