Magidoc

createTodo
Mutation

Creates a todo (task). Two placements exist. Project todos: pass todo.sliceId for the target project slice, optionally with todo.boxId for a box in that same slice (the box must belong to the slice). Do not pass a projectId; the project association is inferred from the slice. Standalone todos: omit sliceId and pass todo.workspaceId - allowed only in the caller's personal workspace; other workspaces reject standalone todos with an explanatory validation error.

Creating a project todo requires the caller to be a workspace admin or a workspace member assigned to the project as admin, admin+autoassign, member, or member+invite. Pass todo.todoId to create the todo as a subtask: it inherits the parent's assignments and roles, and the parent's own dates, duration, and progress are cleared (parents derive them from subtasks). The creator is auto-assigned to standalone todos and, unless they are a project admin, to project todos. todo.workEffort is ignored on create and defaults to 8 hours (28800 seconds); change it with updateTodo. When startDate/dueDate fall outside the project's date range, the project dates are expanded to cover them.

Returns TodoMutationPayload: select todoId or todo, plus assignments and the recalculated progress, slices, and boxes aggregates. Validation failures return error messages of the form "field message".

Arguments

#

todo

Non-null

Response

#

Returns TodoMutationPayload .

Example

#