---
title: "Update task metadata"
method: PATCH
path: "/tasks/{task_id}"
tags: ["Tasks"]
---

# Update task metadata

`PATCH /tasks/{task_id}`

## Request

- Base URL: `https://api-docs.jackhamr.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api-docs.jackhamr.ai/tasks/{task_id}`
- Auth: none declared

Update task metadata.

Updatable: name, description, priority, scheduled_at. Status changes
must go through the lifecycle endpoints (pause/resume/cancel/retry).
Uses ``exclude_unset`` so omitted fields are left untouched.

## Path parameters

- `task_id` string, required

## Request body

- TaskUpdate: Request body for ``PATCH /api/v1/tasks/{id}``.
  - `name` string, nullable
  - `description` string, nullable
  - `priority` integer, nullable
  - `scheduled_at` string, date-time, nullable

## Response `200`

Successful Response

- TaskOut: A task as returned by ``GET/POST/PATCH /api/v1/tasks``.
  - `id` string, required
  - `agent_id` string, nullable
  - `parent_id` string, nullable
  - `name` string, required
  - `description` string, nullable
  - `task_type` string, required
  - `status` string, required
  - `priority` integer
  - `command` string, nullable
  - `working_directory` string, nullable
  - `environment_vars` object, nullable
  - `dependencies` string[], nullable
  - `progress_percent` integer
  - `progress_message` string, nullable
  - `result_data` object, nullable
  - `error_message` string, nullable
  - `started_at` string, date-time, nullable
  - `completed_at` string, date-time, nullable
  - `scheduled_at` string, date-time, nullable
  - `duration_seconds` integer, nullable
  - `exit_code` integer, nullable
  - `max_retries` integer
  - `retry_count` integer
  - `retry_delay_seconds` integer
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required

## Other responses

- `422`: Validation Error

---

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