API / use-markdown-in-origin-check-run-annotation-messages

API

Use Markdown in Origin check run annotation messages

As of the September 22, 2026 Origin changelog, a check run annotation message can contain Markdown. Origin renders it on the pull request page in both the Checks tab and the inline card on Changes. rawDetails stays plain text.

Accepted on Post Check Run and Batch Upsert Check Runs, and returned by Get Check Run. The OpenAPI CheckRunAnnotationInput.message description also states the field may contain Markdown (including Create Check Run Annotations).

Origin is in Early Beta and subject to change. Authenticate with an installation access token (oit_…) that carries repository:checks:write to post, or repository:checks:read to get.

Post with Markdown in message

Include annotations on the check run body (Post / Batch Upsert), or append later with Create Check Run Annotations. Put Markdown in message; leave rawDetails as plain text when you need an unrendered dump.

curl --request POST \
  --url 'https://api.cursor.com/v1/origin/repos/OWNER_SLUG/REPO_NAME/check-runs' \
  --header 'Authorization: Bearer oit_...' \
  --header 'Content-Type: application/json' \
  --data '{
  "headSha": "9a41f0c3d2b8e7f6a5c4d3e2f1b0a9c8d7e6f5a4",
  "checkSuite": { "key": "ci-8842", "name": "CI" },
  "checkRun": {
    "key": "ci-8842-lint",
    "name": "lint",
    "status": "completed",
    "conclusion": "neutral",
    "externalUpdatedAt": "2026-09-22T18:00:00Z",
    "externalId": "run-8842-lint",
    "annotations": [
      {
        "annotationLevel": "warning",
        "title": "Unused import",
        "message": "Remove unused import in `src/telemetry.ts`.\n\nSee the [style guide](https://example.com/style).",
        "rawDetails": "eslint: no-unused-vars at src/telemetry.ts:42",
        "location": {
          "path": "src/telemetry.ts",
          "startLine": 42,
          "endLine": 42
        }
      }
    ]
  }
}'

Read it back

  1. Call Get Check Run for the cr_… id.
  2. Read each annotation's message as Markdown-capable text.
  3. Treat rawDetails as plain text for logs or copy-paste; do not expect Origin to render it as Markdown on the PR page.

Append-only batches: Create Origin Check Run Annotations via the API. Upsert outcome values: Read Origin Check Run Upsert Outcome via the API.

Pitfalls

  • message max size is 65,535 UTF-8 bytes; title max is 255 Unicode characters.
  • Do not put secrets in message — it renders on the PR page.
  • Do not assume rawDetails renders as Markdown on Checks or Changes; the changelog keeps it plain text.
  • A stale Post / Batch Upsert still returns HTTP 200 with the stored run; read outcome / results[].outcome to tell writes apart.