Skip to content

Rename a time slot and/or move its start​

PATCH
/api/time-slots/{id}

Settings → Reminder periods. A reminder belongs to a slot only through
its time of day, so moving a slot's start_time also moves that slot's
reminders to keep them in it: reminders on the old start move to the new
start, reminders inside the slot keep their time unless the new
boundaries would put them in another slot (then they move to the new
start). Other slots' reminders and ordinary tasks are never touched.
The slot change and the reminder moves are one atomic undo entry
(time_slot_edit) that also restores the slot; undo_id names it.
A rename alone moves nothing and returns undo_id: null.

start_time must be unique among the user's slots. There is no
reordering: slots are always ordered by start_time.

Authorizations​

bearerAuth

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

Type
HTTP (bearer)

Request Body​

application/json
JSON
{
"label": "string",
"start_time": "string"
}

Responses​

The slot after the change

application/json
JSON
{
"data": {
"slot": {
"id": 0,
"user_id": 0,
"label": "Early morning",
"start_time": "07:00",
"sort_order": 0,
"created_at": "string"
},
"reminders_moved": 0,
"quotas_moved": 0,
"undo_id": 0
}
}

Samples​

Powered by VitePress OpenAPI