{
	"openapi": "3.1.0",
	"info": {
		"title": "Rolyx API",
		"version": "1.0.0",
		"description": "Read and write your Rolyx outline from scripts and agents. Make a token in Settings → API and send it as `Authorization: Bearer rlx_…`."
	},
	"servers": [
		{
			"url": "https://api.rolyx.app"
		}
	],
	"security": [
		{
			"bearerAuth": []
		}
	],
	"paths": {
		"/v1/me": {
			"get": {
				"operationId": "getMe",
				"summary": "Who this token is",
				"description": "The token's name, prefix, scopes and expiry, and the spaces it reaches: your personal space (its id is your user id) and the shared items you're a member of, each with your role and the shared item's top node. A token limited to some spaces lists only those; one with only write scopes lists only spaces it may write.\n\nScope: any valid token.",
				"x-rolyx-scope": null,
				"security": [
					{
						"bearerAuth": []
					}
				],
				"responses": {
					"200": {
						"description": "Success.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"name": {
											"type": "string",
											"maxLength": 60,
											"description": "The name it was given in Settings → API."
										},
										"prefix": {
											"type": "string",
											"maxLength": 12,
											"description": "Its first 12 characters, as Settings shows them."
										},
										"scopes": {
											"type": "array",
											"items": {
												"type": "string",
												"maxLength": 20,
												"enum": [
													"nodes:read",
													"nodes:write",
													"nodes:delete",
													"search"
												]
											},
											"maxItems": 4
										},
										"expiresAt": {
											"type": [
												"string",
												"null"
											],
											"maxLength": 40,
											"format": "date-time",
											"description": "When it stops working; null = never."
										},
										"createdAt": {
											"type": "string",
											"maxLength": 40,
											"format": "date-time"
										},
										"spaces": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"maxLength": 36,
														"format": "uuid"
													},
													"kind": {
														"type": "string",
														"maxLength": 1000,
														"enum": [
															"personal",
															"shared"
														],
														"description": "`personal`: everything of yours not shared. `shared`: a shared item and everything under it."
													},
													"role": {
														"type": "string",
														"maxLength": 1000,
														"enum": [
															"owner",
															"editor",
															"viewer"
														],
														"description": "Editors and owners write; viewers only read."
													},
													"rootId": {
														"type": [
															"string",
															"null"
														],
														"maxLength": 64,
														"description": "A shared space's top node; null for the personal space."
													}
												},
												"required": [
													"id",
													"kind",
													"role",
													"rootId"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"name",
										"prefix",
										"scopes",
										"expiresAt",
										"createdAt",
										"spaces"
									],
									"additionalProperties": false
								},
								"example": {
									"name": "Laptop script",
									"prefix": "rlx_3f9a2b1c",
									"scopes": [
										"nodes:read",
										"nodes:write"
									],
									"expiresAt": null,
									"createdAt": "2026-11-25T09:00:00.000Z",
									"spaces": [
										{
											"id": "0b7e9a52-1c3d-4e5f-8a9b-0c1d2e3f4a5b",
											"kind": "personal",
											"role": "owner",
											"rootId": null
										},
										{
											"id": "5d1c0e2f-7a8b-4c9d-8e0f-1a2b3c4d5e6f",
											"kind": "shared",
											"role": "editor",
											"rootId": "019ab1c2-3d4e-7f00-8a1b-2c3d4e5f6a7b"
										}
									]
								}
							}
						}
					},
					"400": {
						"description": "Bad input: unknown field, wrong type, too long.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"401": {
						"description": "Missing, malformed, expired or revoked token.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"403": {
						"description": "The token lacks the scope this endpoint needs.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"404": {
						"description": "No such resource, or the token cannot see it.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"429": {
						"description": "Rate limited; see `retry-after`.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"500": {
						"description": "Internal error.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"502": {
						"description": "The database failed.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"503": {
						"description": "The API is not set up on this server.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					}
				}
			}
		},
		"/v1/types": {
			"get": {
				"operationId": "getTypes",
				"summary": "List types",
				"description": "The built-in types and your custom types (from every space the token reads; a shared item's types live in its space). A node's `type` is a built-in id or `custom:<id>`. `settable` types are the ones the API can give a node; it takes a custom type by name.\n\nScope: `nodes:read`.",
				"x-rolyx-scope": "nodes:read",
				"security": [
					{
						"bearerAuth": []
					}
				],
				"responses": {
					"200": {
						"description": "Success.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"items": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"maxLength": 64,
														"description": "What a node's `type` holds: `task`, or `custom:<id>`."
													},
													"name": {
														"type": "string",
														"maxLength": 200
													},
													"builtin": {
														"type": "boolean"
													},
													"settable": {
														"type": "boolean",
														"description": "The API can set it (`POST /v1/nodes`, `PATCH`)."
													},
													"checkable": {
														"type": "boolean",
														"description": "Its nodes can be done."
													},
													"space": {
														"type": "string",
														"maxLength": 36,
														"format": "uuid",
														"description": "Custom types: the space it is defined in."
													},
													"fields": {
														"type": "array",
														"items": {
															"type": "object",
															"properties": {
																"key": {
																	"type": "string",
																	"maxLength": 200
																},
																"label": {
																	"type": "string",
																	"maxLength": 200
																},
																"kind": {
																	"type": "string",
																	"maxLength": 1000,
																	"enum": [
																		"text",
																		"number",
																		"date",
																		"checkbox",
																		"select",
																		"node"
																	]
																},
																"options": {
																	"type": "array",
																	"items": {
																		"type": "string",
																		"maxLength": 200
																	},
																	"description": "`select` fields: the choices."
																}
															},
															"required": [
																"key",
																"label",
																"kind"
															],
															"additionalProperties": false
														},
														"description": "Custom types: their fields. Values aren't in the node shape yet."
													}
												},
												"required": [
													"id",
													"name",
													"builtin",
													"settable",
													"checkable"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"items"
									],
									"additionalProperties": false
								},
								"example": {
									"items": [
										{
											"id": "task",
											"name": "Task",
											"builtin": true,
											"settable": true,
											"checkable": true
										},
										{
											"id": "custom:019ab1c2-0000-7000-8000-000000000001",
											"name": "Book",
											"builtin": false,
											"settable": true,
											"checkable": true,
											"space": "0b7e9a52-1c3d-4e5f-8a9b-0c1d2e3f4a5b",
											"fields": [
												{
													"key": "author",
													"label": "Author",
													"kind": "text"
												}
											]
										}
									]
								}
							}
						}
					},
					"400": {
						"description": "Bad input: unknown field, wrong type, too long.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"401": {
						"description": "Missing, malformed, expired or revoked token.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"403": {
						"description": "The token lacks the scope this endpoint needs.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"404": {
						"description": "No such resource, or the token cannot see it.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"429": {
						"description": "Rate limited; see `retry-after`.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"500": {
						"description": "Internal error.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"502": {
						"description": "The database failed.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"503": {
						"description": "The API is not set up on this server.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					}
				}
			}
		},
		"/v1/nodes/{id}": {
			"get": {
				"operationId": "getNodesId",
				"summary": "Get a node",
				"description": "One node, from any space the token reads. A node the token cannot see is a 404, the same as one that does not exist.\n\nScope: `nodes:read`.",
				"x-rolyx-scope": "nodes:read",
				"security": [
					{
						"bearerAuth": []
					}
				],
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"description": "Node id.",
						"schema": {
							"type": "string",
							"maxLength": 64,
							"pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|root:[a-z]{1,16}|year:\\d{4}|month:\\d{4}-\\d{2}|day:\\d{4}-\\d{2}-\\d{2})$",
							"description": "Node id."
						}
					}
				],
				"responses": {
					"200": {
						"description": "Success.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"maxLength": 64,
											"description": "Node id: a UUID."
										},
										"parentId": {
											"type": [
												"string",
												"null"
											],
											"maxLength": 64,
											"description": "The parent: a node id, `day:YYYY-MM-DD` (a day in the Journal) or `root:home`."
										},
										"order": {
											"type": "string",
											"maxLength": 256,
											"description": "Sort key among its siblings: siblings sort by `(order, id)`, compared byte by byte. Opaque."
										},
										"text": {
											"type": "string",
											"maxLength": 262144,
											"description": "The text; the first line is its name. Markdown, `[[links]]` and `#tags` as in the app."
										},
										"type": {
											"type": "string",
											"maxLength": 64,
											"description": "`note`, `task`, `project`, `aim`, `habit`, `search`, or `custom:<id>` (see `GET /v1/types`)."
										},
										"size": {
											"type": "string",
											"maxLength": 1000,
											"enum": [
												"sm",
												"md",
												"lg"
											],
											"description": "Task size, when set."
										},
										"done": {
											"type": "boolean",
											"description": "Completed. For a repeating item: the series has ended."
										},
										"schedule": {
											"type": [
												"object",
												"null"
											],
											"properties": {
												"date": {
													"type": "string",
													"maxLength": 10,
													"format": "date",
													"description": "Do on this day."
												},
												"window": {
													"type": "object",
													"properties": {
														"start": {
															"type": "string",
															"maxLength": 10,
															"format": "date",
															"description": "First day."
														},
														"end": {
															"type": "string",
															"maxLength": 10,
															"format": "date",
															"description": "Last day."
														}
													},
													"required": [
														"start",
														"end"
													],
													"additionalProperties": false,
													"description": "Sometime in these days."
												},
												"time": {
													"type": "string",
													"maxLength": 5,
													"pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
													"description": "Time of day, `HH:MM`, wall clock."
												},
												"duration": {
													"type": "integer",
													"minimum": 1,
													"maximum": 1440,
													"description": "Length in minutes, when not the default for its size."
												},
												"someday": {
													"type": "boolean",
													"description": "Parked (someday / maybe). Always `true` when present."
												},
												"repeat": {
													"type": "object",
													"properties": {
														"start": {
															"type": "string",
															"maxLength": 10,
															"format": "date",
															"description": "First day."
														},
														"end": {
															"type": "string",
															"maxLength": 10,
															"format": "date",
															"description": "Last day."
														}
													},
													"required": [
														"start",
														"end"
													],
													"additionalProperties": false,
													"description": "A repeating item's current occurrence. Read-only: repeats are set up in the app."
												}
											},
											"additionalProperties": false,
											"description": "When it matters, or null. Date, window, someday and repeat replace one another."
										},
										"createdAt": {
											"type": "string",
											"maxLength": 40,
											"format": "date-time",
											"description": "When it was made."
										},
										"updatedAt": {
											"type": "string",
											"maxLength": 40,
											"format": "date-time",
											"description": "When it last changed, on any device."
										},
										"space": {
											"type": "string",
											"maxLength": 36,
											"format": "uuid",
											"description": "The space it lives in: your personal space (your user id) or a shared one (see `GET /v1/me`)."
										}
									},
									"required": [
										"id",
										"parentId",
										"order",
										"text",
										"type",
										"done",
										"schedule",
										"createdAt",
										"updatedAt",
										"space"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "019ab1c2-3d4e-7f00-8a1b-2c3d4e5f6a7b",
									"parentId": "day:2026-11-25",
									"order": "a0V3k",
									"text": "Call the dentist",
									"type": "task",
									"size": "sm",
									"done": false,
									"schedule": {
										"date": "2026-11-27",
										"time": "09:30"
									},
									"createdAt": "2026-11-25T09:00:00.000Z",
									"updatedAt": "2026-11-25T09:00:00.000Z",
									"space": "0b7e9a52-1c3d-4e5f-8a9b-0c1d2e3f4a5b"
								}
							}
						}
					},
					"400": {
						"description": "Bad input: unknown field, wrong type, too long.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"401": {
						"description": "Missing, malformed, expired or revoked token.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"403": {
						"description": "The token lacks the scope this endpoint needs.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"404": {
						"description": "No such resource, or the token cannot see it.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"429": {
						"description": "Rate limited; see `retry-after`.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"500": {
						"description": "Internal error.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"502": {
						"description": "The database failed.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"503": {
						"description": "The API is not set up on this server.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					}
				}
			},
			"patch": {
				"operationId": "patchNodesId",
				"summary": "Change a node",
				"description": "Changes any of text, type, size, done and schedule; fields not sent stay as they are. Each changed part is stamped now, so it merges with devices' edits like any device's edit. Marking done records the completion on today in `tz`, as the app does. Repeating items keep their size, schedule and done state: change those in the app (400).\n\nScope: `nodes:write`.",
				"x-rolyx-scope": "nodes:write",
				"security": [
					{
						"bearerAuth": []
					}
				],
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"description": "Node id.",
						"schema": {
							"type": "string",
							"maxLength": 64,
							"pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|root:[a-z]{1,16}|year:\\d{4}|month:\\d{4}-\\d{2}|day:\\d{4}-\\d{2}-\\d{2})$",
							"description": "Node id."
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"text": {
										"type": "string",
										"minLength": 1,
										"maxLength": 2000,
										"description": "New text."
									},
									"type": {
										"type": "string",
										"maxLength": 200,
										"description": "`note`, `task`, `project`, or a custom type by name."
									},
									"size": {
										"type": [
											"string",
											"null"
										],
										"maxLength": 1000,
										"enum": [
											"sm",
											"md",
											"lg"
										],
										"description": "Task size, or null to clear. Not on repeating items."
									},
									"done": {
										"type": "boolean",
										"description": "Complete (or reopen) a task, project, aim or checkable custom node. Not on repeating items."
									},
									"schedule": {
										"type": [
											"object",
											"null"
										],
										"properties": {
											"date": {
												"type": "string",
												"maxLength": 10,
												"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
												"format": "date",
												"description": "Do on this day."
											},
											"window": {
												"type": "object",
												"properties": {
													"start": {
														"type": "string",
														"maxLength": 10,
														"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
														"format": "date",
														"description": "First day."
													},
													"end": {
														"type": "string",
														"maxLength": 10,
														"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
														"format": "date",
														"description": "Last day."
													}
												},
												"required": [
													"start",
													"end"
												],
												"additionalProperties": false,
												"description": "Sometime in these days."
											},
											"time": {
												"type": "string",
												"maxLength": 5,
												"pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
												"description": "Time of day `HH:MM`; with `date` only."
											},
											"duration": {
												"type": "integer",
												"minimum": 1,
												"maximum": 1440,
												"description": "Length in minutes; with `date` only. Default: by size."
											},
											"someday": {
												"type": "boolean",
												"description": "`true`: park it (someday / maybe)."
											}
										},
										"additionalProperties": false,
										"description": "The whole new schedule: exactly one of `date`, `window`, `someday: true`; or null to clear it. Replaces any date, window, time, length and someday flag."
									},
									"tz": {
										"type": "string",
										"maxLength": 64,
										"description": "IANA time zone that decides the day a completion is recorded on. Default UTC.",
										"examples": [
											"Europe/London"
										]
									}
								},
								"additionalProperties": false
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Success.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"maxLength": 64,
											"description": "Node id: a UUID."
										},
										"parentId": {
											"type": [
												"string",
												"null"
											],
											"maxLength": 64,
											"description": "The parent: a node id, `day:YYYY-MM-DD` (a day in the Journal) or `root:home`."
										},
										"order": {
											"type": "string",
											"maxLength": 256,
											"description": "Sort key among its siblings: siblings sort by `(order, id)`, compared byte by byte. Opaque."
										},
										"text": {
											"type": "string",
											"maxLength": 262144,
											"description": "The text; the first line is its name. Markdown, `[[links]]` and `#tags` as in the app."
										},
										"type": {
											"type": "string",
											"maxLength": 64,
											"description": "`note`, `task`, `project`, `aim`, `habit`, `search`, or `custom:<id>` (see `GET /v1/types`)."
										},
										"size": {
											"type": "string",
											"maxLength": 1000,
											"enum": [
												"sm",
												"md",
												"lg"
											],
											"description": "Task size, when set."
										},
										"done": {
											"type": "boolean",
											"description": "Completed. For a repeating item: the series has ended."
										},
										"schedule": {
											"type": [
												"object",
												"null"
											],
											"properties": {
												"date": {
													"type": "string",
													"maxLength": 10,
													"format": "date",
													"description": "Do on this day."
												},
												"window": {
													"type": "object",
													"properties": {
														"start": {
															"type": "string",
															"maxLength": 10,
															"format": "date",
															"description": "First day."
														},
														"end": {
															"type": "string",
															"maxLength": 10,
															"format": "date",
															"description": "Last day."
														}
													},
													"required": [
														"start",
														"end"
													],
													"additionalProperties": false,
													"description": "Sometime in these days."
												},
												"time": {
													"type": "string",
													"maxLength": 5,
													"pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
													"description": "Time of day, `HH:MM`, wall clock."
												},
												"duration": {
													"type": "integer",
													"minimum": 1,
													"maximum": 1440,
													"description": "Length in minutes, when not the default for its size."
												},
												"someday": {
													"type": "boolean",
													"description": "Parked (someday / maybe). Always `true` when present."
												},
												"repeat": {
													"type": "object",
													"properties": {
														"start": {
															"type": "string",
															"maxLength": 10,
															"format": "date",
															"description": "First day."
														},
														"end": {
															"type": "string",
															"maxLength": 10,
															"format": "date",
															"description": "Last day."
														}
													},
													"required": [
														"start",
														"end"
													],
													"additionalProperties": false,
													"description": "A repeating item's current occurrence. Read-only: repeats are set up in the app."
												}
											},
											"additionalProperties": false,
											"description": "When it matters, or null. Date, window, someday and repeat replace one another."
										},
										"createdAt": {
											"type": "string",
											"maxLength": 40,
											"format": "date-time",
											"description": "When it was made."
										},
										"updatedAt": {
											"type": "string",
											"maxLength": 40,
											"format": "date-time",
											"description": "When it last changed, on any device."
										},
										"space": {
											"type": "string",
											"maxLength": 36,
											"format": "uuid",
											"description": "The space it lives in: your personal space (your user id) or a shared one (see `GET /v1/me`)."
										}
									},
									"required": [
										"id"
									],
									"additionalProperties": false,
									"description": "The node as stored after the write. A token without `nodes:read` gets only `id`."
								},
								"example": {
									"id": "019ab1c2-3d4e-7f00-8a1b-2c3d4e5f6a7b",
									"parentId": "day:2026-11-25",
									"order": "a0V3k",
									"text": "Call the dentist",
									"type": "task",
									"size": "sm",
									"done": false,
									"schedule": {
										"date": "2026-11-27",
										"time": "09:30"
									},
									"createdAt": "2026-11-25T09:00:00.000Z",
									"updatedAt": "2026-11-25T09:00:00.000Z",
									"space": "0b7e9a52-1c3d-4e5f-8a9b-0c1d2e3f4a5b"
								}
							}
						}
					},
					"400": {
						"description": "Bad input: unknown field, wrong type, too long.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"401": {
						"description": "Missing, malformed, expired or revoked token.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"403": {
						"description": "The token lacks the scope this endpoint needs.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"404": {
						"description": "No such resource, or the token cannot see it.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"413": {
						"description": "Body over 16 KB.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"415": {
						"description": "Body is not `application/json`.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"429": {
						"description": "Rate limited; see `retry-after`.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"500": {
						"description": "Internal error.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"502": {
						"description": "The database failed.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"503": {
						"description": "The API is not set up on this server.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"507": {
						"description": "Storage limit reached.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					}
				}
			},
			"delete": {
				"operationId": "deleteNodesId",
				"summary": "Delete a node",
				"description": "Deletes a node and everything under it, as the app's delete does; devices drop them on their next sync. Its completions stay in history. The top of a shared item, or a node holding one, can't be deleted here: stop sharing it in the app first (400).\n\nScope: `nodes:delete`.",
				"x-rolyx-scope": "nodes:delete",
				"security": [
					{
						"bearerAuth": []
					}
				],
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"description": "Node id.",
						"schema": {
							"type": "string",
							"maxLength": 64,
							"pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|root:[a-z]{1,16}|year:\\d{4}|month:\\d{4}-\\d{2}|day:\\d{4}-\\d{2}-\\d{2})$",
							"description": "Node id."
						}
					}
				],
				"responses": {
					"200": {
						"description": "Success.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"deleted": {
											"type": "integer",
											"minimum": 1,
											"description": "How many nodes went: the node and its descendants."
										}
									},
									"required": [
										"deleted"
									],
									"additionalProperties": false
								},
								"example": {
									"deleted": 4
								}
							}
						}
					},
					"400": {
						"description": "Bad input: unknown field, wrong type, too long.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"401": {
						"description": "Missing, malformed, expired or revoked token.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"403": {
						"description": "The token lacks the scope this endpoint needs.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"404": {
						"description": "No such resource, or the token cannot see it.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"429": {
						"description": "Rate limited; see `retry-after`.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"500": {
						"description": "Internal error.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"502": {
						"description": "The database failed.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"503": {
						"description": "The API is not set up on this server.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"507": {
						"description": "Storage limit reached.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					}
				}
			}
		},
		"/v1/nodes/{id}/children": {
			"get": {
				"operationId": "getNodesIdChildren",
				"summary": "List a node's children",
				"description": "A node's direct children in outline order (`order`, then `id`), a page at a time. The id may also be `day:YYYY-MM-DD` or `root:home` (the top of your outline). Children in spaces the token can't read are left out.\n\nScope: `nodes:read`.",
				"x-rolyx-scope": "nodes:read",
				"security": [
					{
						"bearerAuth": []
					}
				],
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"description": "Node id.",
						"schema": {
							"type": "string",
							"maxLength": 64,
							"pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|root:[a-z]{1,16}|year:\\d{4}|month:\\d{4}-\\d{2}|day:\\d{4}-\\d{2}-\\d{2})$",
							"description": "Node id."
						}
					},
					{
						"name": "cursor",
						"in": "query",
						"required": false,
						"description": "Where to continue: `nextCursor` from the previous page.",
						"schema": {
							"type": "string",
							"maxLength": 400,
							"pattern": "^[A-Za-z0-9_-]+$",
							"description": "Where to continue: `nextCursor` from the previous page."
						}
					},
					{
						"name": "limit",
						"in": "query",
						"required": false,
						"description": "Rows per page, 1 to 200. Default 100.",
						"schema": {
							"type": "integer",
							"minimum": 1,
							"maximum": 200,
							"description": "Rows per page, 1 to 200. Default 100."
						}
					}
				],
				"responses": {
					"200": {
						"description": "Success.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"items": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"maxLength": 64,
														"description": "Node id: a UUID."
													},
													"parentId": {
														"type": [
															"string",
															"null"
														],
														"maxLength": 64,
														"description": "The parent: a node id, `day:YYYY-MM-DD` (a day in the Journal) or `root:home`."
													},
													"order": {
														"type": "string",
														"maxLength": 256,
														"description": "Sort key among its siblings: siblings sort by `(order, id)`, compared byte by byte. Opaque."
													},
													"text": {
														"type": "string",
														"maxLength": 262144,
														"description": "The text; the first line is its name. Markdown, `[[links]]` and `#tags` as in the app."
													},
													"type": {
														"type": "string",
														"maxLength": 64,
														"description": "`note`, `task`, `project`, `aim`, `habit`, `search`, or `custom:<id>` (see `GET /v1/types`)."
													},
													"size": {
														"type": "string",
														"maxLength": 1000,
														"enum": [
															"sm",
															"md",
															"lg"
														],
														"description": "Task size, when set."
													},
													"done": {
														"type": "boolean",
														"description": "Completed. For a repeating item: the series has ended."
													},
													"schedule": {
														"type": [
															"object",
															"null"
														],
														"properties": {
															"date": {
																"type": "string",
																"maxLength": 10,
																"format": "date",
																"description": "Do on this day."
															},
															"window": {
																"type": "object",
																"properties": {
																	"start": {
																		"type": "string",
																		"maxLength": 10,
																		"format": "date",
																		"description": "First day."
																	},
																	"end": {
																		"type": "string",
																		"maxLength": 10,
																		"format": "date",
																		"description": "Last day."
																	}
																},
																"required": [
																	"start",
																	"end"
																],
																"additionalProperties": false,
																"description": "Sometime in these days."
															},
															"time": {
																"type": "string",
																"maxLength": 5,
																"pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
																"description": "Time of day, `HH:MM`, wall clock."
															},
															"duration": {
																"type": "integer",
																"minimum": 1,
																"maximum": 1440,
																"description": "Length in minutes, when not the default for its size."
															},
															"someday": {
																"type": "boolean",
																"description": "Parked (someday / maybe). Always `true` when present."
															},
															"repeat": {
																"type": "object",
																"properties": {
																	"start": {
																		"type": "string",
																		"maxLength": 10,
																		"format": "date",
																		"description": "First day."
																	},
																	"end": {
																		"type": "string",
																		"maxLength": 10,
																		"format": "date",
																		"description": "Last day."
																	}
																},
																"required": [
																	"start",
																	"end"
																],
																"additionalProperties": false,
																"description": "A repeating item's current occurrence. Read-only: repeats are set up in the app."
															}
														},
														"additionalProperties": false,
														"description": "When it matters, or null. Date, window, someday and repeat replace one another."
													},
													"createdAt": {
														"type": "string",
														"maxLength": 40,
														"format": "date-time",
														"description": "When it was made."
													},
													"updatedAt": {
														"type": "string",
														"maxLength": 40,
														"format": "date-time",
														"description": "When it last changed, on any device."
													},
													"space": {
														"type": "string",
														"maxLength": 36,
														"format": "uuid",
														"description": "The space it lives in: your personal space (your user id) or a shared one (see `GET /v1/me`)."
													}
												},
												"required": [
													"id",
													"parentId",
													"order",
													"text",
													"type",
													"done",
													"schedule",
													"createdAt",
													"updatedAt",
													"space"
												],
												"additionalProperties": false
											},
											"description": "The children, in order."
										},
										"nextCursor": {
											"type": [
												"string",
												"null"
											],
											"maxLength": 400,
											"description": "Pass as `cursor` for the next page; null on the last one."
										}
									},
									"required": [
										"items",
										"nextCursor"
									],
									"additionalProperties": false
								},
								"example": {
									"items": [
										{
											"id": "019ab1c2-3d4e-7f00-8a1b-2c3d4e5f6a7b",
											"parentId": "day:2026-11-25",
											"order": "a0V3k",
											"text": "Call the dentist",
											"type": "task",
											"size": "sm",
											"done": false,
											"schedule": {
												"date": "2026-11-27",
												"time": "09:30"
											},
											"createdAt": "2026-11-25T09:00:00.000Z",
											"updatedAt": "2026-11-25T09:00:00.000Z",
											"space": "0b7e9a52-1c3d-4e5f-8a9b-0c1d2e3f4a5b"
										}
									],
									"nextCursor": null
								}
							}
						}
					},
					"400": {
						"description": "Bad input: unknown field, wrong type, too long.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"401": {
						"description": "Missing, malformed, expired or revoked token.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"403": {
						"description": "The token lacks the scope this endpoint needs.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"404": {
						"description": "No such resource, or the token cannot see it.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"429": {
						"description": "Rate limited; see `retry-after`.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"500": {
						"description": "Internal error.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"502": {
						"description": "The database failed.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"503": {
						"description": "The API is not set up on this server.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					}
				}
			}
		},
		"/v1/nodes": {
			"post": {
				"operationId": "postNodes",
				"summary": "Add a node",
				"description": "Adds a node under `parentId`, on `date`'s day, or (neither) last in today's dump where today is the date in `tz`. It lands last among its siblings unless `before` or `after` names one, and joins its parent's space. A custom type is found by name, its own space's first. Replies `201` with the node as stored; a token without `nodes:read` gets only its `id`. Devices pick it up on their next sync.\n\nScope: `nodes:write`.",
				"x-rolyx-scope": "nodes:write",
				"security": [
					{
						"bearerAuth": []
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"text": {
										"type": "string",
										"minLength": 1,
										"maxLength": 2000,
										"description": "The node text. Markdown and `#tags` work as in the app.",
										"examples": [
											"Call the dentist"
										]
									},
									"type": {
										"type": "string",
										"maxLength": 200,
										"description": "`note` (default), `task`, `project`, or the name of a custom type, any case. In a shared space, only that space's own custom types.",
										"examples": [
											"task"
										]
									},
									"size": {
										"type": "string",
										"maxLength": 1000,
										"enum": [
											"sm",
											"md",
											"lg"
										],
										"description": "Task size."
									},
									"parentId": {
										"type": "string",
										"maxLength": 64,
										"pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|root:[a-z]{1,16}|year:\\d{4}|month:\\d{4}-\\d{2}|day:\\d{4}-\\d{2}-\\d{2})$",
										"description": "Where it goes: a node id, `day:YYYY-MM-DD` or `root:home`. It joins the parent's space. Default: today's day."
									},
									"date": {
										"type": "string",
										"maxLength": 10,
										"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
										"format": "date",
										"description": "Shorthand for `parentId: \"day:<date>\"`."
									},
									"before": {
										"type": "string",
										"maxLength": 64,
										"pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|root:[a-z]{1,16}|year:\\d{4}|month:\\d{4}-\\d{2}|day:\\d{4}-\\d{2}-\\d{2})$",
										"description": "Land just before this sibling."
									},
									"after": {
										"type": "string",
										"maxLength": 64,
										"pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|root:[a-z]{1,16}|year:\\d{4}|month:\\d{4}-\\d{2}|day:\\d{4}-\\d{2}-\\d{2})$",
										"description": "Land just after this sibling. Neither = last."
									},
									"tz": {
										"type": "string",
										"maxLength": 64,
										"description": "IANA time zone that decides which day is today when neither `parentId` nor `date` is given. Default UTC.",
										"examples": [
											"Europe/London"
										]
									}
								},
								"required": [
									"text"
								],
								"additionalProperties": false
							}
						}
					}
				},
				"responses": {
					"201": {
						"description": "Success.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"maxLength": 64,
											"description": "Node id: a UUID."
										},
										"parentId": {
											"type": [
												"string",
												"null"
											],
											"maxLength": 64,
											"description": "The parent: a node id, `day:YYYY-MM-DD` (a day in the Journal) or `root:home`."
										},
										"order": {
											"type": "string",
											"maxLength": 256,
											"description": "Sort key among its siblings: siblings sort by `(order, id)`, compared byte by byte. Opaque."
										},
										"text": {
											"type": "string",
											"maxLength": 262144,
											"description": "The text; the first line is its name. Markdown, `[[links]]` and `#tags` as in the app."
										},
										"type": {
											"type": "string",
											"maxLength": 64,
											"description": "`note`, `task`, `project`, `aim`, `habit`, `search`, or `custom:<id>` (see `GET /v1/types`)."
										},
										"size": {
											"type": "string",
											"maxLength": 1000,
											"enum": [
												"sm",
												"md",
												"lg"
											],
											"description": "Task size, when set."
										},
										"done": {
											"type": "boolean",
											"description": "Completed. For a repeating item: the series has ended."
										},
										"schedule": {
											"type": [
												"object",
												"null"
											],
											"properties": {
												"date": {
													"type": "string",
													"maxLength": 10,
													"format": "date",
													"description": "Do on this day."
												},
												"window": {
													"type": "object",
													"properties": {
														"start": {
															"type": "string",
															"maxLength": 10,
															"format": "date",
															"description": "First day."
														},
														"end": {
															"type": "string",
															"maxLength": 10,
															"format": "date",
															"description": "Last day."
														}
													},
													"required": [
														"start",
														"end"
													],
													"additionalProperties": false,
													"description": "Sometime in these days."
												},
												"time": {
													"type": "string",
													"maxLength": 5,
													"pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
													"description": "Time of day, `HH:MM`, wall clock."
												},
												"duration": {
													"type": "integer",
													"minimum": 1,
													"maximum": 1440,
													"description": "Length in minutes, when not the default for its size."
												},
												"someday": {
													"type": "boolean",
													"description": "Parked (someday / maybe). Always `true` when present."
												},
												"repeat": {
													"type": "object",
													"properties": {
														"start": {
															"type": "string",
															"maxLength": 10,
															"format": "date",
															"description": "First day."
														},
														"end": {
															"type": "string",
															"maxLength": 10,
															"format": "date",
															"description": "Last day."
														}
													},
													"required": [
														"start",
														"end"
													],
													"additionalProperties": false,
													"description": "A repeating item's current occurrence. Read-only: repeats are set up in the app."
												}
											},
											"additionalProperties": false,
											"description": "When it matters, or null. Date, window, someday and repeat replace one another."
										},
										"createdAt": {
											"type": "string",
											"maxLength": 40,
											"format": "date-time",
											"description": "When it was made."
										},
										"updatedAt": {
											"type": "string",
											"maxLength": 40,
											"format": "date-time",
											"description": "When it last changed, on any device."
										},
										"space": {
											"type": "string",
											"maxLength": 36,
											"format": "uuid",
											"description": "The space it lives in: your personal space (your user id) or a shared one (see `GET /v1/me`)."
										}
									},
									"required": [
										"id"
									],
									"additionalProperties": false,
									"description": "The node as stored after the write. A token without `nodes:read` gets only `id`."
								},
								"example": {
									"id": "019ab1c2-3d4e-7f00-8a1b-2c3d4e5f6a7b",
									"parentId": "day:2026-11-25",
									"order": "a0V3k",
									"text": "Call the dentist",
									"type": "task",
									"size": "sm",
									"done": false,
									"schedule": {
										"date": "2026-11-27",
										"time": "09:30"
									},
									"createdAt": "2026-11-25T09:00:00.000Z",
									"updatedAt": "2026-11-25T09:00:00.000Z",
									"space": "0b7e9a52-1c3d-4e5f-8a9b-0c1d2e3f4a5b"
								}
							}
						}
					},
					"400": {
						"description": "Bad input: unknown field, wrong type, too long.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"401": {
						"description": "Missing, malformed, expired or revoked token.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"403": {
						"description": "The token lacks the scope this endpoint needs.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"404": {
						"description": "No such resource, or the token cannot see it.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"413": {
						"description": "Body over 16 KB.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"415": {
						"description": "Body is not `application/json`.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"429": {
						"description": "Rate limited; see `retry-after`.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"500": {
						"description": "Internal error.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"502": {
						"description": "The database failed.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"503": {
						"description": "The API is not set up on this server.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"507": {
						"description": "Storage limit reached.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					}
				}
			}
		},
		"/v1/nodes/{id}/move": {
			"post": {
				"operationId": "postNodesIdMove",
				"summary": "Move a node",
				"description": "Moves a node, with everything under it, under `parentId` (a node, `day:YYYY-MM-DD` or `root:home`), last unless `before` or `after` names a sibling. Within one space only: moving into, out of or between shared items is done in the app (400), as is moving the top of a shared item. A node can't go under itself or its own children (400).\n\nScope: `nodes:write`.",
				"x-rolyx-scope": "nodes:write",
				"security": [
					{
						"bearerAuth": []
					}
				],
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"description": "Node id.",
						"schema": {
							"type": "string",
							"maxLength": 64,
							"pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|root:[a-z]{1,16}|year:\\d{4}|month:\\d{4}-\\d{2}|day:\\d{4}-\\d{2}-\\d{2})$",
							"description": "Node id."
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"parentId": {
										"type": "string",
										"maxLength": 64,
										"pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|root:[a-z]{1,16}|year:\\d{4}|month:\\d{4}-\\d{2}|day:\\d{4}-\\d{2}-\\d{2})$",
										"description": "The new parent."
									},
									"before": {
										"type": "string",
										"maxLength": 64,
										"pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|root:[a-z]{1,16}|year:\\d{4}|month:\\d{4}-\\d{2}|day:\\d{4}-\\d{2}-\\d{2})$",
										"description": "Land just before this sibling."
									},
									"after": {
										"type": "string",
										"maxLength": 64,
										"pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|root:[a-z]{1,16}|year:\\d{4}|month:\\d{4}-\\d{2}|day:\\d{4}-\\d{2}-\\d{2})$",
										"description": "Land just after this sibling. Neither = last."
									}
								},
								"required": [
									"parentId"
								],
								"additionalProperties": false
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Success.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"maxLength": 64,
											"description": "Node id: a UUID."
										},
										"parentId": {
											"type": [
												"string",
												"null"
											],
											"maxLength": 64,
											"description": "The parent: a node id, `day:YYYY-MM-DD` (a day in the Journal) or `root:home`."
										},
										"order": {
											"type": "string",
											"maxLength": 256,
											"description": "Sort key among its siblings: siblings sort by `(order, id)`, compared byte by byte. Opaque."
										},
										"text": {
											"type": "string",
											"maxLength": 262144,
											"description": "The text; the first line is its name. Markdown, `[[links]]` and `#tags` as in the app."
										},
										"type": {
											"type": "string",
											"maxLength": 64,
											"description": "`note`, `task`, `project`, `aim`, `habit`, `search`, or `custom:<id>` (see `GET /v1/types`)."
										},
										"size": {
											"type": "string",
											"maxLength": 1000,
											"enum": [
												"sm",
												"md",
												"lg"
											],
											"description": "Task size, when set."
										},
										"done": {
											"type": "boolean",
											"description": "Completed. For a repeating item: the series has ended."
										},
										"schedule": {
											"type": [
												"object",
												"null"
											],
											"properties": {
												"date": {
													"type": "string",
													"maxLength": 10,
													"format": "date",
													"description": "Do on this day."
												},
												"window": {
													"type": "object",
													"properties": {
														"start": {
															"type": "string",
															"maxLength": 10,
															"format": "date",
															"description": "First day."
														},
														"end": {
															"type": "string",
															"maxLength": 10,
															"format": "date",
															"description": "Last day."
														}
													},
													"required": [
														"start",
														"end"
													],
													"additionalProperties": false,
													"description": "Sometime in these days."
												},
												"time": {
													"type": "string",
													"maxLength": 5,
													"pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
													"description": "Time of day, `HH:MM`, wall clock."
												},
												"duration": {
													"type": "integer",
													"minimum": 1,
													"maximum": 1440,
													"description": "Length in minutes, when not the default for its size."
												},
												"someday": {
													"type": "boolean",
													"description": "Parked (someday / maybe). Always `true` when present."
												},
												"repeat": {
													"type": "object",
													"properties": {
														"start": {
															"type": "string",
															"maxLength": 10,
															"format": "date",
															"description": "First day."
														},
														"end": {
															"type": "string",
															"maxLength": 10,
															"format": "date",
															"description": "Last day."
														}
													},
													"required": [
														"start",
														"end"
													],
													"additionalProperties": false,
													"description": "A repeating item's current occurrence. Read-only: repeats are set up in the app."
												}
											},
											"additionalProperties": false,
											"description": "When it matters, or null. Date, window, someday and repeat replace one another."
										},
										"createdAt": {
											"type": "string",
											"maxLength": 40,
											"format": "date-time",
											"description": "When it was made."
										},
										"updatedAt": {
											"type": "string",
											"maxLength": 40,
											"format": "date-time",
											"description": "When it last changed, on any device."
										},
										"space": {
											"type": "string",
											"maxLength": 36,
											"format": "uuid",
											"description": "The space it lives in: your personal space (your user id) or a shared one (see `GET /v1/me`)."
										}
									},
									"required": [
										"id"
									],
									"additionalProperties": false,
									"description": "The node as stored after the write. A token without `nodes:read` gets only `id`."
								},
								"example": {
									"id": "019ab1c2-3d4e-7f00-8a1b-2c3d4e5f6a7b",
									"parentId": "day:2026-11-25",
									"order": "a0V3k",
									"text": "Call the dentist",
									"type": "task",
									"size": "sm",
									"done": false,
									"schedule": {
										"date": "2026-11-27",
										"time": "09:30"
									},
									"createdAt": "2026-11-25T09:00:00.000Z",
									"updatedAt": "2026-11-25T09:00:00.000Z",
									"space": "0b7e9a52-1c3d-4e5f-8a9b-0c1d2e3f4a5b"
								}
							}
						}
					},
					"400": {
						"description": "Bad input: unknown field, wrong type, too long.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"401": {
						"description": "Missing, malformed, expired or revoked token.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"403": {
						"description": "The token lacks the scope this endpoint needs.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"404": {
						"description": "No such resource, or the token cannot see it.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"413": {
						"description": "Body over 16 KB.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"415": {
						"description": "Body is not `application/json`.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"429": {
						"description": "Rate limited; see `retry-after`.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"500": {
						"description": "Internal error.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"502": {
						"description": "The database failed.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"503": {
						"description": "The API is not set up on this server.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"507": {
						"description": "Storage limit reached.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					}
				}
			}
		},
		"/v1/days/{date}": {
			"get": {
				"operationId": "getDaysDate",
				"summary": "A day's dump",
				"description": "The nodes written directly in a day (its dump in the Journal), in outline order. Days are personal: shared items never sit on a day. Scheduled items aren't listed; find them with `GET /v1/search?q=on:<date>`.\n\nScope: `nodes:read`.",
				"x-rolyx-scope": "nodes:read",
				"security": [
					{
						"bearerAuth": []
					}
				],
				"parameters": [
					{
						"name": "date",
						"in": "path",
						"required": true,
						"description": "The day, `YYYY-MM-DD`.",
						"schema": {
							"type": "string",
							"maxLength": 10,
							"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
							"format": "date",
							"description": "The day, `YYYY-MM-DD`."
						}
					}
				],
				"responses": {
					"200": {
						"description": "Success.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"date": {
											"type": "string",
											"maxLength": 10,
											"format": "date"
										},
										"nodes": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"maxLength": 64,
														"description": "Node id: a UUID."
													},
													"parentId": {
														"type": [
															"string",
															"null"
														],
														"maxLength": 64,
														"description": "The parent: a node id, `day:YYYY-MM-DD` (a day in the Journal) or `root:home`."
													},
													"order": {
														"type": "string",
														"maxLength": 256,
														"description": "Sort key among its siblings: siblings sort by `(order, id)`, compared byte by byte. Opaque."
													},
													"text": {
														"type": "string",
														"maxLength": 262144,
														"description": "The text; the first line is its name. Markdown, `[[links]]` and `#tags` as in the app."
													},
													"type": {
														"type": "string",
														"maxLength": 64,
														"description": "`note`, `task`, `project`, `aim`, `habit`, `search`, or `custom:<id>` (see `GET /v1/types`)."
													},
													"size": {
														"type": "string",
														"maxLength": 1000,
														"enum": [
															"sm",
															"md",
															"lg"
														],
														"description": "Task size, when set."
													},
													"done": {
														"type": "boolean",
														"description": "Completed. For a repeating item: the series has ended."
													},
													"schedule": {
														"type": [
															"object",
															"null"
														],
														"properties": {
															"date": {
																"type": "string",
																"maxLength": 10,
																"format": "date",
																"description": "Do on this day."
															},
															"window": {
																"type": "object",
																"properties": {
																	"start": {
																		"type": "string",
																		"maxLength": 10,
																		"format": "date",
																		"description": "First day."
																	},
																	"end": {
																		"type": "string",
																		"maxLength": 10,
																		"format": "date",
																		"description": "Last day."
																	}
																},
																"required": [
																	"start",
																	"end"
																],
																"additionalProperties": false,
																"description": "Sometime in these days."
															},
															"time": {
																"type": "string",
																"maxLength": 5,
																"pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
																"description": "Time of day, `HH:MM`, wall clock."
															},
															"duration": {
																"type": "integer",
																"minimum": 1,
																"maximum": 1440,
																"description": "Length in minutes, when not the default for its size."
															},
															"someday": {
																"type": "boolean",
																"description": "Parked (someday / maybe). Always `true` when present."
															},
															"repeat": {
																"type": "object",
																"properties": {
																	"start": {
																		"type": "string",
																		"maxLength": 10,
																		"format": "date",
																		"description": "First day."
																	},
																	"end": {
																		"type": "string",
																		"maxLength": 10,
																		"format": "date",
																		"description": "Last day."
																	}
																},
																"required": [
																	"start",
																	"end"
																],
																"additionalProperties": false,
																"description": "A repeating item's current occurrence. Read-only: repeats are set up in the app."
															}
														},
														"additionalProperties": false,
														"description": "When it matters, or null. Date, window, someday and repeat replace one another."
													},
													"createdAt": {
														"type": "string",
														"maxLength": 40,
														"format": "date-time",
														"description": "When it was made."
													},
													"updatedAt": {
														"type": "string",
														"maxLength": 40,
														"format": "date-time",
														"description": "When it last changed, on any device."
													},
													"space": {
														"type": "string",
														"maxLength": 36,
														"format": "uuid",
														"description": "The space it lives in: your personal space (your user id) or a shared one (see `GET /v1/me`)."
													}
												},
												"required": [
													"id",
													"parentId",
													"order",
													"text",
													"type",
													"done",
													"schedule",
													"createdAt",
													"updatedAt",
													"space"
												],
												"additionalProperties": false
											},
											"description": "The day's top-level nodes, in outline order. Their children: `GET /v1/nodes/{id}/children`."
										}
									},
									"required": [
										"date",
										"nodes"
									],
									"additionalProperties": false
								},
								"example": {
									"date": "2026-11-25",
									"nodes": [
										{
											"id": "019ab1c2-3d4e-7f00-8a1b-2c3d4e5f6a7b",
											"parentId": "day:2026-11-25",
											"order": "a0V3k",
											"text": "Call the dentist",
											"type": "task",
											"size": "sm",
											"done": false,
											"schedule": {
												"date": "2026-11-27",
												"time": "09:30"
											},
											"createdAt": "2026-11-25T09:00:00.000Z",
											"updatedAt": "2026-11-25T09:00:00.000Z",
											"space": "0b7e9a52-1c3d-4e5f-8a9b-0c1d2e3f4a5b"
										}
									]
								}
							}
						}
					},
					"400": {
						"description": "Bad input: unknown field, wrong type, too long.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"401": {
						"description": "Missing, malformed, expired or revoked token.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"403": {
						"description": "The token lacks the scope this endpoint needs.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"404": {
						"description": "No such resource, or the token cannot see it.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"429": {
						"description": "Rate limited; see `retry-after`.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"500": {
						"description": "Internal error.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"502": {
						"description": "The database failed.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"503": {
						"description": "The API is not set up on this server.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					}
				}
			}
		},
		"/v1/days": {
			"get": {
				"operationId": "getDays",
				"summary": "Several days",
				"description": "Each day from `from` to `to` (inclusive, at most 31 days) with the nodes written directly in it, empty days included.\n\nScope: `nodes:read`.",
				"x-rolyx-scope": "nodes:read",
				"security": [
					{
						"bearerAuth": []
					}
				],
				"parameters": [
					{
						"name": "from",
						"in": "query",
						"required": true,
						"description": "First day.",
						"schema": {
							"type": "string",
							"maxLength": 10,
							"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
							"format": "date",
							"description": "First day."
						}
					},
					{
						"name": "to",
						"in": "query",
						"required": true,
						"description": "Last day.",
						"schema": {
							"type": "string",
							"maxLength": 10,
							"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
							"format": "date",
							"description": "Last day."
						}
					}
				],
				"responses": {
					"200": {
						"description": "Success.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"days": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"date": {
														"type": "string",
														"maxLength": 10,
														"format": "date"
													},
													"nodes": {
														"type": "array",
														"items": {
															"type": "object",
															"properties": {
																"id": {
																	"type": "string",
																	"maxLength": 64,
																	"description": "Node id: a UUID."
																},
																"parentId": {
																	"type": [
																		"string",
																		"null"
																	],
																	"maxLength": 64,
																	"description": "The parent: a node id, `day:YYYY-MM-DD` (a day in the Journal) or `root:home`."
																},
																"order": {
																	"type": "string",
																	"maxLength": 256,
																	"description": "Sort key among its siblings: siblings sort by `(order, id)`, compared byte by byte. Opaque."
																},
																"text": {
																	"type": "string",
																	"maxLength": 262144,
																	"description": "The text; the first line is its name. Markdown, `[[links]]` and `#tags` as in the app."
																},
																"type": {
																	"type": "string",
																	"maxLength": 64,
																	"description": "`note`, `task`, `project`, `aim`, `habit`, `search`, or `custom:<id>` (see `GET /v1/types`)."
																},
																"size": {
																	"type": "string",
																	"maxLength": 1000,
																	"enum": [
																		"sm",
																		"md",
																		"lg"
																	],
																	"description": "Task size, when set."
																},
																"done": {
																	"type": "boolean",
																	"description": "Completed. For a repeating item: the series has ended."
																},
																"schedule": {
																	"type": [
																		"object",
																		"null"
																	],
																	"properties": {
																		"date": {
																			"type": "string",
																			"maxLength": 10,
																			"format": "date",
																			"description": "Do on this day."
																		},
																		"window": {
																			"type": "object",
																			"properties": {
																				"start": {
																					"type": "string",
																					"maxLength": 10,
																					"format": "date",
																					"description": "First day."
																				},
																				"end": {
																					"type": "string",
																					"maxLength": 10,
																					"format": "date",
																					"description": "Last day."
																				}
																			},
																			"required": [
																				"start",
																				"end"
																			],
																			"additionalProperties": false,
																			"description": "Sometime in these days."
																		},
																		"time": {
																			"type": "string",
																			"maxLength": 5,
																			"pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
																			"description": "Time of day, `HH:MM`, wall clock."
																		},
																		"duration": {
																			"type": "integer",
																			"minimum": 1,
																			"maximum": 1440,
																			"description": "Length in minutes, when not the default for its size."
																		},
																		"someday": {
																			"type": "boolean",
																			"description": "Parked (someday / maybe). Always `true` when present."
																		},
																		"repeat": {
																			"type": "object",
																			"properties": {
																				"start": {
																					"type": "string",
																					"maxLength": 10,
																					"format": "date",
																					"description": "First day."
																				},
																				"end": {
																					"type": "string",
																					"maxLength": 10,
																					"format": "date",
																					"description": "Last day."
																				}
																			},
																			"required": [
																				"start",
																				"end"
																			],
																			"additionalProperties": false,
																			"description": "A repeating item's current occurrence. Read-only: repeats are set up in the app."
																		}
																	},
																	"additionalProperties": false,
																	"description": "When it matters, or null. Date, window, someday and repeat replace one another."
																},
																"createdAt": {
																	"type": "string",
																	"maxLength": 40,
																	"format": "date-time",
																	"description": "When it was made."
																},
																"updatedAt": {
																	"type": "string",
																	"maxLength": 40,
																	"format": "date-time",
																	"description": "When it last changed, on any device."
																},
																"space": {
																	"type": "string",
																	"maxLength": 36,
																	"format": "uuid",
																	"description": "The space it lives in: your personal space (your user id) or a shared one (see `GET /v1/me`)."
																}
															},
															"required": [
																"id",
																"parentId",
																"order",
																"text",
																"type",
																"done",
																"schedule",
																"createdAt",
																"updatedAt",
																"space"
															],
															"additionalProperties": false
														},
														"description": "The day's top-level nodes, in outline order. Their children: `GET /v1/nodes/{id}/children`."
													}
												},
												"required": [
													"date",
													"nodes"
												],
												"additionalProperties": false
											},
											"maxItems": 31
										}
									},
									"required": [
										"days"
									],
									"additionalProperties": false
								},
								"example": {
									"days": [
										{
											"date": "2026-11-25",
											"nodes": [
												{
													"id": "019ab1c2-3d4e-7f00-8a1b-2c3d4e5f6a7b",
													"parentId": "day:2026-11-25",
													"order": "a0V3k",
													"text": "Call the dentist",
													"type": "task",
													"size": "sm",
													"done": false,
													"schedule": {
														"date": "2026-11-27",
														"time": "09:30"
													},
													"createdAt": "2026-11-25T09:00:00.000Z",
													"updatedAt": "2026-11-25T09:00:00.000Z",
													"space": "0b7e9a52-1c3d-4e5f-8a9b-0c1d2e3f4a5b"
												}
											]
										}
									]
								}
							}
						}
					},
					"400": {
						"description": "Bad input: unknown field, wrong type, too long.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"401": {
						"description": "Missing, malformed, expired or revoked token.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"403": {
						"description": "The token lacks the scope this endpoint needs.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"404": {
						"description": "No such resource, or the token cannot see it.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"429": {
						"description": "Rate limited; see `retry-after`.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"500": {
						"description": "Internal error.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"502": {
						"description": "The database failed.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"503": {
						"description": "The API is not set up on this server.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					}
				}
			}
		},
		"/v1/search": {
			"get": {
				"operationId": "getSearch",
				"summary": "Search",
				"description": "Finds nodes in every space the token reads, with the app's search syntax: words, `#tags` and the filters `is:`, `done:`, `in:[[…]]`, `on:`, `when:`, `nested:`, `someday:`, `sort:`. Unlike the app: words match as prefixes of words (`plum` finds \"plumber\"), with no typo tolerance; there is no relevance score, so open hits come before done or dropped ones, newest first, unless `sort:` says otherwise; a `node` field matches by the linked node's id, not its name; and a query that is a date doesn't add that day's scheduled and done items. `is:<name>` finds that custom type in every space. At most 3 `in:` filters. A query that would look at more than 20,000 nodes (or 8 MB of them) is refused as too broad (400): add words or filters.\n\nScope: `search`.",
				"x-rolyx-scope": "search",
				"security": [
					{
						"bearerAuth": []
					}
				],
				"parameters": [
					{
						"name": "q",
						"in": "query",
						"required": true,
						"description": "The query, as typed in the app.",
						"schema": {
							"type": "string",
							"minLength": 1,
							"maxLength": 500,
							"description": "The query, as typed in the app.",
							"examples": [
								"is:task done:no #reno"
							]
						}
					},
					{
						"name": "cursor",
						"in": "query",
						"required": false,
						"description": "Where to continue: `nextCursor` from the previous page.",
						"schema": {
							"type": "string",
							"maxLength": 400,
							"pattern": "^[A-Za-z0-9_-]+$",
							"description": "Where to continue: `nextCursor` from the previous page."
						}
					},
					{
						"name": "limit",
						"in": "query",
						"required": false,
						"description": "Rows per page, 1 to 200. Default 50.",
						"schema": {
							"type": "integer",
							"minimum": 1,
							"maximum": 200,
							"description": "Rows per page, 1 to 200. Default 50."
						}
					},
					{
						"name": "tz",
						"in": "query",
						"required": false,
						"description": "IANA time zone for `today`, `when:` and relative dates. Default UTC.",
						"schema": {
							"type": "string",
							"maxLength": 64,
							"description": "IANA time zone for `today`, `when:` and relative dates. Default UTC."
						}
					}
				],
				"responses": {
					"200": {
						"description": "Success.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"items": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"maxLength": 64,
														"description": "Node id: a UUID."
													},
													"parentId": {
														"type": [
															"string",
															"null"
														],
														"maxLength": 64,
														"description": "The parent: a node id, `day:YYYY-MM-DD` (a day in the Journal) or `root:home`."
													},
													"order": {
														"type": "string",
														"maxLength": 256,
														"description": "Sort key among its siblings: siblings sort by `(order, id)`, compared byte by byte. Opaque."
													},
													"text": {
														"type": "string",
														"maxLength": 262144,
														"description": "The text; the first line is its name. Markdown, `[[links]]` and `#tags` as in the app."
													},
													"type": {
														"type": "string",
														"maxLength": 64,
														"description": "`note`, `task`, `project`, `aim`, `habit`, `search`, or `custom:<id>` (see `GET /v1/types`)."
													},
													"size": {
														"type": "string",
														"maxLength": 1000,
														"enum": [
															"sm",
															"md",
															"lg"
														],
														"description": "Task size, when set."
													},
													"done": {
														"type": "boolean",
														"description": "Completed. For a repeating item: the series has ended."
													},
													"schedule": {
														"type": [
															"object",
															"null"
														],
														"properties": {
															"date": {
																"type": "string",
																"maxLength": 10,
																"format": "date",
																"description": "Do on this day."
															},
															"window": {
																"type": "object",
																"properties": {
																	"start": {
																		"type": "string",
																		"maxLength": 10,
																		"format": "date",
																		"description": "First day."
																	},
																	"end": {
																		"type": "string",
																		"maxLength": 10,
																		"format": "date",
																		"description": "Last day."
																	}
																},
																"required": [
																	"start",
																	"end"
																],
																"additionalProperties": false,
																"description": "Sometime in these days."
															},
															"time": {
																"type": "string",
																"maxLength": 5,
																"pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
																"description": "Time of day, `HH:MM`, wall clock."
															},
															"duration": {
																"type": "integer",
																"minimum": 1,
																"maximum": 1440,
																"description": "Length in minutes, when not the default for its size."
															},
															"someday": {
																"type": "boolean",
																"description": "Parked (someday / maybe). Always `true` when present."
															},
															"repeat": {
																"type": "object",
																"properties": {
																	"start": {
																		"type": "string",
																		"maxLength": 10,
																		"format": "date",
																		"description": "First day."
																	},
																	"end": {
																		"type": "string",
																		"maxLength": 10,
																		"format": "date",
																		"description": "Last day."
																	}
																},
																"required": [
																	"start",
																	"end"
																],
																"additionalProperties": false,
																"description": "A repeating item's current occurrence. Read-only: repeats are set up in the app."
															}
														},
														"additionalProperties": false,
														"description": "When it matters, or null. Date, window, someday and repeat replace one another."
													},
													"createdAt": {
														"type": "string",
														"maxLength": 40,
														"format": "date-time",
														"description": "When it was made."
													},
													"updatedAt": {
														"type": "string",
														"maxLength": 40,
														"format": "date-time",
														"description": "When it last changed, on any device."
													},
													"space": {
														"type": "string",
														"maxLength": 36,
														"format": "uuid",
														"description": "The space it lives in: your personal space (your user id) or a shared one (see `GET /v1/me`)."
													}
												},
												"required": [
													"id",
													"parentId",
													"order",
													"text",
													"type",
													"done",
													"schedule",
													"createdAt",
													"updatedAt",
													"space"
												],
												"additionalProperties": false
											}
										},
										"total": {
											"type": "integer",
											"minimum": 0,
											"description": "Hits on every page together."
										},
										"nextCursor": {
											"type": [
												"string",
												"null"
											],
											"maxLength": 400,
											"description": "Pass as `cursor` for the next page; null on the last one."
										},
										"unknown": {
											"type": "array",
											"items": {
												"type": "string",
												"maxLength": 600
											},
											"description": "`is:` and `in:` values that name nothing; the search then finds nothing."
										}
									},
									"required": [
										"items",
										"total",
										"nextCursor",
										"unknown"
									],
									"additionalProperties": false
								},
								"example": {
									"items": [
										{
											"id": "019ab1c2-3d4e-7f00-8a1b-2c3d4e5f6a7b",
											"parentId": "day:2026-11-25",
											"order": "a0V3k",
											"text": "Call the dentist",
											"type": "task",
											"size": "sm",
											"done": false,
											"schedule": {
												"date": "2026-11-27",
												"time": "09:30"
											},
											"createdAt": "2026-11-25T09:00:00.000Z",
											"updatedAt": "2026-11-25T09:00:00.000Z",
											"space": "0b7e9a52-1c3d-4e5f-8a9b-0c1d2e3f4a5b"
										}
									],
									"total": 1,
									"nextCursor": null,
									"unknown": []
								}
							}
						}
					},
					"400": {
						"description": "Bad input: unknown field, wrong type, too long.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"401": {
						"description": "Missing, malformed, expired or revoked token.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"403": {
						"description": "The token lacks the scope this endpoint needs.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"404": {
						"description": "No such resource, or the token cannot see it.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"429": {
						"description": "Rate limited; see `retry-after`.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"500": {
						"description": "Internal error.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"502": {
						"description": "The database failed.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					},
					"503": {
						"description": "The API is not set up on this server.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Error"
								}
							}
						}
					}
				}
			}
		}
	},
	"components": {
		"securitySchemes": {
			"bearerAuth": {
				"type": "http",
				"scheme": "bearer",
				"description": "A personal token from Settings → API (`rlx_…`)."
			}
		},
		"schemas": {
			"Error": {
				"type": "object",
				"required": [
					"error"
				],
				"additionalProperties": false,
				"properties": {
					"error": {
						"type": "object",
						"required": [
							"code",
							"message"
						],
						"additionalProperties": false,
						"properties": {
							"code": {
								"type": "string",
								"enum": [
									"bad_request",
									"unauthorized",
									"insufficient_scope",
									"not_found",
									"payload_too_large",
									"unsupported_media_type",
									"rate_limited",
									"internal",
									"upstream_error",
									"unavailable",
									"storage_full"
								]
							},
							"message": {
								"type": "string"
							}
						}
					}
				}
			}
		}
	}
}