Skip to content

Get a changeset

A changeset by its `set_` ID

GET /api/v1/changesets/{changeset}

Personal token · read

Example request

Link to this section
Shell
# Set your token and resource IDs first.
API_BASE_URL="https://app.theseus.dev/api/v1"

curl --fail-with-body --request GET \
  -H "Authorization: Bearer ${THESEUS_API_TOKEN:?}" \
  "${API_BASE_URL}/changesets/${CHANGESET_ID:?}"
NameInTypeDescription
changeset requiredpathstringA set_ ID

Pattern ^set_[0-9A-Z]{26}$

The changeset

Response fields

Content type application/json

  • id string required

    Example set_01K6Z3M4N5P6Q7R8S9T0V1W2X3

  • path string required

    The readable path, which the web app shows after the workspace host

    Example acme/widgets/pr/71

  • kind string required

    A pull request, a hosted branch, or your own local branch

    One of pr, branch, local

  • number integer or null required

    The pull request number

  • ref string or null required

    The branch name, for a hosted or local branch; null for a PR

  • owner string or null required

    A local branch's owner's GitHub login; null otherwise

  • title string required

  • url string (uri) required

    The changeset in the web app

  • workspace object required

    workspace fields
    • id string required

    • slug string required

  • repository Repository required

    repository fields
    • id string required

      Example rep_01K6Z3M4N5P6Q7R8S9T0V1W2X3

    • github_id integer required

    • full_name string required

      Example acme/widgets

  • latest_guide object or null required

    The newest ready guide, which the web app shows by default

    latest_guide fields
    • id string required

      Example ver_01K6Z3M4N5P6Q7R8S9T0V1W2X3

    • head_sha string required

    • created_at string required

  • newest_run object or null required

    The newest run generating a guide, which may still be going

    newest_run fields
    • id string or null required

      Null for guides older than runs

    • status string required

      New statuses may be added; tolerate one you do not know

      One of queued, running, succeeded, failed

    • error string or null required

    • guide_id string required

      The guide the run generates

  • pull_request object or null required

    pull_request fields
    • number integer required

    • head_sha string or null required

      Null until Theseus has seen it

    • head_branch string or null required

      The observed PR head branch

    • state string or null required

      One of open, closed, merged, null

  • behind_head boolean or null required

    Whether the pull request's head has moved past the latest ready guide; null when either is unknown

Example responses

Link to this section

Pull request

Illustrative response · selected fields

{
  "id": "set_EXAMPLE",
  "path": "example/project/pr/42",
  "kind": "pr",
  "title": "Keep notifications enabled after reconnecting",
  "url": "https://example-team.theseus.dev/example/project/pr/42",
  "latest_guide": {
    "id": "ver_EXAMPLE",
    "head_sha": "0123456789abcdef0123456789abcdef01234567",
    "created_at": "2026-10-08T12:00:00Z"
  },
  "newest_run": {
    "id": "run_EXAMPLE",
    "status": "succeeded",
    "error": null,
    "guide_id": "ver_EXAMPLE"
  },
  "behind_head": false
}
400 · The request is not valid

Error response fields

401 · A valid bearer token is required

Error response fields

403 · The credential's scopes do not allow this

Error response fields

404 · Not found

Error response fields

426 · Upgrade the CLI: run theseus update

Error response fields

429 · Too many requests

Headers

  • Retry-After integer

    Seconds to wait before the next request, when known

Error response fields

503 · Theseus is unavailable; retry the same request

Headers

  • Retry-After integer

    Seconds to wait before the next request, when known

Error response fields

Error response fields

Content type application/problem+json

  • type string (uri) required

    Identifies the problem type; branch on code instead

  • title string required

  • status integer required

  • detail string

  • code string required

    Why the request failed. New codes may be added: treat an unknown one by its status

    One of invalid_request, unauthenticated, not_in_plan, insufficient_scope, admission_required, not_found, ambiguous, conflict, rate_limited, internal_error, unavailable, search_authorization_pending, search_unavailable, cli_upgrade_required

  • request_id string required

    Quote this when reporting the problem

  • errors array of FieldError

    With invalid_request: what is wrong with each field

    errors fields
    • path string required

      Where in the request, as dotted segments

    • message string required

  • required_scope string

    With insufficient_scope: the scope the operation needs

  • next string

    Recovery action, such as theseus update

  • candidates array of Candidate

    With ambiguous: what the request could mean; ask which

    candidates fields
    • id string required

    • path string required

    • kind string required

    • title string required

    • url string (uri) required