---
title: "Update a task's status"
method: POST
path: "/v1/task/update"
tags: ["Task"]
---

# Update a task's status

`POST /v1/task/update`

## Request

- Base URL: `http://localhost:9998`
- URL: `http://localhost:9998/v1/task/update`
- Auth: HTTP bearer

Transitions an existing task to `in_progress`, `completed`, or `cancelled`
(`pending` is a mint-only state, never a target). Backs `task_update`.

## Request body

- object
  - `id` string, required: The task id returned by createTask
  - `status` 'in_progress' | 'completed' | 'cancelled', required
  - `session_id` string: The session the task lives in (defaults to "default")

## Response `200`

Task updated

- object
  - `ok` true
  - `task` AgentTask
    - `id` string, required
    - `title` string, required
    - `description` string
    - `status` 'pending' | 'in_progress' | 'completed' | 'cancelled', required
    - `createdAt` string, required
    - `updatedAt` string, required

## Other responses

- `400`: Missing id/status, or an invalid status
- `404`: No such task in the session

---

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