5 minutes to help shape OpenTodo. Anonymous, no account. Take the survey

Calendar slots API

Slots are the synced entity slot, personal like a frame: one block on the Day and Week grid that holds a checklist of small tasks, such as "Admin" on Wednesday from 16:00 for 45 minutes.

Implementation notes

Slots (OpenSpec calendar-slots; guide: slots.md) are the synced entity slot, personal like a frame: one block on the Day and Week grid that holds a checklist of small tasks, such as "Admin" on Wednesday from 16:00 for 45 minutes. Fields: title (content, encrypted for an encrypted account; empty reads as "Slot"), date (YYYY-MM-DD), start (floating wall time HH:MM), minutes (15 to 480 in steps of 15; the op log accepts 1 to 1440), task_ids (ordered task ids, at most 20, written as one whole list), color (hex), created_at, deleted_at. No field is added to tasks: a task is in a slot when the slot lists it and the task is open and due on the slot's date without a time (or has no due date). Devices write slots through /api/v1/sync; the REST routes below add the checks.

GET /api/v1/slots

List slots · Token or session

?from=&to= (optional dates, inclusive) → {slots: [{id, title, date, start, minutes, task_ids, color, created_at, encrypted}]} by date and start

Response 200
FieldTypeDescription
slots requiredarray of object

POST /api/v1/slots

Create a slot · Token or session

{date, title?, start?, minutes?, task_ids?, color?, move_tasks?} → 201 slot (defaults 09:00, 30 minutes, #64748b)

Request body
FieldTypeDescription
color requiredstring
date requiredstring
minutes requiredstring
move_tasks requiredboolean
start requiredstring
task_ids requiredstring
title requiredstring
Response 201
FieldTypeDescription
encryptedboolean
id requiredstring

GET /api/v1/slots/{id}

Get a slot · Token or session

PATCH takes the same fields → 200 slot; DELETE → 204 (a tombstone; the tasks keep their date without a time); an unknown or deleted id answers 404 not_found

Path parameters
FieldTypeDescription
id requiredstringpath
Response 200
FieldTypeDescription
encryptedboolean
id requiredstring

PATCH /api/v1/slots/{id}

Update a slot · Token or session

PATCH takes the same fields → 200 slot; DELETE → 204 (a tombstone; the tasks keep their date without a time); an unknown or deleted id answers 404 not_found

Path parameters
FieldTypeDescription
id requiredstringpath
Request body
FieldTypeDescription
color requiredstring
date requiredstring
minutes requiredstring
move_tasks requiredboolean
start requiredstring
task_ids requiredstring
title requiredstring
Response 200
FieldTypeDescription
encryptedboolean
id requiredstring

DELETE /api/v1/slots/{id}

Delete a slot · Token or session

PATCH takes the same fields → 200 slot; DELETE → 204 (a tombstone; the tasks keep their date without a time); an unknown or deleted id answers 404 not_found

Path parameters
FieldTypeDescription
id requiredstringpath

Response 204: No content

This group in the HTTP API guide