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

# Update Task

`PATCH /v1/tasks/{task_id}`

## Request

- Base URL: `https://api.lightsage.com`
- URL: `https://api.lightsage.com/v1/tasks/{task_id}`
- Auth: API key in header `X-Lightsage-Api-Key`

Updates the status and delegation of a single daily task.

Move a task through its lifecycle (for example to `in_progress`,
`done`, or `dismissed`), reprioritize it (`priority`), delegate it to a
teammate (`assignee_user_id`), or change its `action_type`. Only the fields
sent are changed; sending `null` clears an assignee or action type. Send at
least one field.

## Path parameters

- `task_id` string, required

## Request body

- UpdateTaskRequest
  - `status` 'new' | 'in_progress' | 'added_to_sheet' | 'done' | 'dismissed' | 'snoozed': The new task status. `added_to_sheet` and `snoozed` tasks are listed only when `status=all`.
  - `priority` 'urgent' | 'high' | 'medium' | 'low'
  - `assignee_user_id` string
  - `action_type` 'agent_discovery' | 'agent_usability'

## Response `200`

Successful Response

- PublicTask
  - `id` string, required
  - `action_date` string, required
  - `batch_number` integer, required
  - `rank` integer, required: Sort order within the batch, ascending; values need not start at 1.
  - `source_key` string, required: A finding key namespaced by source, such as `api_perf:https://example.com/docs/cli`.
  - `task_type` string, required: A free-form label such as `Redirect` or `Docs`; this field is not an enum.
  - `title` string, required
  - `why` string, required
  - `next_action` string, required
  - `description` string, nullable
  - `execution_prompt` string, required
  - `content` string, nullable: The task's Markdown write-up covering what went wrong, how to fix it, the impact, and the evidence. Null until the write-up is generated; see `content_status`.
  - `target_url` string, nullable: The page the fix should be made on, when the task targets one.
  - `content_status` 'none' | 'writing' | 'ready' | 'failed': Progress of the Markdown write-up in `content`.
  - `content_written_at` string, nullable: When the write-up in `content` was last generated.
  - `reasoning` string, nullable
  - `evidence` object: Supporting evidence with keys such as `expected_lift`, `failure_traces`, `source_prompts`, and `source_urls`.
  - `score` number, nullable: Planner impact score; manually created tasks may be unscored.
  - `effort` string, required: A free-form effort estimate such as `Low` or `Medium`; this field is not an enum.
  - `priority` string, nullable
  - `status` string, required: The workflow status. New tasks start as `new`. A task is `in_review` while its content waits to go live, as an open pull request or a CMS draft; it is listed with `in_progress` tasks. `added_to_sheet` and `snoozed` tasks are listed only when `status=all`.
  - `assignee_user_id` string, nullable
  - `function_area` string, nullable
  - `action_type` string, nullable
  - `source` string, nullable
  - `source_type` string, nullable: A free-form source type such as `api_performance`; manually created tasks may not have a source.
  - `source_refs` object: Source references. For `api_performance` tasks, keys include `kind`, `brand_id`, `failed_url`, `fail_count`, and per-run `traces`.
  - `metadata` object: Additional task metadata, including `source_key`, `impact_score`, `disposition`, `target_urls`, `edit_locations` (where on the target page each change goes: `url`, `anchor` heading, `placement` of `in`, `after`, or `before`, and `change`), `evidence_summary`, `source_start_date`, and `source_end_date`.
  - `created_at` string, nullable
  - `updated_at` string, nullable

## Other responses

- `404`: The task does not exist or is not visible to this API key.
- `422`: Validation Error

## Changes

> 8 revisions in range; 1 not diffed.

- **2026-10-17** `ed90d98158de`: 4 info
  - added the optional property `content` to the response with the `200` status
  - added the optional property `content_status` to the response with the `200` status
  - added the optional property `content_written_at` to the response with the `200` status
  - added the optional property `target_url` to the response with the `200` status

[Operation history](https://skmtc.dev/usesapient/apis/sapient-public-api/changes/v1/tasks/:task_id/patch.md)

---

[API](https://skmtc.dev/usesapient/apis/sapient-public-api.md) - [All operations](https://skmtc.dev/usesapient/apis/sapient-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/usesapient/apis/sapient-public-api/revisions/14890dfe867e?raw)
