{
    "openapi": "3.1.0",
    "info": {
        "title": "FlowTasks API",
        "version": "v1",
        "description": "REST API for FlowTasks with boards, lists, to-dos and comments. Built for project management apps, task trackers and automations."
    },
    "servers": [
        {
            "url": "https://api.flowsuite.one",
            "description": "FlowSuite API"
        }
    ],
    "security": [
        {
            "bearerAuth": []
        }
    ],
    "tags": [
        {
            "name": "todos",
            "description": "Managing to-dos"
        },
        {
            "name": "boards",
            "description": "Boards"
        },
        {
            "name": "lists",
            "description": "Lists"
        },
        {
            "name": "assignments",
            "description": "Assignments"
        },
        {
            "name": "comments",
            "description": "Comments"
        },
        {
            "name": "labels",
            "description": "Labels"
        },
        {
            "name": "checklists",
            "description": "Checklists"
        },
        {
            "name": "sharing",
            "description": "Board sharing and ownership"
        },
        {
            "name": "files",
            "description": "Files"
        }
    ],
    "paths": {
        "/todos": {
            "get": {
                "operationId": "todos-list",
                "summary": "List to-dos",
                "description": "Returns your team's to-dos with cursor pagination. Without board_id only your own personal to-dos are returned; with board_id the to-dos of that board are returned (optionally narrowed further by list_id).",
                "tags": [
                    "todos"
                ],
                "parameters": [
                    {
                        "name": "type",
                        "in": "query",
                        "required": false,
                        "description": "Filter within the result set by type: assigned (assigned to me), completed or created (created by me)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "completed",
                        "in": "query",
                        "required": false,
                        "description": "Filter by status: true or false",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "priority",
                        "in": "query",
                        "required": false,
                        "description": "Filter by priority: low, medium, high",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "board_id",
                        "in": "query",
                        "required": false,
                        "description": "Board UUID; limits the results to to-dos of this board (requires board access)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "list_id",
                        "in": "query",
                        "required": false,
                        "description": "List UUID; only together with board_id, narrows down to one list",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "required": false,
                        "description": "Cursor from the meta object of the previous response for the next or previous page",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Results per page, 1-100 (default 50)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "550e8400-e29b-41d4-a716-446655440000",
                                            "title": "Feature implementieren",
                                            "priority": "high",
                                            "completed": false,
                                            "list": {
                                                "uuid": "f0e1d2c3-...",
                                                "name": "In Progress"
                                            }
                                        }
                                    ],
                                    "meta": {
                                        "next_cursor": "eyJpZCI6MTIzfQ==",
                                        "prev_cursor": null,
                                        "has_more": true,
                                        "per_page": 50
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "todos-create",
                "summary": "Create a to-do",
                "description": "Creates a new to-do, either personal (without list_id/board_id) or on a board. With recurring_interval you create a series, a to-do that moves itself to its next date each time it is completed. A series requires a due_date, otherwise the endpoint answers with HTTP 422.",
                "tags": [
                    "todos"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "550e8400-e29b-41d4-a716-446655440000",
                                        "title": "Feature implementieren",
                                        "priority": "high",
                                        "completed": false,
                                        "list": {
                                            "uuid": "f0e1d2c3-...",
                                            "name": "In Progress"
                                        },
                                        "created_at": "2024-01-01T10:00:00Z"
                                    },
                                    "message": "Todo created successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "description": "Title of the to-do (max. 255 characters)"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Description (max. 65,535 characters)"
                                    },
                                    "due_date": {
                                        "type": "string",
                                        "description": "Due date (ISO 8601)"
                                    },
                                    "priority": {
                                        "type": "string",
                                        "description": "Priority: low, medium, high"
                                    },
                                    "list_id": {
                                        "type": "string",
                                        "description": "UUID of the target list"
                                    },
                                    "board_id": {
                                        "type": "string",
                                        "description": "UUID of the target board (without list_id the first list of the board is used)"
                                    },
                                    "recurring_interval": {
                                        "type": "string",
                                        "description": "Recurrence interval: daily, every_2_days, weekly, every_2_weeks, monthly, every_2_months, quarterly, half_yearly, yearly. Requires due_date"
                                    },
                                    "assigned_to": {
                                        "type": "string",
                                        "description": "UUID of the assigned user (ignored when assigned_to_ids is set)"
                                    },
                                    "assigned_to_ids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Array of user UUIDs for multiple assignees; takes precedence over assigned_to"
                                    },
                                    "card_settings": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Card display; allowed keys: color (max. 32 characters), labels (max. 50 strings)"
                                    }
                                },
                                "required": [
                                    "title"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/todos/search": {
            "get": {
                "operationId": "todos-search",
                "summary": "Search to-dos",
                "description": "Searches title and description of every to-do you have access to (your own personal to-dos plus to-dos on boards you can access).",
                "tags": [
                    "todos"
                ],
                "parameters": [
                    {
                        "name": "search",
                        "in": "query",
                        "required": true,
                        "description": "Search term (1-100 characters). Characters such as % and _ are matched literally, not as wildcards",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "required": false,
                        "description": "Cursor from the meta object of the previous response for the next or previous page",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Results per page, 1-100 (default 50)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "550e8400-e29b-41d4-a716-446655440000",
                                            "title": "Feature implementieren",
                                            "priority": "high",
                                            "completed": false
                                        }
                                    ],
                                    "meta": {
                                        "next_cursor": "eyJpZCI6MTIzfQ==",
                                        "prev_cursor": null,
                                        "has_more": true,
                                        "per_page": 50
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/context": {
            "get": {
                "operationId": "todos-context",
                "summary": "Get module context",
                "description": "Returns the writable fields of each record type with their rules, the allowed priorities, the intervals for recurring tasks, the label colours and the board roles, so a client does not need to hard-code maximum lengths or value lists. rights.manage_labels also tells you whether the key may manage labels.",
                "tags": [
                    "todos"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "fields": {
                                            "todo": {
                                                "title": "required|string|max:255",
                                                "priority": "nullable|in:low,medium,high"
                                            }
                                        },
                                        "priorities": [
                                            "low",
                                            "medium",
                                            "high"
                                        ],
                                        "recurring_intervals": [
                                            "daily",
                                            "weekly",
                                            "monthly"
                                        ],
                                        "label_colors": [
                                            "zinc",
                                            "red",
                                            "blue"
                                        ],
                                        "board_roles": [
                                            "owner",
                                            "admin",
                                            "member"
                                        ],
                                        "rights": {
                                            "manage_labels": true
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/{todoUuid}": {
            "get": {
                "operationId": "todos-show",
                "summary": "Get a to-do",
                "description": "Returns a single to-do with all its details (including comments, checklists and labels).",
                "tags": [
                    "todos"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "550e8400-e29b-41d4-a716-446655440000",
                                        "title": "Feature implementieren",
                                        "description": null,
                                        "priority": "high",
                                        "completed": false,
                                        "list": {
                                            "uuid": "f0e1d2c3-...",
                                            "name": "In Progress"
                                        },
                                        "comments": [],
                                        "created_at": "2024-01-01T10:00:00Z"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "todos-update",
                "summary": "Update a to-do",
                "description": "Updates an existing to-do. All fields are optional, only the fields you send are changed. list_id:null is not allowed; use the detach endpoint to remove a to-do from its board explicitly. Validation errors return HTTP 422 with message and errors. On a series (a to-do with recurring_interval), completed:true only completes the current occurrence: the to-do stays open, its due_date moves ahead by one interval, and the completed occurrence is stored as a separate, completed to-do. data is always the to-do you addressed, so for a series it still has completed:false and the new due_date. The completed occurrence is returned next to it in the completed_occurrence field; in every other case that field is null. Reopening (completed:false) works on plain to-dos and on completed occurrences; the series itself is never completed. The due_date of a series cannot be changed directly (HTTP 422). A repeated call would also complete the next occurrence: if you send expected_due_date, you get HTTP 409 with the current date in current_due_date instead, as soon as the series has already moved on.",
                "tags": [
                    "todos"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "550e8400-e29b-41d4-a716-446655440000",
                                        "title": "Feature implementieren (aktualisiert)",
                                        "priority": "high",
                                        "completed": true,
                                        "recurring_interval": null
                                    },
                                    "completed_occurrence": null,
                                    "message": "Todo updated successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "description": "Title (if sent: required, max. 255 characters)"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Description (max. 65,535 characters)"
                                    },
                                    "due_date": {
                                        "type": "string",
                                        "description": "Due date"
                                    },
                                    "priority": {
                                        "type": "string",
                                        "description": "Priority: low, medium, high"
                                    },
                                    "list_id": {
                                        "type": "string",
                                        "description": "UUID of the new target list (moves the to-do)"
                                    },
                                    "assigned_to": {
                                        "type": "string",
                                        "description": "UUID of the assigned user (ignored when assigned_to_ids is sent)"
                                    },
                                    "assigned_to_ids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Array of user UUIDs; replaces the complete list of assignees"
                                    },
                                    "completed": {
                                        "type": "boolean",
                                        "description": "true completes the to-do, false reopens it. On a series, true only completes the current occurrence"
                                    },
                                    "recurring_interval": {
                                        "type": "string",
                                        "description": "Recurrence interval: daily, every_2_days, weekly, every_2_weeks, monthly, every_2_months, quarterly, half_yearly, yearly. Requires a due_date; null ends the series"
                                    },
                                    "expected_due_date": {
                                        "type": "string",
                                        "description": "Only when completing a series: the date (YYYY-MM-DD) the caller currently sees. If it differs from the current due_date, the endpoint answers with HTTP 409 and completes nothing"
                                    },
                                    "card_settings": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Card display; allowed keys: color (max. 32 characters), labels (max. 50 strings)"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "todos-delete",
                "summary": "Delete a to-do",
                "description": "Deletes a to-do permanently.",
                "tags": [
                    "todos"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Todo deleted successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/{todoUuid}/duplicate": {
            "post": {
                "operationId": "todos-duplicate",
                "summary": "Duplicate a to-do",
                "description": "Creates a copy of a to-do. Checklists, labels and assignments are copied by default; you can switch that off with the body parameters.",
                "tags": [
                    "todos"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
                                        "title": "Feature implementieren",
                                        "priority": "high",
                                        "completed": false
                                    },
                                    "message": "Todo duplicated successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "include_checklists": {
                                        "type": "boolean",
                                        "description": "Copy checklists (default true)"
                                    },
                                    "include_labels": {
                                        "type": "boolean",
                                        "description": "Copy labels (default true)"
                                    },
                                    "include_assignments": {
                                        "type": "boolean",
                                        "description": "Copy assigned users (default true)"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/{todoUuid}/move": {
            "put": {
                "operationId": "todos-move",
                "summary": "Move a to-do",
                "description": "Moves a to-do to another board list, with position to an index among the open to-dos (renumbered without gaps). Requires access to the board of the target list. Sending sort_order and position together returns HTTP 422, and so does position for a completed to-do.",
                "tags": [
                    "todos"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "550e8400-e29b-41d4-a716-446655440000",
                                        "title": "Feature implementieren",
                                        "list": {
                                            "uuid": "1a2b3c4d-...",
                                            "name": "Done"
                                        }
                                    },
                                    "message": "Todo moved successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "list_uuid": {
                                        "type": "string",
                                        "description": "UUID of the target list"
                                    },
                                    "position": {
                                        "type": "integer",
                                        "description": "Index among the open to-dos of the target list, starting at 0 (0 = top), counted without the moved to-do. An index past the end appends. Source and target list are renumbered from 1 without gaps. Only for open to-dos, not together with sort_order."
                                    },
                                    "sort_order": {
                                        "type": "integer",
                                        "description": "Raw sort value in the target list; to-dos from this value on move down by one (previous behaviour, otherwise placed at the end automatically). Not together with position."
                                    }
                                },
                                "required": [
                                    "list_uuid"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/todos/{todoUuid}/detach": {
            "post": {
                "operationId": "todos-detach",
                "summary": "Detach a to-do from its board",
                "description": "Removes a board to-do from its board explicitly, with an audit log entry, and moves it to the personal to-do list of the board owner. Only the current board owner may do this; visible resources with an insufficient role return HTTP 403, inaccessible resources HTTP 404.",
                "tags": [
                    "todos"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "550e8400-e29b-41d4-a716-446655440000",
                                        "title": "Feature implementieren",
                                        "list": null
                                    },
                                    "message": "Todo detached from board successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/boards": {
            "get": {
                "operationId": "boards-list",
                "summary": "List boards",
                "description": "Returns the boards the authenticated user has access to (not every board of the team), including their nested lists. Cursor-paginated.",
                "tags": [
                    "boards"
                ],
                "parameters": [
                    {
                        "name": "cursor",
                        "in": "query",
                        "required": false,
                        "description": "Cursor from the meta object of the previous response for the next or previous page",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Results per page, 1-100 (default 50)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "a1b2c3d4-...",
                                            "name": "Projekt Alpha",
                                            "description": null,
                                            "background_settings": {
                                                "color": "#0ea5e9"
                                            },
                                            "is_archived": false,
                                            "sort_order": 1,
                                            "lists": [
                                                {
                                                    "uuid": "f0e1d2c3-...",
                                                    "name": "Backlog"
                                                },
                                                {
                                                    "uuid": "1a2b3c4d-...",
                                                    "name": "In Progress"
                                                }
                                            ],
                                            "created_at": "2024-01-01T10:00:00Z"
                                        }
                                    ],
                                    "meta": {
                                        "next_cursor": "eyJpZCI6MTIzfQ==",
                                        "prev_cursor": null,
                                        "has_more": false,
                                        "per_page": 50
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "boards-create",
                "summary": "Create a board",
                "description": "Creates a new board. The user who creates it automatically becomes the owner.",
                "tags": [
                    "boards"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "a1b2c3d4-...",
                                        "name": "Projekt Alpha",
                                        "description": null,
                                        "background_settings": [],
                                        "is_archived": false,
                                        "sort_order": 1,
                                        "users_with_access": [
                                            {
                                                "uuid": "9c858901-8a57-4791-81fe-4c455b099bc9",
                                                "name": "Maria Beispiel"
                                            }
                                        ],
                                        "created_at": "2024-01-01T10:00:00Z"
                                    },
                                    "message": "Board created successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name of the board (max. 255 characters)"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Description (max. 65,535 characters)"
                                    },
                                    "background_settings": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Background and display; allowed keys: color (max. 32 characters), image (max. 2,048 characters)"
                                    },
                                    "project_id": {
                                        "type": "string",
                                        "description": "UUID of a FlowCRM project to link the board to"
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/todos/boards/{uuid}": {
            "get": {
                "operationId": "boards-show",
                "summary": "Get a board",
                "description": "Returns a single board with its full tree: lists -> to-dos -> assigned users + labels, including statistics (total_todos, completed_todos, progress_percentage) and the list of users with access.",
                "tags": [
                    "boards"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "a1b2c3d4-...",
                                        "name": "Projekt Alpha",
                                        "description": null,
                                        "background_settings": {
                                            "color": "#0ea5e9"
                                        },
                                        "is_archived": false,
                                        "sort_order": 1,
                                        "total_todos": 12,
                                        "completed_todos": 5,
                                        "progress_percentage": 42,
                                        "lists": [
                                            {
                                                "uuid": "f0e1d2c3-...",
                                                "name": "Backlog",
                                                "todos": []
                                            }
                                        ],
                                        "users_with_access": [
                                            {
                                                "uuid": "9c858901-8a57-4791-81fe-4c455b099bc9",
                                                "name": "Maria Beispiel",
                                                "email": "maria@example.com"
                                            }
                                        ],
                                        "created_at": "2024-01-01T10:00:00Z"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "boards-update",
                "summary": "Update a board",
                "description": "Updates the name, description or background settings of a board. All fields are optional, only the fields you send are changed.",
                "tags": [
                    "boards"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "a1b2c3d4-...",
                                        "name": "Projekt Alpha (aktualisiert)",
                                        "description": "Neue Beschreibung",
                                        "is_archived": false
                                    },
                                    "message": "Board updated successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name (if sent: required, max. 255 characters)"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Description (max. 65,535 characters)"
                                    },
                                    "background_settings": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Background and display; allowed keys: color (max. 32 characters), image (max. 2,048 characters)"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "boards-delete",
                "summary": "Delete a board",
                "description": "Deletes a board permanently, cascading to its lists, to-dos, access rights and external shares. Owner only: only the board owner may delete it; admins and members get HTTP 403 (\"You do not have permission to perform this action on this board.\").",
                "tags": [
                    "boards"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Board deleted successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/boards/{uuid}/archive": {
            "put": {
                "operationId": "boards-archive",
                "summary": "Archive or unarchive a board",
                "description": "Toggles the archive state of a board (archived -> active or the other way round). Only requires board access, no role check.",
                "tags": [
                    "boards"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "a1b2c3d4-...",
                                        "name": "Projekt Alpha",
                                        "is_archived": true
                                    },
                                    "message": "Board archived successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/boards/{uuid}/users": {
            "get": {
                "operationId": "boards-users-list",
                "summary": "List board members",
                "description": "Returns every user with access to a board.",
                "tags": [
                    "boards"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "9c858901-8a57-4791-81fe-4c455b099bc9",
                                            "name": "Maria Beispiel",
                                            "email": "maria@example.com"
                                        }
                                    ],
                                    "count": 1
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "boards-users-grant",
                "summary": "Grant board access",
                "description": "Gives a team member access to a board. New or restored grants return HTTP 201; a grant that is already active (idempotent) returns HTTP 200. New grants always get the member role; roles are only changed through the role endpoint. Only owners or admins may grant access; members get HTTP 403.",
                "tags": [
                    "boards"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "User access granted successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "user_uuid": {
                                        "type": "string",
                                        "description": "UUID of the team member who should get access"
                                    }
                                },
                                "required": [
                                    "user_uuid"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/todos/boards/{uuid}/users/{userUuid}": {
            "delete": {
                "operationId": "boards-users-revoke",
                "summary": "Revoke board access",
                "description": "Removes a user's access to a board. Only owners or admins may revoke the access of ANOTHER member (otherwise HTTP 403 \"You do not have permission to perform this action on this board.\"); every member may, however, revoke their OWN access (self-removal). Exception: the owner cannot remove themselves and has to transfer ownership first (HTTP 403 \"The board Owner cannot remove their own access. Transfer ownership first.\"); likewise, the owner can never be removed by others through this endpoint.",
                "tags": [
                    "boards"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "userUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "User access revoked successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/boards/{uuid}/users/{userUuid}/role": {
            "put": {
                "operationId": "boards-users-update-role",
                "summary": "Change a board role or transfer ownership",
                "description": "Owner-only action: only the board owner may change roles or transfer ownership; admins and members get HTTP 403 (\"You do not have permission to perform this action on this board.\"). role=admin or role=member changes the target user's role (\"User role updated successfully.\"). role=owner transfers ownership atomically: the target user becomes owner and the previous owner is automatically demoted to admin (\"Board ownership transferred successfully.\"). Error cases: HTTP 404 if the board or the target user is not found, HTTP 422 if the target user has no active board access, HTTP 422 if the owner tries to transfer ownership to themselves (\"You are already the Owner of this board.\"), HTTP 422 if you try to demote the owner directly with role=admin/member (use role=owner on another target user to transfer ownership instead), and HTTP 409 if the ownership transfer was blocked by a concurrent change to the calling owner's permissions (\"Ownership changed concurrently. Please retry.\", retrying is recommended).",
                "tags": [
                    "boards"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "userUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "User role updated successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "role": {
                                        "type": "string",
                                        "description": "New role: admin, member or owner (owner triggers an ownership transfer)"
                                    }
                                },
                                "required": [
                                    "role"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/todos/boards/{uuid}/lists": {
            "post": {
                "operationId": "lists-create",
                "summary": "Create a list",
                "description": "Creates a new list on a board. Requires board access.",
                "tags": [
                    "lists"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "f0e1d2c3-...",
                                        "name": "Backlog",
                                        "sort_order": 1,
                                        "list_settings": [],
                                        "is_archived": false
                                    },
                                    "message": "List created successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name of the list (max. 255 characters)"
                                    },
                                    "list_settings": {
                                        "type": "array",
                                        "items": [],
                                        "description": "List display; allowed keys: color (max. 32 characters), label (max. 255 characters)"
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                }
            },
            "get": {
                "operationId": "lists-index",
                "summary": "List the lists of a board",
                "description": "Returns the lists of a board page by page, each with the number of its to-dos. Unlike the board tree, this route only returns the columns and stays usable even with thousands of cards.",
                "tags": [
                    "lists"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "archived",
                        "in": "query",
                        "required": false,
                        "description": "Limits the result to archived (true) or active (false) lists",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, starting at 1",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Entries per page, 1-200 (default 50)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "f0e1d2c3-...",
                                            "board_uuid": "a1b2c3d4-...",
                                            "name": "Backlog",
                                            "sort_order": 1,
                                            "is_archived": false,
                                            "todos_count": 12
                                        }
                                    ],
                                    "meta": {
                                        "current_page": 1,
                                        "per_page": 50,
                                        "total": 3,
                                        "last_page": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/boards/{uuid}/lists/{listUuid}": {
            "get": {
                "operationId": "lists-show",
                "summary": "Get a list",
                "description": "Returns a single list with its to-dos (including assigned users and labels). This is the actual endpoint for fetching a single list; there is no endpoint that lists all lists of a board separately from the board itself (use GET /todos/boards/{uuid} for that, which returns the board with all its lists).",
                "tags": [
                    "lists"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "listUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "f0e1d2c3-...",
                                        "name": "Backlog",
                                        "sort_order": 1,
                                        "list_settings": [],
                                        "is_archived": false,
                                        "todos": [
                                            {
                                                "uuid": "550e8400-e29b-41d4-a716-446655440000",
                                                "title": "Feature implementieren",
                                                "priority": "high",
                                                "completed": false
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "lists-update",
                "summary": "Update a list",
                "description": "Updates the name or list_settings of a list. All fields are optional, only the fields you send are changed.",
                "tags": [
                    "lists"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "listUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "f0e1d2c3-...",
                                        "name": "Backlog (umbenannt)",
                                        "sort_order": 1,
                                        "is_archived": false
                                    },
                                    "message": "List updated successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name (if sent: required, max. 255 characters)"
                                    },
                                    "list_settings": {
                                        "type": "array",
                                        "items": [],
                                        "description": "List display; allowed keys: color (max. 32 characters), label (max. 255 characters)"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "lists-delete",
                "summary": "Delete a list",
                "description": "Deletes a list permanently; cascades to every to-do in the list.",
                "tags": [
                    "lists"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "listUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "List deleted successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/lists/{listUuid}/todos/reorder": {
            "put": {
                "operationId": "lists-todos-reorder",
                "summary": "Reorder the to-dos of a list",
                "description": "Reorders the to-dos of a list following the order of the UUIDs you send. The array must contain every to-do of the list exactly once; missing or unknown UUIDs return HTTP 422 with skipped and change no order.",
                "tags": [
                    "lists"
                ],
                "parameters": [
                    {
                        "name": "listUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Todos reordered successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "todo_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Array of all to-do UUIDs of the list in the order you want"
                                    }
                                },
                                "required": [
                                    "todo_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/todos/boards/{uuid}/lists/reorder": {
            "put": {
                "operationId": "lists-reorder",
                "summary": "Reorder lists",
                "description": "Reorders all lists of a board atomically and without collisions, following the order of the UUIDs you send. The array must contain every list of the board exactly once; missing or unknown UUIDs return HTTP 422 with skipped and change no order.",
                "tags": [
                    "lists"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Lists reordered successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "list_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Array of all list UUIDs of the board in the order you want"
                                    }
                                },
                                "required": [
                                    "list_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/todos/boards/{uuid}/lists/{listUuid}/archive": {
            "put": {
                "operationId": "lists-archive",
                "summary": "Archive or unarchive a list",
                "description": "Toggles the archive state of a list (archived -> active or the other way round).",
                "tags": [
                    "lists"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "listUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "f0e1d2c3-...",
                                        "name": "Backlog",
                                        "is_archived": true
                                    },
                                    "message": "List archived successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/{todoUuid}/assignments": {
            "get": {
                "operationId": "todos-assignments-list",
                "summary": "List assignments",
                "description": "Returns every user currently assigned to a to-do.",
                "tags": [
                    "assignments"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "9c858901-8a57-4791-81fe-4c455b099bc9",
                                            "name": "Maria Beispiel",
                                            "email": "maria@example.com"
                                        }
                                    ],
                                    "count": 1
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "todos-assignments-add",
                "summary": "Assign a user",
                "description": "Assigns another user to a to-do (additive, existing assignments stay). The user must be a member of the team.",
                "tags": [
                    "assignments"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "User assigned successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "user_uuid": {
                                        "type": "string",
                                        "description": "UUID of the team member to assign"
                                    }
                                },
                                "required": [
                                    "user_uuid"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/todos/{todoUuid}/assignments/{userUuid}": {
            "delete": {
                "operationId": "todos-assignments-remove",
                "summary": "Remove an assignment",
                "description": "Removes a user's assignment from a to-do.",
                "tags": [
                    "assignments"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "userUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "User assignment removed successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/{todoUuid}/comments": {
            "get": {
                "operationId": "todos-comments-list",
                "summary": "List comments",
                "description": "Returns every comment of a to-do in ascending chronological order.",
                "tags": [
                    "comments"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                                            "comment": "Bitte bis Freitag erledigen.",
                                            "user": {
                                                "uuid": "9c858901-8a57-4791-81fe-4c455b099bc9",
                                                "name": "Maria Beispiel"
                                            },
                                            "created_at": "2024-01-01T10:00:00Z"
                                        }
                                    ],
                                    "count": 1
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "todos-comments-create",
                "summary": "Add a comment",
                "description": "Adds a new comment to a to-do.",
                "tags": [
                    "comments"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                                        "comment": "Bitte bis Freitag erledigen.",
                                        "created_at": "2024-01-01T10:00:00Z"
                                    },
                                    "message": "Comment added successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "comment": {
                                        "type": "string",
                                        "description": "Comment text (max. 1000 characters)"
                                    }
                                },
                                "required": [
                                    "comment"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/todos/{todoUuid}/comments/{commentUuid}": {
            "put": {
                "operationId": "todos-comments-update",
                "summary": "Edit a comment",
                "description": "Edits a comment. Only the original author may edit their own comment; otherwise the API answers with HTTP 403 \"You can only edit your own comments.\"",
                "tags": [
                    "comments"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "commentUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                                        "comment": "Bitte bis Montag erledigen.",
                                        "created_at": "2024-01-01T10:00:00Z"
                                    },
                                    "message": "Comment updated successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "comment": {
                                        "type": "string",
                                        "description": "New comment text (max. 1000 characters)"
                                    }
                                },
                                "required": [
                                    "comment"
                                ]
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "todos-comments-delete",
                "summary": "Delete a comment",
                "description": "Deletes a comment permanently. Only the original author may delete their own comment; otherwise the API answers with HTTP 403 \"You can only delete your own comments.\"",
                "tags": [
                    "comments"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "commentUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Comment deleted successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/labels": {
            "get": {
                "operationId": "labels-list",
                "summary": "List labels",
                "description": "Returns every label of the team with cursor pagination, sorted by sort_order.",
                "tags": [
                    "labels"
                ],
                "parameters": [
                    {
                        "name": "cursor",
                        "in": "query",
                        "required": false,
                        "description": "Cursor from the meta object of the previous response for the next or previous page",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Results per page, 1-100 (default 50)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "b2c3d4e5-...",
                                            "name": "Dringend",
                                            "color": "red",
                                            "sort_order": 1
                                        }
                                    ],
                                    "meta": {
                                        "next_cursor": "eyJpZCI6MTIzfQ==",
                                        "prev_cursor": null,
                                        "has_more": false,
                                        "per_page": 50
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "labels-create",
                "summary": "Create a label",
                "description": "Creates a new team-wide label.",
                "tags": [
                    "labels"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "b2c3d4e5-...",
                                        "name": "Dringend",
                                        "color": "red",
                                        "sort_order": 5
                                    },
                                    "message": "Label created successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name of the label (max. 255 characters)"
                                    },
                                    "color": {
                                        "type": "string",
                                        "description": "Colour of the label. Allowed values: zinc, red, orange, amber, yellow, lime, green, emerald, teal, cyan, sky, blue, indigo, violet, purple, fuchsia, pink, rose."
                                    }
                                },
                                "required": [
                                    "name",
                                    "color"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/todos/labels/{labelUuid}": {
            "get": {
                "operationId": "labels-show",
                "summary": "Get a label",
                "description": "Returns a single label of the team, including the number of to-dos that carry it.",
                "tags": [
                    "labels"
                ],
                "parameters": [
                    {
                        "name": "labelUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "b2c3d4e5-...",
                                        "name": "Dringend",
                                        "color": "red",
                                        "sort_order": 5,
                                        "todos_count": 7
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "labels-update",
                "summary": "Update a label",
                "description": "Updates the name or colour of a label. All fields are optional, only the fields you send are changed.",
                "tags": [
                    "labels"
                ],
                "parameters": [
                    {
                        "name": "labelUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "b2c3d4e5-...",
                                        "name": "Dringend (aktualisiert)",
                                        "color": "orange",
                                        "sort_order": 5
                                    },
                                    "message": "Label updated successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name (if sent: required, max. 255 characters)"
                                    },
                                    "color": {
                                        "type": "string",
                                        "description": "Colour (if sent: required). Allowed values: zinc, red, orange, amber, yellow, lime, green, emerald, teal, cyan, sky, blue, indigo, violet, purple, fuchsia, pink, rose."
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "labels-delete",
                "summary": "Delete a label",
                "description": "Deletes a label (soft delete). A model boot event detaches the label from every to-do beforehand.",
                "tags": [
                    "labels"
                ],
                "parameters": [
                    {
                        "name": "labelUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Label deleted successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/{todoUuid}/labels": {
            "get": {
                "operationId": "todos-labels-list",
                "summary": "List the labels of a to-do",
                "description": "Returns every label attached to a specific to-do.",
                "tags": [
                    "labels"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "b2c3d4e5-...",
                                            "name": "Dringend",
                                            "color": "red",
                                            "sort_order": 1
                                        }
                                    ],
                                    "count": 1
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "todos-labels-attach",
                "summary": "Attach labels to a to-do",
                "description": "Attaches one or more labels to a to-do additively and returns HTTP 201 on success. If a UUID does not resolve to a team label, the endpoint answers with HTTP 422 and skipped; no labels are attached in that case.",
                "tags": [
                    "labels"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "b2c3d4e5-...",
                                            "name": "Dringend",
                                            "color": "red",
                                            "sort_order": 1
                                        }
                                    ],
                                    "message": "Labels attached successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "label_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Array of label UUIDs (at least 1 entry)"
                                    }
                                },
                                "required": [
                                    "label_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/todos/{todoUuid}/labels/{labelUuid}": {
            "delete": {
                "operationId": "todos-labels-detach",
                "summary": "Remove a label from a to-do",
                "description": "Removes a single label from a to-do (the label itself stays available to the team).",
                "tags": [
                    "labels"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "labelUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Label removed from todo."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/{todoUuid}/checklists": {
            "get": {
                "operationId": "checklists-list",
                "summary": "List checklists",
                "description": "Returns every checklist of a to-do including its items and progress (progress_percentage, total_items_count, completed_items_count).",
                "tags": [
                    "checklists"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "c3d4e5f6-...",
                                            "name": "Vorbereitung",
                                            "sort_order": 1,
                                            "progress_percentage": 50,
                                            "total_items_count": 2,
                                            "completed_items_count": 1,
                                            "items": [
                                                {
                                                    "uuid": "d4e5f6a7-...",
                                                    "content": "Kickoff-Meeting planen",
                                                    "completed": false,
                                                    "sort_order": 1,
                                                    "assignedUser": null
                                                }
                                            ]
                                        }
                                    ],
                                    "count": 1
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "checklists-create",
                "summary": "Create a checklist",
                "description": "Creates a new checklist on a to-do.",
                "tags": [
                    "checklists"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "c3d4e5f6-...",
                                        "name": "Vorbereitung",
                                        "sort_order": 1,
                                        "progress_percentage": 0,
                                        "total_items_count": 0,
                                        "completed_items_count": 0,
                                        "items": []
                                    },
                                    "message": "Checklist created successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name of the checklist (max. 255 characters)"
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/todos/{todoUuid}/checklists/{checklistUuid}": {
            "get": {
                "operationId": "checklists-show",
                "summary": "Get a checklist",
                "description": "Returns a single checklist of a to-do with all its items and its progress.",
                "tags": [
                    "checklists"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "checklistUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "c3d4e5f6-...",
                                        "todo_uuid": "550e8400-...",
                                        "name": "Vorbereitung",
                                        "sort_order": 1,
                                        "total_items_count": 2,
                                        "completed_items_count": 1,
                                        "progress_percentage": 50,
                                        "items": [
                                            {
                                                "uuid": "d4e5f6a7-...",
                                                "content": "Kickoff planen",
                                                "completed": false,
                                                "assigned_to_uuid": null
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "checklists-update",
                "summary": "Update a checklist",
                "description": "Updates the name or sort_order of a checklist. All fields are optional, only the fields you send are changed.",
                "tags": [
                    "checklists"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "checklistUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "c3d4e5f6-...",
                                        "name": "Vorbereitung (aktualisiert)",
                                        "sort_order": 2,
                                        "progress_percentage": 50
                                    },
                                    "message": "Checklist updated successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name (if sent: required, max. 255 characters)"
                                    },
                                    "sort_order": {
                                        "type": "integer",
                                        "description": "Explicit sort index"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "checklists-delete",
                "summary": "Delete a checklist",
                "description": "Deletes a checklist permanently, including all its items.",
                "tags": [
                    "checklists"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "checklistUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Checklist deleted successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/{todoUuid}/checklists/reorder": {
            "put": {
                "operationId": "checklists-reorder",
                "summary": "Reorder checklists",
                "description": "Reorders the checklists of a to-do following the order of the UUIDs you send. The array must contain every checklist of the to-do exactly once; missing or unknown UUIDs return HTTP 422 with skipped and change no order.",
                "tags": [
                    "checklists"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Checklists reordered successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "checklist_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Array of all checklist UUIDs of the to-do in the order you want"
                                    }
                                },
                                "required": [
                                    "checklist_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/todos/{todoUuid}/checklists/{checklistUuid}/items": {
            "get": {
                "operationId": "checklists-items-list",
                "summary": "List checklist items",
                "description": "Returns the items of a checklist page by page, optionally only the completed or only the open ones.",
                "tags": [
                    "checklists"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "checklistUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "completed",
                        "in": "query",
                        "required": false,
                        "description": "Limits the result to completed (true) or open (false) items",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, starting at 1",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Entries per page, 1-200 (default 50)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "d4e5f6a7-...",
                                            "checklist_uuid": "c3d4e5f6-...",
                                            "content": "Kickoff planen",
                                            "completed": false,
                                            "assigned_to_uuid": null,
                                            "sort_order": 1
                                        }
                                    ],
                                    "meta": {
                                        "current_page": 1,
                                        "per_page": 50,
                                        "total": 2,
                                        "last_page": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "checklists-items-create",
                "summary": "Create a checklist item",
                "description": "Adds a new item to a checklist. If assigned_to is sent, the UUID must belong to a team member; otherwise the API answers with HTTP 404 \"Assigned user not found or not a team member.\"",
                "tags": [
                    "checklists"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "checklistUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "d4e5f6a7-...",
                                        "content": "Kickoff-Meeting planen",
                                        "completed": false,
                                        "sort_order": 1,
                                        "assignedUser": {
                                            "uuid": "9c858901-8a57-4791-81fe-4c455b099bc9",
                                            "name": "Maria Beispiel",
                                            "email": "maria@example.com"
                                        }
                                    },
                                    "message": "Checklist item created successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "content": {
                                        "type": "string",
                                        "description": "Text of the item (max. 500 characters)"
                                    },
                                    "assigned_to": {
                                        "type": "string",
                                        "description": "UUID of the assigned team member"
                                    }
                                },
                                "required": [
                                    "content"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/todos/checklists/{checklistUuid}/items/reorder": {
            "put": {
                "operationId": "checklists-items-reorder",
                "summary": "Reorder checklist items",
                "description": "Reorders the items of a checklist following the order of the UUIDs you send. The array must contain every item of the checklist exactly once; missing or unknown UUIDs return HTTP 422 with skipped and change no order.",
                "tags": [
                    "checklists"
                ],
                "parameters": [
                    {
                        "name": "checklistUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Checklist items reordered successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "item_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Array of all item UUIDs of the checklist in the order you want"
                                    }
                                },
                                "required": [
                                    "item_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/todos/{todoUuid}/checklists/{checklistUuid}/items/{itemUuid}": {
            "put": {
                "operationId": "checklists-items-update",
                "summary": "Update a checklist item",
                "description": "Updates the text or assignment of a checklist item. All fields are optional, only the fields you send are changed; assigned_to=null removes an existing assignment.",
                "tags": [
                    "checklists"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "checklistUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "itemUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "d4e5f6a7-...",
                                        "content": "Kickoff-Meeting vorbereiten",
                                        "completed": false,
                                        "sort_order": 1,
                                        "assignedUser": null
                                    },
                                    "message": "Checklist item updated successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "content": {
                                        "type": "string",
                                        "description": "Text (if sent: required, max. 500 characters)"
                                    },
                                    "assigned_to": {
                                        "type": "string",
                                        "description": "UUID of the assigned team member, or null to remove the assignment"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "checklists-items-delete",
                "summary": "Delete a checklist item",
                "description": "Deletes a checklist item permanently.",
                "tags": [
                    "checklists"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "checklistUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "itemUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Checklist item deleted successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/{todoUuid}/checklists/{checklistUuid}/items/{itemUuid}/toggle": {
            "put": {
                "operationId": "checklists-items-toggle",
                "summary": "Toggle a checklist item",
                "description": "Toggles the completed state of a checklist item (open -> completed or the other way round). The message depends on the new state: \"Checklist item marked complete.\" or \"Checklist item marked incomplete.\"",
                "tags": [
                    "checklists"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "checklistUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "itemUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "d4e5f6a7-...",
                                        "content": "Kickoff-Meeting planen",
                                        "completed": true,
                                        "sort_order": 1,
                                        "assignedUser": null
                                    },
                                    "message": "Checklist item marked complete."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/boards/{uuid}/access": {
            "get": {
                "operationId": "boards-access-show",
                "summary": "Get the access of a board",
                "description": "Returns the board members with their roles, your own role, the state of external sharing and, for accounts with administration rights, the invited guests and the share address.",
                "tags": [
                    "sharing"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "board_uuid": "a1b2c3d4-...",
                                        "is_shared": true,
                                        "can_manage_access": true,
                                        "own_role": "owner",
                                        "members": [
                                            {
                                                "user_uuid": "e5f6a7b8-...",
                                                "name": "Anna",
                                                "role": "owner"
                                            }
                                        ],
                                        "share_url": "https://app.example.com/share/board/…",
                                        "external_invites": [
                                            {
                                                "uuid": "9f8e7d6c-...",
                                                "name": "Gast",
                                                "email": "gast@example.com"
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/boards/{uuid}/sharing/enable": {
            "post": {
                "operationId": "boards-sharing-enable",
                "summary": "Enable external sharing",
                "description": "Turns on external sharing for the board and creates a share address. A board that is already shared keeps its address.",
                "tags": [
                    "sharing"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "board_uuid": "a1b2c3d4-...",
                                        "is_shared": true,
                                        "share_url": "https://app.example.com/share/board/…"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/boards/{uuid}/sharing/disable": {
            "post": {
                "operationId": "boards-sharing-disable",
                "summary": "Disable external sharing",
                "description": "Turns off external sharing and discards the share address. Guests who were already invited can no longer reach the board.",
                "tags": [
                    "sharing"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "board_uuid": "a1b2c3d4-...",
                                        "is_shared": false,
                                        "share_url": null
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/boards/{uuid}/sharing/rotate": {
            "post": {
                "operationId": "boards-sharing-rotate",
                "summary": "Renew the share address",
                "description": "Replaces the share address with a new one. Every address handed out before becomes invalid; the guests stay on the list and regain access through a new invitation.",
                "tags": [
                    "sharing"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "board_uuid": "a1b2c3d4-...",
                                        "is_shared": true,
                                        "share_url": "https://app.example.com/share/board/…"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/boards/{uuid}/external-invites": {
            "post": {
                "operationId": "boards-external-invite",
                "summary": "Invite a guest",
                "description": "Invites a person without an account to the board and sends them an invitation with a time-limited access link. If external sharing is not active yet, it is turned on, because the invitation would otherwise lead nowhere.",
                "tags": [
                    "sharing"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "9f8e7d6c-...",
                                        "name": "Gast",
                                        "email": "gast@example.com"
                                    },
                                    "message": "Invitation sent successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "email": {
                                        "type": "string",
                                        "description": "Email address of the guest"
                                    },
                                    "name": {
                                        "type": "string",
                                        "description": "Display name of the guest (max. 255 characters)"
                                    }
                                },
                                "required": [
                                    "email",
                                    "name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/todos/boards/{uuid}/external-invites/{inviteUuid}": {
            "delete": {
                "operationId": "boards-external-invite-revoke",
                "summary": "Revoke guest access",
                "description": "Removes a guest's access to this board. The share address of the board stays the same.",
                "tags": [
                    "sharing"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "inviteUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "External access revoked successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/boards/{uuid}/transfer-ownership": {
            "post": {
                "operationId": "boards-transfer-ownership",
                "summary": "Transfer ownership",
                "description": "Hands the board over to another member; the previous owner becomes an admin. The target person must already have access to the board, otherwise the API answers with HTTP 422.",
                "tags": [
                    "sharing"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Board ownership transferred successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "user_uuid": {
                                        "type": "string",
                                        "description": "UUID of the new owner; must be a member of the team and of the board"
                                    }
                                },
                                "required": [
                                    "user_uuid"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/todos/{todoUuid}/files": {
            "get": {
                "operationId": "todos-files-list",
                "summary": "List the files of a to-do",
                "description": "Returns the attachments of a to-do page by page, newest first. Attachments that a guest uploaded through a shared board are marked by uploaded_by_external.",
                "tags": [
                    "files"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, starting at 1",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Entries per page, 1-200 (default 50)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "7a6b5c4d-...",
                                            "todo_uuid": "550e8400-...",
                                            "name": "Angebot.pdf",
                                            "mime_type": "application/pdf",
                                            "size": 182344,
                                            "kind": "document",
                                            "uploaded_by_name": "Anna",
                                            "uploaded_by_external": false
                                        }
                                    ],
                                    "meta": {
                                        "current_page": 1,
                                        "per_page": 50,
                                        "total": 1,
                                        "last_page": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "todos-files-upload",
                "summary": "Attach a file to a to-do",
                "description": "Attaches an uploaded file to a to-do. The call is made as multipart/form-data with the file field.",
                "tags": [
                    "files"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "7a6b5c4d-...",
                                        "name": "Angebot.pdf",
                                        "mime_type": "application/pdf",
                                        "size": 182344,
                                        "kind": "document"
                                    },
                                    "message": "File attached successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "file": {
                                        "type": "string",
                                        "format": "binary",
                                        "description": "The file to upload, at most 50 MB, in one of the allowed formats"
                                    }
                                },
                                "required": [
                                    "file"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/todos/{todoUuid}/files/{fileUuid}/download": {
            "get": {
                "operationId": "todos-files-download",
                "summary": "Download a file",
                "description": "Delivers the file itself as a download. The response is not JSON but the file content with the matching content type. If the stored file is missing, the API answers with HTTP 404 and the error file_missing.",
                "tags": [
                    "files"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "fileUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/octet-stream": {
                                "schema": {
                                    "type": "string",
                                    "format": "binary"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/{todoUuid}/files/{fileUuid}/text": {
            "get": {
                "operationId": "todos-files-text",
                "summary": "Read the text of a file",
                "description": "Reads the text of an attached file with the same extraction that is used for chat attachments. Formats without a reader answer with extraction_available=false instead of an error. Long texts are delivered in chunks of 20,000 characters; next_offset tells you where to continue.",
                "tags": [
                    "files"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "fileUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "offset",
                        "in": "query",
                        "required": false,
                        "description": "Character offset to continue a long text (default 0)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "7a6b5c4d-...",
                                        "name": "Angebot.pdf",
                                        "extraction_available": true,
                                        "text": "Angebot Nr. 4711 …",
                                        "next_offset": null
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        }
    },
    "components": {
        "securitySchemes": {
            "bearerAuth": {
                "type": "http",
                "scheme": "bearer",
                "description": "API key (pk_… or at_…) as Authorization: Bearer <key>. Any other way of sending it is rejected with 401."
            }
        },
        "schemas": {
            "Error": {
                "type": "object",
                "properties": {
                    "success": {
                        "type": "boolean"
                    },
                    "error": {
                        "type": "string"
                    },
                    "message": {
                        "type": "string"
                    },
                    "errors": {
                        "type": "object"
                    }
                }
            }
        }
    }
}