---
title: "Record Task State"
method: POST
path: "/api/cli/task-state"
tags: ["cli"]
---

# Record Task State

`POST /api/cli/task-state`

## Request

- Base URL: `https://app.thinqos.com` (the document declares no server; this is the origin it was published from)
- URL: `https://app.thinqos.com/api/cli/task-state`
- Auth: none declared

Upsert this machine's task-state for a repo (one row per worktree).

## Headers

- `x-impersonate-identity-id` string, nullable

## Request body

- TaskStateIn: One machine's in-flight task-state for a repo.
  - `repo` string, required: Normalized git remote, owner/name.
  - `machine_id` string, required
  - `worktree_path` string, required
  - `branch` string
  - `dirty_files` string[]
  - `pr_number` integer
  - `ci_status` string
  - `merge_state` string
  - `summary` string

## Response `200`

Successful Response

- object

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/thinqos/apis/thinqos-api.md) · [All operations](https://skmtc.dev/thinqos/apis/thinqos-api/llms.txt) · [OpenAPI document](https://skmtc.dev/thinqos/apis/thinqos-api/revisions/ce2c2ce318b1?raw)
