
Get Origin Git Commit via the API
Read a Git commit object with GET https://api.cursor.com/v1/origin/repos/{ownerSlug}/{repoName}/git/commits/{sha}. Official reference: Origin API (OpenAPI OriginService_GetGitCommit).
Origin is in Early Beta and subject to change. Authenticate with an installation access token (oit_…) or a user access token that carries repository:contents:read. Availability: Early Beta per the API overview.
OpenAPI documents this as the low-level Git Database commit shape: flat author / committer / message / tree / parents. The path is under /git/commits/{sha}. The sha path segment accepts a commit SHA, branch, tag, or symbolic ref such as HEAD. An empty repository returns 409 Conflict.
Cost: 1 point against the principal budget (ordinary read). The heavier Get Commit operation under /commits/{sha} is listed separately in the docs rate table at 5 points.
Path parameters
| Param | Required | Meaning |
|---|---|---|
ownerSlug |
yes | Owning entity's unique slug |
repoName |
yes | Repo name, unique to the owner |
sha |
yes | Commit SHA (full or abbreviated), branch, tag, or HEAD |
curl --request GET \
--url 'https://api.cursor.com/v1/origin/repos/OWNER_SLUG/REPO_NAME/git/commits/HEAD' \
--header 'Authorization: Bearer YOUR_ORIGIN_TOKEN'
Response
200 returns sha (full hex), author and committer objects with name, email, and date (ISO-8601 preserving the git signature timezone offset), full message, tree.sha, and parents as an array of { "sha": "…" } (empty for a root commit). Author and committer are the identities recorded in the commit object.
{
"sha": "9a41f0c3d2b8e7f6a5c4d3e2f1b0a9c8d7e6f5a4",
"author": {
"name": "Jane Doe",
"email": "jane@acme.dev",
"date": "2026-08-02T14:45:00Z"
},
"committer": {
"name": "Jane Doe",
"email": "jane@acme.dev",
"date": "2026-08-02T14:45:00Z"
},
"message": "Ship telemetry schema\n",
"tree": {
"sha": "3b1f9c2d8a7e6f5049c8b7a6d5e4f3a2b1c0d9e8"
},
"parents": [
{
"sha": "1c0d9e8f7a6b5c4d3e2f1a0b9c8d7e6f5a4b3c2d"
}
]
}
Base URL: https://api.cursor.com/v1/origin.