---
title: "Update Task (V1)"
method: PUT
path: "/v1.0/tasks/{taskId}"
tags: ["Tasks & Appointments"]
---

# Update Task (V1)

`PUT /v1.0/tasks/{taskId}`

Partially updates an existing task. Fields not supplied are left unchanged.

Notes:
- When finishFlag is true, the task is marked completed and all other fields are ignored. Completion is rejected for smart-plan tasks (TASK_IS_SMARTPLAN).
- When leadId is supplied, it must match the task's existing lead; otherwise 400 INVALID_UPDATE_OPERATION_LEADID.
- At least one field must be supplied; an entirely empty payload returns 400 MISSING_PARAMETER.
- Caller must have manage permission on the task's lead.
- The response body is empty.

## Path parameters

- `taskId` integer, required

## Headers

- `Authorization` string, required
- `Content-Type` string, required

## Request body

- TaskRequest — Task payload.
  - `content` string, required — Description of the task.
  - `leadId` integer, required — ID of the lead this task belongs to.
  - `deadline` integer, required — Deadline of the task, in milliseconds since Unix epoch (UTC).
  - `type` 'Other' | 'Call' | 'Email' | 'Text', required — Type of the task.
  - `assignedRole` 'Agent' | 'Assistant', required — Role the task is assigned to.
  - `finishFlag` boolean — When true on update, the task is marked completed and other fields are ignored.

## Response `200`

Task updated successfully. No response body.

## Other responses

- `400` — Missing or invalid parameter (20012 INVALID_PARAMETER / MISSING_PARAMETER), finish attempted on a smart-plan task (TASK_IS_SMARTPLAN), or leadId does not match the task's lead (INVALID_UPDATE_OPERATION_LEADID).
- `401` — Missing or invalid authentication token.
- `404` — Task does not exist (TASK_NOT_EXIST) or caller lacks access to the lead (20006 LEAD_NOT_EXIST).
- `500` — Internal server error.

---

[API](https://skmtc.net/lofty/apis/lofty-service-open-apis.md) · [All operations](https://skmtc.net/lofty/apis/lofty-service-open-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/lofty/lofty-service-open-apis/versions/23e640467118/schema)
