{
    "openapi": "3.1.0",
    "info": {
        "title": "FlowTime API",
        "version": "v1",
        "description": "REST API for time tracking with timer control, project management and statistics. Built for time tracking apps, billing systems and productivity analytics."
    },
    "servers": [
        {
            "url": "https://api.flowsuite.one",
            "description": "FlowSuite API"
        }
    ],
    "security": [
        {
            "bearerAuth": []
        }
    ],
    "tags": [
        {
            "name": "timer",
            "description": "Timer control"
        },
        {
            "name": "entries",
            "description": "Time entries"
        },
        {
            "name": "projects",
            "description": "Projects"
        },
        {
            "name": "reports",
            "description": "Context, reports and search"
        },
        {
            "name": "statistics",
            "description": "Statistics"
        },
        {
            "name": "working-hours",
            "description": "Working hours"
        },
        {
            "name": "members",
            "description": "Members"
        },
        {
            "name": "absences",
            "description": "Absences"
        },
        {
            "name": "app",
            "description": "Team status and work location"
        },
        {
            "name": "shifts",
            "description": "Shift planning"
        }
    ],
    "paths": {
        "/flowtime/timer/status": {
            "get": {
                "operationId": "timer-status",
                "summary": "Get the timer status",
                "description": "Returns the current timer status: whether a timer is running and for how long. If no timer is running, \"is_tracking\" is false and \"timer\" is null. \"timer.source\" names the origin (api, app, app_offline, geofence or null for the web). In the \"Simple time tracking\" mode, the fields \"timer.entry_type\" (work|break) and \"timer.state\" (working|on_break) show whether you are working or on a break.",
                "tags": [
                    "timer"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "is_tracking": true,
                                        "timer": {
                                            "uuid": "6f1e2a3b-...",
                                            "entry_type": "work",
                                            "state": "working",
                                            "description": "Feature-Entwicklung",
                                            "project": {
                                                "uuid": "9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f",
                                                "name": "Website Redesign",
                                                "client_name": "Example Company GmbH"
                                            },
                                            "starts_at": "2024-01-15T09:00:00+00:00",
                                            "elapsed_seconds": 3600,
                                            "elapsed_formatted": "01:00:00",
                                            "source": "app"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/timer/start": {
            "post": {
                "operationId": "timer-start",
                "summary": "Start the timer",
                "description": "Starts a new timer. If a timer is already running, it is NOT replaced: the API answers with HTTP 409 and returns the UUID of the running timer in the field \"data.active_timer_uuid\". Stop or cancel the active timer before you start a new one. Breaking change: the former numeric field \"project_id\" is no longer accepted (validation error); the project is only given through \"project_uuid\". In the \"Simple time tracking\" mode, \"description\" and \"project_uuid\" are not allowed (HTTP 422), because starting the timer is clocking in.",
                "tags": [
                    "timer"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": false,
                                    "error": "A timer is already running",
                                    "code": "timer_running",
                                    "data": {
                                        "active_timer_uuid": "6f1e2a3b-..."
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "description": {
                                        "type": "string",
                                        "description": "Description of the activity (max. 500 characters). Not allowed in the \"Simple time tracking\" mode."
                                    },
                                    "project_uuid": {
                                        "type": "string",
                                        "description": "UUID of the related project (bound to the team). Not allowed in the \"Simple time tracking\" mode."
                                    },
                                    "occurred_at": {
                                        "type": "string",
                                        "description": "Time of the clock event, ISO 8601 with offset (for example 2026-11-22T08:15:00+01:00), for clock events recorded offline or by location. At most 30 seconds in the future, at most 24 hours back, not before the start of the open entry and, without an open entry, not before the end of the last one (HTTP 422, code occurred_at_out_of_range). Default: server time."
                                    },
                                    "client_request_id": {
                                        "type": "string",
                                        "description": "UUID as an idempotency key per user. A repeat returns the first result with \"replayed\": true without clocking again. The same key for a different action: HTTP 409, code client_request_conflict."
                                    },
                                    "source": {
                                        "type": "string",
                                        "description": "Origin: api, app, app_offline or geofence. Default api for API keys, app for app tokens. app_offline and geofence show up on the web as a note on the entry."
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/timer/stop": {
            "post": {
                "operationId": "timer-stop",
                "summary": "Stop the timer",
                "description": "Stops the running timer and saves the time entry. In project mode, project and description must be set (HTTP 400). In the \"Simple time tracking\" mode (clocking out), both requirements are dropped; this also applies to a running break, which ends as a result (leaving from a break). As with start and update, \"description\"/\"project_uuid\" are not allowed there (HTTP 422). HTTP 409 if the state changed in the meantime (for example a break started in parallel).",
                "tags": [
                    "timer"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Timer stopped successfully",
                                    "data": {
                                        "uuid": "6f1e2a3b-...",
                                        "description": "Bug-Fixing",
                                        "project": {
                                            "uuid": "9d2f4c1a-...",
                                            "name": "Website Redesign",
                                            "client_name": "Example Company GmbH"
                                        },
                                        "starts_at": "2024-01-15T09:00:00+00:00",
                                        "ends_at": "2024-01-15T10:30:00+00:00",
                                        "seconds": 5400,
                                        "duration_formatted": "01:30:00",
                                        "source": "api"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "description": {
                                        "type": "string",
                                        "description": "Description (project mode only)."
                                    },
                                    "project_uuid": {
                                        "type": "string",
                                        "description": "UUID of the project (project mode only, bound to the team)."
                                    },
                                    "occurred_at": {
                                        "type": "string",
                                        "description": "Time of the clock event, ISO 8601 with offset (for example 2026-11-22T08:15:00+01:00), for clock events recorded offline or by location. At most 30 seconds in the future, at most 24 hours back, not before the start of the open entry and, without an open entry, not before the end of the last one (HTTP 422, code occurred_at_out_of_range). Default: server time."
                                    },
                                    "client_request_id": {
                                        "type": "string",
                                        "description": "UUID as an idempotency key per user. A repeat returns the first result with \"replayed\": true without clocking again. The same key for a different action: HTTP 409, code client_request_conflict."
                                    },
                                    "source": {
                                        "type": "string",
                                        "description": "Origin: api, app, app_offline or geofence. Default api for API keys, app for app tokens. app_offline and geofence show up on the web as a note on the entry."
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/timer": {
            "put": {
                "operationId": "timer-update",
                "summary": "Update the running timer",
                "description": "Updates the running timer (change the description or project). Breaking change: the former numeric field \"project_id\" is no longer accepted; the project is only given through \"project_uuid\". In the \"Simple time tracking\" mode (and during a running break), \"description\"/\"project_uuid\" are not allowed (HTTP 422); only \"starts_at\" can still be changed.",
                "tags": [
                    "timer"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "description": {
                                        "type": "string",
                                        "description": "New description"
                                    },
                                    "project_uuid": {
                                        "type": "string",
                                        "description": "UUID of the new project (bound to the team)"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "timer-cancel",
                "summary": "Cancel the timer",
                "description": "Cancels the running timer without saving the time. A running break cannot be cancelled (HTTP 409). It has to be ended (\"End break\") or you clock out.",
                "tags": [
                    "timer"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/timer/break/start": {
            "post": {
                "operationId": "timer-break-start",
                "summary": "Start a break",
                "description": "Only in the \"Simple time tracking\" mode (otherwise HTTP 409). Closes the running work entry and atomically opens a break entry (entry_type=break). Breaks never count as working time. HTTP 404 without a running timer, HTTP 409 if already on a break.",
                "tags": [
                    "timer"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Break started successfully",
                                    "data": {
                                        "uuid": "6f1e2a3b-...",
                                        "entry_type": "break",
                                        "state": "on_break",
                                        "starts_at": "2026-09-01T12:00:00+00:00",
                                        "source": "app"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "occurred_at": {
                                        "type": "string",
                                        "description": "Time of the clock event, ISO 8601 with offset (for example 2026-11-22T08:15:00+01:00), for clock events recorded offline or by location. At most 30 seconds in the future, at most 24 hours back, not before the start of the open entry and, without an open entry, not before the end of the last one (HTTP 422, code occurred_at_out_of_range). Default: server time."
                                    },
                                    "client_request_id": {
                                        "type": "string",
                                        "description": "UUID as an idempotency key per user. A repeat returns the first result with \"replayed\": true without clocking again. The same key for a different action: HTTP 409, code client_request_conflict."
                                    },
                                    "source": {
                                        "type": "string",
                                        "description": "Origin: api, app, app_offline or geofence. Default api for API keys, app for app tokens. app_offline and geofence show up on the web as a note on the entry."
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/timer/break/stop": {
            "post": {
                "operationId": "timer-break-stop",
                "summary": "End a break",
                "description": "Only in the \"Simple time tracking\" mode (otherwise HTTP 409). Closes the running break entry and atomically opens a new work entry. HTTP 404 without a running timer, HTTP 409 if not on a break.",
                "tags": [
                    "timer"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Break ended successfully",
                                    "data": {
                                        "uuid": "7a2b3c4d-...",
                                        "entry_type": "work",
                                        "state": "working",
                                        "starts_at": "2026-09-01T12:30:00+00:00",
                                        "source": "app"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "occurred_at": {
                                        "type": "string",
                                        "description": "Time of the clock event, ISO 8601 with offset (for example 2026-11-22T08:15:00+01:00), for clock events recorded offline or by location. At most 30 seconds in the future, at most 24 hours back, not before the start of the open entry and, without an open entry, not before the end of the last one (HTTP 422, code occurred_at_out_of_range). Default: server time."
                                    },
                                    "client_request_id": {
                                        "type": "string",
                                        "description": "UUID as an idempotency key per user. A repeat returns the first result with \"replayed\": true without clocking again. The same key for a different action: HTTP 409, code client_request_conflict."
                                    },
                                    "source": {
                                        "type": "string",
                                        "description": "Origin: api, app, app_offline or geofence. Default api for API keys, app for app tokens. app_offline and geofence show up on the web as a note on the entry."
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/entries": {
            "get": {
                "operationId": "entries-list",
                "summary": "List time entries",
                "description": "Returns all time entries with optional filters. Every entry carries \"source\" (null for the web and FlowAI, otherwise api, app, app_offline or geofence).",
                "tags": [
                    "entries"
                ],
                "parameters": [
                    {
                        "name": "start_date",
                        "in": "query",
                        "required": false,
                        "description": "Start date (YYYY-MM-DD)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "end_date",
                        "in": "query",
                        "required": false,
                        "description": "End date (YYYY-MM-DD)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "project_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Filter by project UUID",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "user_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Your own UUID is allowed for every FlowTime member and limits the result to your own entries. Team owner (or members with FlowTime full access) only: filter the entries of a specific user (UUID). Members with the \"berichte\" sub-right see team-wide entries, without it only their own.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "entry_type",
                        "in": "query",
                        "required": false,
                        "description": "Filter by entry type: \"work\" or \"break\" (\"Simple time tracking\" mode)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "description": "Maximum number of entries (1-500, default: 50)",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "offset",
                        "in": "query",
                        "required": false,
                        "description": "Offset for pagination",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "entries-create",
                "summary": "Create a time entry",
                "description": "Creates a manual time entry (without a timer). Start and end time are required; the duration is calculated on the server from the difference. Breaking change: the former numeric field \"project_id\" is no longer accepted; the project is only given through \"project_uuid\". The \"Simple time tracking\" mode has a different contract: \"description\" and \"project_uuid\" are NOT allowed there; instead, \"entry_type\" (work|break, default: work) can be set. Validation errors of this endpoint (including the mode restrictions) answer with HTTP 400 and {\"success\": false, \"errors\": {...}}.",
                "tags": [
                    "entries"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "description": {
                                        "type": "string",
                                        "description": "Conditional: required in project mode (max. 500 characters); not allowed in the \"Simple time tracking\" mode (HTTP 400)."
                                    },
                                    "project_uuid": {
                                        "type": "string",
                                        "description": "Conditional: required in project mode (project UUID, must belong to the team); not allowed in the \"Simple time tracking\" mode (HTTP 400)."
                                    },
                                    "starts_at": {
                                        "type": "string",
                                        "description": "Start time (ISO 8601)"
                                    },
                                    "ends_at": {
                                        "type": "string",
                                        "description": "End time (ISO 8601), must be after starts_at"
                                    },
                                    "entry_type": {
                                        "type": "string",
                                        "description": "Only in the \"Simple time tracking\" mode: \"work\" or \"break\" (default: work). Not allowed in project mode (HTTP 400)."
                                    }
                                },
                                "required": [
                                    "starts_at",
                                    "ends_at"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/entries/{uuid}": {
            "get": {
                "operationId": "entries-show",
                "summary": "Get a time entry",
                "description": "Returns a single time entry with all details, including \"source\" (origin as in the list).",
                "tags": [
                    "entries"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "entries-update",
                "summary": "Update a time entry",
                "description": "Updates an existing time entry. Breaking change: the former numeric field \"project_id\" is no longer accepted; the project is only given through \"project_uuid\". Field validation answers with HTTP 400. Time clock entries (breaks, entries in the \"Simple time tracking\" mode and completed attendance entries without project and description) accept neither \"description\" nor \"project_uuid\" (HTTP 422); only start and end time can be changed, and \"entry_type\" is immutable. A running entry (timer or break) cannot be edited here (HTTP 409); use PUT /flowtime/timer for that.",
                "tags": [
                    "entries"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "description": {
                                        "type": "string",
                                        "description": "Description"
                                    },
                                    "project_uuid": {
                                        "type": "string",
                                        "description": "Project UUID (bound to the team)"
                                    },
                                    "starts_at": {
                                        "type": "string",
                                        "description": "Start time (ISO 8601)"
                                    },
                                    "ends_at": {
                                        "type": "string",
                                        "description": "End time (ISO 8601)"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "entries-delete",
                "summary": "Delete a time entry",
                "description": "Deletes a time entry permanently. A running entry (timer or break) cannot be deleted here (HTTP 409); use the timer endpoints (stop or cancel) for that.",
                "tags": [
                    "entries"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/projects": {
            "get": {
                "operationId": "projects-list",
                "summary": "List projects",
                "description": "Lists the active projects of the team that the user may book time on. Owners see all active projects. Members see public projects and those they have been granted, never hidden ones. Owners and members with the FlowTime \"Projekte\" sub-right get the full object (is_public, is_billable, billable_rate, currency; owners additionally budget). Members without this sub-right get the same bookable list with only uuid, name, client_name and color_code, so they can stop a project timer (POST /flowtime/timer/stop). Project details (GET /flowtime/projects/{uuid}) remain reserved for the sub-right, creating and editing for the owner as before (otherwise HTTP 403).",
                "tags": [
                    "projects"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f",
                                            "name": "Website Redesign",
                                            "client_name": "Example Company GmbH",
                                            "color_code": "#3B82F6",
                                            "is_public": true,
                                            "is_billable": false,
                                            "billable_rate": null,
                                            "currency": "EUR"
                                        }
                                    ],
                                    "count": 1
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "projects-create",
                "summary": "Create a project",
                "description": "Creates a new project (team owner or members with FlowTime full access only; everyone else gets 403). Breaking change: the client is passed as client_uuid; the former numeric field client_id is no longer accepted (validation error). Only available in project mode; in the \"Simple time tracking\" mode the endpoint answers with HTTP 409 and the error code mode_mismatch.",
                "tags": [
                    "projects"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "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": "Project name (max. 255 characters)"
                                    },
                                    "client_uuid": {
                                        "type": "string",
                                        "description": "UUID of the CRM client, which must belong to the team"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Project description"
                                    },
                                    "color_code": {
                                        "type": "string",
                                        "description": "Hex colour (for example #10B981, default: #3B82F6)"
                                    },
                                    "is_public": {
                                        "type": "boolean",
                                        "description": "Visible to all team members (default: true)"
                                    },
                                    "is_billable": {
                                        "type": "boolean",
                                        "description": "The project is billable (default: false)"
                                    },
                                    "billable_rate": {
                                        "type": "number",
                                        "description": "Hourly rate for billing; required when is_billable is true (otherwise a validation error with HTTP 400), default 0 if omitted"
                                    },
                                    "currency": {
                                        "type": "string",
                                        "description": "ISO 4217 currency code (3 characters, default: team currency)"
                                    }
                                },
                                "required": [
                                    "name",
                                    "client_uuid"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/projects/{uuid}": {
            "get": {
                "operationId": "projects-show",
                "summary": "Get project details",
                "description": "Returns the details of a single project, including time statistics. The project is addressed by its UUID; numeric IDs are no longer accepted (HTTP 404).",
                "tags": [
                    "projects"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "projects-update",
                "summary": "Update a project",
                "description": "Updates an existing project (team owner or members with FlowTime full access only; everyone else gets 403). The project is addressed by its UUID; numeric IDs are no longer accepted (HTTP 404). Only available in project mode; in the \"Simple time tracking\" mode the endpoint answers with HTTP 409 and the error code mode_mismatch.",
                "tags": [
                    "projects"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "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": "Project name (max. 255 characters)"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Project description"
                                    },
                                    "status": {
                                        "type": "string",
                                        "description": "Project status: active or archived"
                                    },
                                    "color_code": {
                                        "type": "string",
                                        "description": "Hex colour (for example #10B981)"
                                    },
                                    "is_public": {
                                        "type": "boolean",
                                        "description": "Visible to all team members"
                                    },
                                    "is_hidden": {
                                        "type": "boolean",
                                        "description": "Hide the project in lists"
                                    },
                                    "is_billable": {
                                        "type": "boolean",
                                        "description": "The project is billable"
                                    },
                                    "billable_rate": {
                                        "type": "number",
                                        "description": "Hourly rate for billing; null is stored as 0"
                                    },
                                    "currency": {
                                        "type": "string",
                                        "description": "ISO 4217 currency code (3 characters)"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "projects-delete",
                "summary": "Delete a project",
                "description": "Removes a project from FlowTime (team owner or members with FlowTime full access only; everyone else gets 403). As in the web interface, the project must be archived first, otherwise the API answers with HTTP 409 and the error project_not_archived. A project that still has time entries booked on it is kept and answers with HTTP 409 and the error project_has_entries, so booked hours never lose their project. Only the FlowTime side of the project is deleted; the client project record in FlowCRM stays untouched.",
                "tags": [
                    "projects"
                ],
                "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": "Project deleted successfully"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/projects/{uuid}/permissions": {
            "put": {
                "operationId": "projects-permissions",
                "summary": "Set project permissions",
                "description": "Sets which team members have access to a private project (team owner or members with FlowTime full access only; everyone else gets 403). The list you send replaces the existing permissions completely. Only users who belong to the team are taken over. Only available in project mode; in the \"Simple time tracking\" mode the endpoint answers with HTTP 409 and the error code mode_mismatch.",
                "tags": [
                    "projects"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "user_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "List of user UUIDs that should get access",
                                        "properties": {
                                            "*": {
                                                "type": "string",
                                                "description": "Single user UUID (valid UUID format)"
                                            }
                                        }
                                    }
                                },
                                "required": [
                                    "user_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/context": {
            "get": {
                "operationId": "flowtime-context",
                "summary": "Get module context",
                "description": "Returns the team's working time model, your own sub-rights, the working hours settings and the state of the time clock. A client needs this before its first write: in the \"Simple time tracking\" mode an entry carries neither project nor description, and the shift endpoints are only available when the team has switched on shift planning. The state of the time clock is one of clocked_out, clocked_in, on_break or inactive. If the team's overtime switch is off, the target hours weekly_hours and daily_hours are missing from working_hours.",
                "tags": [
                    "reports"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "mode": "stamp_clock",
                                        "simple_mode": true,
                                        "shifts_enabled": false,
                                        "rights": {
                                            "owner": true,
                                            "reports": true,
                                            "team_reports": true,
                                            "projects": true,
                                            "logs": true,
                                            "shifts": false,
                                            "shift_planning": false
                                        },
                                        "working_hours": {
                                            "weekly_hours": "40.00",
                                            "working_days": [
                                                1,
                                                2,
                                                3,
                                                4,
                                                5
                                            ],
                                            "daily_hours": {
                                                "1": 8,
                                                "2": 8,
                                                "3": 8,
                                                "4": 8,
                                                "5": 8
                                            },
                                            "track_overtime": true
                                        },
                                        "stamp_clock": {
                                            "state": "clocked_in",
                                            "running_entry_uuid": "11aa22bb-...",
                                            "running_since": "2026-09-21T08:02:00+02:00"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/search": {
            "get": {
                "operationId": "flowtime-search",
                "summary": "Search records",
                "description": "Searches the FlowTime records of one type. Visibility follows the rights of the key: without report rights only your own time entries appear, projects only with the projekte sub-right, clients only for the team owner. A type the key cannot reach answers with HTTP 403 and the error record_type_not_available.",
                "tags": [
                    "reports"
                ],
                "parameters": [
                    {
                        "name": "type",
                        "in": "query",
                        "required": true,
                        "description": "Record type: entry, project, client, member, shift_plan, shift_type or shift_template",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "q",
                        "in": "query",
                        "required": false,
                        "description": "Search term; matches the record name, and for members also the email address",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "from",
                        "in": "query",
                        "required": false,
                        "description": "Only for type=entry: earliest start date (YYYY-MM-DD)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "required": false,
                        "description": "Only for type=entry: latest start date (YYYY-MM-DD)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "user_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Only for type=entry: limits the result to one person's entries; other people require the teamberichte sub-right",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "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": "11aa22bb-...",
                                            "user_uuid": "e5f6a7b8-...",
                                            "user_name": "Anna",
                                            "project_uuid": "8b7a6f5e-...",
                                            "project_name": "Relaunch",
                                            "client_name": "Muster GmbH",
                                            "description": "Konzept",
                                            "starts_at": "2026-09-21T08:00:00+02:00",
                                            "ends_at": "2026-09-21T09:30:00+02:00",
                                            "seconds": 5400,
                                            "is_running": false,
                                            "is_stamp": false,
                                            "entry_type": "work",
                                            "source": null
                                        }
                                    ],
                                    "meta": {
                                        "current_page": 1,
                                        "per_page": 50,
                                        "total": 1,
                                        "last_page": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/reports/{report}": {
            "get": {
                "operationId": "reports-detailed",
                "summary": "Get the detailed report",
                "description": "Returns one of the four reports. The path segment report is detailed, team, overtime or logs. detailed returns the completed work entries of a period page by page (the default is the current month) and accepts from, to and user_uuid. team returns the monthly evaluation per team member and accepts year and month. overtime returns the overtime balance of the current week, your own by default; another person's user_uuid is reserved for the team owner. If the team's overtime switch is off, overtime has no data key, and the team report has no target_hours and overtime_reduction_hours; if no overtime is tracked for the person, these values are null. logs returns the module's log lines page by page.",
                "tags": [
                    "reports"
                ],
                "parameters": [
                    {
                        "name": "report",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "from",
                        "in": "query",
                        "required": false,
                        "description": "detailed only: start of the period (YYYY-MM-DD), default start of the month",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "required": false,
                        "description": "detailed only: end of the period (YYYY-MM-DD), default today",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "year",
                        "in": "query",
                        "required": false,
                        "description": "team only: year of the evaluation, default current year",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "month",
                        "in": "query",
                        "required": false,
                        "description": "team only: month of the evaluation (1-12), default current month",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "user_uuid",
                        "in": "query",
                        "required": false,
                        "description": "For detailed and overtime: the person whose figures you want",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "For detailed and logs: page number, starting at 1",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "For detailed and logs: 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": "11aa22bb-...",
                                            "user_uuid": "e5f6a7b8-...",
                                            "user_name": "Anna",
                                            "project_uuid": "8b7a6f5e-...",
                                            "project_name": "Relaunch",
                                            "client_name": "Muster GmbH",
                                            "description": "Konzept",
                                            "starts_at": "2026-09-21T08:00:00+02:00",
                                            "ends_at": "2026-09-21T09:30:00+02:00",
                                            "seconds": 5400,
                                            "is_running": false,
                                            "is_stamp": false,
                                            "entry_type": "work",
                                            "source": null
                                        }
                                    ],
                                    "meta": {
                                        "current_page": 1,
                                        "per_page": 50,
                                        "total": 1,
                                        "last_page": 1
                                    },
                                    "report": "detailed",
                                    "from": "2026-09-01",
                                    "to": "2026-09-21"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/stats/today": {
            "get": {
                "operationId": "stats-today",
                "summary": "Daily evaluation",
                "description": "Aggregated evaluation of the time the user tracked today, including breaks and a breakdown by project (data.by_project, identified by project_uuid).",
                "tags": [
                    "statistics"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "date": "2026-09-21",
                                        "total_seconds": 5400,
                                        "total_hours": 1.5,
                                        "total_formatted": "01:30:00",
                                        "break_seconds": 0,
                                        "entries_count": 1,
                                        "is_tracking": false,
                                        "by_project": [
                                            {
                                                "project_uuid": "8b7a6f5e-...",
                                                "project_name": "Relaunch",
                                                "client_name": "Muster GmbH",
                                                "seconds": 5400,
                                                "entries_count": 1
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/stats/week": {
            "get": {
                "operationId": "stats-week",
                "summary": "Weekly evaluation",
                "description": "Aggregated evaluation of the current week with a daily breakdown and project shares.",
                "tags": [
                    "statistics"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "week_start": "2026-09-21",
                                        "week_end": "2026-09-27",
                                        "total_seconds": 5400,
                                        "total_hours": 1.5,
                                        "total_formatted": "01:30:00",
                                        "break_seconds": 0,
                                        "entries_count": 1,
                                        "by_day": [
                                            {
                                                "date": "2026-09-21",
                                                "day_name": "Monday",
                                                "seconds": 5400,
                                                "hours": 1.5
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/working-hours/status": {
            "get": {
                "operationId": "working-hours-status",
                "summary": "Get the working time status",
                "description": "Returns the current working time balance of the signed-in user (daily, weekly and monthly balance and overtime balance). The balance in \"overtime_balance\" is calculated on every call from the tracked time, the target and the corrections, not read from a stored value. A team with overtime tracking switched off, and likewise a member for whom no overtime is tracked, only gets \"configured\" (false) and \"message\"; settings, target and balance fields do not appear at all and are not null. The same shape applies when no working hours are configured. The settings can still be written.",
                "tags": [
                    "working-hours"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "configured": true,
                                        "settings": {
                                            "weekly_hours": "40.00",
                                            "working_days": [
                                                1,
                                                2,
                                                3,
                                                4,
                                                5,
                                                6,
                                                7
                                            ],
                                            "daily_hours": null,
                                            "track_overtime": true
                                        },
                                        "overtime_balance": {
                                            "minutes": -1123,
                                            "hours": -18.72,
                                            "formatted": "-18:43"
                                        },
                                        "today": {
                                            "date": "2026-09-23",
                                            "day_name": "Mittwoch",
                                            "is_working_day": true,
                                            "day_kind": "regular",
                                            "day_label": null,
                                            "target_seconds": 7714,
                                            "target_hours": 2.14,
                                            "target_formatted": "02:08",
                                            "actual_seconds": 0,
                                            "actual_hours": 0,
                                            "actual_formatted": "00:00",
                                            "difference_seconds": -7714,
                                            "difference_formatted": "-02:08",
                                            "remaining_seconds": 7714,
                                            "remaining_formatted": "02:08",
                                            "is_complete": false,
                                            "percentage": 0,
                                            "has_active_timer": false
                                        },
                                        "this_week": {
                                            "week_start": "2026-09-21",
                                            "week_end": "2026-09-27",
                                            "target_seconds": 48856,
                                            "target_hours": 13.57,
                                            "target_formatted": "13:34",
                                            "actual_seconds": 64800,
                                            "actual_hours": 18,
                                            "actual_formatted": "18:00",
                                            "difference_seconds": 15944,
                                            "difference_hours": 4.43,
                                            "difference_formatted": "+04:25",
                                            "percentage": 132.6,
                                            "is_over_target": true,
                                            "has_active_timer": false
                                        },
                                        "this_month": {
                                            "month": "2026-09",
                                            "month_name": "September 2026",
                                            "target_seconds": 460276,
                                            "target_hours": 127.85,
                                            "actual_seconds": 97200,
                                            "actual_hours": 27,
                                            "difference_seconds": -363076,
                                            "difference_hours": -100.85,
                                            "difference_formatted": "-100:51",
                                            "working_days_count": 23,
                                            "percentage": 21.1,
                                            "has_active_timer": false
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/working-hours/settings": {
            "put": {
                "operationId": "working-hours-settings",
                "summary": "Change working hours settings",
                "description": "Deprecated, replaced by PUT /members/{user_uuid}. Changes the working hours settings of a team member (team owner or members with FlowTime full access only; everyone else gets 403). The target member is identified by \"user_uuid\" in the body. Only the fields you send are updated. The endpoint writes through the same logic as the members endpoint and therefore answers in its shape; fields that are no longer supported are silently ignored here. Every response carries the headers \"Deprecation: true\" and \"Sunset\".",
                "tags": [
                    "working-hours"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Member updated successfully",
                                    "data": {
                                        "user_uuid": "9d3c6a2e-5b1f-4f7a-8c2d-1e4b7a9f0c35",
                                        "weekly_hours": "32.00",
                                        "working_days": [
                                            1,
                                            2,
                                            3,
                                            4,
                                            5,
                                            6,
                                            7
                                        ],
                                        "daily_hours": null,
                                        "track_overtime": true,
                                        "compensation": {
                                            "type": "hourly",
                                            "hourly_rate": null,
                                            "monthly_salary": null,
                                            "currency": null,
                                            "valid_from": "2026-09-23"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "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 target member"
                                    },
                                    "weekly_hours": {
                                        "type": "number",
                                        "description": "Weekly hours (0-168)"
                                    },
                                    "working_days": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Working days as numbers 1-7 (Mon-Sun), at least one day, each day at most once"
                                    },
                                    "daily_hours": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Target hours per day (0-24)"
                                    },
                                    "track_overtime": {
                                        "type": "boolean",
                                        "description": "Track overtime; if sent, true or false, not null"
                                    }
                                },
                                "required": [
                                    "user_uuid"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/working-hours/overtime/adjust": {
            "post": {
                "operationId": "working-hours-overtime-adjust",
                "summary": "Adjust the overtime balance",
                "description": "Adjusts the overtime balance of a team member (team owner or members with FlowTime full access only; everyone else gets 403). With \"mode\" the value is either added (add, default) or set absolutely (set). The resulting balance is limited to the permitted bounds on the server.",
                "tags": [
                    "working-hours"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "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 target member"
                                    },
                                    "minutes": {
                                        "type": "integer",
                                        "description": "Number of minutes (with mode=add the delta, with mode=set the target value)"
                                    },
                                    "mode": {
                                        "type": "string",
                                        "description": "add (add, default) or set (set absolutely)"
                                    },
                                    "reason": {
                                        "type": "string",
                                        "description": "Reason for the audit trail (max. 500 characters)"
                                    }
                                },
                                "required": [
                                    "user_uuid",
                                    "minutes"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/working-hours/history": {
            "get": {
                "operationId": "working-hours-history",
                "summary": "Get the working time history",
                "description": "Returns the day-by-day working time history, by default for the current week of the signed-in user. Team owners and members with FlowTime full access can get another member's history through \"user_uuid\". The period is limited to 31 days. \"summary\" sums up target and actual time of the requested days; \"overtime_balance\" is, separately, the running overtime balance as of today, calculated on every call. A team with overtime tracking switched off, and likewise a member for whom no overtime is tracked, only gets \"configured\" (false) and an empty list of days; the requested member is what counts. Period, summary and balance then do not appear at all and are not null. The settings can still be written.",
                "tags": [
                    "working-hours"
                ],
                "parameters": [
                    {
                        "name": "start_date",
                        "in": "query",
                        "required": false,
                        "description": "Start date (YYYY-MM-DD, default: start of the week)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "end_date",
                        "in": "query",
                        "required": false,
                        "description": "End date (YYYY-MM-DD, must be >= start_date)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "user_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Team owner (or members with FlowTime full access) only: history of a specific user",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "configured": true,
                                        "period": {
                                            "start_date": "2026-09-22",
                                            "end_date": "2026-09-22"
                                        },
                                        "summary": {
                                            "target_hours": 5.71,
                                            "actual_hours": 9,
                                            "difference_hours": 3.29
                                        },
                                        "overtime_balance": {
                                            "minutes": -1123,
                                            "hours": -18.72,
                                            "formatted": "-18:43"
                                        },
                                        "days": [
                                            {
                                                "date": "2026-09-22",
                                                "day_name": "Dienstag",
                                                "is_working_day": true,
                                                "day_kind": "regular",
                                                "day_label": null,
                                                "target_seconds": 20571,
                                                "target_hours": 5.71,
                                                "target_formatted": "05:42",
                                                "actual_seconds": 32400,
                                                "actual_hours": 9,
                                                "actual_formatted": "09:00",
                                                "difference_seconds": 11829,
                                                "difference_formatted": "+03:17",
                                                "remaining_seconds": 0,
                                                "remaining_formatted": "00:00",
                                                "is_complete": true,
                                                "percentage": 157.5,
                                                "has_active_timer": false
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/members": {
            "get": {
                "operationId": "members-index",
                "summary": "List members",
                "description": "Lists all members of the team with working hours, pay, vacation allowance and overtime balance (team owner or members with FlowTime full access only; everyone else gets 403). The pay is the row of the pay history valid on the reference date; if no row exists for a member, all values of the block are null in the response, never 0. The vacation block applies to the year of the reference date, the overtime block is the balance up to the reference date. If FlowTime cannot calculate a value, for example for a member without FlowTime access, it is null in the block. If no overtime is tracked for a member (track_overtime false), all values of their overtime block are null. If the team has switched overtime off, the fields data.*.overtime, data.*.working_time.weekly_hours and data.*.working_time.daily_hours are missing entirely from every entry; working days, track_overtime, pay and vacation remain.",
                "tags": [
                    "members"
                ],
                "parameters": [
                    {
                        "name": "date",
                        "in": "query",
                        "required": false,
                        "description": "Reference date (YYYY-MM-DD), default: today",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Entries per page (1-200, default 50)",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page (starting at 1)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "user_uuid": "44ad890b-f7f3-4154-8b38-83261195e475",
                                            "name": "John Doe",
                                            "working_time": {
                                                "weekly_hours": "40.00",
                                                "working_days": [
                                                    1,
                                                    2,
                                                    3,
                                                    4,
                                                    5
                                                ],
                                                "daily_hours": {
                                                    "1": 8,
                                                    "2": 8,
                                                    "3": 8,
                                                    "4": 8,
                                                    "5": 8
                                                },
                                                "track_overtime": true
                                            },
                                            "compensation": {
                                                "type": "hourly",
                                                "hourly_rate": 25.5,
                                                "monthly_salary": null,
                                                "currency": "EUR",
                                                "valid_from": "2026-09-23"
                                            },
                                            "vacation": {
                                                "year": 2026,
                                                "has_contingent": true,
                                                "entitlement": 30,
                                                "carryover": 2.5,
                                                "taken": 12,
                                                "planned": 5,
                                                "requested": 2,
                                                "remaining": 13.5
                                            },
                                            "overtime": {
                                                "minutes": 450,
                                                "hours": 7.5,
                                                "formatted": "+07:30"
                                            }
                                        }
                                    ],
                                    "meta": {
                                        "total": 1,
                                        "per_page": 50,
                                        "current_page": 1,
                                        "last_page": 1,
                                        "date": "2026-09-23"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/members/{user_uuid}": {
            "put": {
                "operationId": "members-update",
                "summary": "Edit a member",
                "description": "Changes the working hours and pay of a team member (team owner or members with FlowTime full access only; everyone else gets 403). The member is addressed by the UUID in the path. Only the fields you send are updated; daily hours are only kept for selected working days. A pay change is recorded in the pay history with a valid-from date; a second change on the same day replaces that day's row instead of adding another. The response contains the pay block valid today. Validation errors are answered with HTTP 422.",
                "tags": [
                    "members"
                ],
                "parameters": [
                    {
                        "name": "user_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": "Member updated successfully",
                                    "data": {
                                        "user_uuid": "9d3c6a2e-5b1f-4f7a-8c2d-1e4b7a9f0c35",
                                        "weekly_hours": "32.00",
                                        "working_days": [
                                            1,
                                            2,
                                            3,
                                            4
                                        ],
                                        "daily_hours": {
                                            "1": 8,
                                            "2": 8,
                                            "3": 8,
                                            "4": 8
                                        },
                                        "track_overtime": true,
                                        "compensation": {
                                            "type": "monthly",
                                            "hourly_rate": null,
                                            "monthly_salary": 4200,
                                            "currency": "EUR",
                                            "valid_from": "2026-09-23"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "weekly_hours": {
                                        "type": "number",
                                        "description": "Weekly hours (0-168)"
                                    },
                                    "working_days": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Working days as numbers 1-7 (Mon-Sun), at least one day, each day at most once"
                                    },
                                    "daily_hours": {
                                        "type": "object",
                                        "description": "Target hours per working day (0-24), the key is the weekday 1-7"
                                    },
                                    "track_overtime": {
                                        "type": "boolean",
                                        "description": "Track overtime; if sent, true or false, not null"
                                    },
                                    "compensation_type": {
                                        "type": "string",
                                        "description": "Pay type: hourly (hourly rate) or monthly (monthly salary); if sent, not null"
                                    },
                                    "hourly_rate": {
                                        "type": "number",
                                        "description": "Hourly rate (0 to 999999.99). Required for the pay type hourly unless an hourly rate is stored; not stored for monthly"
                                    },
                                    "monthly_salary": {
                                        "type": "number",
                                        "description": "Monthly salary (0 to 999999.99). Required for the pay type monthly unless a monthly salary is stored; not stored for hourly"
                                    },
                                    "currency": {
                                        "type": "string",
                                        "description": "Currency as a three-letter code, for example EUR; if omitted, the previous currency stays"
                                    },
                                    "valid_from": {
                                        "type": "string",
                                        "format": "date",
                                        "description": "Valid from (YYYY-MM-DD), default: today. The date must not be in the future, at most 118 months before the current month (from its first day) and not before the start of the last row of the pay history with a different amount; each of these limits is rejected with HTTP 422. A date equal to that start replaces the row. Later rows without an amount (such as the row from the start date of employment) or with exactly the new pay are replaced."
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/holidays": {
            "get": {
                "operationId": "holidays-index",
                "summary": "Get public holidays",
                "description": "Returns the statutory public holidays in Germany for a year, in ascending date order. This is master data that is identical for all teams; every member with FlowTime access can retrieve it. With state you get the nationwide holidays and those of the given federal state.",
                "tags": [
                    "members"
                ],
                "parameters": [
                    {
                        "name": "year",
                        "in": "query",
                        "required": false,
                        "description": "Year (1990-2100), default: current year",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "state",
                        "in": "query",
                        "required": false,
                        "description": "Federal state as an abbreviation (BW, BY, BE, BB, HB, HH, HE, MV, NI, NW, RP, SL, SN, ST, SH, TH). DE only returns the nationwide holidays; any other code is rejected with HTTP 422. Without it, all holidays of the year are returned.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "date": "2026-01-01",
                                            "state": "DE",
                                            "name": "Neujahr",
                                            "source": "feiertage-api.de"
                                        },
                                        {
                                            "date": "2026-01-06",
                                            "state": "BY",
                                            "name": "Heilige Drei Könige",
                                            "source": "feiertage-api.de"
                                        },
                                        {
                                            "date": "2026-12-25",
                                            "state": "DE",
                                            "name": "1. Weihnachtstag",
                                            "source": "feiertage-api.de"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/absences": {
            "get": {
                "operationId": "absences-index",
                "summary": "List absences",
                "description": "Lists the team's absences, sorted by first day in descending order. Members only get their own entries. A period from from and to returns every absence that has at least one day in it.",
                "tags": [
                    "absences"
                ],
                "parameters": [
                    {
                        "name": "from",
                        "in": "query",
                        "required": false,
                        "description": "Start of the period (YYYY-MM-DD)",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "required": false,
                        "description": "End of the period (YYYY-MM-DD), not before from",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "type",
                        "in": "query",
                        "required": false,
                        "description": "vacation, sick, overtime_reduction or business_trip",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "requested, approved, rejected or cancelled",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "user_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Only absences of this member (team owner; members only with their own UUID)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Entries per page (1-200, default 50)",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page (starting at 1)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "8f2b4c1e-3d5a-4e6f-9a7b-2c1d0e9f8a76",
                                            "user_uuid": "44ad890b-f7f3-4154-8b38-83261195e475",
                                            "user_name": "John Doe",
                                            "type": "vacation",
                                            "starts_on": "2026-09-28",
                                            "ends_on": "2026-09-30",
                                            "half_day_start": "none",
                                            "half_day_end": "none",
                                            "hours": null,
                                            "status": "approved",
                                            "note": "Sommerurlaub",
                                            "decided_by_uuid": "a57b92df-c5e3-4e64-81f0-4dcfddba105c",
                                            "decided_at": "2026-09-23T17:03:49+02:00",
                                            "decision_note": null,
                                            "created_at": "2026-09-23T17:03:49+02:00",
                                            "updated_at": "2026-09-23T17:03:49+02:00"
                                        }
                                    ],
                                    "meta": {
                                        "total": 1,
                                        "per_page": 50,
                                        "current_page": 1,
                                        "last_page": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "absences-store",
                "summary": "Create an absence",
                "description": "Creates an absence. Without user_uuid it is your own request or notification; with user_uuid the team owner enters the absence for a member. FlowTime sets the status; status and decision fields must not be sent. warnings contains notes for the team owner (for example an overlap) that do not prevent saving. No absence can be created for a member without FlowTime access, not even by the team owner (HTTP 422, error on the user_uuid field). Response HTTP 201.",
                "tags": [
                    "absences"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Absence created successfully",
                                    "data": {
                                        "uuid": "8f2b4c1e-3d5a-4e6f-9a7b-2c1d0e9f8a76",
                                        "user_uuid": "44ad890b-f7f3-4154-8b38-83261195e475",
                                        "user_name": "John Doe",
                                        "type": "vacation",
                                        "starts_on": "2026-09-28",
                                        "ends_on": "2026-09-30",
                                        "half_day_start": "none",
                                        "half_day_end": "none",
                                        "hours": null,
                                        "status": "approved",
                                        "note": "Sommerurlaub",
                                        "decided_by_uuid": "a57b92df-c5e3-4e64-81f0-4dcfddba105c",
                                        "decided_at": "2026-09-23T17:03:49+02:00",
                                        "decision_note": null,
                                        "created_at": "2026-09-23T17:03:49+02:00",
                                        "updated_at": "2026-09-23T17:03:49+02:00"
                                    },
                                    "warnings": []
                                }
                            }
                        }
                    },
                    "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": "Member of the team (team owner only); if omitted, the absence applies to you"
                                    },
                                    "type": {
                                        "type": "string",
                                        "description": "vacation, sick, overtime_reduction or business_trip"
                                    },
                                    "starts_on": {
                                        "type": "string",
                                        "format": "date",
                                        "description": "First day (YYYY-MM-DD)"
                                    },
                                    "ends_on": {
                                        "type": "string",
                                        "format": "date",
                                        "description": "Last day (YYYY-MM-DD), not before starts_on; required except for overtime_reduction (a single day)"
                                    },
                                    "half_day_start": {
                                        "type": "string",
                                        "description": "Half day on the first day: none, am or pm (default none)"
                                    },
                                    "half_day_end": {
                                        "type": "string",
                                        "description": "Half day on the last day: none, am or pm (default none)"
                                    },
                                    "hours": {
                                        "type": "number",
                                        "description": "Hours, only for overtime_reduction and then required (greater than 0, at most 24, in quarter hours)"
                                    },
                                    "note": {
                                        "type": "string",
                                        "description": "Note (max. 500 characters)"
                                    }
                                },
                                "required": [
                                    "type",
                                    "starts_on"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/absences/balance": {
            "get": {
                "operationId": "absences-balance",
                "summary": "Get the vacation and overtime balance",
                "description": "Returns a member's vacation allowance for a year and current overtime balance, exactly as FlowTime calculates them. A member can only retrieve their own figures; another person's user_uuid returns 403. Only the team owner and members with FlowTime full access see other people's figures; the team reports right is not enough. A member of another team returns 404. The vacation block applies to the requested year, the overtime block is the running balance up to today. If the team has switched overtime off, the data.overtime block is missing entirely from the response; the vacation block remains. If FlowTime cannot calculate a value, it is null in the block. If no overtime is tracked for the member, all values of the overtime block are null; for a member without FlowTime access this applies to both blocks, exactly as in GET /members. entitlement and remaining are null as long as no vacation entitlement is stored for the member.",
                "tags": [
                    "absences"
                ],
                "parameters": [
                    {
                        "name": "user_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Member of the team; if omitted, your own figures (other members only for the team owner and members with FlowTime full access)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "year",
                        "in": "query",
                        "required": false,
                        "description": "Year of the vacation allowance (2000-2100, default: current year)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "user_uuid": "44ad890b-f7f3-4154-8b38-83261195e475",
                                        "year": 2026,
                                        "vacation": {
                                            "has_contingent": true,
                                            "entitlement": 30,
                                            "carryover": 2.5,
                                            "taken": 12,
                                            "planned": 5,
                                            "requested": 2,
                                            "remaining": 13.5
                                        },
                                        "overtime": {
                                            "minutes": 450,
                                            "hours": 7.5,
                                            "formatted": "+07:30"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/absences/{uuid}": {
            "get": {
                "operationId": "absences-show",
                "summary": "Get an absence",
                "description": "Returns an absence. Members only get their own absences; any other UUID returns 404.",
                "tags": [
                    "absences"
                ],
                "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": "8f2b4c1e-3d5a-4e6f-9a7b-2c1d0e9f8a76",
                                        "user_uuid": "44ad890b-f7f3-4154-8b38-83261195e475",
                                        "user_name": "John Doe",
                                        "type": "vacation",
                                        "starts_on": "2026-09-28",
                                        "ends_on": "2026-09-30",
                                        "half_day_start": "none",
                                        "half_day_end": "none",
                                        "hours": null,
                                        "status": "approved",
                                        "note": "Sommerurlaub",
                                        "decided_by_uuid": "a57b92df-c5e3-4e64-81f0-4dcfddba105c",
                                        "decided_at": "2026-09-23T17:03:49+02:00",
                                        "decision_note": null,
                                        "created_at": "2026-09-23T17:03:49+02:00",
                                        "updated_at": "2026-09-23T17:03:49+02:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "absences-update",
                "summary": "Change an absence",
                "description": "Changes an absence (team owner or members with FlowTime full access only; everyone else gets 403). Only the fields you send are changed. The status, the decision fields and the member cannot be changed here.",
                "tags": [
                    "absences"
                ],
                "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": "Absence updated successfully",
                                    "data": {
                                        "uuid": "8f2b4c1e-3d5a-4e6f-9a7b-2c1d0e9f8a76",
                                        "user_uuid": "44ad890b-f7f3-4154-8b38-83261195e475",
                                        "user_name": "John Doe",
                                        "type": "vacation",
                                        "starts_on": "2026-09-28",
                                        "ends_on": "2026-09-30",
                                        "half_day_start": "none",
                                        "half_day_end": "none",
                                        "hours": null,
                                        "status": "approved",
                                        "note": "Sommerurlaub an der Ostsee",
                                        "decided_by_uuid": "a57b92df-c5e3-4e64-81f0-4dcfddba105c",
                                        "decided_at": "2026-09-23T17:03:49+02:00",
                                        "decision_note": null,
                                        "created_at": "2026-09-23T17:03:49+02:00",
                                        "updated_at": "2026-09-23T17:03:49+02:00"
                                    },
                                    "warnings": []
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "type": "string",
                                        "description": "vacation, sick, overtime_reduction or business_trip"
                                    },
                                    "starts_on": {
                                        "type": "string",
                                        "format": "date",
                                        "description": "First day (YYYY-MM-DD)"
                                    },
                                    "ends_on": {
                                        "type": "string",
                                        "format": "date",
                                        "description": "Last day (YYYY-MM-DD)"
                                    },
                                    "half_day_start": {
                                        "type": "string",
                                        "description": "none, am or pm"
                                    },
                                    "half_day_end": {
                                        "type": "string",
                                        "description": "none, am or pm"
                                    },
                                    "hours": {
                                        "type": "number",
                                        "description": "Hours for overtime_reduction (greater than 0, at most 24, in quarter hours); if sent, not null, if omitted unchanged"
                                    },
                                    "note": {
                                        "type": "string",
                                        "description": "Note (max. 500 characters)"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "absences-destroy",
                "summary": "Delete an absence",
                "description": "Deletes an absence (team owner or members with FlowTime full access only; everyone else gets 403). The absence is archived and its decision stays traceable. An absence that has already been deleted returns 404.",
                "tags": [
                    "absences"
                ],
                "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": "Absence deleted successfully"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/absences/{uuid}/approve": {
            "post": {
                "operationId": "absences-approve",
                "summary": "Approve an absence",
                "description": "Approves an open request (team owner or members with FlowTime full access only; everyone else gets 403). Only a request with the status requested can be approved; a request that has already been decided returns 409 and keeps its first decision. If the requesting person no longer belongs to the team or no longer has FlowTime access, the request is not approved (HTTP 422, error on the user_uuid field); such a request can still be rejected. The member receives a notification.",
                "tags": [
                    "absences"
                ],
                "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": "Absence approved successfully",
                                    "data": {
                                        "uuid": "8f2b4c1e-3d5a-4e6f-9a7b-2c1d0e9f8a76",
                                        "user_uuid": "44ad890b-f7f3-4154-8b38-83261195e475",
                                        "user_name": "John Doe",
                                        "type": "vacation",
                                        "starts_on": "2026-09-28",
                                        "ends_on": "2026-09-30",
                                        "half_day_start": "none",
                                        "half_day_end": "none",
                                        "hours": null,
                                        "status": "approved",
                                        "note": "Sommerurlaub",
                                        "decided_by_uuid": "a57b92df-c5e3-4e64-81f0-4dcfddba105c",
                                        "decided_at": "2026-09-23T17:17:20+02:00",
                                        "decision_note": null,
                                        "created_at": "2026-09-23T17:03:49+02:00",
                                        "updated_at": "2026-09-23T17:17:20+02:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "decision_note": {
                                        "type": "string",
                                        "description": "Note on the decision (max. 500 characters)"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/absences/{uuid}/reject": {
            "post": {
                "operationId": "absences-reject",
                "summary": "Reject an absence",
                "description": "Rejects an open request (team owner or members with FlowTime full access only; everyone else gets 403). A rejection needs a reason, which the member reads in their notification; if it is missing from the request of the team owner or a member with FlowTime full access, the API answers with HTTP 422. A request that has already been decided returns 409.",
                "tags": [
                    "absences"
                ],
                "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": "Absence rejected successfully",
                                    "data": {
                                        "uuid": "8f2b4c1e-3d5a-4e6f-9a7b-2c1d0e9f8a76",
                                        "user_uuid": "44ad890b-f7f3-4154-8b38-83261195e475",
                                        "user_name": "John Doe",
                                        "type": "vacation",
                                        "starts_on": "2026-09-28",
                                        "ends_on": "2026-09-30",
                                        "half_day_start": "none",
                                        "half_day_end": "none",
                                        "hours": null,
                                        "status": "rejected",
                                        "note": "Sommerurlaub",
                                        "decided_by_uuid": "a57b92df-c5e3-4e64-81f0-4dcfddba105c",
                                        "decided_at": "2026-09-23T17:17:20+02:00",
                                        "decision_note": "Zu dieser Zeit ist das Team unterbesetzt.",
                                        "created_at": "2026-09-23T17:03:49+02:00",
                                        "updated_at": "2026-09-23T17:17:20+02:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "decision_note": {
                                        "type": "string",
                                        "description": "Reason for the rejection (max. 500 characters)"
                                    }
                                },
                                "required": [
                                    "decision_note"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/absences/{uuid}/cancel": {
            "post": {
                "operationId": "absences-cancel",
                "summary": "Withdraw an absence",
                "description": "Withdraws your own absence. This is not a right of the team owner: only the person who requested the absence can withdraw it, an open request as well as an approved absence, at the latest on the day before it starts. The team owner removes a member's absence with DELETE instead; if they call this endpoint for another member, they get 403. If withdrawing is no longer possible, the API answers with HTTP 409. No reason is sent.",
                "tags": [
                    "absences"
                ],
                "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": "Absence cancelled successfully",
                                    "data": {
                                        "uuid": "8f2b4c1e-3d5a-4e6f-9a7b-2c1d0e9f8a76",
                                        "user_uuid": "44ad890b-f7f3-4154-8b38-83261195e475",
                                        "user_name": "John Doe",
                                        "type": "vacation",
                                        "starts_on": "2026-09-28",
                                        "ends_on": "2026-09-30",
                                        "half_day_start": "none",
                                        "half_day_end": "none",
                                        "hours": null,
                                        "status": "cancelled",
                                        "note": "Sommerurlaub",
                                        "decided_by_uuid": null,
                                        "decided_at": null,
                                        "decision_note": null,
                                        "created_at": "2026-09-23T17:03:49+02:00",
                                        "updated_at": "2026-09-23T17:17:20+02:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/team/status": {
            "get": {
                "operationId": "team-status",
                "summary": "Get the team status",
                "description": "Who is currently clocked in, on a break or clocked out. For the team owner, members with FlowTime full access and members with the teamberichte sub-right; everyone else gets HTTP 403 with code team_status_denied. Only entries of this team count. since is the start of the open entry, or for clocked-out people the end of the last entry (or null).",
                "tags": [
                    "app"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "user": {
                                                "uuid": "44ad890b-f7f3-4154-8b38-83261195e475",
                                                "name": "John Doe",
                                                "profile_photo_url": "https://ui-avatars.com/api/?name=M+M"
                                            },
                                            "state": "clocked_in",
                                            "since": "2026-11-22T08:02:00+01:00",
                                            "project": null
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/me/location": {
            "get": {
                "operationId": "me-location-show",
                "summary": "Get your own work location",
                "description": "Your own work location for the location notice of the FlowTime app in the current team. data is null as long as none is set. address is the address entered on the web, and null if the location was set in the app.",
                "tags": [
                    "app"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "label": "Büro Berlin",
                                        "address": "Alexanderplatz 1, 10178 Berlin",
                                        "latitude": 52.52,
                                        "longitude": 13.405,
                                        "radius_m": 150,
                                        "mode": "reminder",
                                        "enabled": true,
                                        "updated_at": "2026-11-22T09:00:00+01:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "me-location-update",
                "summary": "Set your own work location",
                "description": "Creates or replaces your own work location (one row per user and team). address is optional. If it is omitted and the coordinates change, an address saved on the web is cleared because it no longer matches the location.",
                "tags": [
                    "app"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "label": "Büro Berlin",
                                        "address": null,
                                        "latitude": 52.52,
                                        "longitude": 13.405,
                                        "radius_m": 150,
                                        "mode": "auto",
                                        "enabled": true,
                                        "updated_at": "2026-11-22T09:00:00+01:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "label": {
                                        "type": "string",
                                        "description": "Label (max. 100 characters)"
                                    },
                                    "address": {
                                        "type": "string",
                                        "description": "Address of the work location (max. 255 characters, optional, null allowed). Only stored, not evaluated."
                                    },
                                    "latitude": {
                                        "type": "number",
                                        "description": "Latitude (-90 to 90)"
                                    },
                                    "longitude": {
                                        "type": "number",
                                        "description": "Longitude (-180 to 180)"
                                    },
                                    "radius_m": {
                                        "type": "integer",
                                        "description": "Radius in metres (50 to 1000)"
                                    },
                                    "mode": {
                                        "type": "string",
                                        "description": "reminder (reminder) or auto (clock in and out automatically)"
                                    },
                                    "enabled": {
                                        "type": "boolean",
                                        "description": "Active"
                                    }
                                },
                                "required": [
                                    "label",
                                    "latitude",
                                    "longitude",
                                    "radius_m",
                                    "mode",
                                    "enabled"
                                ]
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "me-location-destroy",
                "summary": "Remove your own work location",
                "description": "Removes your own work location. Always answers with HTTP 204 without content.",
                "tags": [
                    "app"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/types": {
            "get": {
                "operationId": "shifts-types-index",
                "summary": "List shift types",
                "description": "Lists all shift types of the team.",
                "tags": [
                    "shifts"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "shifts-types-store",
                "summary": "Create a shift type",
                "description": "Creates a new shift type (requires the \"schichtplanung\" sub-right, team owner or FlowTime full access).",
                "tags": [
                    "shifts"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "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 shift type (max. 255 characters)"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Description"
                                    },
                                    "color": {
                                        "type": "string",
                                        "description": "Hex colour (max. 7 characters)"
                                    },
                                    "icon": {
                                        "type": "string",
                                        "description": "Icon identifier (max. 50 characters)"
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "Shift type active"
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/types/{uuid}": {
            "get": {
                "operationId": "shifts-types-show",
                "summary": "Get a shift type",
                "description": "Returns a single shift type, including the number of its templates and shifts.",
                "tags": [
                    "shifts"
                ],
                "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": "3c2b1a09-...",
                                        "name": "Frühschicht",
                                        "short_name": "FS",
                                        "description": null,
                                        "color": "#3B82F6",
                                        "icon": null,
                                        "is_active": true,
                                        "sort_order": 0,
                                        "templates_count": 2,
                                        "shifts_count": 14,
                                        "created_at": "2026-09-14T10:00:00+02:00",
                                        "updated_at": "2026-09-14T10:00:00+02:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "shifts-types-update",
                "summary": "Update a shift type",
                "description": "Updates a shift type (requires the \"schichtplanung\" sub-right, team owner or FlowTime full access). Addressed by UUID only.",
                "tags": [
                    "shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "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 of the shift type (max. 255 characters)"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Description"
                                    },
                                    "color": {
                                        "type": "string",
                                        "description": "Hex colour in the format #RRGGBB"
                                    },
                                    "icon": {
                                        "type": "string",
                                        "description": "Icon identifier (max. 50 characters)"
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "Shift type active"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "shifts-types-destroy",
                "summary": "Delete a shift type",
                "description": "Deletes a shift type (requires the \"schichtplanung\" sub-right, team owner or FlowTime full access). Addressed by UUID only.",
                "tags": [
                    "shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/templates": {
            "get": {
                "operationId": "shifts-templates-index",
                "summary": "List shift templates",
                "description": "Lists all shift templates of the team.",
                "tags": [
                    "shifts"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "shifts-templates-store",
                "summary": "Create a shift template",
                "description": "Creates a new shift template (requires the \"schichtplanung\" sub-right, team owner or FlowTime full access). Breaking change: the former numeric field \"shift_type_id\" is no longer accepted; the shift type is only given through \"shift_type_uuid\".",
                "tags": [
                    "shifts"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "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 shift template (max. 255 characters)"
                                    },
                                    "shift_type_uuid": {
                                        "type": "string",
                                        "description": "UUID of the shift type (bound to the team)"
                                    },
                                    "start_time": {
                                        "type": "string",
                                        "description": "Start time (HH:MM)"
                                    },
                                    "end_time": {
                                        "type": "string",
                                        "description": "End time (HH:MM)"
                                    },
                                    "min_staff": {
                                        "type": "integer",
                                        "description": "Minimum staffing"
                                    },
                                    "max_staff": {
                                        "type": "integer",
                                        "description": "Maximum staffing (>= min_staff)"
                                    },
                                    "default_days": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Default weekdays (1-7)"
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "Shift template active"
                                    }
                                },
                                "required": [
                                    "name",
                                    "shift_type_uuid",
                                    "start_time",
                                    "end_time"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/templates/{uuid}": {
            "get": {
                "operationId": "shifts-templates-show",
                "summary": "Get a shift template",
                "description": "Returns a single shift template with its shift type.",
                "tags": [
                    "shifts"
                ],
                "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": "4d3c2b1a-...",
                                        "name": "Frühdienst Werktag",
                                        "shift_type_uuid": "3c2b1a09-...",
                                        "shift_type_name": "Frühschicht",
                                        "start_time": "06:00",
                                        "end_time": "14:00",
                                        "duration_minutes": 480,
                                        "min_staff": 2,
                                        "max_staff": 4,
                                        "default_days": [
                                            1,
                                            2,
                                            3,
                                            4,
                                            5
                                        ],
                                        "is_active": true,
                                        "sort_order": 0,
                                        "created_at": "2026-09-14T10:00:00+02:00",
                                        "updated_at": "2026-09-14T10:00:00+02:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "shifts-templates-update",
                "summary": "Update a shift template",
                "description": "Updates a shift template (requires the \"schichtplanung\" sub-right, team owner or FlowTime full access). Addressed by UUID only. Breaking change: the former numeric field \"shift_type_id\" is no longer accepted; the shift type is only given through \"shift_type_uuid\".",
                "tags": [
                    "shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "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 of the shift template (max. 255 characters)"
                                    },
                                    "shift_type_uuid": {
                                        "type": "string",
                                        "description": "UUID of the shift type (bound to the team)"
                                    },
                                    "start_time": {
                                        "type": "string",
                                        "description": "Start time (HH:MM)"
                                    },
                                    "end_time": {
                                        "type": "string",
                                        "description": "End time (HH:MM)"
                                    },
                                    "min_staff": {
                                        "type": "integer",
                                        "description": "Minimum staffing"
                                    },
                                    "max_staff": {
                                        "type": "integer",
                                        "description": "Maximum staffing (>= min_staff)"
                                    },
                                    "default_days": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Default weekdays (1-7)"
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "Shift template active"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "shifts-templates-destroy",
                "summary": "Delete a shift template",
                "description": "Deletes a shift template (requires the \"schichtplanung\" sub-right, team owner or FlowTime full access). Addressed by UUID only.",
                "tags": [
                    "shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/plans": {
            "get": {
                "operationId": "shifts-plans-index",
                "summary": "List shift plans",
                "description": "Lists the shift plans of the team.",
                "tags": [
                    "shifts"
                ],
                "parameters": [
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "Filters by status (draft, published or archived)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "start_date",
                        "in": "query",
                        "required": false,
                        "description": "Filters plans from this date",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "end_date",
                        "in": "query",
                        "required": false,
                        "description": "Filters plans up to this date (must be >= start_date)",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "shifts-plans-store",
                "summary": "Create a shift plan",
                "description": "Creates a new shift plan for one week (requires the \"schichtplanung\" sub-right, team owner or FlowTime full access). Breaking change: the former numeric field \"shift_type_ids\" is no longer accepted; the shift types are only given through \"shift_type_uuids\".",
                "tags": [
                    "shifts"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "week_start": {
                                        "type": "string",
                                        "description": "Start of the week (date)"
                                    },
                                    "name": {
                                        "type": "string",
                                        "description": "Name of the plan (max. 255 characters)"
                                    },
                                    "create_from_templates": {
                                        "type": "boolean",
                                        "description": "Generate the plan from templates"
                                    },
                                    "shift_type_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "UUIDs of the shift types to include (bound to the team)",
                                        "properties": {
                                            "*": {
                                                "type": "string",
                                                "description": "Single shift type UUID"
                                            }
                                        }
                                    }
                                },
                                "required": [
                                    "week_start"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/plans/{uuid}": {
            "get": {
                "operationId": "shifts-plans-show",
                "summary": "Get shift plan details",
                "description": "Returns a single shift plan with its shifts. Addressed by UUID only.",
                "tags": [
                    "shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "shifts-plans-update",
                "summary": "Change a shift plan",
                "description": "Changes the name and note of a shift plan (requires the \"schichtplanung\" sub-right, team owner or FlowTime full access). Only drafts can be changed; a published or archived plan answers with HTTP 409 and the error plan_not_editable. The plan week itself cannot be changed, because the shifts are tied to its days; for another week there is the copy action. The status only changes through publish and archive.",
                "tags": [
                    "shifts"
                ],
                "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": "5e4d3c2b-...",
                                        "name": "KW 39/2026",
                                        "start_date": "2026-09-21",
                                        "end_date": "2026-09-27",
                                        "status": "draft",
                                        "notes": "Urlaubszeit",
                                        "editable": true,
                                        "published_at": null,
                                        "published_by_name": null,
                                        "shifts_count": 12,
                                        "created_at": "2026-09-14T10:00:00+02:00",
                                        "updated_at": "2026-09-14T10:00:00+02:00"
                                    },
                                    "message": "Shift plan 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": "New name of the plan (max. 255 characters)"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Note on the plan; null clears it"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "shifts-plans-destroy",
                "summary": "Delete a shift plan",
                "description": "Deletes a shift plan with its shifts and their assignments (requires the \"schichtplanung\" sub-right, team owner or FlowTime full access). Only drafts can be deleted: a published plan is the roster the team works by, an archived one the record of a past week. Both answer with HTTP 409 and the error plan_not_editable and are archived instead.",
                "tags": [
                    "shifts"
                ],
                "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": "Shift plan deleted successfully"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/plans/{uuid}/shifts": {
            "get": {
                "operationId": "shifts-plans-shifts",
                "summary": "List the shifts of a plan",
                "description": "Returns the shifts of a plan page by page, optionally limited to one day or one shift type. The plan detail view, by contrast, returns the whole week in one response.",
                "tags": [
                    "shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "date",
                        "in": "query",
                        "required": false,
                        "description": "Limits the result to one day (YYYY-MM-DD)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "shift_type_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Limits the result to one shift type of the team",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "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": "6f5e4d3c-...",
                                            "shift_plan_uuid": "5e4d3c2b-...",
                                            "shift_type_uuid": "3c2b1a09-...",
                                            "shift_type_name": "Frühschicht",
                                            "shift_type_color": "#3B82F6",
                                            "date": "2026-09-21",
                                            "start_time": "06:00",
                                            "end_time": "14:00",
                                            "duration_minutes": 480,
                                            "min_staff": 2,
                                            "max_staff": 4,
                                            "assigned_count": 2,
                                            "staffing_status": "ok",
                                            "notes": null,
                                            "editable": true,
                                            "assignments": [
                                                {
                                                    "uuid": "7a6f5e4d-...",
                                                    "user_uuid": "e5f6a7b8-...",
                                                    "user_name": "Anna",
                                                    "status": "confirmed",
                                                    "confirmed_at": "2026-09-15T09:00:00+02:00",
                                                    "notes": null,
                                                    "created_at": "2026-09-14T10:00:00+02:00",
                                                    "updated_at": "2026-09-14T10:00:00+02:00"
                                                }
                                            ],
                                            "created_at": "2026-09-14T10:00:00+02:00",
                                            "updated_at": "2026-09-14T10:00:00+02:00"
                                        }
                                    ],
                                    "meta": {
                                        "current_page": 1,
                                        "per_page": 50,
                                        "total": 12,
                                        "last_page": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/plans/{uuid}/publish": {
            "post": {
                "operationId": "shifts-plans-publish",
                "summary": "Publish a shift plan",
                "description": "Publishes a shift plan (requires the \"schichtplanung\" sub-right, team owner or FlowTime full access).",
                "tags": [
                    "shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/plans/{uuid}/archive": {
            "post": {
                "operationId": "shifts-plans-archive",
                "summary": "Archive a shift plan",
                "description": "Archives a shift plan (requires the \"schichtplanung\" sub-right, team owner or FlowTime full access).",
                "tags": [
                    "shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/plans/{uuid}/copy": {
            "post": {
                "operationId": "shifts-plans-copy",
                "summary": "Copy a shift plan",
                "description": "Copies a shift plan to another week (requires the \"schichtplanung\" sub-right, team owner or FlowTime full access).",
                "tags": [
                    "shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "target_week_start": {
                                        "type": "string",
                                        "description": "Start date of the target week"
                                    }
                                },
                                "required": [
                                    "target_week_start"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts": {
            "post": {
                "operationId": "shifts-store",
                "summary": "Create a shift",
                "description": "Creates a single shift within a plan (requires the \"schichtplanung\" sub-right, team owner or FlowTime full access). Breaking change: the former numeric fields \"shift_plan_id\" and \"shift_type_id\" are no longer accepted; plan and type are only given through \"shift_plan_uuid\" and \"shift_type_uuid\".",
                "tags": [
                    "shifts"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "shift_plan_uuid": {
                                        "type": "string",
                                        "description": "UUID of the shift plan (bound to the team)"
                                    },
                                    "shift_type_uuid": {
                                        "type": "string",
                                        "description": "UUID of the shift type (bound to the team)"
                                    },
                                    "date": {
                                        "type": "string",
                                        "description": "Date of the shift"
                                    },
                                    "start_time": {
                                        "type": "string",
                                        "description": "Start time (HH:MM)"
                                    },
                                    "end_time": {
                                        "type": "string",
                                        "description": "End time (HH:MM)"
                                    },
                                    "min_staff": {
                                        "type": "integer",
                                        "description": "Minimum staffing"
                                    },
                                    "max_staff": {
                                        "type": "integer",
                                        "description": "Maximum staffing (>= min_staff)"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Notes on the shift"
                                    }
                                },
                                "required": [
                                    "shift_plan_uuid",
                                    "shift_type_uuid",
                                    "date",
                                    "start_time",
                                    "end_time"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/{uuid}": {
            "get": {
                "operationId": "shifts-show",
                "summary": "Get a shift",
                "description": "Returns a single shift with its assignments and staffing level. The editable field repeats the rule of the planning interface: only shifts in a draft can be changed.",
                "tags": [
                    "shifts"
                ],
                "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": "6f5e4d3c-...",
                                        "shift_plan_uuid": "5e4d3c2b-...",
                                        "shift_type_uuid": "3c2b1a09-...",
                                        "shift_type_name": "Frühschicht",
                                        "shift_type_color": "#3B82F6",
                                        "date": "2026-09-21",
                                        "start_time": "06:00",
                                        "end_time": "14:00",
                                        "duration_minutes": 480,
                                        "min_staff": 2,
                                        "max_staff": 4,
                                        "assigned_count": 2,
                                        "staffing_status": "ok",
                                        "notes": null,
                                        "editable": true,
                                        "assignments": [
                                            {
                                                "uuid": "7a6f5e4d-...",
                                                "user_uuid": "e5f6a7b8-...",
                                                "user_name": "Anna",
                                                "status": "confirmed",
                                                "confirmed_at": "2026-09-15T09:00:00+02:00",
                                                "notes": null,
                                                "created_at": "2026-09-14T10:00:00+02:00",
                                                "updated_at": "2026-09-14T10:00:00+02:00"
                                            }
                                        ],
                                        "created_at": "2026-09-14T10:00:00+02:00",
                                        "updated_at": "2026-09-14T10:00:00+02:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "shifts-update",
                "summary": "Change a shift",
                "description": "Changes a shift (requires the \"schichtplanung\" sub-right, team owner or FlowTime full access). Only shifts in a draft can be changed, otherwise HTTP 409 with the error plan_not_editable. The date must be within the plan week, otherwise HTTP 422 with date_outside_plan_week. A shift stays in its plan; for another week it is created anew in the target plan. The API calculates the duration itself and takes night shifts past midnight into account.",
                "tags": [
                    "shifts"
                ],
                "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": "6f5e4d3c-...",
                                        "shift_plan_uuid": "5e4d3c2b-...",
                                        "shift_type_uuid": "3c2b1a09-...",
                                        "shift_type_name": "Frühschicht",
                                        "shift_type_color": "#3B82F6",
                                        "date": "2026-09-22",
                                        "start_time": "07:00",
                                        "end_time": "15:00",
                                        "duration_minutes": 480,
                                        "min_staff": 2,
                                        "max_staff": 4,
                                        "assigned_count": 2,
                                        "staffing_status": "ok",
                                        "notes": null,
                                        "editable": true,
                                        "assignments": [
                                            {
                                                "uuid": "7a6f5e4d-...",
                                                "user_uuid": "e5f6a7b8-...",
                                                "user_name": "Anna",
                                                "status": "confirmed",
                                                "confirmed_at": "2026-09-15T09:00:00+02:00",
                                                "notes": null,
                                                "created_at": "2026-09-14T10:00:00+02:00",
                                                "updated_at": "2026-09-14T10:00:00+02:00"
                                            }
                                        ],
                                        "created_at": "2026-09-14T10:00:00+02:00",
                                        "updated_at": "2026-09-14T10:00:00+02:00"
                                    },
                                    "message": "Shift updated successfully"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "shift_type_uuid": {
                                        "type": "string",
                                        "description": "Another shift type of the team"
                                    },
                                    "date": {
                                        "type": "string",
                                        "description": "New date (YYYY-MM-DD), must be within the plan week"
                                    },
                                    "start_time": {
                                        "type": "string",
                                        "description": "Start in the format HH:MM"
                                    },
                                    "end_time": {
                                        "type": "string",
                                        "description": "End in the format HH:MM"
                                    },
                                    "min_staff": {
                                        "type": "integer",
                                        "description": "Minimum staffing, at least 1"
                                    },
                                    "max_staff": {
                                        "type": "integer",
                                        "description": "Maximum staffing; must not be below the minimum staffing, null removes the upper limit"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Note on the shift"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "shifts-destroy",
                "summary": "Delete a shift",
                "description": "Deletes a shift (requires the \"schichtplanung\" sub-right, team owner or FlowTime full access). Addressed by UUID only.",
                "tags": [
                    "shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/{uuid}/assign": {
            "post": {
                "operationId": "shifts-assign",
                "summary": "Assign a user to a shift",
                "description": "Assigns a user to a shift (requires the \"schichtplanung\" sub-right, team owner or FlowTime full access).",
                "tags": [
                    "shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "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 user to assign"
                                    },
                                    "check_conflicts": {
                                        "type": "boolean",
                                        "description": "Check for time conflicts"
                                    }
                                },
                                "required": [
                                    "user_uuid"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/{uuid}/assign/{userUuid}": {
            "delete": {
                "operationId": "shifts-unassign",
                "summary": "Remove an assignment",
                "description": "Removes a user's assignment from a shift (requires the \"schichtplanung\" sub-right, team owner or FlowTime full access).",
                "tags": [
                    "shifts"
                ],
                "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"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/{uuid}/available-users": {
            "get": {
                "operationId": "shifts-available-users",
                "summary": "Available users for a shift",
                "description": "Lists the users who can be assigned to a shift (requires the \"schichtplanung\" sub-right, team owner or FlowTime full access).",
                "tags": [
                    "shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/assignments/{uuid}/confirm": {
            "post": {
                "operationId": "shifts-assignments-confirm",
                "summary": "Confirm an assignment",
                "description": "Confirms one of your own shift assignments. Open to every member for their own assignments.",
                "tags": [
                    "shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/assignments/{uuid}/decline": {
            "post": {
                "operationId": "shifts-assignments-decline",
                "summary": "Decline an assignment",
                "description": "Declines one of your own shift assignments. Open to every member for their own assignments.",
                "tags": [
                    "shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "reason": {
                                        "type": "string",
                                        "description": "Reason for declining"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/my-shifts": {
            "get": {
                "operationId": "shifts-my-shifts",
                "summary": "Get your own shifts",
                "description": "Returns the shifts of the signed-in user.",
                "tags": [
                    "shifts"
                ],
                "parameters": [
                    {
                        "name": "start_date",
                        "in": "query",
                        "required": false,
                        "description": "Filters shifts from this date",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "end_date",
                        "in": "query",
                        "required": false,
                        "description": "Filters shifts up to this date (must be >= start_date)",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/current": {
            "get": {
                "operationId": "shifts-current",
                "summary": "Current shift overview",
                "description": "Returns the current shift overview.",
                "tags": [
                    "shifts"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/preferences": {
            "get": {
                "operationId": "shifts-preferences-index",
                "summary": "Your own availability preferences",
                "description": "Returns the availability preferences of the signed-in user.",
                "tags": [
                    "shifts"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/preferences/{dayOfWeek}": {
            "put": {
                "operationId": "shifts-preferences-update",
                "summary": "Set an availability preference",
                "description": "Sets your own availability preference for a weekday (1-7). Open to every member for their own preferences.",
                "tags": [
                    "shifts"
                ],
                "parameters": [
                    {
                        "name": "dayOfWeek",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "availability": {
                                        "type": "string",
                                        "description": "Availability: available, preferred, unavailable or if_needed"
                                    },
                                    "available_from": {
                                        "type": "string",
                                        "description": "Available from (HH:MM)"
                                    },
                                    "available_until": {
                                        "type": "string",
                                        "description": "Available until (HH:MM)"
                                    },
                                    "preferred_shift_types": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Preferred shift types as UUIDs (bound to the team)"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Notes (max. 500 characters)"
                                    }
                                },
                                "required": [
                                    "availability"
                                ]
                            }
                        }
                    }
                }
            }
        }
    },
    "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"
                    }
                }
            }
        }
    }
}