---
title: "Mark a task completed"
method: POST
path: "/v1/task/complete"
tags: ["Task"]
---

# Mark a task completed

`POST /v1/task/complete`

## Request

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

Marks a task `completed` (a convenience for updateTask). Backs `task_complete`.

## Request body

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

## Response `200`

Task completed

- 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
- `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)
