restore_task
- Category: tasks
- Access: write
- Audience: ordinary (an ordinary user normally calls this directly)
Purpose
Restore an archived task or note to its pre-archive status.
Arguments
Required: task_id.
-
task_id. Note: UUID of the archived task or note to restore.
Result
JSON object with restored (id) and status (the restored status), or unchanged 1 when not archived.
Boundaries
Only the addressed archived task visible under the caller's project grants is touched; foreign projects read as not found.
Lifecycle / side effects
Restores the pre-archive status recorded at archive time (not_started fallback for legacy rows) and clears the marker, ledgered like any status write.
Errors
Missing/foreign id reads as not found. Non-archived rows are a successful no-op. Failures move nothing (atomic).
Example
{
"task_id": "<uuid>"
}
Result shape:
{
"restored": "<uuid>",
"status": "done"
}