## Update task **patch** `/api/v1/tasks/{todoId}` Increments the Replicache space version via repVersionIncrement after writing. ### Path Parameters - `todoId: string` ### Query Parameters - `spaceId: optional string` Optional space id; when omitted, the user’s default space is used. ### Body Parameters - `spaceId: optional string` ### Returns - `SingleResponseTodo = object { data, spaceVersion }` - `data: Todo` - `sortOrder: number` - `todoId: string` - `complexity: optional string` - `contextId: optional string` - `dateDue: optional string` - `dateStart: optional string` - `durationEstimate: optional number` - `durationMs: optional number` - `goalId: optional string` - `isImportant: optional boolean` - `isTimeSensitive: optional boolean` - `listId: optional string` - `name: optional string` - `notesMarkdown: optional string` - `status: optional string` - `TodoPredecessorsAllAny: optional "ALL" or "ANY"` - `"ALL"` - `"ANY"` - `TodoPredecessorsView: optional boolean` - `spaceVersion: number` Current Replicache space version (`Space.version`). ### Example ```http curl https://$FLUIDWAVE_HOST/api/v1/tasks/$TODO_ID \ -X PATCH \ -H 'Content-Type: application/json' \ -d '{}' ``` #### Response ```json { "data": { "id": "id", "createdAt": "2019-12-27T18:11:19.117Z", "deletedAt": "2019-12-27T18:11:19.117Z", "isDeleted": true, "spaceId": "spaceId", "updatedAt": "2019-12-27T18:11:19.117Z", "versionUpdatedAt": 0, "sortOrder": 0, "todoId": "todoId", "complexity": "complexity", "contextId": "contextId", "dateDue": "2019-12-27T18:11:19.117Z", "dateStart": "2019-12-27T18:11:19.117Z", "durationEstimate": 0, "durationMs": 0, "goalId": "goalId", "isImportant": true, "isTimeSensitive": true, "listId": "listId", "name": "name", "notesMarkdown": "notesMarkdown", "status": "status", "TodoPredecessorsAllAny": "ALL", "TodoPredecessorsView": true }, "spaceVersion": 0 } ```