---
title: "Update a task"
method: PATCH
path: "/v2/tasks/{taskId}"
tags: ["Tasks"]
---

# Update a task

`PATCH /v2/tasks/{taskId}`

## Request

- Base URL: `https://api.zenzap.co`
- URL: `https://api.zenzap.co/v2/tasks/{taskId}`
- Auth: one of:
  - HTTP bearer and API key in header `X-Signature`
  - OAuth 2
    - Client credentials
    - Token URL: `https://api.zenzap.co/oauth/token` scopes: `task:write`
- TypeScript: <https://skmtc.dev/zenzap/apis/zenzap-external-integration-api/docs/v2/tasks/:taskId/patch.ts> (a function with typed inputs; its response is checked against the schema)

Update task fields. This endpoint supports partial updates.

Updatable fields:
- `name` (alias of `title`)
- `description`
- `assignee`
- `dueDate`
- `status` (`Open` or `Done`)

Notes:
- Provide either `name` or `title` (not both)
- Setting `assignee` to an empty string unassigns the task
- Setting `dueDate` to `0` clears the due date
- When status is set to `Done`, the task is marked as closed
- When `status` is provided, `topicId` is required
- Every successful update creates a task system message in the topic

## Path parameters

- `taskId` string, uuid, required

## Headers

- `X-Signature` string
- `X-Timestamp` integer

## Request body

- TaskPatchRequest: Partial task update payload. At least one field must be provided.
  - `topicId` string, uuid: Required when `status` is provided.
  - `name` string: Task title (alias of `title`). Provide either `name` or `title`.
  - `title` string: Task title. Provide either `title` or `name`.
  - `description` string: Task description
  - `assignee` string: Assignee profile ID. Empty string removes assignee.
  - `dueDate` integer: Due date as Unix timestamp in milliseconds. Set to `0` to clear.
  - `status` 'Open' | 'Done': Task status

## Response `200`

Task updated successfully

- TaskPatchResponse
  - `id` string, uuid: Updated task ID
  - `updatedAt` integer: Unix timestamp in milliseconds when the task was updated

## Other responses

- `400`: Bad request - invalid input
- `401`: Unauthorized - invalid or missing API token
- `404`: Resource not found
- `500`: Internal server error

---

[API](https://skmtc.dev/zenzap/apis/zenzap-external-integration-api.md) - [All operations](https://skmtc.dev/zenzap/apis/zenzap-external-integration-api/llms.txt) - [OpenAPI document](https://skmtc.dev/zenzap/apis/zenzap-external-integration-api/revisions/37faae2c2036?raw)
