
Update an Origin Pull Request Thread via the API
Resolve or reopen a comment thread with PATCH https://api.cursor.com/v1/origin/repos/{ownerSlug}/{repoName}/pulls/threads/{threadId}. Official reference: Origin API → Update Pull Request Thread (OpenAPI OriginService_UpdatePullRequestThread). Changelog notes: August 29, 2026 (endpoint added; idempotent resolve/reopen), September 16, 2026 (OpenAPI schema renamed Thread → CommentThread; wire JSON unchanged).
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.
Resolving an already-resolved thread, or reopening an already-open one, is a no-op. The thread must belong to the repository in the path; a thread stored on another repository returns 404. A 404 never distinguishes a missing thread from one your installation cannot reach. Replying to a resolved thread with Create Pull Request Comment is allowed and does not reopen it.
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 |
threadId |
yes | Stable Origin thread id (e.g. cth_…) |
Request body
| Field | Required | Meaning |
|---|---|---|
resolved |
yes | Target resolution state. true resolves the thread; false reopens it |
curl --request PATCH \
--url 'https://api.cursor.com/v1/origin/repos/OWNER_SLUG/REPO_NAME/pulls/threads/cth_01k2ja2000e0080000000000s6' \
--header 'Authorization: Bearer YOUR_ORIGIN_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"resolved": true
}'
Reopen:
curl --request PATCH \
--url 'https://api.cursor.com/v1/origin/repos/OWNER_SLUG/REPO_NAME/pulls/threads/cth_01k2ja2000e0080000000000s6' \
--header 'Authorization: Bearer YOUR_ORIGIN_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"resolved": false
}'
Response
200 returns a CommentThread: id, filed-against version, diff anchor (path, side, startLine, endLine), resolvedAt, createdAt, updatedAt.
{
"id": "cth_01k2ja2000e0080000000000s6",
"version": {
"number": "3",
"headSha": "9a41f0c3d2b8e7f6a5c4d3e2f1b0a9c8d7e6f5a4",
"baseSha": "3b1f9c2d8a7e6f5049c8b7a6d5e4f3a2b1c0d9e8",
"createdAt": "2026-08-01T09:30:00Z"
},
"path": "src/telemetry/retry.ts",
"side": "right",
"startLine": 42,
"endLine": 45,
"resolvedAt": "2026-08-03T10:00:00Z",
"createdAt": "2026-08-01T09:30:00Z",
"updatedAt": "2026-08-03T10:00:00Z"
}
path is empty on general-discussion threads; resolvedAt is unset while the thread is open; startLine / endLine are 0 for file-level and general-discussion threads. List or Get Pull Request Comments to read comments inside the thread.
Base URL: https://api.cursor.com/v1/origin.