---
title: "Update an existing task. All fields are optional except id."
method: POST
path: "/api/mcp/tools/update_task"
tags: ["tasks"]
---

# Update an existing task. All fields are optional except id.

`POST /api/mcp/tools/update_task`

## Request

- Base URL: `https://api.ainote.dev`
- URL: `https://api.ainote.dev/api/mcp/tools/update_task`
- Auth: API key in header `Authorization`

Update an existing task. All fields are optional except id.

## Request body

- object
  - `id` string, required: Task ID (required)
  - `content` string: New task content
  - `is_important` boolean: Update important status
  - `completed_at` string: Mark as completed (ISO format) or 'null' to uncomplete
  - `due_date` string: Update due date in ISO format (or 'null' to clear)
  - `due_time` string: Update due time in HH:MM format (or 'null' to make all-day)
  - `start_date` string: Update start date in ISO format (or 'null' to clear)
  - `is_all_day` boolean: Toggle all-day mode.
  - `category_id` string: Update category ID (or 'null' to remove category)
  - `notes` string: Update notes (or 'null' to clear)
  - `location` string: Update location (or 'null' to clear)
  - `location_lat` number: Update GPS latitude.
  - `location_lng` number: Update GPS longitude.
  - `travel_time` number: Update travel-time minutes.
  - `has_notification` boolean: Enable/disable reminder notifications
  - `reminder_timing` integer: Minutes before due time to send reminder (e.g., 10 for 10 minutes before). Only used when has_notification is true.
  - `reminder_timings` integer[]: Multiple reminder offsets in minutes before due time (e.g., [10, 60]). Pass empty array [] to clear.
  - `repeat_rule` string: Update recurrence rule (or 'null' to make non-recurring)

## Response `200`

Tool executed successfully

- ToolSuccessResponse: Successful tool invocation. `content` mirrors the MCP `tools/call` result shape: an array of content blocks (text and optionally a structured resource payload).
  - `content` object[]
    - `type` 'text' | 'resource'
    - `text` string

## Other responses

- `400`: Invalid arguments or business-rule violation
- `401`: Missing or invalid McpKey

---

[API](https://skmtc.dev/ainote/apis/ainote-mcp-openapi-mirror.md) · [All operations](https://skmtc.dev/ainote/apis/ainote-mcp-openapi-mirror/llms.txt) · [OpenAPI document](https://skmtc.dev/ainote/apis/ainote-mcp-openapi-mirror/revisions/f6c91d85e027?raw)
