Skip to content

Task Attributes API

A Task is a child of a List with a title plus a set of attributes (Product Brief §5.2 “Task rules”). The fields and their HTTP surface are defined contract-first in src/api/routes/tasks.ts (registerTasksRoutes) over the tasks table.

  • done — completion state. (Recurring-task behavior — a new instance on completion — is a domain rule; recurrence fields are future scope.)
  • starred — marks the Task “important” (feeds the “Important” View).
  • dueDate — date only (YYYY-MM-DD), nullable (feeds “Planned”).
  • notes — plaintext, nullable, with notesUpdatedAt for last-write-wins reconciliation.
  • assigneeId — at most one Member of the Task’s List; assigning to the owner is allowed; removing the assignee clears it (spec 012). assignedToMe is derived per requesting user.
  • rank — fractional order within the List (new Tasks at the top).

Per-field updates go through PATCH routes with Zod schemas (the OpenAPI contract, ADR-003); validation failures return RFC 9457 422 (see Worker API & Clerk Auth). Writes are optimistic on the client and reconciled server-side (reconcileTasks, Sync-Core Reconcilers); a successful write fans a signal to the List’s accessible users (DB Schema & Notify-Affected).

Related: DB Schema & Notify-Affected, Sync-Core Reconcilers, Steps in a Task (Task children).