API / list-origin-check-run-annotations-via-api

API

List Origin Check Run Annotations via the API

Page through annotations on one check run with GET https://api.cursor.com/v1/origin/repos/{ownerSlug}/{repoName}/check-runs/{checkRunId}/annotations. Official reference: Origin API → Checks / List Check Run Annotations (OpenAPI OriginService_ListCheckRunAnnotations).

Origin is in Early Beta and subject to change. Authenticate with an installation access token (oit_…) or a user access token that carries repository:checks:read. Availability: Early Beta per the API overview.

Annotations come back in ascending id order (creation order). Annotation ids are time-sortable TypeIDs prefixed cra_…. Default page size is 30; values above 100 clamp to 100. A supplied pageToken fixes page size and scope, so pageSize is ignored on follow-up pages.

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
checkRunId yes Server-assigned check-run id (cr_…)

Query parameters

Param Required Meaning
pageSize no Max annotations to return (default 30, max 100)
pageToken no Opaque cursor from a previous nextPageToken
curl --request GET \
  --url 'https://api.cursor.com/v1/origin/repos/OWNER_SLUG/REPO_NAME/check-runs/cr_01k2ja2000e0080000000000g7/annotations?pageSize=30' \
  --header 'Authorization: Bearer YOUR_ORIGIN_TOKEN'

Response

The body carries annotations and an optional nextPageToken (empty when no next page). Each annotation includes id, checkRunId, annotationLevel (notice, warning, or failure), message, optional title / rawDetails, timestamps, and optional location.

Example shape from the OpenAPI:

{
  "annotations": [
    {
      "id": "cra_01k2ja2000e0080000000000v1",
      "checkRunId": "cr_01k2ja2000e0080000000000g7",
      "annotationLevel": "warning",
      "message": "Deprecated API usage; migrate to the v2 client.",
      "title": "Deprecated API",
      "createdAt": "2026-08-02T14:45:00Z",
      "updatedAt": "2026-08-02T14:45:00Z",
      "location": {
        "path": "src/telemetry.ts",
        "startLine": 42,
        "endLine": 42
      }
    }
  ]
}

Append annotations with the create-annotations how-to (1–25 per request, durable cap 100), then list them here for review UIs.

Base URL: https://api.cursor.com/v1/origin.