Update Day Plan fields on an existing todo
Request
- Base URLhttps://api.focusbear.io (the document declares no server; this is the origin it was published from)
- AuthHTTP bearer
Path parameters
Request body
The day this todo is planned for (yyyy-MM-dd). Passing null removes the todo from the Day Plan and clears the whole plan slot: planned_block_key and planned_order are also nulled in the same write (the todo itself is not deleted).
Unplanning and time-boxing are contradictory, so planned_date: null may only be combined with explicit null clears of the other fields. A non-null planned_block_key or planned_order in the same payload is rejected (400).
Example request
{
"planned_date": "2026-06-20",
"planned_block_key": "event:calendar-event-id"
}Response
Id of the user this task is assigned to, or null when it is unassigned.
Cached external task status label used by task list endpoints.
Available external statuses on the linked project, when the todo is synced.
@brief Materialised priority score, written by application code. @details Mirrors the SQL expression that previously computed the "top score" inside ORDER BY on every page load. Persisting the value allows the planner to satisfy ORDER BY ... LIMIT with the (user_id, top_score DESC) index instead of a parallel sequential scan + in-memory sort. The score depends on the user's local "today", so it is refreshed daily by the off-thread top-score worker as well as on every write that touches due_date, outcome, or perspiration_level.
PostgreSQL's `numeric` type round-trips through node-postgres
as a string; the transformer below converts it to `number`
on read so the application can treat it as a plain numeric
value.
ID of the MCP agent token assigned to this task
Number of files attached to this task. Present on list reads (GET /to-do, Day Plan, recent).
@brief Materialised external status identifier from the linked platform. @details Populated by the integration sync worker so list-view rendering no longer needs to decrypt/parse the external_task_metadata JSONB on the request path.
@brief Materialised external status label from the linked platform. @details See current_external_status_id. The label is exposed via the API as the human-readable status text.
@brief Day Plan pointer: the day this todo is planned for (YYYY-MM-DD). @details NULL means the todo is not in any Day Plan. A planned task is a pointer into to_do by date, not a copy; the Day Plan panel reads todos by planned_date and writes planning changes through PATCH /to-do/:id.
@brief Day Plan time-box assignment within the planned day. @details Opaque, never parsed by the backend. One of event:<id>, deepwork:<unix-epoch>, habit:<title>, or NULL when planned but not yet time-boxed onto a block. Encrypted at rest because the habit:<title> form can embed a habit name, matching title/ details. The column stays unbounded varchar (ciphertext is longer than plaintext); the DTO caps plaintext input at 256 chars.
@brief Manual ordering within the planned day (drag-to-reorder).
@brief Recurrence: canonical RFC 5545 RRULE content line, e.g. RRULE:FREQ=WEEKLY;INTERVAL=2 for a fortnightly chore. @details NULL means the todo is a one-off and takes no recurrence code path, which is every todo that existed before this column. Set together with the other three recurrence_* columns (a DB CHECK enforces all-or-none). Validated and canonicalised through the same RFC 5545 subset the Day Plan's event series use.
@brief Recurrence: IANA zone the rule is evaluated in (keeps the local time of day across DST).
@brief Recurrence: the series DTSTART — the first occurrence's due date. @details Copied unchanged onto every occurrence so the next due date is always computed from the series anchor. Completing an occurrence late therefore does not shift the schedule.
@brief Recurrence: groups every occurrence of one repeating todo. @details Equal to the first occurrence's own id. Lets history be read per series and DELETE /to-do?scope=series remove the whole thing.
Changes
No recorded changes to this operation across all 1 revision of this API.