
Get Origin Tag via the API
Return an annotated Git tag object by SHA with GET https://api.cursor.com/v1/origin/repos/{ownerSlug}/{repoName}/git/tags/{sha}. Official reference: Origin API (OpenAPI OriginService_GetTag).
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.
Path sha must be the full or abbreviated hex SHA of an annotated tag object. Lightweight tags are not tag objects and return 404. Empty repositories return 409 Conflict. Not-found and no-access are deliberately indistinguishable.
Cost: 1 point against the principal budget (ordinary read).
Path parameters
| Param | Required | Meaning |
|---|---|---|
ownerSlug |
yes | Owning entity's unique slug |
repoName |
yes | Repo name, unique to the owner |
sha |
yes | Full or abbreviated hex SHA of the annotated tag object |
curl --request GET \
--url 'https://api.cursor.com/v1/origin/repos/OWNER_SLUG/REPO_NAME/git/tags/e1f0a9b8c7d6e5f4a3b2c1d0e9f8a7b6c5d4e3f2' \
--header 'Authorization: Bearer YOUR_ORIGIN_TOKEN'
Response
200 returns a GitTag:
| Field | Meaning |
|---|---|
sha |
Hex SHA of the tag object |
tag |
Tag name (for example v1.2.0) |
message |
Tag message body |
tagger |
name, email, and date (RFC 3339) of the tagger |
object |
Target object: sha plus type (commit, tree, blob, or tag) |
{
"sha": "e1f0a9b8c7d6e5f4a3b2c1d0e9f8a7b6c5d4e3f2",
"tag": "v1.2.0",
"message": "Release v1.2.0",
"tagger": {
"name": "Jane Doe",
"email": "jane@acme.dev",
"date": "2026-08-01T09:30:00Z"
},
"object": {
"sha": "9a41f0c3d2b8e7f6a5c4d3e2f1b0a9c8d7e6f5a4",
"type": "commit"
}
}
Resolve a tag name to an object SHA with Get Git Ref (refs/tags/…) before calling Get Tag when you only have the name. Base URL: https://api.cursor.com/v1/origin.