Skip to main content

update

client.todos.update(todoId: string, data: UpdateTodoRequest): Promise<TodoItem>

Updates an existing todo.

Modifies the specified todo with the provided field values. Only the fields included in the request will be updated; all other fields remain unchanged. Use this to change status, reassign tasks, or update details.

Parameters​

ParameterTypeRequiredDescription
todoIdstringYesThe unique identifier of the todo to update
dataUpdateTodoRequestYesPartial update payload containing fields to modify

Returns​

Promise<TodoItem> — A promise that resolves to the updated TodoItem object

Example​

import { CodeBoltClient } from '@codebolt/clientsdk';

const client = new CodeBoltClient();

const result = await client.todos.update('todoId', /* UpdateTodoRequest */);
console.log(result);