API tickets and ticket runs
You want a script to run tickets against your live app and read what it found: the same thing as clicking Run on the Tickets tab. The steps below go in the order a script takes them. The ids and values in the answers are examples; the shapes are the API’s. Starting or re-running a ticket run uses agent-hours and can also write results to Jira, Linear or GitHub when your team has that turned on, so it carries the label Can write to Jira, Linear or GitHub; reading a finished run’s result is Changes data because the first read makes its share link. See cost labels.
Every command assumes two variables:
export INSIGHTJET_API_KEY="<your key>"BASE=https://insightjet.ai/api/v11. List a crawl’s tickets
Section titled “1. List a crawl’s tickets”curl "$BASE/crawls/42/tickets" -H "Authorization: Bearer $INSIGHTJET_API_KEY"{ "tickets": [ { "id": 301, "kind": "story", "title": "A customer can reset their password", "priority": "high", "status": "Open", "labels": ["auth"], "source": "...", "createdAt": "2026-11-20T09:12:44.000Z", "updatedAt": "2026-11-20T09:12:44.000Z", "latestTicketRunId": null } ]}Newest first, only your team’s tickets. source is a short text saying where the ticket came from; its possible values are not confirmed. latestTicketRunId is the newest of your ticket runs that included the ticket, or null. requirementTitle is present only for a ticket that came from a requirement. A crawl you may not see is 404 not_found, the same as one that does not exist.
Expected result: status 200 and a tickets array.
2. Start a ticket run
Section titled “2. Start a ticket run”curl -X POST "$BASE/crawls/42/ticket-runs" \ -H "Authorization: Bearer $INSIGHTJET_API_KEY" \ -H "Content-Type: application/json" \ -d '{"ticketIds": [301, 302]}'{ "ticketRunId": 77, "status": "running", "ticketCount": 2, "movedToInProgress": 2 }Send 1 to 50 ticket ids of the crawl. Only tickets the key’s owner created can be started. Each of them that is Open or Done moves to In progress. The answer comes at once and the ticket run goes on after it; the Location header is /api/v1/ticket-runs/77, the address to ask about.
Expected result: status 202, status: "running", and a ticketRunId you keep for the next steps. A start can be refused for agent-hours (402 out_of_hours) or for agents at the same time (429 all_agents_working); see Errors and limits.
3. Wait for it
Section titled “3. Wait for it”curl "$BASE/ticket-runs/77?wait=30" -H "Authorization: Bearer $INSIGHTJET_API_KEY"{ "ticketRunId": 77, "crawlId": 42, "status": "running", "stillRunning": true, "doneCount": 1, "totalCount": 2 }wait=N (1 to 30 seconds) holds the request open until the run finishes or N seconds pass, then answers where the run stands. It returns the status, not the result. If stillRunning is true, ask again. Without wait the answer is immediate.
Expected result: status 200. Repeat until stillRunning is false and status is completed (or stopped).
4. Read the result
Section titled “4. Read the result”curl "$BASE/ticket-runs/77/result" -H "Authorization: Bearer $INSIGHTJET_API_KEY"A run that has not finished answers stillRunning: true with how far it got, not an error. A finished run answers its result per ticket and goal:
{ "ticketRunId": 77, "crawlId": 42, "status": "completed", "stillRunning": false, "createdAt": "2026-11-30T10:03:11.000Z", "passConfidence": 80, "tickets": [ { "ticketId": 301, "requirements": [ { "goalIntent": "...", "verdict": "...", "reason": "...", "confidence": 90, "countsAsPassed": true, "failureSide": null, "recordedSteps": [] } ], "expertOpinion": { "status": "ready", "opinion": {} } } ], "insightjetLink": "https://insightjet.ai/..."}Each goal also carries requirementWord, goalOutcome, markedVerdict, markedAt, answerState and needs, and an advice sentence when the cause is on InsightJet’s side. The values of verdict, reason, goalOutcome and the shape of expertOpinion.opinion and recordedSteps are not listed here: not confirmed beyond their names. Logins are removed from the recorded steps. insightjetLink is a public link to the result that opens without signing in; the first read of a finished run makes it, and it is absent when none can be made. Read countsAsPassed for the verdict as the Results tab shows it.
Expected result: status 200, stillRunning: false, and a tickets array with one entry per ticket of the run.
5. Run it again
Section titled “5. Run it again”curl -X POST "$BASE/ticket-runs/77/retry" -H "Authorization: Bearer $INSIGHTJET_API_KEY"Starts a new run over the same tickets, for example after a deploy. The answer is the same as in step 2, with the new run’s id. A run that is still going answers 409 run_still_running.
Expected result: status 202 and a new ticketRunId.
6. Stop a run
Section titled “6. Stop a run”curl -X POST "$BASE/ticket-runs/77/stop" -H "Authorization: Bearer $INSIGHTJET_API_KEY"{ "ticketRunId": 77, "status": "stopped" }Only a run that is still running and that the key’s owner started. A stopped run cannot be resumed, only run again. A run that already finished answers 409 run_not_running and keeps its result.
Expected result: status 200 and status: "stopped".
List your ticket runs
Section titled “List your ticket runs”curl "$BASE/ticket-runs?crawlId=42&limit=5" -H "Authorization: Bearer $INSIGHTJET_API_KEY"{ "ticketRuns": [ { "ticketRunId", "crawlId", "status", "createdAt", "totalCount", "doneCount", "ticketIds", "startedByKey" } ] }, newest first: 10 by default, at most 50. crawlId and ticketId filter; startedByKey says whether a key started the run (never which), and is false for runs from the web app or the chat.
Create and change tickets
Section titled “Create and change tickets”Only a ticket the key’s owner created or currently owns can be changed, and nothing deletes a ticket.
Create:
curl -X POST "$BASE/crawls/42/tickets" \ -H "Authorization: Bearer $INSIGHTJET_API_KEY" -H "Content-Type: application/json" \ -d '{"kind": "bug", "title": "Coupon field accepts negative numbers", "priority": "high", "labels": ["checkout"]}'kind is story, bug or support; title is 1 to 500 characters; description is plain text up to 20,000; up to 20 labels of up to 40 characters; priority is none, low, medium, high or urgent. The ticket starts in your team’s first Open status, you are its creator and it has no owner.
Expected result: status 201, a Location header /api/v1/tickets/<id>, and the ticket as { ticketId, crawlId, kind, title, priority, status, labels, ownerId, updatedAt }.
Edit: PATCH /tickets/{ticketId} with any of title, description, labels, priority, ownerId (a member id from GET /team/members, or null). A description replaces the whole text and a labels list replaces the whole list. Answers 200 with the ticket as it is now; 403 not_allowed for a ticket that is not yours to change.
Set the status: PUT /tickets/{ticketId}/status with {"name": "In review"}, a status name of your team (the words open, in progress and done also work). An unknown name changes nothing and details.statuses lists the names the team has.
Comments: GET /tickets/{ticketId}/comments lists them, oldest first. POST the same address with {"text": "...", "mentions": [5]} adds one: 1 to 1,900 characters and up to 3 team members to notify. The comment starts with a line InsightJet adds, “Written by an assistant for” your name. A comment cannot be edited or deleted. 201 with { "comment": {...} }.
Suggestions: POST /crawls/{crawlId}/ticket-suggestions returns up to 8 suggested tickets for the crawl and creates nothing (10 asks a minute). POST /crawls/{crawlId}/suggested-tickets with {"suggestions": [...]} (the suggestions as given, 1 to 20) creates one ticket each; one already made is not made twice.
Team members: GET /team/members answers { "members": [ { "id", "name" } ] }; a personal key has none.
See the reference for every field.