Skip to content

Put back handled quota prompts​

POST
/api/quota-prompts/restore

The filled dashed circle on a handled prompt in a "considered" / DONE
list (2026-09-25): the prompt waits for today again. Its key leaves
today's considered and did; if it was "did it", exactly the
progress that did-it added is taken back (quota_day_state.did_applied
— a daily prompt k done when the count was already at k added 0,
so it takes back 0). Any other did-it the lower count no longer
supports waits again too. A key that is already waiting changes
nothing. One transaction and one undo entry (always logged, so a
toast's Undo never reaches an older action). Keys for another local
day, or for a quota that is not the caller's own, refuse the whole
request (400). Quotas are never put back with /api/tasks/{id}/undone.
Dispatches task.progressed for each quota whose count moved.

Authorizations​

bearerAuth

API token created via POST /api/tokens or the db:create-token CLI command

Type
HTTP (bearer)

Request Body​

application/json
JSON
{
"keys": [
"q:42:0:2026-09-24"
]
}

Responses​

How many prompts now wait again, and the quotas touched

application/json
JSON
{
"data": {
"restored": 0,
"tasks": [
{
"id": 0,
"user_id": 0,
"project_id": 0,
"title": "string",
"original_title": "string",
"short_title": "string",
"done": true,
"done_at": "string",
"priority": 0,
"due_at": "string",
"rrule": "string",
"recurrence_mode": "string",
"anchor_time": "string",
"anchor_dow": 0,
"anchor_dom": 0,
"original_due_at": "string",
"target_at": "string",
"deadline_at": "string",
"horizon": "string",
"horizon_set_at": "string",
"last_considered_at": "string",
"segment_deferred_at": "string",
"segment_targeted_at": "string",
"target_set_at": "string",
"target_auto": true,
"occurrence_at": "string",
"deadline_nag_off": true,
"auto_snooze_minutes": 0,
"deleted_at": "string",
"archived_at": "string",
"labels": [
"string"
],
"notes": "string",
"progress_target": 0,
"progress_current": 0,
"progress_period_start": "string",
"quota_prompt_config": {
"enabled": true,
"slot_id": 0,
"numbers": {
"additionalProperties": 0
}
},
"quota_day_state": {
"date": "2026-09-24",
"logged": 0,
"did": [
"string"
],
"considered": [
"string"
],
"did_applied": {
"additionalProperties": 0
}
},
"completion_count": 0,
"skip_count": 0,
"first_completed_at": "string",
"last_completed_at": "string",
"created_at": "string",
"updated_at": "string",
"is_recurring": true
}
]
}
}

Samples​

Powered by VitePress OpenAPI