Tuti APIAutopilot

Get a code change

Get a code change with its proposed actions, most likely first

GET/code-changes/{id}

Authorization Bearer token

Path parameters

  • idstring · 1–100 charactersrequired

    The code change's id

Responses

  • 200The code change

    application/json · object

    The code change

    • idstringrequired

      The code change's id

    • repostringrequired

      The repository, as owner/name

    • numberintegerrequired

      The pull request's number on GitHub

    • urlstringrequired

      The pull request on GitHub

    • titlestringrequired

      The pull request's title

    • authorstringrequired

      Its author's GitHub login

    • mergedAtstringrequired

      When it merged

    • statestringrequired

      Its analysis: analysing (for up to 30 minutes), ready, nothing_to_do, failed or paused (out of AI credits, or the plan didn't include code changes)

      One of"analysing""ready""nothing_to_do""failed""paused"

    • reasonstringrequired

      Why there's nothing to do, where it failed, or why it's paused; empty otherwise

    • retryAtstring · nullablerequired

      Failed because the AI provider didn't answer: when it's analysed again by itself (null: it isn't)

    • summarystringrequired

      What changed for users, as Autopilot read it

    • waitingintegerrequired

      Proposed actions waiting for the team

    • tunedarray of stringrequired

      The Advanced tuning values its analysis ran with that the project changed, by path

    • whystringrequired

      Why Autopilot proposes its actions

    • changelogobject · nullablerequired

      The changelog entry with the pull request's bullet, if one has it

      Show 2 properties
      • numberintegerrequired

        The entry's number

      • titlestringrequired

        The entry's title

    • actionsarray of CodeChangeActionrequired

      Its proposed actions, most likely first

      Show 36 properties
      • idstringrequired

        The action's id

      • codeChangeIdstring · nullablerequired

        The code change (pull request) it's from; null for a Verify run's fix

      • createdAtstringrequired

        When it was proposed (an article's edits are layered in this order)

      • reviewPathstring · nullablerequired

        Where it's reviewed under Autopilot: feedback/<post id> or articles/<id> (codeChanges.target's type and id); null for the changelog line

      • kindstringrequired

        What it does: links the pull request to a post, resolves (completes) a post, moves_forward (a progress update), article_edit, new_article (a draft) or changelog_line

        One of"links""resolves""moves_forward""article_edit""new_article""changelog_line"

      • statusstringrequired

        pending (waiting for the team), scheduled (going out by itself after the hold), stale (out of date), applied, dismissed or undone

        One of"pending""applied""dismissed""stale""undone""scheduled"

      • probabilitynumberrequired

        How sure Autopilot is, 0 to 1

      • confidencestringrequired

        likely above its kind's threshold, else maybe

        One of"likely""maybe"

      • applyLikelybooleanrequired

        Ticked as the review page opens

      • emailedinteger

        For a post it completed or moved to In progress: how many it emailed so (Undo can't take those back)

      • emailsinteger

        For a post it completes or moves forward: how many people approving (or publishing) it emails

      • reasonstringrequired

        Why Autopilot proposes it

      • commentstring

        The team's comment, for a post it moves forward (as proposed, or as posted once applied; one completing it posted with it too)

      • postobject · nullablerequired

        The post it updates; null for an article or the changelog

        Show 10 properties
        • numberintegerrequired

          The post's number

        • titlestringrequired

          The post's title

        • statusstringrequired

          Its status

          One of"open""under_review""planned""in_progress""completed""closed"

        • boardstringrequired

          Its board's slug

        • votesintegerrequired

          How many voted for it

        • commentsintegerrequired

          How many comments it has

        • authorobjectrequired

          Who posted it

          Show 1 property
          • namestringrequired

            Their name

        • visibilitystringrequired

          Who sees it besides the team: everyone, its author, or nobody

          One of"public""private""team"

        • createdAtstringrequired

          When it was posted

        • urlstringrequired

          The post on the portal

      • articleobject · nullablerequired

        The article it edits (or, for a new article once its draft exists, the draft)

        Show 4 properties
        • slugstringrequired

          The article's slug

        • titlestringrequired

          The article's title

        • collectionstring · nullablerequired

          Its collection's name; null for none

        • draftbooleanrequired

          A draft: approving an edit keeps it in the draft, which the team publishes from Docs

      • problemstring

        An article edit's: what's wrong with the article, or missing from it

        One of"wrong""missing"

      • beforestring

        An article edit's text before (plain text)

      • afterstring

        An article edit's text after, or a new article's text (plain text)

      • revisionstring

        An article edit's own change: its tagged revision

      • basedOnstring · nullable

        The revision that edit was written on

      • titlestring

        A new article's title

      • placeobject · nullable

        A new article's: where approving saves its draft (null: in no collection). A collection deleted since is none; an article deleted or moved since, last

        Show 4 properties
        • collectionobject · nullablerequired

          An existing collection (its slug, name and Lucide icon)

          Show 3 properties
          • slugstringrequired
          • namestringrequired
          • iconstring · nullablerequired
        • newCollectionobject · nullablerequired

          A new collection approving makes, readers seeing it only once an article in it is published

          Show 2 properties
          • namestringrequired
          • iconstring · nullablerequired
        • afterArticleobject · nullablerequired

          The article it goes after; else first, else last

          Show 2 properties
          • slugstringrequired
          • titlestringrequired
        • firstbooleanrequired

          It goes first in its collection

      • linestring

        The pull request's line in the changelog (as proposed, or as written once applied)

      • decidedBystring · nullablerequired

        Who applied, dismissed, undid or stopped it, or held a comment it wasn't sure of: "Autopilot" for one it applied by itself; null while nobody has

      • autobooleanrequired

        Applied by Autopilot itself, nobody approving it

      • unsurebooleanrequired

        Autopilot went to apply it by itself and couldn't tell whether it went out: someone should check

      • unpublishedbooleanrequired

        An article edit approved into the article's unpublished changes, not published

      • canUndobooleanrequired

        Applied, with what it changed recorded: codeChangeActions.undo can put it back

      • undoRemovesCollectionstring

        A new article's draft: the collection approving made, by name, which Undo removes too

      • putsBackStatusbooleanrequired

        Undo puts the post's status back (applying moved it)

      • togetherarray of string

        A post's update applied as one, from several pull requests: its parts (this one among them), which Undo puts back together

      • decidedAtstring · nullablerequired

        When it was applied, dismissed, undone or stopped, or its comment held; null while nobody has

      • dismissReasonstringrequired

        Why it was dismissed, if someone said

      • dueAtstring · nullablerequired

        A scheduled one: when it goes out by itself

      • wouldHaveGoneOutAtstring · nullablerequired

        One someone stopped: when it would have gone out by itself

      • waitReasonstring · nullablerequired

        Why it waits for the team after all (it stopped qualifying, or someone stopped it: "Stopped by …")

  • 400The request isn't valid: a field is missing, has the wrong type or is out of range, or the body isn't a JSON object. The message names the field.

    application/json · Error

    • errorobjectrequired
      Show 2 properties
      • codestringrequired

        What went wrong, for code to check: stays the same

      • messagestringrequired

        What went wrong, for a person: may change

  • 401No API key was sent, or it isn't valid: it was revoked, or whoever created it left the team.

    application/json · Error

    • errorobjectrequired
      Show 2 properties
      • codestringrequired

        What went wrong, for code to check: stays the same

      • messagestringrequired

        What went wrong, for a person: may change

  • 404Nothing by that name, number or id in this project.

    application/json · Error

    • errorobjectrequired
      Show 2 properties
      • codestringrequired

        What went wrong, for code to check: stays the same

      • messagestringrequired

        What went wrong, for a person: may change

  • 429Too many requests: past 600 a minute per key, try again after the seconds in the Retry-After header. Some operations have limits of their own (their description gives them), whose 429 has no Retry-After.

    application/json · Error

    • errorobjectrequired
      Show 2 properties
      • codestringrequired

        What went wrong, for code to check: stays the same

      • messagestringrequired

        What went wrong, for a person: may change

  • 500Something went wrong on Tuti's side. Try again in a moment.

    application/json · Error

    • errorobjectrequired
      Show 2 properties
      • codestringrequired

        What went wrong, for code to check: stays the same

      • messagestringrequired

        What went wrong, for a person: may change

curl 'https://tuti.so/api/v1/code-changes/cm3x9a1b2c3d4e5f6g7h8i9j0' \
  --header 'Authorization: Bearer YOUR_API_KEY'
const response = await fetch("https://tuti.so/api/v1/code-changes/cm3x9a1b2c3d4e5f6g7h8i9j0", {
  method: "GET",
  headers: {
    "Authorization": "Bearer YOUR_API_KEY"
  },
});
const text = await response.text();
import requests

response = requests.get(
    "https://tuti.so/api/v1/code-changes/cm3x9a1b2c3d4e5f6g7h8i9j0",
    headers={
        "Authorization": "Bearer YOUR_API_KEY"
    },
)
print(response.text)
{
  "id": "cm3x9a1b2c3d4e5f6g7h8i9j0",
  "repo": "acme/app",
  "number": 412,
  "url": "https://github.com/acme/app/pull/412",
  "title": "Add weekly repeats",
  "author": "octocat",
  "mergedAt": "2026-11-18T09:30:00.000Z",
  "state": "ready",
  "reason": "",
  "retryAt": null,
  "summary": "Events can repeat weekly.",
  "waiting": 2,
  "tuned": [
    "decide.rounds"
  ],
  "why": "Two posts ask for this.",
  "changelog": {
    "number": 18,
    "title": "November updates"
  },
  "actions": [
    {
      "id": "cm3x9a1b2c3d4e5f6g7h8i9j1",
      "codeChangeId": "cm3x9a1b2c3d4e5f6g7h8i9j0",
      "createdAt": "2026-11-18T09:30:00.000Z",
      "reviewPath": "feedback/cm3x9post0000000000000000",
      "kind": "resolves",
      "status": "pending",
      "probability": 0.92,
      "confidence": "likely",
      "applyLikely": true,
      "emailed": 0,
      "emails": 14,
      "reason": "The pull request ships weekly repeats, which this post asks for.",
      "comment": "Weekly repeats are out today; monthly ones are next.",
      "post": {
        "number": 42,
        "title": "Repeating events",
        "status": "planned",
        "board": "feature-requests",
        "votes": 12,
        "comments": 3,
        "author": {
          "name": "Pat Reader"
        },
        "visibility": "public",
        "createdAt": "2026-11-18T09:30:00.000Z",
        "url": "https://acme.tuti.so/feedback/feature-requests/repeating-events-42"
      },
      "article": null,
      "problem": "wrong",
      "before": "Events happen once.",
      "after": "Events can repeat every week.",
      "revision": "cm3x9rev10000000000000000",
      "basedOn": "cm3x9rev00000000000000000",
      "title": "Repeating events",
      "place": {
        "collection": {
          "slug": "events",
          "name": "Events",
          "icon": "calendar"
        },
        "newCollection": {
          "name": "Scheduling",
          "icon": "clock"
        },
        "afterArticle": {
          "slug": "create-an-event",
          "title": "Create an event"
        },
        "first": false
      },
      "line": "Events can repeat weekly.",
      "decidedBy": null,
      "auto": false,
      "unsure": false,
      "unpublished": false,
      "canUndo": false,
      "undoRemovesCollection": "Scheduling",
      "putsBackStatus": false,
      "together": [
        "cm3x9a1b2c3d4e5f6g7h8i9j1",
        "cm3x9a1b2c3d4e5f6g7h8i9j2"
      ],
      "decidedAt": null,
      "dismissReason": "",
      "dueAt": null,
      "wouldHaveGoneOutAt": null,
      "waitReason": null
    }
  ]
}
{
  "error": {
    "code": "invalid_input",
    "message": "title: Title is too short"
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "This API key isn't valid or was revoked"
  }
}
{
  "error": {
    "code": "not_found",
    "message": "No such post"
  }
}
{
  "error": {
    "code": "rate_limited",
    "message": "Up to 600 requests a minute per key"
  }
}
{
  "error": {
    "code": "internal_error",
    "message": "Something went wrong"
  }
}