{
    "openapi": "3.1.0",
    "info": {
        "title": "FlowSuite API",
        "version": "v1",
        "description": "Alle Module der FlowSuite API in einem Dokument. Pfade gelten unter https://api.flowsuite.one; die FlowAI-Chat-API nennt ihre eigene Adresse."
    },
    "servers": [
        {
            "url": "https://api.flowsuite.one",
            "description": "FlowSuite API"
        }
    ],
    "security": [
        {
            "bearerAuth": []
        }
    ],
    "tags": [
        {
            "name": "team-management.team",
            "description": "Team Management API: Team und Module"
        },
        {
            "name": "team-management.members",
            "description": "Team Management API: Mitglieder"
        },
        {
            "name": "team-management.invitations",
            "description": "Team Management API: Einladungen und Sitzplätze"
        },
        {
            "name": "flowaccounting.invoices",
            "description": "FlowAccounting API: Rechnungen"
        },
        {
            "name": "flowaccounting.items",
            "description": "FlowAccounting API: Rechnungspositionen"
        },
        {
            "name": "flowaccounting.transactions",
            "description": "FlowAccounting API: Transaktionen"
        },
        {
            "name": "flowaccounting.products",
            "description": "FlowAccounting API: Produkte"
        },
        {
            "name": "flowaccounting.tax-rates",
            "description": "FlowAccounting API: Steuersätze"
        },
        {
            "name": "flowaccounting.recurring",
            "description": "FlowAccounting API: Wiederkehrende Rechnungen"
        },
        {
            "name": "flowaccounting.installment-plans",
            "description": "FlowAccounting API: Ratenzahlungen"
        },
        {
            "name": "flowaccounting.billable-items",
            "description": "FlowAccounting API: Abrechenbare Positionen"
        },
        {
            "name": "flowaccounting.quotes",
            "description": "FlowAccounting API: Angebote"
        },
        {
            "name": "flowaccounting.quote-items",
            "description": "FlowAccounting API: Angebotspositionen"
        },
        {
            "name": "flowaccounting.credit-notes",
            "description": "FlowAccounting API: Rechnungskorrekturen"
        },
        {
            "name": "flowaccounting.expenses",
            "description": "FlowAccounting API: Ausgaben"
        },
        {
            "name": "flowaccounting.suppliers",
            "description": "FlowAccounting API: Lieferanten"
        },
        {
            "name": "flowaccounting.expense-categories",
            "description": "FlowAccounting API: Ausgabenkategorien"
        },
        {
            "name": "flowaccounting.income-categories",
            "description": "FlowAccounting API: Einnahmenkategorien"
        },
        {
            "name": "flowaccounting.reports",
            "description": "FlowAccounting API: Berichte und Kontext"
        },
        {
            "name": "flowaccounting.tax-profile",
            "description": "FlowAccounting API: Steuerprofil und Funktionen"
        },
        {
            "name": "flowai.models",
            "description": "FlowAI API: Modelle"
        },
        {
            "name": "flowai.chat",
            "description": "FlowAI API: Chat"
        },
        {
            "name": "flowai.files",
            "description": "FlowAI API: Dateien"
        },
        {
            "name": "flowai.webhooks",
            "description": "FlowAI API: Webhooks"
        },
        {
            "name": "flowcall.context",
            "description": "FlowCall API: Überblick"
        },
        {
            "name": "flowcall.projects",
            "description": "FlowCall API: Projekte"
        },
        {
            "name": "flowcall.guideline",
            "description": "FlowCall API: Leitfaden und Formular"
        },
        {
            "name": "flowcall.imports",
            "description": "FlowCall API: Importe"
        },
        {
            "name": "flowcall.exports",
            "description": "FlowCall API: Exporte"
        },
        {
            "name": "flowcall.leads",
            "description": "FlowCall API: Leads"
        },
        {
            "name": "flowcall.comments",
            "description": "FlowCall API: Kommentare"
        },
        {
            "name": "flowcall.follow-ups",
            "description": "FlowCall API: Wiedervorlagen"
        },
        {
            "name": "flowcall.calls",
            "description": "FlowCall API: Anrufe"
        },
        {
            "name": "flowcall.emails",
            "description": "FlowCall API: E-Mails"
        },
        {
            "name": "flowcall.team",
            "description": "FlowCall API: Team und Rollen"
        },
        {
            "name": "flowcall.call-history",
            "description": "FlowCall API: Telefonprotokoll"
        },
        {
            "name": "flowcall.reports",
            "description": "FlowCall API: Auswertungen"
        },
        {
            "name": "flowcontacts.endpoints",
            "description": "FlowContacts API: API-Referenz"
        },
        {
            "name": "flowcrm.customers",
            "description": "FlowCRM API: Kunden-Verwaltung"
        },
        {
            "name": "flowcrm.timeline",
            "description": "FlowCRM API: Timeline-Verwaltung"
        },
        {
            "name": "flowcrm.contacts",
            "description": "FlowCRM API: Kontakt-Verwaltung"
        },
        {
            "name": "flowcrm.projects",
            "description": "FlowCRM API: Projekt-Verwaltung"
        },
        {
            "name": "flowcrm.project-timeline",
            "description": "FlowCRM API: Projekt-Timeline"
        },
        {
            "name": "flowcrm.record-extras",
            "description": "FlowCRM API: Aufgaben, Metadaten und Dateien"
        },
        {
            "name": "flowcrm.tags",
            "description": "FlowCRM API: Tags"
        },
        {
            "name": "flowcrm.leads",
            "description": "FlowCRM API: Leads-Verwaltung"
        },
        {
            "name": "flowcrm.lead-relations",
            "description": "FlowCRM API: Lead-Beziehungen"
        },
        {
            "name": "flowcrm.lead-status",
            "description": "FlowCRM API: Lead-Status"
        },
        {
            "name": "flowcrm.lead-timeline",
            "description": "FlowCRM API: Lead-Timeline"
        },
        {
            "name": "flowcrm.lead-convert",
            "description": "FlowCRM API: Lead-Konvertierung"
        },
        {
            "name": "flowcrm.lead-reports",
            "description": "FlowCRM API: Lead-Berichte"
        },
        {
            "name": "flowcrm.lead-boards",
            "description": "FlowCRM API: Lead-Boards"
        },
        {
            "name": "flowcrm.flowdoc",
            "description": "FlowCRM API: FlowDocs"
        },
        {
            "name": "flowdrive.context",
            "description": "FlowDrive API: Überblick"
        },
        {
            "name": "flowdrive.entries-read",
            "description": "FlowDrive API: Einträge lesen"
        },
        {
            "name": "flowdrive.entries-write",
            "description": "FlowDrive API: Einträge anlegen und ändern"
        },
        {
            "name": "flowdrive.entries-trash",
            "description": "FlowDrive API: Papierkorb"
        },
        {
            "name": "flowdrive.versions-favorites",
            "description": "FlowDrive API: Versionen, Favoriten und zuletzt verwendet"
        },
        {
            "name": "flowdrive.share-links",
            "description": "FlowDrive API: Freigabelinks"
        },
        {
            "name": "flowdrive.personal-shares",
            "description": "FlowDrive API: Persönliche Freigaben"
        },
        {
            "name": "flowdrive.flowai-documents",
            "description": "FlowDrive API: FlowAI-Dokumente"
        },
        {
            "name": "flowdrive.shared-drives",
            "description": "FlowDrive API: Geteilte Drives"
        },
        {
            "name": "flowdrive.reports",
            "description": "FlowDrive API: Auswertungen"
        },
        {
            "name": "flowevents.context",
            "description": "FlowEvents API: Überblick"
        },
        {
            "name": "flowevents.reports",
            "description": "FlowEvents API: Auswertungen"
        },
        {
            "name": "flowevents.events",
            "description": "FlowEvents API: Veranstaltungen"
        },
        {
            "name": "flowevents.sessions",
            "description": "FlowEvents API: Termine"
        },
        {
            "name": "flowevents.participants",
            "description": "FlowEvents API: Teilnehmer"
        },
        {
            "name": "flowevents.attendance",
            "description": "FlowEvents API: Anwesenheit"
        },
        {
            "name": "flowevents.event-rooms",
            "description": "FlowEvents API: Zimmerverteilung"
        },
        {
            "name": "flowevents.venues",
            "description": "FlowEvents API: Tagungshäuser und Zimmer"
        },
        {
            "name": "flowevents.mailings",
            "description": "FlowEvents API: Unterschriften und Feedback"
        },
        {
            "name": "flowevents.feedback-forms",
            "description": "FlowEvents API: Feedback-Formulare"
        },
        {
            "name": "flowevents.exports",
            "description": "FlowEvents API: Exporte"
        },
        {
            "name": "flowleads.forms",
            "description": "FlowLeads Formular-API: Formulare"
        },
        {
            "name": "flowsaas.context",
            "description": "FlowSaas API: Überblick und Auswertungen"
        },
        {
            "name": "flowsaas.portals",
            "description": "FlowSaas API: Portale"
        },
        {
            "name": "flowsaas.vocabulary",
            "description": "FlowSaas API: Status und Schlagwörter"
        },
        {
            "name": "flowsaas.posts",
            "description": "FlowSaas API: Ideen"
        },
        {
            "name": "flowsaas.comments",
            "description": "FlowSaas API: Kommentare"
        },
        {
            "name": "flowsaas.roadmap",
            "description": "FlowSaas API: Roadmap"
        },
        {
            "name": "flowsaas.webhooks",
            "description": "FlowSaas API: Webhooks"
        },
        {
            "name": "flowsend.subscribers",
            "description": "FlowSend API: Subscriber"
        },
        {
            "name": "flowsend.subscribers-bulk",
            "description": "FlowSend API: Bulk-Operationen"
        },
        {
            "name": "flowsend.lists",
            "description": "FlowSend API: Listen"
        },
        {
            "name": "flowsend.tags",
            "description": "FlowSend API: Tags"
        },
        {
            "name": "flowsend.campaigns",
            "description": "FlowSend API: Kampagnen"
        },
        {
            "name": "flowsend.templates",
            "description": "FlowSend API: Vorlagen"
        },
        {
            "name": "flowsend.sender-domains",
            "description": "FlowSend API: Absenderdomäne"
        },
        {
            "name": "flowsend.insights",
            "description": "FlowSend API: Kontext und Berichte"
        },
        {
            "name": "flowsupport.context",
            "description": "FlowSupport API: Überblick"
        },
        {
            "name": "flowsupport.inboxes",
            "description": "FlowSupport API: Postfächer"
        },
        {
            "name": "flowsupport.conversations",
            "description": "FlowSupport API: Unterhaltungen"
        },
        {
            "name": "flowsupport.messages",
            "description": "FlowSupport API: Nachrichten"
        },
        {
            "name": "flowsupport.notes",
            "description": "FlowSupport API: Interne Notizen"
        },
        {
            "name": "flowsupport.catalogs",
            "description": "FlowSupport API: Labels und Vorlagen"
        },
        {
            "name": "flowsupport.reports",
            "description": "FlowSupport API: Auswertungen"
        },
        {
            "name": "flowtasks.todos",
            "description": "FlowTasks API: Todo-Verwaltung"
        },
        {
            "name": "flowtasks.boards",
            "description": "FlowTasks API: Boards"
        },
        {
            "name": "flowtasks.lists",
            "description": "FlowTasks API: Listen"
        },
        {
            "name": "flowtasks.assignments",
            "description": "FlowTasks API: Zuweisungen"
        },
        {
            "name": "flowtasks.comments",
            "description": "FlowTasks API: Kommentare"
        },
        {
            "name": "flowtasks.labels",
            "description": "FlowTasks API: Labels"
        },
        {
            "name": "flowtasks.checklists",
            "description": "FlowTasks API: Checklisten"
        },
        {
            "name": "flowtasks.sharing",
            "description": "FlowTasks API: Board-Freigaben und Eigentum"
        },
        {
            "name": "flowtasks.files",
            "description": "FlowTasks API: Dateien"
        },
        {
            "name": "flowtime.timer",
            "description": "FlowTime API: Timer-Steuerung"
        },
        {
            "name": "flowtime.entries",
            "description": "FlowTime API: Zeiteinträge"
        },
        {
            "name": "flowtime.projects",
            "description": "FlowTime API: Projekte"
        },
        {
            "name": "flowtime.reports",
            "description": "FlowTime API: Kontext, Berichte und Suche"
        },
        {
            "name": "flowtime.statistics",
            "description": "FlowTime API: Statistiken"
        },
        {
            "name": "flowtime.working-hours",
            "description": "FlowTime API: Arbeitszeiten"
        },
        {
            "name": "flowtime.members",
            "description": "FlowTime API: Mitglieder"
        },
        {
            "name": "flowtime.absences",
            "description": "FlowTime API: Abwesenheiten"
        },
        {
            "name": "flowtime.app",
            "description": "FlowTime API: Team-Status und Arbeitsort"
        },
        {
            "name": "flowtime.shifts",
            "description": "FlowTime API: Schichtplanung"
        }
    ],
    "paths": {
        "/team": {
            "get": {
                "operationId": "team-management.team-show",
                "summary": "Eigenes Team abrufen",
                "description": "Liefert UUID und Name des Teams, die UUID der Inhaberin oder des Inhabers, das wirksame Paket, den Zustand der Testphase und die Kurzkennungen der aktiven Module. Während einer laufenden Testphase ist das genannte Paket das Leistungspaket der Testphase, nicht das gebuchte; der Block trial weist das aus.",
                "tags": [
                    "team-management.team"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f",
                                        "name": "Musterfirma GmbH",
                                        "owner_uuid": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
                                        "package": {
                                            "key": "flow_suite_pro",
                                            "name": "FlowSuite Pro"
                                        },
                                        "trial": {
                                            "active": false,
                                            "ends_at": "2026-08-01T00:00:00+02:00",
                                            "days_remaining": 0,
                                            "package_key": null
                                        },
                                        "active_modules": [
                                            "ai",
                                            "cc",
                                            "tt",
                                            "cm",
                                            "td",
                                            "fs",
                                            "sa",
                                            "fa",
                                            "fe",
                                            "fd",
                                            "flowsupport"
                                        ],
                                        "created_at": "2025-11-02T09:14:00+01:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/team/modules": {
            "get": {
                "operationId": "team-management.team-modules",
                "summary": "Modulkatalog mit eigenen Rechten abrufen",
                "description": "Liefert jedes Modul mit Kurzkennung, langer Kennung und Anzeigenamen, dazu ob das Paket es enthält, ob das Team es eingeschaltet hat, ob es damit nutzbar ist, und ob der aufrufende Schlüssel selbst darauf zugreifen darf. own_sub_access nennt die eigenen Unterzugriffe des Moduls. Bei Modulen außerhalb der Pakete, etwa Hosting oder Teamverwaltung, ist package_granted null.",
                "tags": [
                    "team-management.team"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "field": "cm",
                                            "key": "flowcrm",
                                            "label": "FlowCRM",
                                            "group": "flow_suite",
                                            "availability": "package",
                                            "package_granted": true,
                                            "team_active": true,
                                            "available": true,
                                            "own_access": true,
                                            "own_sub_access": [
                                                "kunden",
                                                "projekte"
                                            ]
                                        },
                                        {
                                            "field": "tm",
                                            "key": null,
                                            "label": "Teamverwaltung",
                                            "group": "additional",
                                            "availability": "always",
                                            "package_granted": null,
                                            "team_active": true,
                                            "available": true,
                                            "own_access": false,
                                            "own_sub_access": []
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/team/members": {
            "get": {
                "operationId": "team-management.team-members-index",
                "summary": "Mitglieder auflisten",
                "description": "Liefert die Mitglieder des eigenen Teams mit UUID, Name, E-Mail-Adresse, abgeleiteter Rolle, freier Bezeichnung, den Modulrechten als Wahrheitswerte je Kurzkennung, den gespeicherten Unterzugriffen je Modul und den Vollzugriffsbereichen. Die Modulrechte berücksichtigen, dass die Inhaberin oder der Inhaber jedes angebotene Modul hält, auch ohne gesetztes Kennzeichen.",
                "tags": [
                    "team-management.members"
                ],
                "parameters": [
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Einträge pro Seite, 1 bis 200, Standard 50.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Seitenzahl, Standard 1.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
                                            "name": "Anna Beispiel",
                                            "email": "anna@example.com",
                                            "role": "manager",
                                            "role_label": "Buchhaltung",
                                            "modules": {
                                                "tt": true,
                                                "cm": true,
                                                "fa": false,
                                                "tm": true
                                            },
                                            "sub_access": {
                                                "flowcrm": [
                                                    "kunden",
                                                    "projekte"
                                                ]
                                            },
                                            "full_access_scopes": [],
                                            "joined_at": "2025-11-02T09:14:00+01:00"
                                        }
                                    ],
                                    "meta": {
                                        "current_page": 1,
                                        "per_page": 50,
                                        "total": 1,
                                        "last_page": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/team/members/{userUuid}": {
            "get": {
                "operationId": "team-management.team-members-show",
                "summary": "Einzelnes Mitglied abrufen",
                "description": "Liefert ein einzelnes Mitglied in derselben Form wie die Liste. Angesprochen wird die UUID der Person. Eine UUID, die zu niemandem gehört, und eine aus einem fremden Team antworten beide mit HTTP 404.",
                "tags": [
                    "team-management.members"
                ],
                "parameters": [
                    {
                        "name": "userUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
                                        "name": "Anna Beispiel",
                                        "email": "anna@example.com",
                                        "role": "member",
                                        "role_label": null,
                                        "modules": {
                                            "tt": true,
                                            "cm": true
                                        },
                                        "sub_access": {
                                            "flowtime": [
                                                "berichte"
                                            ]
                                        },
                                        "full_access_scopes": [],
                                        "joined_at": "2025-11-02T09:14:00+01:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/team/invitations": {
            "get": {
                "operationId": "team-management.team-invitations",
                "summary": "Offene Einladungen auflisten",
                "description": "Liefert die Einladungen, die eine Adresse noch an dieses Team binden, mit UUID, Adresse, freier Bezeichnung, Zustand, Ablaufzeitpunkt und Anlagezeitpunkt. Abgelaufene und bereits angenommene Einladungen erscheinen nicht.",
                "tags": [
                    "team-management.invitations"
                ],
                "parameters": [
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Einträge pro Seite, 1 bis 200, Standard 50.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Seitenzahl, Standard 1.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "7f8e9d0c-1b2a-4c3d-8e5f-6a7b8c9d0e1f",
                                            "email": "neu@example.com",
                                            "role": null,
                                            "status": "pending",
                                            "expires_at": "2026-10-05T12:00:00+02:00",
                                            "created_at": "2026-09-21T12:00:00+02:00"
                                        }
                                    ],
                                    "meta": {
                                        "current_page": 1,
                                        "per_page": 50,
                                        "total": 1,
                                        "last_page": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/team/licenses": {
            "get": {
                "operationId": "team-management.team-licenses",
                "summary": "Sitzplätze abrufen",
                "description": "Liefert die Sitzplatzlage des Teams: gebuchte Plätze, belegte Plätze, offene Einladungen, ob eine weitere Einladung möglich ist, und bei einem Enterprise-Vertrag dessen Mitgliedergrenze. state ist active_subscription, trialing oder no_subscription. Die Auskunft stammt aus derselben Prüfung, die auch in der Weboberfläche über eine weitere Einladung entscheidet.",
                "tags": [
                    "team-management.invitations"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "state": "active_subscription",
                                        "purchased": 5,
                                        "active": 3,
                                        "pending": 1,
                                        "enterprise_max_members": null,
                                        "can_invite": true,
                                        "enterprise_capped": false,
                                        "billing_cycle": "monthly",
                                        "current_period_end": "2026-10-21T00:00:00+02:00",
                                        "trial_ends_at": "2026-08-01T00:00:00+02:00",
                                        "trial_days_remaining": 0
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/invoices": {
            "get": {
                "operationId": "flowaccounting.invoices-list",
                "summary": "Rechnungen auflisten",
                "description": "Ruft eine paginierte Liste aller Rechnungen des Teams ab (sortiert nach Rechnungsdatum, absteigend).",
                "tags": [
                    "flowaccounting.invoices"
                ],
                "parameters": [
                    {
                        "name": "include",
                        "in": "query",
                        "required": false,
                        "description": "Mit items werden die Rechnungspositionen einschließlich name und description eingebettet",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "Filter: draft, sent, partially_paid, paid, overdue, past_due, cancelled",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "client_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Filter nach Kunden-UUID (cmm_clients). Breaking Change: die früheren Filter client_id und contact_id werden mit 422 abgelehnt, statt stillschweigend ignoriert zu werden",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Suchbegriff (Rechnungsnummer, Empfängername, Firma)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "from",
                        "in": "query",
                        "required": false,
                        "description": "Rechnungsdatum ab (YYYY-MM-DD)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "required": false,
                        "description": "Rechnungsdatum bis (YYYY-MM-DD)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Anzahl pro Seite (1-200, Standard: 15)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "550e8400-e29b-41d4-a716-446655440000",
                                            "invoice_number": "RE-2026-0042",
                                            "status": "sent",
                                            "recipient_name": "Mustermann GmbH",
                                            "total": 1190,
                                            "allowed_transitions": [
                                                "paid",
                                                "cancelled"
                                            ]
                                        }
                                    ],
                                    "meta": {
                                        "current_page": 1,
                                        "per_page": 15,
                                        "total": 42
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowaccounting.invoices-create",
                "summary": "Rechnung erstellen",
                "description": "Erstellt eine neue Rechnung. Die Rechnungsnummer wird automatisch aus dem Nummernkreis des Teams vergeben, und zwar erst beim Ausstellen (Statuswechsel nach sent, Versand per E-Mail oder send beim Anlegen): Ein Entwurf hat invoice_number: null, und ein gelöschter Entwurf verbraucht keine Nummer. Wer die Nummer braucht, liest sie nach dem Ausstellen aus der Antwort oder per GET. Für den Import von Altrechnungen kann sie über invoice_number vorgegeben werden. Eine Rechnung mit vorgegebener Nummer erhält ohne payment_method die Zahlungsart bank_transfer; die Standard-Zahlungsart des Kunden wird dann nicht übernommen. Die vollständige Reihenfolge einer Übernahme steht im Abschnitt „Belege aus einem Fremdsystem übernehmen“. Kollidiert der Nummernkreis beim Ausstellen mit vorhandenen Belegen, antwortet der ausstellende Endpunkt mit 409 und error_code: document_number_conflict. Positionen können entweder direkt beim Erstellen über items mitgegeben oder nachträglich über den Positionen-Endpoint hinzugefügt werden, beide Wege sind gültig. Ohne send entsteht die Rechnung im Status draft. Mit send wird sie unmittelbar nach dem Anlegen per E-Mail versendet und wechselt dabei in den Status sent. Die Antwort führt in diesem Fall zusätzlich das Feld sent, bei einem gescheiterten Versand ergänzt um send_error_code und send_message. Die Rechnung bleibt auch dann mit 201 angelegt. Wird billing_operation_key mitgegeben und existiert die Rechnung dazu bereits, liefert die API den vorhandenen Stand zurück und wendet weder items noch send ein zweites Mal an, so dass ein wiederholter Aufruf keinen Doppelversand auslöst. Breaking Change: Die früheren numerischen Felder client_id, contact_id und items.*.product_id werden nicht mehr akzeptiert (Validierungsfehler); Kunde, Kontakt und Produkt werden ausschließlich über client_uuid, contact_uuid und items.*.product_uuid angegeben. § 19-Hinweis: Ist das Team laut bestätigtem Steuerprofil Kleinunternehmer in Deutschland und würde der noch offene Betrag der Rechnung, sobald bezahlt, die Umsatzgrenze des laufenden Jahres überschreiten (oder ist sie schon überschritten), enthält die Antwort zusätzlich das Feld notices: eine Liste mit code small_business_limit, level would_exceed oder already_exceeded, context invoice, year, den Beträgen in Euro (limit_eur, known_turnover_eur, amount_eur, turnover_after_eur), complete (false, wenn Zahlungen ungeklärt sind), blocking (immer false) und message. Der Hinweis blockiert nie und ändert das Steuerprofil nicht; ohne Hinweis fehlt das Feld.",
                "tags": [
                    "flowaccounting.invoices"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "550e8400-e29b-41d4-a716-446655440000",
                                        "invoice_number": null,
                                        "status": "draft"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "recipient_name": {
                                        "type": "string",
                                        "description": "Name des Rechnungsempfängers"
                                    },
                                    "invoice_date": {
                                        "type": "string",
                                        "description": "Rechnungsdatum (YYYY-MM-DD)"
                                    },
                                    "due_date": {
                                        "type": "string",
                                        "description": "Fälligkeitsdatum (>= invoice_date). Wenn leer: invoice_date + Zahlungsziel des Teams (Standard 14 Tage)"
                                    },
                                    "currency_code": {
                                        "type": "string",
                                        "description": "ISO 4217 Währungscode (3 Zeichen, z.B. EUR)"
                                    },
                                    "client_uuid": {
                                        "type": "string",
                                        "description": "Optional: Kunden-UUID (cmm_clients, teamgebunden)"
                                    },
                                    "contact_uuid": {
                                        "type": "string",
                                        "description": "Optional: Kontakt-UUID (teamgebunden)"
                                    },
                                    "invoice_number": {
                                        "type": "string",
                                        "description": "Optional: eigene Rechnungsnummer, nur für den Import von Altrechnungen gedacht. Im Normalfall weglassen, dann vergibt der Nummernkreis die Nummer. KI-Assistenten und Agenten setzen das Feld nur, wenn der Nutzer ausdrücklich auf einer eigenen Nummer besteht. Höchstens 40 Zeichen aus den Buchstaben A bis Z, Ziffern, Leerzeichen, Punkt, Unterstrich und Bindestrich, am Anfang und Ende ein Buchstabe oder eine Ziffer. Muss im Team eindeutig sein, auch gegenüber gelöschten Entwürfen und stornierten Rechnungen. Liegt die Nummer im laufenden Nummernkreis, muss sie unter dem nächsten Zählerstand liegen; dafür vorher in den FlowAccounting-Einstellungen die nächste Rechnungsnummer über die höchste Importnummer setzen. Der Zähler bleibt unverändert. Nach dem Anlegen lässt sich die Nummer nicht mehr ändern"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Sichtbare Notiz auf der Rechnung"
                                    },
                                    "payment_method": {
                                        "type": "string",
                                        "description": "Zahlungsart: bank_transfer | sepa | stripe | paypal | cash | other. Ohne Angabe gilt die Standard-Zahlungsart des Kunden aus FlowCRM (nicht gesetzt = Banküberweisung); Kreditkarte oder SEPA werden also nur übernommen, wenn sie dort als Standard hinterlegt oder hier explizit angegeben sind. Ausnahme: Mit vorgegebener invoice_number gilt ohne Angabe immer bank_transfer, damit eine übernommene Altrechnung nicht auf ein hinterlegtes Zahlungsmittel des Kunden läuft; eine ausdrücklich angegebene Zahlungsart gilt auch dann. stripe, sepa und paypal setzen eine gespeicherte Stripe-Zahlungsmethode des Kunden vom passenden Typ voraus (sonst 422)."
                                    },
                                    "stripe_pm_id": {
                                        "type": "string",
                                        "description": "Optional: konkrete Stripe-Zahlungsmethode (pm_...) des Kunden. Ohne Angabe wird sie bei stripe, sepa und paypal aus der Standard-Zahlungsmethode des Kunden ergänzt."
                                    },
                                    "tax_treatment": {
                                        "type": "string",
                                        "description": "Steuerbehandlung dieser Rechnung: standard | reverse_charge | reverse_charge_domestic | intra_community_supply | export | non_taxable_abroad | tax_exempt. Ohne Angabe gilt bei manuellen Rechnungen die Steuerbehandlung des Kunden aus FlowCRM. Bei jedem Wert außer standard weist die Rechnung keine Umsatzsteuer aus und trägt den passenden Pflichthinweis: Positionen mit tax_rate über 0 oder mit unit_price_gross werden mit 422 abgelehnt. Nur für source manual. reverse_charge_domestic und tax_exempt gibt es nur nach deutschem Recht: Ein Team, für das laut Steuerprofil kein deutsches Recht gilt, kann sie nicht neu setzen (422), ein schon gespeicherter Wert bleibt erlaubt."
                                    },
                                    "tax_exemption_basis": {
                                        "type": "string",
                                        "description": "Vorschrift der Steuerbefreiung bei tax_exempt, z. B. „§ 4 Nr. 14“ (max. 40 Zeichen). Steht im Hinweis „Steuerfrei nach … UStG“; ohne Angabe ein allgemeiner Hinweis auf § 4 UStG. Bei anderen Steuerbehandlungen ignoriert"
                                    },
                                    "property_retention_notice": {
                                        "type": "boolean",
                                        "description": "Leistung im Zusammenhang mit einem Grundstück an eine Privatperson: druckt den Hinweis auf die zweijährige Aufbewahrungspflicht (§ 14b Abs. 1 Satz 5 UStG)"
                                    },
                                    "document_language": {
                                        "type": "string",
                                        "description": "Belegsprache der Rechnung: de | en | pt. Ohne Angabe gilt bei manuellen Rechnungen die Rechnungssprache des Kunden aus FlowCRM, sonst de"
                                    },
                                    "send": {
                                        "type": "boolean",
                                        "description": "Rechnung sofort nach dem Anlegen per E-Mail versenden. Ohne dieses Flag bleibt es beim Entwurf"
                                    },
                                    "items": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Rechnungspositionen direkt mitgeben, 1 bis 200 Stück. Je Position sind <code>quantity</code> und <code>unit_price</code> verpflichtend, optional sind <code>name</code>, <code>description</code>, <code>tax_rate</code>, <code>unit</code>, <code>position</code>, <code>product_uuid</code>, <code>discount_percent</code> und <code>type</code>. Ohne <code>position</code> werden die Positionen fortlaufend nummeriert"
                                    }
                                },
                                "required": [
                                    "recipient_name",
                                    "invoice_date",
                                    "currency_code"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/invoices/{uuid}": {
            "get": {
                "operationId": "flowaccounting.invoices-show",
                "summary": "Rechnungs-Details abrufen",
                "description": "Rechnungs-Details abrufen, inklusive Positionen, Transaktionen sowie total_paid, remaining_amount und allowed_transitions. sent_date nennt den Tag des Versands und ist im Entwurf null. kind ist invoice oder cancellation (Stornorechnung). Eine Stornorechnung ist ein eigener Beleg mit eigener Nummer aus dem Rechnungskreis und negativen Beträgen; cancels_invoice nennt die stornierte Rechnung (uuid, invoice_number, invoice_date). Eine stornierte Rechnung behält Nummer und Inhalt, cancelled_by_invoice verweist auf ihre Stornorechnung und cancelled_at nennt den Zeitpunkt. original_invoice_number ist nur bei Stornos aus der Zeit vor den Stornorechnungen gesetzt: Damals bekam die stornierte Rechnung selbst eine neue Nummer, das Feld nennt die Nummer, unter der sie ausgestellt war. Unter credit_notes stehen die Rechnungskorrekturen, die zu dieser Rechnung angelegt wurden, aufsteigend nach Datum der Rechnungskorrektur und jeweils mit uuid, credit_note_number, status, credit_note_date, total und currency_code; die vollständige Rechnungskorrektur liefert der Rechnungskorrekturen-Endpoint. credit_notes gibt es nur in dieser Detailantwort, nicht in der Liste.",
                "tags": [
                    "flowaccounting.invoices"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "550e8400-e29b-41d4-a716-446655440000",
                                        "invoice_number": "RE-2026-0042",
                                        "original_invoice_number": null,
                                        "kind": "invoice",
                                        "cancels_invoice": null,
                                        "cancelled_by_invoice": null,
                                        "cancelled_at": null,
                                        "status": "paid",
                                        "invoice_date": "2026-01-10T00:00:00+01:00",
                                        "due_date": "2026-01-24T00:00:00+01:00",
                                        "sent_date": "2026-01-10",
                                        "paid_date": "2026-01-20",
                                        "total": 1190,
                                        "currency_code": "EUR",
                                        "payment_method": "bank_transfer",
                                        "total_paid": 1190,
                                        "remaining_amount": 0,
                                        "allowed_transitions": [
                                            "cancelled"
                                        ],
                                        "items": [
                                            {
                                                "uuid": "3f2b1c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
                                                "name": "Beratung",
                                                "quantity": 10,
                                                "unit_price": 100,
                                                "tax_rate": 19,
                                                "total": 1190
                                            }
                                        ],
                                        "transactions": [
                                            {
                                                "uuid": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
                                                "type": "payment",
                                                "amount": 952,
                                                "currency_code": "EUR",
                                                "transaction_date": "2026-01-16T00:00:00+01:00"
                                            },
                                            {
                                                "uuid": "1d4e5f6a-7b8c-4d9e-a0b1-c2d3e4f5a6b7",
                                                "type": "credit",
                                                "amount": 238,
                                                "currency_code": "EUR",
                                                "transaction_date": "2026-01-20T00:00:00+01:00"
                                            }
                                        ],
                                        "credit_notes": [
                                            {
                                                "uuid": "9b2e4f6a-1c3d-4e5f-8a7b-6c5d4e3f2a1b",
                                                "credit_note_number": "GS-2026-0003",
                                                "status": "settled",
                                                "credit_note_date": "2026-01-20",
                                                "total": 238,
                                                "currency_code": "EUR"
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowaccounting.invoices-update",
                "summary": "Rechnung aktualisieren",
                "description": "Rechnung aktualisieren. Nur möglich bei Status draft oder sent und Quelle manual (sonst 422). Ein Entwurf akzeptiert dieselben Kopffelder wie beim Erstellen. Eine ausgestellte Rechnung ist inhaltlich festgeschrieben (GoBD): änderbar sind nur noch internal_notes, payment_method und stripe_pm_id, wie in der Weboberfläche. Enthält die Anfrage ein anderes Feld (z. B. client_uuid, recipient_*, invoice_date, due_date, service_date_*, currency_code, document_language, notes, greeting_text, closing_text, payment_reference), antwortet der Endpoint mit 422 und error_code invoice_locked, nennt die Felder in locked_fields, die erlaubten in allowed_fields und die Korrekturwege in correction und schreibt nichts, auch die erlaubten Felder derselben Anfrage nicht. Das gilt auch für einen Entwurf, solange eine Zahlung läuft oder ein Zahlungslink offen ist. Inhaltliche Korrekturen laufen über POST /invoices/{uuid}/correct (Rechnung berichtigen), eine Rechnungskorrektur (POST /credit-notes) oder ein Storno. Breaking Change: client_id und contact_id werden nicht mehr akzeptiert; ausschließlich client_uuid und contact_uuid.",
                "tags": [
                    "flowaccounting.invoices"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": false,
                                    "error_code": "invoice_locked",
                                    "message": "Die Rechnung ist ausgestellt und inhaltlich festgeschrieben. …",
                                    "locked_fields": [
                                        "recipient_name"
                                    ],
                                    "allowed_fields": [
                                        "internal_notes",
                                        "payment_method",
                                        "stripe_pm_id"
                                    ],
                                    "correction": [
                                        {
                                            "action": "correct",
                                            "method": "POST",
                                            "path": "/api/flowaccounting/invoices/{uuid}/correct"
                                        },
                                        {
                                            "action": "credit_note",
                                            "method": "POST",
                                            "path": "/api/flowaccounting/credit-notes",
                                            "body": {
                                                "invoice_uuid": "{uuid}"
                                            }
                                        },
                                        {
                                            "action": "cancel",
                                            "method": "POST",
                                            "path": "/api/flowaccounting/invoices/{uuid}/status",
                                            "body": {
                                                "status": "cancelled"
                                            }
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "recipient_name": {
                                        "type": "string",
                                        "description": "Name des Rechnungsempfängers. Nur im Entwurf änderbar"
                                    },
                                    "due_date": {
                                        "type": "string",
                                        "description": "Fälligkeitsdatum. Nur im Entwurf änderbar"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Sichtbare Notiz auf der Rechnung. Nur im Entwurf änderbar"
                                    },
                                    "tax_exemption_basis": {
                                        "type": "string",
                                        "description": "Vorschrift der Steuerbefreiung bei tax_exempt, z. B. „§ 4 Nr. 14“ (max. 40 Zeichen). Nur im Entwurf änderbar"
                                    },
                                    "property_retention_notice": {
                                        "type": "boolean",
                                        "description": "Hinweis auf die Aufbewahrungspflicht bei Grundstücksleistungen an Privatpersonen (§ 14b Abs. 1 Satz 5 UStG). Nur im Entwurf änderbar"
                                    },
                                    "document_language": {
                                        "type": "string",
                                        "description": "Belegsprache der Rechnung: de | en | pt. Nur im Entwurf änderbar"
                                    },
                                    "internal_notes": {
                                        "type": "string",
                                        "description": "Interne Notiz, erscheint nicht auf der Rechnung. Auch nach dem Ausstellen änderbar"
                                    },
                                    "payment_method": {
                                        "type": "string",
                                        "description": "Zahlart (bank_transfer | stripe | sepa | paypal | cash | other). Auch nach dem Ausstellen änderbar"
                                    },
                                    "stripe_pm_id": {
                                        "type": "string",
                                        "description": "Gespeicherte Stripe-Zahlungsmethode des Kunden (pm_…), passend zur Zahlart. Auch nach dem Ausstellen änderbar"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowaccounting.invoices-delete",
                "summary": "Rechnung löschen",
                "description": "Rechnung löschen. Nur möglich im Status draft (sonst 422). Ein Entwurf ohne Nummer wird gelöscht und verbraucht keine Nummer. Trägt der Entwurf schon eine Nummer (vor dem 2026-11-22 gespeichert, mit vorgegebener invoice_number übernommen oder ein Korrekturentwurf), wird er verworfen: Die Nummer bleibt belegt und wird nicht erneut vergeben, die Antwort nennt sie in retained_invoice_number.",
                "tags": [
                    "flowaccounting.invoices"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Entwurf verworfen. Die Rechnungsnummer RE-2026-0041 bleibt belegt und wird nicht erneut vergeben.",
                                    "retained_invoice_number": "RE-2026-0041"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/invoices/{uuid}/status": {
            "post": {
                "operationId": "flowaccounting.invoices-status",
                "summary": "Rechnungsstatus setzen",
                "description": "Direkter Statuswechsel. Über diesen Endpoint sind nur die Übergänge nach sent (versenden) und cancelled (stornieren) möglich. Bei unzulässigem Übergang: 422 mit Feld allowed_transitions. Beim Wechsel nach sent erhält eine Rechnung ohne Nummer ihre Rechnungsnummer aus dem Nummernkreis, und der heutige Tag gilt als Versanddatum; eine E-Mail wird dabei nicht verschickt. Beim Wechsel einer ausgestellten Rechnung nach cancelled entsteht eine eigene Stornorechnung (kind cancellation) mit neuer Nummer und negativen Positionen; die Rechnung selbst behält Nummer und Inhalt und verweist über cancelled_by_invoice darauf. Ein Entwurf wird ohne Stornorechnung storniert. Eine Stornorechnung selbst lässt sich nicht stornieren, korrigieren oder duplizieren. Für Altrechnungen aus einem Fremdsystem kann das tatsächliche Versanddatum über sent_date mitgegeben werden. Eine Rechnung mit einem Versanddatum vor dem Tag ihrer Erfassung gilt als übernommener Altbeleg: Sie wird nicht automatisch gemahnt und nicht automatisch abgebucht. Von Hand geht beides weiter. § 19-Hinweis: Ist das Team laut bestätigtem Steuerprofil Kleinunternehmer in Deutschland und würde der noch offene Betrag der Rechnung, sobald bezahlt, die Umsatzgrenze des laufenden Jahres überschreiten (oder ist sie schon überschritten), enthält die Antwort zusätzlich das Feld notices: eine Liste mit code small_business_limit, level would_exceed oder already_exceeded, context invoice, year, den Beträgen in Euro (limit_eur, known_turnover_eur, amount_eur, turnover_after_eur), complete (false, wenn Zahlungen ungeklärt sind), blocking (immer false) und message. Der Hinweis blockiert nie und ändert das Steuerprofil nicht; ohne Hinweis fehlt das Feld.",
                "tags": [
                    "flowaccounting.invoices"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "status": {
                                        "type": "string",
                                        "description": "Zielstatus: sent oder cancelled"
                                    },
                                    "sent_date": {
                                        "type": "string",
                                        "description": "Optional: tatsächliches Versanddatum (YYYY-MM-DD), nur für die Übernahme von Altrechnungen aus einem Fremdsystem gedacht. Im Normalfall weglassen, dann gilt der heutige Tag. Nur zusammen mit status sent, nur beim Wechsel aus dem Entwurf und nur für manuelle Rechnungen (source manual), sonst 422. Frühestens das Rechnungsdatum, spätestens heute. Liegt das Datum vor dem Tag, an dem die Rechnung hier erfasst wurde, gilt sie als übernommener Altbeleg und wird nicht automatisch gemahnt oder abgebucht"
                                    }
                                },
                                "required": [
                                    "status"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/invoices/{uuid}/send": {
            "post": {
                "operationId": "flowaccounting.invoices-send",
                "summary": "Rechnung per E-Mail versenden",
                "description": "Versendet die Rechnung per E-Mail an den hinterlegten Empfänger. Eine stornierte Rechnung wird nicht erneut versendet (422, error_code: not_sendable); ihre Stornorechnung (kind cancellation, UUID aus cancelled_by_invoice) lässt sich über diesen Endpoint versenden und bleibt dabei im Status cancelled. Beim Erstversand wechselt eine Rechnung im Status draft automatisch nach sent und erhält dabei ihre Rechnungsnummer; kollidiert der Nummernkreis, antwortet der Endpoint mit 409 und error_code: document_number_conflict, und die Rechnung bleibt ein Entwurf ohne Nummer. Eine bereits versendete Rechnung kann erneut verschickt werden, der Status bleibt dabei unverändert. Der Endpoint ist auf 10 Anfragen pro Minute je API-Key begrenzt, darüber hinausgehende Anfragen werden mit 429 beantwortet. Nicht versandfähig sind stornierte Rechnungen, Rechnungen ohne hinterlegte Empfänger-E-Mail sowie E-Rechnungsformate mit offenen Validierungsfehlern. Versendbar sind außerdem nur Rechnungen aus den Quellen manual, hosting_checkout und hosting_renewal, weil automatisch abgerechnete Quellen ihre Rechnungsmail bereits selbst verschicken. In all diesen Fällen antwortet die API mit 422 und dem Feld error_code, das die Werte not_sendable, no_recipient_email oder einvoice_invalid annehmen kann. Eine unbekannte UUID ergibt 404. § 19-Hinweis: Ist das Team laut bestätigtem Steuerprofil Kleinunternehmer in Deutschland und würde der noch offene Betrag der Rechnung, sobald bezahlt, die Umsatzgrenze des laufenden Jahres überschreiten (oder ist sie schon überschritten), enthält die Antwort zusätzlich das Feld notices: eine Liste mit code small_business_limit, level would_exceed oder already_exceeded, context invoice, year, den Beträgen in Euro (limit_eur, known_turnover_eur, amount_eur, turnover_after_eur), complete (false, wenn Zahlungen ungeklärt sind), blocking (immer false) und message. Der Hinweis blockiert nie und ändert das Steuerprofil nicht; ohne Hinweis fehlt das Feld.",
                "tags": [
                    "flowaccounting.invoices"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/invoices/{uuid}/pdf": {
            "get": {
                "operationId": "flowaccounting.invoices-pdf",
                "summary": "Rechnung als PDF herunterladen",
                "description": "Lädt die Rechnung als Standard-PDF herunter (Team-Einstellung einvoice_format=pdf). Antwort ist ein Datei-Download, kein JSON. Ausgestellte Rechnungen liefern die beim Ausstellen gespeicherte Datei Byte für Byte (Header X-FlowAccounting-Document-Source: frozen und X-FlowAccounting-Document-SHA256); Entwürfe und Rechnungen, die vor dem Einfrieren ausgestellt wurden, werden mit den aktuellen Daten erzeugt (regenerated).",
                "tags": [
                    "flowaccounting.invoices"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/invoices/{uuid}/duplicate": {
            "post": {
                "operationId": "flowaccounting.invoices-duplicate",
                "summary": "Rechnung duplizieren",
                "description": "Dupliziert die Rechnung inklusive Positionen als neuen draft ohne Rechnungsnummer; die Nummer wird beim Ausstellen vergeben. Antwort: 201 mit der neuen Rechnung.",
                "tags": [
                    "flowaccounting.invoices"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/invoices/{uuid}/correct": {
            "post": {
                "operationId": "flowaccounting.invoices-correct",
                "summary": "Rechnung berichtigen",
                "description": "Storniert die versendete Rechnung mit einer eigenen Stornorechnung und erstellt eine inhaltsgleiche berichtigte Rechnung als Entwurf. Die Korrektur trägt die Nummer des Originals mit angehängter Korrekturziffer, das Original behält seine Nummer, wird auf cancelled gesetzt und auf Stornorechnung und Korrektur verwiesen. Möglich bei sent, overdue, past_due und partially_paid und ausschließlich bei manuell geführten Rechnungen; sonst 422. Antwort: 201 mit der berichtigten Rechnung.",
                "tags": [
                    "flowaccounting.invoices"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "550e8400-e29b-41d4-a716-446655440000",
                                        "invoice_number": "RE-2026-0042-1",
                                        "status": "draft"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/invoices/{uuid}/dunning": {
            "post": {
                "operationId": "flowaccounting.invoices-dunning",
                "summary": "Mahnung versenden",
                "description": "Beauftragt eine Zahlungserinnerung oder Mahnung. level muss genau die nächste fällige Stufe sein: eine übersprungene oder wiederholte Stufe wird mit 422 und dunning_level_not_due abgelehnt. Welche Stufe fällig ist, richtet sich nach den Mahnfristen der Teameinstellungen und den bereits versendeten Stufen, also nach denselben Regeln wie der automatische Mahnlauf. Ohne recipient_emails gelten die Empfänger des Kunden.",
                "tags": [
                    "flowaccounting.invoices"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "level": "reminder",
                                    "data": {
                                        "uuid": "550e8400-e29b-41d4-a716-446655440000",
                                        "status": "overdue"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "level": {
                                        "type": "string",
                                        "description": "Mahnstufe: reminder, dunning_1, dunning_2 oder dunning_3"
                                    },
                                    "recipient_emails": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Abweichende Empfängeradressen, höchstens 50"
                                    }
                                },
                                "required": [
                                    "level"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/invoices/{uuid}/mark-paid": {
            "post": {
                "operationId": "flowaccounting.invoices-mark-paid",
                "summary": "Rechnung als bezahlt markieren",
                "description": "Markiert die Rechnung über eine Stripe-PaymentIntent-ID als vollständig bezahlt. Idempotent: Eine erneute Anfrage mit derselben PaymentIntent-ID gibt den aktuellen Stand zurück (200). Zulässige Ausgangsstatus: sent, requires_action, past_due.",
                "tags": [
                    "flowaccounting.invoices"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "stripe_payment_intent_id": {
                                        "type": "string",
                                        "description": "Stripe-PaymentIntent-ID (pi_3Q...)"
                                    },
                                    "date_paid": {
                                        "type": "string",
                                        "description": "Zahlungsdatum (YYYY-MM-DD), spätestens heute (Kalendertag in Deutschland)"
                                    }
                                },
                                "required": [
                                    "stripe_payment_intent_id"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/invoices/{uuid}/record-payment-intent": {
            "post": {
                "operationId": "flowaccounting.invoices-record-payment-intent",
                "summary": "PaymentIntent speichern",
                "description": "Speichert eine Stripe-PaymentIntent-ID an der Rechnung, ohne den Zahlstatus auf paid zu setzen. Für 3DS-ausstehende oder überfällige Zahlungen.",
                "tags": [
                    "flowaccounting.invoices"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "stripe_payment_intent_id": {
                                        "type": "string",
                                        "description": "Stripe-PaymentIntent-ID"
                                    },
                                    "status": {
                                        "type": "string",
                                        "description": "Optional: past_due | requires_action"
                                    }
                                },
                                "required": [
                                    "stripe_payment_intent_id"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/invoices/{uuid}/charge": {
            "post": {
                "operationId": "flowaccounting.invoices-charge",
                "summary": "Rechnung per Stripe abbuchen",
                "description": "Löst die Abbuchung der Rechnung über die hinterlegte Stripe-Zahlungsart aus (Karte oder SEPA-Lastschrift). Voraussetzung: Die Rechnung hat einen Kunden und eine Stripe-gestützte Zahlungsart, sonst antwortet der Endpoint mit 422 und einem error_code (no_client, wrong_payment_method). Ein Entwurf wird vor der Abbuchung ausgestellt (Rechnungsnummer, Status sent, ohne E-Mail), denn eine Zahlung läuft nie gegen eine Rechnung ohne Nummer; kollidiert dabei der Nummernkreis, antwortet der Endpoint mit 409 und error_code: document_number_conflict, und der Entwurf bleibt unverändert. Eine abgelehnte Zahlung ist kein Anfragefehler: Die Antwort ist 200 mit charged: false. Ein wiederholter Aufruf bucht nicht doppelt ab. Ist Stripe vorübergehend nicht erreichbar, antwortet der Endpoint mit 503. Der Aufruf ist pro API-Key begrenzt.",
                "tags": [
                    "flowaccounting.invoices"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/invoices/{uuid}/payment-status": {
            "get": {
                "operationId": "flowaccounting.invoices-payment-status",
                "summary": "Zahlstatus abfragen",
                "description": "Schlanke Statusabfrage für das Polling nach einer Abbuchung, ohne Positionen und Transaktionen. Liefert uuid, status, payment_intent_status, last_charge_error und stripe_charge_id. SEPA-Lastschriften werden erst nach Tagen endgültig bestätigt, der Status ändert sich dann ohne weiteren Aufruf.",
                "tags": [
                    "flowaccounting.invoices"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/invoices/{uuid}/issue-check": {
            "get": {
                "operationId": "flowaccounting.invoices-issue-check",
                "summary": "Prüfliste vor dem Ausstellen",
                "description": "Prüft eine Rechnung vor dem Ausstellen auf Pflichtangaben nach § 14 und § 14a UStG (Anschrift von Aussteller und Kunde, Steuernummer oder USt-IdNr., Positionen, Leistungsdatum, Reverse Charge, § 19 UStG, Fristen) und liefert die Befunde. Nur lesend. findings ist eine Liste mit code (z. B. seller.address, buyer.vat_id, tax.small_business_limit), severity (error, warning oder info), message in der Sprache des Key-Inhabers, legal_basis und target (wo der Befund behoben wird: invoice, recipient, company, tax_profile). blocks_manual_issue sagt, ob die Weboberfläche das Ausstellen wegen Fehlern verweigert, requires_confirmation, ob dort Hinweise zu bestätigen sind. Das Ausstellen über die API (POST /invoices/{uuid}/status, POST /invoices/{uuid}/send) wird nie blockiert (blocks_api_issue ist immer false); die Befunde werden beim Ausstellen mit der Rechnung gespeichert und stehen danach in issued_snapshot. Ohne bestätigtes Steuerprofil sind die Befunde, die vom Umsatzsteuerstatus abhängen (z. B. Steuernummer, Leistungsdatum, Reverse Charge, Fristen), nur info. Die Pflichtangaben jeder Rechnung bleiben auch dann Fehler und sperren das Ausstellen in der Weboberfläche: Anschrift des Ausstellers, Name und Anschrift des Kunden, Rechnungsdatum und Positionen mit Menge; ebenso die Prüfung der E-Rechnung. Die § 19-Warnung (tax.small_business_limit) bleibt eine Warnung; tax_profile nennt den verwendeten Stand (confirmed, vat_regime, governs). Teams, die laut Steuerprofil in Deutschland nicht umsatzsteuerlich registriert sind, erhalten keine deutschen USt-Befunde. Eine unbekannte UUID ergibt 404.",
                "tags": [
                    "flowaccounting.invoices"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "550e8400-e29b-41d4-a716-446655440000",
                                        "status": "draft",
                                        "is_draft": true,
                                        "blocks_api_issue": false,
                                        "checked_at": "2026-11-23T10:00:00+01:00",
                                        "blocks_manual_issue": true,
                                        "requires_confirmation": true,
                                        "summary": {
                                            "errors": 1,
                                            "warnings": 1,
                                            "infos": 0
                                        },
                                        "tax_profile": {
                                            "version_uuid": "0f6d…",
                                            "confirmed": true,
                                            "vat_regime": "standard",
                                            "governs": true
                                        },
                                        "findings": [
                                            {
                                                "code": "seller.tax_id",
                                                "severity": "error",
                                                "message": "Deine Steuernummer oder USt-IdNr. fehlt. Eine davon muss auf jeder Rechnung stehen.",
                                                "legal_basis": "§ 14 Abs. 4 Nr. 2 UStG",
                                                "target": "company"
                                            },
                                            {
                                                "code": "service_date.missing",
                                                "severity": "warning",
                                                "message": "Es ist kein Leistungsdatum angegeben. Trage den Leistungszeitraum ein, oder bestätige, dass die Leistung am Rechnungsdatum erbracht wurde.",
                                                "legal_basis": "§ 14 Abs. 4 Nr. 6 UStG",
                                                "target": "invoice"
                                            }
                                        ],
                                        "issued_snapshot": null
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/invoices/{uuid}/einvoice": {
            "get": {
                "operationId": "flowaccounting.invoices-einvoice",
                "summary": "Archivierte E-Rechnung herunterladen",
                "description": "Liefert die beim Ausstellen archivierte E-Rechnung der Rechnung Byte für Byte: bei XRechnung die XML-Datei (application/xml), bei ZUGFeRD das PDF/A-3 mit eingebetteter XML (application/pdf). Antwort ist ein Datei-Download, kein JSON; es wird nie neu erzeugt. Header: X-FlowAccounting-Einvoice-SHA256 (SHA-256 der gelieferten Datei), X-FlowAccounting-Einvoice-XML-SHA256 (SHA-256 der Rechnungs-XML, bei ZUGFeRD der eingebetteten), X-FlowAccounting-Einvoice-Uuid (Archiveintrag). Ohne archivierte E-Rechnung (Entwurf, klassisches PDF, vor der Archivierung ausgestellt) antwortet der Endpoint mit 404 und error: einvoice_not_archived; besteht die Datei die Hash-Prüfung nicht, mit 409 und error: einvoice_integrity_failed. Eine unbekannte UUID oder eine Rechnung eines anderen Teams ergibt 404.",
                "tags": [
                    "flowaccounting.invoices"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/octet-stream": {
                                "schema": {
                                    "type": "string",
                                    "format": "binary"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/invoices/{uuid}/einvoice/validation": {
            "get": {
                "operationId": "flowaccounting.invoices-einvoice-validation",
                "summary": "Prüfbericht der archivierten E-Rechnung",
                "description": "Liefert den letzten Prüfbericht der archivierten E-Rechnung der Rechnung. Nur lesend. Die Prüfung lief beim Archivieren auf genau den ausgestellten Bytes (Wohlgeformtheit, XSD, Geschäftsregeln nach EN 16931 und XRechnung, Pflichtangaben nach § 14 Abs. 4 UStG). validation_status ist valid, valid_with_warnings, business_rule_errors, mandatory_field_errors oder format_error. report.messages ist eine Liste mit code (z. B. BR-DE-2, FAC-PFLICHT-6), severity (error oder warning), category (format, business_rule, mandatory_vat) und message. Ohne archivierte E-Rechnung 404 mit error: einvoice_not_archived; eine unbekannte UUID oder eine Rechnung eines anderen Teams ergibt 404.",
                "tags": [
                    "flowaccounting.invoices"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "8d1f2c4e-6a0b-4c1d-9e2f-3a4b5c6d7e8f",
                                        "document_uuid": "550e8400-e29b-41d4-a716-446655440000",
                                        "format": "xrechnung",
                                        "profile": "xrechnung_3",
                                        "specification_id": "urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0",
                                        "type_code": "380",
                                        "invoice_number": "RE-00042",
                                        "xml_sha256": "3f5a…",
                                        "file_sha256": "3f5a…",
                                        "archived_at": "2026-11-24T10:00:00+01:00",
                                        "validation_status": "valid_with_warnings",
                                        "report": {
                                            "uuid": "0c9e…",
                                            "engine": "internal",
                                            "engine_version": "internal-1.0",
                                            "status": "valid_with_warnings",
                                            "errors_count": 0,
                                            "warnings_count": 1,
                                            "messages": [
                                                {
                                                    "code": "FAC-FX-2",
                                                    "severity": "warning",
                                                    "category": "mandatory_vat",
                                                    "message": "Die Umsatzsteuer in Euro (BT-111) beruht auf einem vorläufigen Kurs, der BMF-Monatskurs ist noch nicht veröffentlicht."
                                                }
                                            ],
                                            "created_at": "2026-11-24T10:00:00+01:00"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/invoices/{uuid}/items": {
            "get": {
                "operationId": "flowaccounting.items-list",
                "summary": "Positionen auflisten",
                "description": "Alle Positionen einer Rechnung auflisten.",
                "tags": [
                    "flowaccounting.items"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowaccounting.items-create",
                "summary": "Position hinzufügen",
                "description": "Fügt der Rechnung eine Position hinzu. Breaking Change: Das frühere numerische Feld product_id wird nicht mehr akzeptiert; das Produkt wird ausschließlich über product_uuid angegeben.",
                "tags": [
                    "flowaccounting.items"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "quantity": {
                                        "type": "number",
                                        "description": "Menge (min 0.01)"
                                    },
                                    "unit_price": {
                                        "type": "number",
                                        "description": "Einzelpreis (negativ erlaubt für Rechnungskorrekturen)"
                                    },
                                    "name": {
                                        "type": "string",
                                        "description": "Positionsbezeichnung (max 255)"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Beschreibung (max 1000)"
                                    },
                                    "tax_rate": {
                                        "type": "number",
                                        "description": "Steuersatz in Prozent (0-100). Ohne Angabe 0 %"
                                    },
                                    "unit": {
                                        "type": "string",
                                        "description": "Einheit (z.B. Std.)"
                                    },
                                    "product_uuid": {
                                        "type": "string",
                                        "description": "Produkt-UUID (fac_products, teamgebunden)"
                                    }
                                },
                                "required": [
                                    "quantity",
                                    "unit_price"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/invoices/{uuid}/items/{itemUuid}": {
            "put": {
                "operationId": "flowaccounting.items-update",
                "summary": "Position bearbeiten",
                "description": "Position bearbeiten. Die Position wird über ihre UUID adressiert; numerische IDs werden nicht mehr akzeptiert (HTTP 404). Nur bei draft.",
                "tags": [
                    "flowaccounting.items"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "itemUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "quantity": {
                                        "type": "number",
                                        "description": "Menge"
                                    },
                                    "unit_price": {
                                        "type": "number",
                                        "description": "Einzelpreis"
                                    },
                                    "name": {
                                        "type": "string",
                                        "description": "Positionsbezeichnung"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowaccounting.items-delete",
                "summary": "Position löschen",
                "description": "Position löschen. Die Position wird über ihre UUID adressiert. Nur bei draft.",
                "tags": [
                    "flowaccounting.items"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "itemUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/invoices/{uuid}/transactions": {
            "get": {
                "operationId": "flowaccounting.transactions-list",
                "summary": "Transaktionen einer Rechnung auflisten",
                "description": "Alle Transaktionen einer Rechnung auflisten (sortiert nach Datum, absteigend).",
                "tags": [
                    "flowaccounting.transactions"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowaccounting.transactions-create",
                "summary": "Transaktion erfassen",
                "description": "Erfasst eine Transaktion. Nur zulässig, wenn die Rechnung im Status sent, partially_paid oder overdue ist. Die Transaktion wird in der Währung der Rechnung gebucht. Gleicht sie die Rechnung aus, übernimmt die Rechnung das transaction_date dieser Zahlung als paid_date, auch bei nachträglich erfassten Zahlungen. § 19-Hinweis: Nur Zahlungen vom Typ payment lösen ihn aus. Ist das Team laut bestätigtem Steuerprofil Kleinunternehmer in Deutschland und würde diese Zahlung die Umsatzgrenze ihres Kalenderjahres überschreiten (oder ist sie schon überschritten), enthält die Antwort zusätzlich das Feld notices: eine Liste mit code small_business_limit, level would_exceed oder already_exceeded, context payment, year, den Beträgen in Euro (limit_eur, known_turnover_eur, amount_eur, turnover_after_eur), complete (false, wenn Zahlungen ungeklärt sind), blocking (immer false) und message. Der Hinweis blockiert nie und ändert das Steuerprofil nicht; ohne Hinweis fehlt das Feld.",
                "tags": [
                    "flowaccounting.transactions"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
                                        "amount": 1190,
                                        "currency_code": "EUR",
                                        "type": "payment",
                                        "transaction_date": "2026-01-16T00:00:00+00:00"
                                    },
                                    "invoice": {
                                        "uuid": "550e8400-...",
                                        "status": "paid",
                                        "paid_date": "2026-01-16",
                                        "total_paid": 1190,
                                        "remaining_amount": 0
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "type": "string",
                                        "description": "Transaktionstyp: payment | refund | credit"
                                    },
                                    "amount": {
                                        "type": "number",
                                        "description": "Betrag (min 0.01)"
                                    },
                                    "transaction_date": {
                                        "type": "string",
                                        "description": "Transaktionsdatum (YYYY-MM-DD), spätestens heute (Kalendertag in Deutschland)"
                                    },
                                    "payment_method": {
                                        "type": "string",
                                        "description": "Zahlungsmethode: bank_transfer | sepa | stripe | paypal | cash | other"
                                    },
                                    "reference": {
                                        "type": "string",
                                        "description": "Referenz (max 255)"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Notiz (max 1000)"
                                    }
                                },
                                "required": [
                                    "type",
                                    "amount",
                                    "transaction_date",
                                    "payment_method"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/invoices/{uuid}/transactions/{transactionUuid}": {
            "delete": {
                "operationId": "flowaccounting.transactions-delete",
                "summary": "Transaktion löschen",
                "description": "Transaktion löschen. Die Transaktion wird über ihre UUID adressiert; numerische IDs werden nicht mehr akzeptiert (HTTP 404). Nicht möglich bei Rechnungen im Status draft oder cancelled.",
                "tags": [
                    "flowaccounting.transactions"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "transactionUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/transactions": {
            "get": {
                "operationId": "flowaccounting.transactions-all",
                "summary": "Team-weite Transaktionsübersicht",
                "description": "Team-weite Transaktions-Übersicht über alle Rechnungen (paginiert, 25 pro Seite).",
                "tags": [
                    "flowaccounting.transactions"
                ],
                "parameters": [
                    {
                        "name": "from",
                        "in": "query",
                        "required": false,
                        "description": "Transaktionsdatum ab (YYYY-MM-DD)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "required": false,
                        "description": "Transaktionsdatum bis (YYYY-MM-DD)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Suchbegriff (Notiz, Referenz, Rechnungsnummer)",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/products": {
            "get": {
                "operationId": "flowaccounting.products-list",
                "summary": "Produkte auflisten",
                "description": "Produkte auflisten (paginiert, sortiert nach Nutzungshäufigkeit).",
                "tags": [
                    "flowaccounting.products"
                ],
                "parameters": [
                    {
                        "name": "type",
                        "in": "query",
                        "required": false,
                        "description": "Filter nach Quelle (z.B. manual)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Suchbegriff (Titel/Beschreibung)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Anzahl pro Seite (1-200, Standard: 50)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowaccounting.products-create",
                "summary": "Produkt anlegen",
                "description": "Neues Produkt anlegen.",
                "tags": [
                    "flowaccounting.products"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "description": "Produktname (max 255)"
                                    },
                                    "unit_price": {
                                        "type": "number",
                                        "description": "Netto-Einzelpreis (min 0). Pflicht, wenn <code>unit_price_gross</code> fehlt; nicht zusammen mit <code>unit_price_gross</code>"
                                    },
                                    "unit_price_gross": {
                                        "type": "number",
                                        "description": "Brutto-Einzelpreis inkl. MwSt. (min 0), alternativ zu <code>unit_price</code>. Wird exakt gespeichert, der Nettopreis wird daraus abgeleitet"
                                    },
                                    "tax_rate": {
                                        "type": "number",
                                        "description": "Steuersatz (0-100)"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Beschreibung"
                                    },
                                    "unit": {
                                        "type": "string",
                                        "description": "Einheit (max 50)"
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "Aktiv (Standard: true)"
                                    }
                                },
                                "required": [
                                    "title",
                                    "unit_price",
                                    "tax_rate"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/products/{uuid}": {
            "get": {
                "operationId": "flowaccounting.products-show",
                "summary": "Produkt abrufen",
                "description": "Ruft ein einzelnes Produkt Ihres Teams über die uuid ab. Unbekannte oder teamfremde Einträge führen zu 404.",
                "tags": [
                    "flowaccounting.products"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowaccounting.products-update",
                "summary": "Produkt aktualisieren",
                "description": "Produkt aktualisieren.",
                "tags": [
                    "flowaccounting.products"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "description": "Produktname"
                                    },
                                    "unit_price": {
                                        "type": "number",
                                        "description": "Netto-Einzelpreis, macht das Produkt zu einem Netto-Produkt"
                                    },
                                    "unit_price_gross": {
                                        "type": "number",
                                        "description": "Brutto-Einzelpreis inkl. MwSt., wird exakt gespeichert; nicht zusammen mit <code>unit_price</code>"
                                    },
                                    "tax_rate": {
                                        "type": "number",
                                        "description": "Steuersatz"
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "Aktiv"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowaccounting.products-delete",
                "summary": "Produkt löschen",
                "description": "Produkt löschen.",
                "tags": [
                    "flowaccounting.products"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/tax-rates": {
            "get": {
                "operationId": "flowaccounting.tax-rates-list",
                "summary": "Steuersätze auflisten",
                "description": "Alle Steuersätze des Teams abrufen (unpaginiert, sortiert nach sort_order).",
                "tags": [
                    "flowaccounting.tax-rates"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowaccounting.tax-rates-create",
                "summary": "Steuersatz anlegen",
                "description": "Neuen Steuersatz anlegen.",
                "tags": [
                    "flowaccounting.tax-rates"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Bezeichnung (max 255)"
                                    },
                                    "rate": {
                                        "type": "number",
                                        "description": "Steuersatz in Prozent (0-100)"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Beschreibung"
                                    },
                                    "is_default": {
                                        "type": "boolean",
                                        "description": "Als Standard setzen"
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "Aktiv"
                                    },
                                    "sort_order": {
                                        "type": "integer",
                                        "description": "Sortierreihenfolge (>= 0)"
                                    }
                                },
                                "required": [
                                    "name",
                                    "rate"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/tax-rates/{uuid}": {
            "get": {
                "operationId": "flowaccounting.tax-rates-show",
                "summary": "Steuersatz abrufen",
                "description": "Ruft einen einzelnen Steuersatz Ihres Teams über die uuid ab. Unbekannte oder teamfremde Einträge führen zu 404.",
                "tags": [
                    "flowaccounting.tax-rates"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowaccounting.tax-rates-update",
                "summary": "Steuersatz aktualisieren",
                "description": "Steuersatz aktualisieren.",
                "tags": [
                    "flowaccounting.tax-rates"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Bezeichnung"
                                    },
                                    "rate": {
                                        "type": "number",
                                        "description": "Steuersatz"
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "Aktiv"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowaccounting.tax-rates-delete",
                "summary": "Steuersatz löschen",
                "description": "Steuersatz löschen. Nicht möglich, wenn er in Rechnungspositionen verwendet wird (422).",
                "tags": [
                    "flowaccounting.tax-rates"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/tax-rates/{uuid}/default": {
            "post": {
                "operationId": "flowaccounting.tax-rates-default",
                "summary": "Als Standard setzen",
                "description": "Setzt diesen Steuersatz als Team-Standard (alle anderen verlieren das Standard-Flag).",
                "tags": [
                    "flowaccounting.tax-rates"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/recurring-invoices": {
            "get": {
                "operationId": "flowaccounting.recurring-list",
                "summary": "Auflisten",
                "description": "Auflisten (paginiert, 25 pro Seite).",
                "tags": [
                    "flowaccounting.recurring"
                ],
                "parameters": [
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "Filter: active, paused",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "client_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Filter nach Kunden-UUID. Breaking Change: der frühere Filter client_id wird mit 422 abgelehnt, statt stillschweigend ignoriert zu werden",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowaccounting.recurring-create",
                "summary": "Neue wiederkehrende Rechnung anlegen",
                "description": "Neue wiederkehrende Rechnung anlegen. Breaking Change: Das frühere numerische Feld client_id wird nicht mehr akzeptiert; der Kunde wird ausschließlich über client_uuid angegeben.",
                "tags": [
                    "flowaccounting.recurring"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "tax_exemption_basis": {
                                        "type": "string",
                                        "description": "Vorschrift der Steuerbefreiung, wenn der Kunde die Steuerbehandlung tax_exempt hat, z. B. „§ 4 Nr. 14“ (max. 40 Zeichen). Wird in die erzeugten Rechnungen übernommen und im Hinweis gedruckt"
                                    },
                                    "client_uuid": {
                                        "type": "string",
                                        "description": "Kunden-UUID (cmm_clients, teamgebunden)"
                                    },
                                    "interval_value": {
                                        "type": "integer",
                                        "description": "Intervallwert (>= 1)"
                                    },
                                    "interval_unit": {
                                        "type": "string",
                                        "description": "Intervalleinheit: day | week | month | year"
                                    },
                                    "start_date": {
                                        "type": "string",
                                        "description": "Startdatum (YYYY-MM-DD)"
                                    },
                                    "template_items": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Positionen der Vorlage (min 1)"
                                    },
                                    "auto_send": {
                                        "type": "boolean",
                                        "description": "Automatisch versenden"
                                    },
                                    "end_date": {
                                        "type": "string",
                                        "description": "Enddatum (>= start_date)"
                                    },
                                    "status": {
                                        "type": "string",
                                        "description": "Status: active | paused"
                                    }
                                },
                                "required": [
                                    "client_uuid",
                                    "interval_value",
                                    "interval_unit",
                                    "start_date",
                                    "template_items"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/recurring-invoices/{uuid}": {
            "get": {
                "operationId": "flowaccounting.recurring-show",
                "summary": "Wiederkehrende Rechnung abrufen",
                "description": "Ruft eine einzelne wiederkehrende Rechnung Ihres Teams über die uuid ab. Unbekannte oder teamfremde Einträge führen zu 404.",
                "tags": [
                    "flowaccounting.recurring"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowaccounting.recurring-update",
                "summary": "Aktualisieren",
                "description": "Wiederkehrende Rechnung aktualisieren.",
                "tags": [
                    "flowaccounting.recurring"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "tax_exemption_basis": {
                                        "type": "string",
                                        "description": "Vorschrift der Steuerbefreiung, wenn der Kunde die Steuerbehandlung tax_exempt hat, z. B. „§ 4 Nr. 14“ (max. 40 Zeichen). Wird in die erzeugten Rechnungen übernommen und im Hinweis gedruckt"
                                    },
                                    "interval_value": {
                                        "type": "integer",
                                        "description": "Intervallwert"
                                    },
                                    "interval_unit": {
                                        "type": "string",
                                        "description": "Intervalleinheit"
                                    },
                                    "auto_send": {
                                        "type": "boolean",
                                        "description": "Automatisch versenden"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowaccounting.recurring-delete",
                "summary": "Löschen",
                "description": "Wiederkehrende Rechnung löschen.",
                "tags": [
                    "flowaccounting.recurring"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/recurring-invoices/{uuid}/pause": {
            "post": {
                "operationId": "flowaccounting.recurring-pause",
                "summary": "Pausieren",
                "description": "Pausiert die Vorlage (Status paused) - es werden keine neuen Rechnungen erzeugt.",
                "tags": [
                    "flowaccounting.recurring"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/recurring-invoices/{uuid}/activate": {
            "post": {
                "operationId": "flowaccounting.recurring-activate",
                "summary": "Aktivieren",
                "description": "Aktiviert die Vorlage wieder (Status active) und legt dabei fest, was der automatische Lauf tun darf. auto_send, auto_charge und recipient_emails sind die eigentliche Freigabe: ohne sie entstehen nur Entwürfe. auto_send ist standardmäßig aktiv, auto_charge standardmäßig aus und setzt eine Stripe- oder SEPA-Zahlungsart auf der Serie voraus (sonst 422). Ohne recipient_emails gelten die Empfänger des Kunden; ist dort keine Adresse hinterlegt und soll versendet werden, antwortet die API mit 422.",
                "tags": [
                    "flowaccounting.recurring"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "auto_send": {
                                        "type": "boolean",
                                        "description": "Erzeugte Rechnungen automatisch versenden (Standard: true)"
                                    },
                                    "auto_charge": {
                                        "type": "boolean",
                                        "description": "Erzeugte Rechnungen automatisch einziehen (Standard: false, benötigt Zahlungsart stripe oder sepa)"
                                    },
                                    "recipient_emails": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Empfängeradressen des automatischen Versands, höchstens 50"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/recurring-invoices/{uuid}/generate": {
            "post": {
                "operationId": "flowaccounting.recurring-generate",
                "summary": "Nächste Rechnung erzeugen",
                "description": "Erzeugt die fällige Rechnung der Serie sofort, ohne auf den nächtlichen Lauf zu warten. Ist derzeit keine Rechnung fällig oder die Freigabe der Serie nicht mehr gültig, antwortet die API mit 422 und nothing_to_generate.",
                "tags": [
                    "flowaccounting.recurring"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "550e8400-e29b-41d4-a716-446655440000",
                                        "invoice_number": "RE-2026-0042",
                                        "status": "sent"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/installment-plans": {
            "get": {
                "operationId": "flowaccounting.installment-plans-list",
                "summary": "Auflisten",
                "description": "Ratenzahlungen des Teams (paginiert, 25 pro Seite) mit Beträgen, umgewandelten Rechnungen und Ratenplan.",
                "tags": [
                    "flowaccounting.installment-plans"
                ],
                "parameters": [
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "Filter: active, paused, completed, cancelled",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "client_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Filter nach Kunden-UUID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowaccounting.installment-plans-create",
                "summary": "Rechnungen in Ratenzahlung umwandeln",
                "description": "Wandelt offene, versendete Rechnungen (Quelle manual oder quote_accepted) eines Kunden in eine Ratenzahlung um. Unbezahlte Rechnungen werden storniert, teilweise bezahlte per Rechnungskorrektur über den offenen Rest ausgeglichen. Der offene Betrag wird anschließend zu jedem Termin als nummerierte Teilrechnung gestellt. Abgelehnte Umwandlungen antworten mit 422 und error=installment_plan_refused.",
                "tags": [
                    "flowaccounting.installment-plans"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "invoice_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "UUIDs der Rechnungen (teamgebunden, gleicher Kunde und gleiche Währung)"
                                    },
                                    "start_date": {
                                        "type": "string",
                                        "description": "Erste Rate am (YYYY-MM-DD)"
                                    },
                                    "schedule_mode": {
                                        "type": "string",
                                        "description": "Aufteilung: amount (fester Ratenbetrag, kleinere Schlussrate) | count (Anzahl gleicher Raten) | end_date (bis Enddatum)"
                                    },
                                    "installment_amount": {
                                        "type": "number",
                                        "description": "Betrag je Rate, Pflicht bei schedule_mode=amount"
                                    },
                                    "installment_count": {
                                        "type": "integer",
                                        "description": "Anzahl Raten (1 bis 240), Pflicht bei schedule_mode=count"
                                    },
                                    "end_date": {
                                        "type": "string",
                                        "description": "Letzte Rate spätestens am (YYYY-MM-DD), Pflicht bei schedule_mode=end_date"
                                    },
                                    "interval_unit": {
                                        "type": "string",
                                        "description": "month (Standard) | week"
                                    },
                                    "interval_value": {
                                        "type": "integer",
                                        "description": "Intervall (1 bis 12), z. B. 3 mit month = quartalsweise"
                                    },
                                    "payment_method": {
                                        "type": "string",
                                        "description": "bank_transfer | stripe | sepa | paypal | cash | other (Standard: Zahlungsart der Rechnung)"
                                    },
                                    "auto_charge": {
                                        "type": "boolean",
                                        "description": "Teilrechnungen am Erstellungstag automatisch einziehen (nur stripe/sepa)"
                                    },
                                    "auto_send": {
                                        "type": "boolean",
                                        "description": "Teilrechnungen nummerieren und automatisch versenden (Standard true; false = Entwurf)"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Hinweis auf jeder Teilrechnung und der Ratenvereinbarung"
                                    }
                                },
                                "required": [
                                    "invoice_uuids",
                                    "start_date",
                                    "schedule_mode"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/installment-plans/{uuid}": {
            "get": {
                "operationId": "flowaccounting.installment-plans-show",
                "summary": "Ratenzahlung abrufen",
                "description": "Eine Ratenzahlung mit allen Raten und Teilrechnungen. public_url ist der Link zur öffentlichen Kundenseite (null, solange kein Link erzeugt wurde oder er gesperrt ist). Raten mit kind=extra sind Sonderzahlungen, die der Kunde dort geleistet hat. Unbekannte oder teamfremde Einträge führen zu 404.",
                "tags": [
                    "flowaccounting.installment-plans"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/installment-plans/{uuid}/invoices": {
            "post": {
                "operationId": "flowaccounting.installment-plans-add-invoice",
                "summary": "Rechnung hinzufügen",
                "description": "Fügt eine weitere offene Rechnung desselben Kunden hinzu. keep_rate verlängert den Plan bei gleicher Rate, new_rate verteilt den gesamten Rest mit den übergebenen Planwerten neu, separate legt eine zweite Ratenzahlung an und gibt diese zurück.",
                "tags": [
                    "flowaccounting.installment-plans"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "invoice_uuid": {
                                        "type": "string",
                                        "description": "UUID der Rechnung (teamgebunden)"
                                    },
                                    "add_mode": {
                                        "type": "string",
                                        "description": "keep_rate | new_rate | separate"
                                    },
                                    "start_date": {
                                        "type": "string",
                                        "description": "Erste Rate, Pflicht bei add_mode=separate"
                                    },
                                    "schedule_mode": {
                                        "type": "string",
                                        "description": "Aufteilung: amount (fester Ratenbetrag, kleinere Schlussrate) | count (Anzahl gleicher Raten) | end_date (bis Enddatum)"
                                    },
                                    "installment_amount": {
                                        "type": "number",
                                        "description": "Betrag je Rate, Pflicht bei schedule_mode=amount"
                                    },
                                    "installment_count": {
                                        "type": "integer",
                                        "description": "Anzahl Raten (1 bis 240), Pflicht bei schedule_mode=count"
                                    },
                                    "end_date": {
                                        "type": "string",
                                        "description": "Letzte Rate spätestens am (YYYY-MM-DD), Pflicht bei schedule_mode=end_date"
                                    },
                                    "interval_unit": {
                                        "type": "string",
                                        "description": "month (Standard) | week"
                                    },
                                    "interval_value": {
                                        "type": "integer",
                                        "description": "Intervall (1 bis 12), z. B. 3 mit month = quartalsweise"
                                    },
                                    "payment_method": {
                                        "type": "string",
                                        "description": "bank_transfer | stripe | sepa | paypal | cash | other (Standard: Zahlungsart der Rechnung)"
                                    },
                                    "auto_charge": {
                                        "type": "boolean",
                                        "description": "Teilrechnungen am Erstellungstag automatisch einziehen (nur stripe/sepa)"
                                    },
                                    "auto_send": {
                                        "type": "boolean",
                                        "description": "Teilrechnungen nummerieren und automatisch versenden (Standard true; false = Entwurf)"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Hinweis auf jeder Teilrechnung und der Ratenvereinbarung"
                                    }
                                },
                                "required": [
                                    "invoice_uuid",
                                    "add_mode"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/installment-plans/{uuid}/reschedule": {
            "post": {
                "operationId": "flowaccounting.installment-plans-reschedule",
                "summary": "Raten neu berechnen",
                "description": "Verteilt den noch nicht berechneten Rest neu. Bereits gestellte Teilrechnungen bleiben unverändert.",
                "tags": [
                    "flowaccounting.installment-plans"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "schedule_mode": {
                                        "type": "string",
                                        "description": "Aufteilung: amount (fester Ratenbetrag, kleinere Schlussrate) | count (Anzahl gleicher Raten) | end_date (bis Enddatum)"
                                    },
                                    "installment_amount": {
                                        "type": "number",
                                        "description": "Betrag je Rate, Pflicht bei schedule_mode=amount"
                                    },
                                    "installment_count": {
                                        "type": "integer",
                                        "description": "Anzahl Raten (1 bis 240), Pflicht bei schedule_mode=count"
                                    },
                                    "end_date": {
                                        "type": "string",
                                        "description": "Letzte Rate spätestens am (YYYY-MM-DD), Pflicht bei schedule_mode=end_date"
                                    },
                                    "interval_unit": {
                                        "type": "string",
                                        "description": "month (Standard) | week"
                                    },
                                    "interval_value": {
                                        "type": "integer",
                                        "description": "Intervall (1 bis 12), z. B. 3 mit month = quartalsweise"
                                    },
                                    "start_date": {
                                        "type": "string",
                                        "description": "Nächste Rate am (Standard: nächster offener Termin)"
                                    }
                                },
                                "required": [
                                    "schedule_mode"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/installment-plans/{uuid}/installments": {
            "put": {
                "operationId": "flowaccounting.installment-plans-installments",
                "summary": "Raten einzeln setzen",
                "description": "Ersetzt alle noch offenen Raten. Die Summe muss genau dem noch nicht berechneten Rest entsprechen, sonst 422.",
                "tags": [
                    "flowaccounting.installment-plans"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "installments": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Liste aus Objekten mit date (YYYY-MM-DD, ab heute) und amount (ab 0,01)"
                                    }
                                },
                                "required": [
                                    "installments"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/installment-plans/{uuid}/pause": {
            "post": {
                "operationId": "flowaccounting.installment-plans-pause",
                "summary": "Pausieren",
                "description": "Pausiert eine aktive Ratenzahlung. Es entstehen keine Teilrechnungen, bis sie fortgesetzt wird.",
                "tags": [
                    "flowaccounting.installment-plans"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/installment-plans/{uuid}/resume": {
            "post": {
                "operationId": "flowaccounting.installment-plans-resume",
                "summary": "Fortsetzen",
                "description": "Setzt eine pausierte Ratenzahlung fort. Die offenen Raten behalten ihre Beträge und beginnen am neuen Datum.",
                "tags": [
                    "flowaccounting.installment-plans"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "next_date": {
                                        "type": "string",
                                        "description": "Nächste Rate am (YYYY-MM-DD, ab heute)"
                                    }
                                },
                                "required": [
                                    "next_date"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/installment-plans/{uuid}/cancel": {
            "post": {
                "operationId": "flowaccounting.installment-plans-cancel",
                "summary": "Beenden",
                "description": "Beendet die Ratenzahlung vorzeitig. bill_rest stellt den Rest sofort als letzte Teilrechnung, waive erlässt ihn ohne weitere Rechnung.",
                "tags": [
                    "flowaccounting.installment-plans"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "mode": {
                                        "type": "string",
                                        "description": "bill_rest | waive"
                                    }
                                },
                                "required": [
                                    "mode"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/billable-items": {
            "get": {
                "operationId": "flowaccounting.billable-items-list",
                "summary": "Auflisten",
                "description": "Auflisten (paginiert, 25 pro Seite).",
                "tags": [
                    "flowaccounting.billable-items"
                ],
                "parameters": [
                    {
                        "name": "open",
                        "in": "query",
                        "required": false,
                        "description": "true = nur offene, false = nur abgerechnete",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "client_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Filter nach Kunden-UUID. Breaking Change: der frühere Filter client_id wird mit 422 abgelehnt, statt stillschweigend ignoriert zu werden",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowaccounting.billable-items-create",
                "summary": "Neue Position anlegen",
                "description": "Neue abrechenbare Position anlegen. Breaking Change: Das frühere numerische Feld client_id wird nicht mehr akzeptiert; der Kunde wird ausschließlich über client_uuid angegeben.",
                "tags": [
                    "flowaccounting.billable-items"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "tax_exemption_basis": {
                                        "type": "string",
                                        "description": "Vorschrift der Steuerbefreiung, wenn der Kunde die Steuerbehandlung tax_exempt hat, z. B. „§ 4 Nr. 14“ (max. 40 Zeichen). Wird in die erzeugten Rechnungen übernommen und im Hinweis gedruckt"
                                    },
                                    "client_uuid": {
                                        "type": "string",
                                        "description": "Kunden-UUID (cmm_clients, teamgebunden)"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Beschreibung (max 255)"
                                    },
                                    "unit_price": {
                                        "type": "number",
                                        "description": "Einzelpreis"
                                    },
                                    "quantity": {
                                        "type": "number",
                                        "description": "Menge (min 0.01)"
                                    },
                                    "unit": {
                                        "type": "string",
                                        "description": "Einheit (max 50)"
                                    },
                                    "tax_rate": {
                                        "type": "number",
                                        "description": "Steuersatz"
                                    },
                                    "due_date": {
                                        "type": "string",
                                        "description": "Fälligkeitsdatum"
                                    },
                                    "auto_bill": {
                                        "type": "boolean",
                                        "description": "Automatisch abrechnen"
                                    }
                                },
                                "required": [
                                    "client_uuid",
                                    "description",
                                    "unit_price"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/billable-items/{uuid}": {
            "get": {
                "operationId": "flowaccounting.billable-items-show",
                "summary": "Abrechenbare Position abrufen",
                "description": "Ruft eine einzelne abrechenbare Position Ihres Teams über die uuid ab. Unbekannte oder teamfremde Einträge führen zu 404.",
                "tags": [
                    "flowaccounting.billable-items"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowaccounting.billable-items-update",
                "summary": "Position bearbeiten",
                "description": "Bearbeiten. Nur möglich, solange die Position nicht abgerechnet ist (422).",
                "tags": [
                    "flowaccounting.billable-items"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "tax_exemption_basis": {
                                        "type": "string",
                                        "description": "Vorschrift der Steuerbefreiung, wenn der Kunde die Steuerbehandlung tax_exempt hat, z. B. „§ 4 Nr. 14“ (max. 40 Zeichen). Wird in die erzeugten Rechnungen übernommen und im Hinweis gedruckt"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Beschreibung"
                                    },
                                    "unit_price": {
                                        "type": "number",
                                        "description": "Einzelpreis"
                                    },
                                    "quantity": {
                                        "type": "number",
                                        "description": "Menge"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowaccounting.billable-items-delete",
                "summary": "Position löschen",
                "description": "Löschen. Nur möglich, solange nicht abgerechnet (422).",
                "tags": [
                    "flowaccounting.billable-items"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/billable-items/consolidate": {
            "post": {
                "operationId": "flowaccounting.billable-items-consolidate",
                "summary": "Positionen konsolidieren",
                "description": "Fasst mehrere offene Positionen zu Rechnungen zusammen - pro Kunde wird eine Entwurfs-Rechnung erzeugt. Antwort: 201 mit den erstellten Rechnungen.",
                "tags": [
                    "flowaccounting.billable-items"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "UUIDs der zu konsolidierenden Positionen (min 1, eindeutig)"
                                    }
                                },
                                "required": [
                                    "uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/billable-items/{uuid}/generate": {
            "post": {
                "operationId": "flowaccounting.billable-items-generate",
                "summary": "Position einzeln abrechnen",
                "description": "Rechnet genau diese Position sofort ab und liefert den Rechnungsentwurf. Das Fälligkeitsdatum wird dabei bewusst übergangen, es wird nichts versendet. Eine bereits abgerechnete Position liefert mit 200 ihre vorhandene Rechnung statt einer zweiten.",
                "tags": [
                    "flowaccounting.billable-items"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "550e8400-e29b-41d4-a716-446655440000",
                                        "status": "draft"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/quotes": {
            "get": {
                "operationId": "flowaccounting.quotes-list",
                "summary": "Angebote auflisten",
                "description": "Ruft eine paginierte Liste aller Angebote des Teams ab, sortiert nach Angebotsdatum, absteigend.",
                "tags": [
                    "flowaccounting.quotes"
                ],
                "parameters": [
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "Filter: draft, sent, accepted, declined, expired, withdrawn",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "client_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Filter nach Kunden-UUID",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Suchbegriff (Angebotsnummer, Empfängername, Firma)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "from",
                        "in": "query",
                        "required": false,
                        "description": "Angebotsdatum ab (YYYY-MM-DD)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "required": false,
                        "description": "Angebotsdatum bis (YYYY-MM-DD)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Anzahl pro Seite (1-200, Standard: 25)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "550e8400-e29b-41d4-a716-446655440000",
                                            "quote_number": "AN-2026-0007",
                                            "status": "sent",
                                            "total": 1190,
                                            "available_actions": [
                                                "send",
                                                "withdraw"
                                            ]
                                        }
                                    ],
                                    "meta": {
                                        "current_page": 1,
                                        "per_page": 25,
                                        "total": 7
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowaccounting.quotes-create",
                "summary": "Angebot erstellen",
                "description": "Erstellt ein Angebot im Status draft. Die Angebotsnummer wird automatisch aus dem Nummernkreis des Teams vergeben; für die Übernahme bestehender Angebote aus einem Fremdsystem kann sie über quote_number vorgegeben werden. Nicht angegebene Felder werden aus den Teameinstellungen und den Kundendaten ergänzt, etwa Währung, Sprache, Gültigkeitsdauer sowie Anschreiben- und Schlusstext. Die vollständige Liste der schreibbaren Felder liefert GET /flowaccounting/context. Die Steuerbehandlung übernimmt das Angebot vom Kunden aus FlowCRM und gibt sie als tax_treatment zurück (standard, reverse_charge, reverse_charge_domestic, intra_community_supply, export, non_taxable_abroad oder tax_exempt). Bei jedem Wert außer standard weist das Angebot keine Umsatzsteuer aus: Ein übergebener tax_rate wird auf 0 gesetzt. Die Rechnung aus einem angenommenen Angebot übernimmt dessen Steuerbehandlung.",
                "tags": [
                    "flowaccounting.quotes"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "550e8400-e29b-41d4-a716-446655440000",
                                        "quote_number": "AN-2026-0007",
                                        "status": "draft"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "client_uuid": {
                                        "type": "string",
                                        "description": "Kunden-UUID (teamgebunden)"
                                    },
                                    "contact_uuid": {
                                        "type": "string",
                                        "description": "Kontakt-UUID des Kunden"
                                    },
                                    "quote_number": {
                                        "type": "string",
                                        "description": "Optional: eigene Angebotsnummer, nur für die Übernahme bestehender Angebote aus einem Fremdsystem gedacht. Im Normalfall weglassen, dann vergibt der Nummernkreis die Nummer beim Anlegen. KI-Assistenten und Agenten setzen das Feld nur, wenn der Nutzer ausdrücklich auf einer eigenen Nummer besteht. Höchstens 40 Zeichen aus den Buchstaben A bis Z, Ziffern, Leerzeichen, Punkt, Unterstrich und Bindestrich, am Anfang und Ende ein Buchstabe oder eine Ziffer. Muss im Team eindeutig sein, auch gegenüber gelöschten Entwürfen und zurückgezogenen Angeboten. Liegt die Nummer im laufenden Nummernkreis, muss sie unter dem nächsten Zählerstand liegen; dafür vorher in den FlowAccounting-Einstellungen die nächste Angebotsnummer über die höchste Importnummer setzen. Der Zähler bleibt unverändert. Nach dem Anlegen lässt sich die Nummer nicht mehr ändern"
                                    },
                                    "quote_date": {
                                        "type": "string",
                                        "description": "Angebotsdatum (YYYY-MM-DD, Standard: heute)"
                                    },
                                    "valid_until": {
                                        "type": "string",
                                        "description": "Gültig bis (YYYY-MM-DD, Standard: Gültigkeitsdauer des Teams)"
                                    },
                                    "signature_type": {
                                        "type": "string",
                                        "description": "Annahmeart: button oder canvas"
                                    },
                                    "currency_code": {
                                        "type": "string",
                                        "description": "EUR, USD, CHF oder GBP"
                                    },
                                    "document_language": {
                                        "type": "string",
                                        "description": "de, en oder pt"
                                    },
                                    "discount_percent": {
                                        "type": "number",
                                        "description": "Gesamtrabatt in Prozent"
                                    },
                                    "greeting_text": {
                                        "type": "string",
                                        "description": "Anschreiben über den Positionen"
                                    },
                                    "closing_text": {
                                        "type": "string",
                                        "description": "Schlusstext unter den Positionen"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Sichtbare Notiz auf dem Angebot"
                                    },
                                    "tax_exemption_basis": {
                                        "type": "string",
                                        "description": "Vorschrift der Steuerbefreiung bei der Steuerbehandlung tax_exempt, z. B. „§ 4 Nr. 14“ (max. 40 Zeichen), gedruckt im Hinweis auf dem Beleg"
                                    },
                                    "internal_notes": {
                                        "type": "string",
                                        "description": "Interne Notiz, nicht auf dem Dokument"
                                    },
                                    "items": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Positionen, 1 bis 200 Stück. Je Position <code>name</code>, <code>quantity</code>, <code>unit_price</code> und <code>tax_rate</code>; optional <code>description</code>, <code>unit</code>, <code>discount_percent</code>, <code>type</code>, <code>unit_code</code>, <code>product_uuid</code> und <code>project_uuid</code>"
                                    },
                                    "recipient_name": {
                                        "type": "string",
                                        "description": "Abweichender Empfängername"
                                    },
                                    "recipient_company": {
                                        "type": "string",
                                        "description": "Abweichende Empfängerfirma"
                                    },
                                    "recipient_email": {
                                        "type": "string",
                                        "description": "Abweichende Empfängeradresse"
                                    }
                                },
                                "required": [
                                    "client_uuid",
                                    "items"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/quotes/{uuid}": {
            "get": {
                "operationId": "flowaccounting.quotes-show",
                "summary": "Angebots-Details abrufen",
                "description": "Angebots-Details einschließlich Positionen, Summen, available_actions und allowed_transitions.",
                "tags": [
                    "flowaccounting.quotes"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowaccounting.quotes-update",
                "summary": "Angebot aktualisieren",
                "description": "Ändert ein Angebot im Status draft; sonst 422. Es werden nur die gesendeten Felder geändert, alle übrigen bleiben stehen. Wird items mitgegeben, ersetzt die Liste sämtliche Positionen. Die Angebotsnummer lässt sich nicht ändern: quote_number wird hier mit 422 abgelehnt.",
                "tags": [
                    "flowaccounting.quotes"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "valid_until": {
                                        "type": "string",
                                        "description": "Gültig bis (YYYY-MM-DD)"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Sichtbare Notiz auf dem Angebot"
                                    },
                                    "tax_exemption_basis": {
                                        "type": "string",
                                        "description": "Vorschrift der Steuerbefreiung bei der Steuerbehandlung tax_exempt, z. B. „§ 4 Nr. 14“ (max. 40 Zeichen), gedruckt im Hinweis auf dem Beleg"
                                    },
                                    "items": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Ersetzt alle Positionen"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowaccounting.quotes-delete",
                "summary": "Angebot löschen",
                "description": "Löscht ein Angebot im Status draft; sonst 422.",
                "tags": [
                    "flowaccounting.quotes"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/quotes/{uuid}/send": {
            "post": {
                "operationId": "flowaccounting.quotes-send",
                "summary": "Angebot per E-Mail versenden",
                "description": "Versendet das Angebot und setzt es dabei auf sent. Erfordert einen Header Idempotency-Key im UUID-Format; derselbe Schlüssel versendet nicht zweimal. Ohne recipient_emails gelten die Empfänger des Kunden. Ist die Absenderdomain nicht verifiziert, antwortet die API mit 409 und sender_domain_not_verified.",
                "tags": [
                    "flowaccounting.quotes"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "sent": true,
                                    "data": {
                                        "uuid": "550e8400-e29b-41d4-a716-446655440000",
                                        "status": "sent"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "recipient_emails": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Abweichende Empfängeradressen, höchstens 50"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/quotes/{uuid}/withdraw": {
            "post": {
                "operationId": "flowaccounting.quotes-withdraw",
                "summary": "Angebot zurückziehen",
                "description": "Zieht ein versendetes Angebot zurück. Nur aus dem Status sent möglich; sonst 422.",
                "tags": [
                    "flowaccounting.quotes"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/quotes/{uuid}/accept": {
            "post": {
                "operationId": "flowaccounting.quotes-accept",
                "summary": "Annahme erfassen",
                "description": "Hält fest, dass der Kunde das Angebot angenommen hat, etwa telefonisch oder per E-Mail. Nur aus dem Status sent möglich und nur einmal; sonst 422. Für die Annahme über den Angebotslink des Kunden ist dieser Endpoint nicht gedacht, dort wird zusätzlich die Unterschrift erfasst.",
                "tags": [
                    "flowaccounting.quotes"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "550e8400-e29b-41d4-a716-446655440000",
                                        "status": "accepted"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/quotes/{uuid}/convert": {
            "post": {
                "operationId": "flowaccounting.quotes-convert",
                "summary": "In Rechnung umwandeln",
                "description": "Erzeugt aus einem angenommenen Angebot einen Rechnungsentwurf. Nur im Status accepted möglich; sonst 422 mit quote_not_accepted. Ein zweiter Aufruf liefert mit 200 die bereits erzeugte Rechnung statt einer weiteren.",
                "tags": [
                    "flowaccounting.quotes"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "550e8400-e29b-41d4-a716-446655440000",
                                        "status": "draft"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/quotes/{uuid}/pdf": {
            "get": {
                "operationId": "flowaccounting.quotes-pdf",
                "summary": "Angebots-PDF herunterladen",
                "description": "Liefert das Angebot als PDF-Datei (application/pdf), im Dokumentlayout des Teams und in der auf dem Dokument festgehaltenen Sprache.",
                "tags": [
                    "flowaccounting.quotes"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/octet-stream": {
                                "schema": {
                                    "type": "string",
                                    "format": "binary"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/quotes/{uuid}/items": {
            "get": {
                "operationId": "flowaccounting.quote-items-list",
                "summary": "Positionen auflisten",
                "description": "Listet die Positionen eines Angebots, sortiert nach ihrer Reihenfolge.",
                "tags": [
                    "flowaccounting.quote-items"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Anzahl pro Seite (1-200, Standard: 50)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowaccounting.quote-items-create",
                "summary": "Position hinzufügen",
                "description": "Fügt dem Angebot eine Position hinzu. Ohne position wird sie hinten angefügt. Ein project_uuid muss zu einem Projekt des Angebotskunden gehören; sonst 422.",
                "tags": [
                    "flowaccounting.quote-items"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Bezeichnung der Position"
                                    },
                                    "quantity": {
                                        "type": "number",
                                        "description": "Menge"
                                    },
                                    "unit_price": {
                                        "type": "number",
                                        "description": "Einzelpreis netto"
                                    },
                                    "tax_rate": {
                                        "type": "number",
                                        "description": "Steuersatz in Prozent"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Beschreibungstext"
                                    },
                                    "unit": {
                                        "type": "string",
                                        "description": "Einheit, etwa Stunde oder Stück"
                                    },
                                    "discount_percent": {
                                        "type": "number",
                                        "description": "Positionsrabatt in Prozent"
                                    },
                                    "type": {
                                        "type": "string",
                                        "description": "service, product oder hours"
                                    },
                                    "position": {
                                        "type": "integer",
                                        "description": "Reihenfolge"
                                    },
                                    "product_uuid": {
                                        "type": "string",
                                        "description": "Produkt-UUID aus dem Produktkatalog"
                                    },
                                    "project_uuid": {
                                        "type": "string",
                                        "description": "Projekt-UUID des Angebotskunden"
                                    }
                                },
                                "required": [
                                    "name",
                                    "quantity",
                                    "unit_price",
                                    "tax_rate"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/quotes/{uuid}/items/{itemUuid}": {
            "put": {
                "operationId": "flowaccounting.quote-items-update",
                "summary": "Position aktualisieren",
                "description": "Ändert eine einzelne Position. Es werden nur die gesendeten Felder geändert.",
                "tags": [
                    "flowaccounting.quote-items"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "itemUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "quantity": {
                                        "type": "number",
                                        "description": "Menge"
                                    },
                                    "unit_price": {
                                        "type": "number",
                                        "description": "Einzelpreis netto"
                                    },
                                    "tax_rate": {
                                        "type": "number",
                                        "description": "Steuersatz in Prozent"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowaccounting.quote-items-delete",
                "summary": "Position löschen",
                "description": "Entfernt eine Position aus dem Angebot und berechnet die Summen neu.",
                "tags": [
                    "flowaccounting.quote-items"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "itemUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/credit-notes": {
            "get": {
                "operationId": "flowaccounting.credit-notes-list",
                "summary": "Rechnungskorrekturen auflisten",
                "description": "Ruft eine paginierte Liste aller Rechnungskorrekturen des Teams ab, sortiert nach Datum der Rechnungskorrektur, absteigend.",
                "tags": [
                    "flowaccounting.credit-notes"
                ],
                "parameters": [
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "Filter: draft, issued, settled, cancelled",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "client_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Filter nach Kunden-UUID",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "from",
                        "in": "query",
                        "required": false,
                        "description": "Datum der Rechnungskorrektur ab (YYYY-MM-DD)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "required": false,
                        "description": "Datum der Rechnungskorrektur bis (YYYY-MM-DD)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Anzahl pro Seite (1-200, Standard: 25)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowaccounting.credit-notes-create",
                "summary": "Rechnungskorrektur erstellen",
                "description": "Erstellt eine Rechnungskorrektur im Status draft. Mit invoice_uuid wird sie der gutzuschreibenden Rechnung zugeordnet; diese muss demselben Kunden gehören und dieselbe Währung führen. Rechnungskorrekturpositionen sind freie Zeilen ohne Produkt- oder Projektverknüpfung. Eine Rechnungskorrektur zu einer Rechnung übernimmt deren Steuerbehandlung, eine freie Rechnungskorrektur die des Kunden; die Antwort nennt sie als tax_treatment. Bei jedem Wert außer standard (z. B. reverse_charge, tax_exempt) weist die Rechnungskorrektur keine Umsatzsteuer aus: Ein übergebener tax_rate wird auf 0 gesetzt. Ihre Nummer erhält die Rechnungskorrektur erst beim Ausstellen aus dem Nummernkreis des Teams; für die Übernahme bestehender Rechnungskorrekturen aus einem Fremdsystem kann sie über credit_note_number vorgegeben werden.",
                "tags": [
                    "flowaccounting.credit-notes"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "550e8400-e29b-41d4-a716-446655440000",
                                        "status": "draft"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "client_uuid": {
                                        "type": "string",
                                        "description": "Kunden-UUID (teamgebunden)"
                                    },
                                    "invoice_uuid": {
                                        "type": "string",
                                        "description": "UUID der gutzuschreibenden Rechnung"
                                    },
                                    "contact_uuid": {
                                        "type": "string",
                                        "description": "Kontakt-UUID des Kunden"
                                    },
                                    "credit_note_number": {
                                        "type": "string",
                                        "description": "Optional: eigene Nummer der Rechnungskorrektur, nur für die Übernahme bestehender Rechnungskorrekturen aus einem Fremdsystem gedacht. Im Normalfall weglassen, dann vergibt der Nummernkreis die Nummer beim Ausstellen. KI-Assistenten und Agenten setzen das Feld nur, wenn der Nutzer ausdrücklich auf einer eigenen Nummer besteht. Höchstens 40 Zeichen aus den Buchstaben A bis Z, Ziffern, Leerzeichen, Punkt, Unterstrich und Bindestrich, am Anfang und Ende ein Buchstabe oder eine Ziffer. Muss im Team eindeutig sein, auch gegenüber gelöschten Entwürfen und stornierten Rechnungskorrekturen. Liegt die Nummer im laufenden Nummernkreis, muss sie unter dem nächsten Zählerstand liegen; dafür vorher in den FlowAccounting-Einstellungen die nächste Nummer der Rechnungskorrektur über die höchste Importnummer setzen. Der Zähler bleibt unverändert, auch beim Ausstellen. Nach dem Anlegen lässt sich die Nummer nicht mehr ändern"
                                    },
                                    "credit_note_date": {
                                        "type": "string",
                                        "description": "Datum der Rechnungskorrektur (YYYY-MM-DD, Standard: heute)"
                                    },
                                    "currency_code": {
                                        "type": "string",
                                        "description": "EUR, USD, CHF oder GBP"
                                    },
                                    "document_language": {
                                        "type": "string",
                                        "description": "de, en oder pt"
                                    },
                                    "einvoice_format": {
                                        "type": "string",
                                        "description": "pdf, zugferd oder xrechnung"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Sichtbare Notiz auf der Rechnungskorrektur"
                                    },
                                    "tax_exemption_basis": {
                                        "type": "string",
                                        "description": "Vorschrift der Steuerbefreiung bei der Steuerbehandlung tax_exempt, z. B. „§ 4 Nr. 14“ (max. 40 Zeichen), gedruckt im Hinweis auf dem Beleg. Eine Rechnungskorrektur zu einer Rechnung übernimmt die Vorschrift der Rechnung"
                                    },
                                    "items": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Positionen, 1 bis 200 Stück, mit <code>name</code>, <code>quantity</code>, <code>unit_price</code> und <code>tax_rate</code>"
                                    }
                                },
                                "required": [
                                    "client_uuid",
                                    "items"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/credit-notes/{uuid}": {
            "get": {
                "operationId": "flowaccounting.credit-notes-show",
                "summary": "Details der Rechnungskorrektur abrufen",
                "description": "Details der Rechnungskorrektur einschließlich Positionen, Summen und available_actions.",
                "tags": [
                    "flowaccounting.credit-notes"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowaccounting.credit-notes-update",
                "summary": "Rechnungskorrektur aktualisieren",
                "description": "Ändert eine Rechnungskorrektur im Status draft; sonst 422. Wird items mitgegeben, ersetzt die Liste sämtliche Positionen. Die Nummer der Rechnungskorrektur lässt sich nicht ändern: credit_note_number wird hier mit 422 abgelehnt.",
                "tags": [
                    "flowaccounting.credit-notes"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "notes": {
                                        "type": "string",
                                        "description": "Sichtbare Notiz auf der Rechnungskorrektur"
                                    },
                                    "tax_exemption_basis": {
                                        "type": "string",
                                        "description": "Vorschrift der Steuerbefreiung bei der Steuerbehandlung tax_exempt, z. B. „§ 4 Nr. 14“ (max. 40 Zeichen), gedruckt im Hinweis auf dem Beleg. Eine Rechnungskorrektur zu einer Rechnung übernimmt die Vorschrift der Rechnung"
                                    },
                                    "items": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Ersetzt alle Positionen"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowaccounting.credit-notes-delete",
                "summary": "Rechnungskorrektur löschen",
                "description": "Löscht eine Rechnungskorrektur im Status draft; sonst 422.",
                "tags": [
                    "flowaccounting.credit-notes"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/credit-notes/{uuid}/issue": {
            "post": {
                "operationId": "flowaccounting.credit-notes-issue",
                "summary": "Rechnungskorrektur ausstellen",
                "description": "Stellt die Rechnungskorrektur aus und vergibt ihre Nummer, sofern beim Anlegen keine vorgegeben wurde. Ist die zugrunde liegende Rechnung über Stripe bezahlt, wird die Erstattung angestoßen. Das Feld refund_status meldet started, not_required oder review_required. Nur im Status draft möglich; sonst 422. Ebenfalls 422, wenn die verknüpfte Rechnung noch ein Entwurf ist (zuerst die Rechnung ausstellen), wenn sie storniert wurde oder wenn sie ihre Steuerbehandlung geändert hat, seit die Rechnungskorrektur gespeichert wurde: Dann die Rechnungskorrektur zuerst per PUT mit ihren Positionen neu speichern.",
                "tags": [
                    "flowaccounting.credit-notes"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "refund_status": "not_required",
                                    "data": {
                                        "uuid": "550e8400-e29b-41d4-a716-446655440000",
                                        "status": "issued"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/credit-notes/{uuid}/settle": {
            "post": {
                "operationId": "flowaccounting.credit-notes-settle",
                "summary": "Rechnungskorrektur verrechnen",
                "description": "Verrechnet eine ausgestellte Rechnungskorrektur und bucht dafür genau eine Transaktion vom Typ credit. Mit mode offset wird der Betrag auf die verknüpfte Rechnung gebucht: Er darf weder die Summe der Rechnungskorrektur noch den offenen Betrag der Rechnung übersteigen, und Rechnung und Rechnungskorrektur müssen dieselbe Währung führen. Deckt die Buchung den offenen Betrag, gilt die Rechnung als bezahlt (paid), sonst als teilweise bezahlt (partially_paid); eine Rechnung im Entwurf oder eine stornierte Rechnung wird abgelehnt. Mit pool wandert der Betrag ohne Rechnungsbezug ins Guthaben des Kunden und steht dort für spätere Rechnungen zur Verfügung. In beiden Fällen ist die Rechnungskorrektur danach vollständig verrechnet (settled), auch bei einem Teilbetrag: Der Rest wandert nicht ins Guthaben und lässt sich nicht nachträglich verrechnen. Ohne amount wird der höchste zulässige Betrag gebucht. transaction_date ist für die Übernahme historischer Belege gedacht und legt das Buchungsdatum der Transaktion fest. Die Antwort enthält die Rechnungskorrektur in data, die gebuchte Transaktion in transaction und bei offset den Stand der Rechnung in invoice (uuid, invoice_number, status, paid_date, remaining_amount); bei pool ist invoice null. Der Aufruf ist über den Status abgesichert: Eine Wiederholung bucht nichts und liefert 422 mit credit_note_already_settled, ein Entwurf oder eine stornierte Rechnungskorrektur 422 mit credit_note_not_issued. Weitere Ablehnungen mit 422: credit_note_without_invoice, invoice_not_settleable, currency_mismatch, amount_exceeds_limit und transaction_date_out_of_range.",
                "tags": [
                    "flowaccounting.credit-notes"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "550e8400-e29b-41d4-a716-446655440000",
                                        "status": "settled"
                                    },
                                    "transaction": {
                                        "uuid": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
                                        "type": "credit",
                                        "amount": 238,
                                        "credit_note_uuid": "550e8400-e29b-41d4-a716-446655440000",
                                        "invoice_uuid": "9b2e4f6a-1c3d-4e5f-8a7b-6c5d4e3f2a1b"
                                    },
                                    "invoice": {
                                        "uuid": "9b2e4f6a-1c3d-4e5f-8a7b-6c5d4e3f2a1b",
                                        "invoice_number": "RE-2026-0042",
                                        "status": "partially_paid",
                                        "paid_date": null,
                                        "remaining_amount": 952
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "mode": {
                                        "type": "string",
                                        "description": "<code>offset</code> (mit der verknüpften Rechnung verrechnen) oder <code>pool</code> (dem Guthaben des Kunden gutschreiben)"
                                    },
                                    "amount": {
                                        "type": "number",
                                        "description": "Zu buchender Betrag, mindestens 0,01. Standard: die Summe der Rechnungskorrektur, bei <code>offset</code> höchstens der offene Betrag der Rechnung"
                                    },
                                    "transaction_date": {
                                        "type": "string",
                                        "description": "Buchungsdatum (YYYY-MM-DD, Standard: heute). Frühestens das Datum der Rechnungskorrektur, spätestens heute"
                                    }
                                },
                                "required": [
                                    "mode"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/credit-notes/{uuid}/cancel": {
            "post": {
                "operationId": "flowaccounting.credit-notes-cancel",
                "summary": "Rechnungskorrektur stornieren",
                "description": "Storniert eine Rechnungskorrektur im Status draft oder issued; der Aufruf hat keinen Body. Die Stornierung ist endgültig. Beleg und Nummer bleiben erhalten: Die Rechnungskorrektur lässt sich weiter abrufen, und ihre Nummer wird nicht wieder frei. Das gilt auch für einen Entwurf, der mit vorgegebener credit_note_number angelegt wurde; er belegt diese Nummer weiter. Eine verrechnete oder bereits stornierte Rechnungskorrektur liefert 422 mit action_not_available. Ebenfalls 422, mit credit_note_refund_started, wenn für die verknüpfte Rechnung eine Stripe-Erstattung angestoßen wurde, die nicht fehlgeschlagen ist: Das Geld ist dann an den Kunden zurückgeflossen, und der Beleg dazu muss bestehen bleiben.",
                "tags": [
                    "flowaccounting.credit-notes"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "550e8400-e29b-41d4-a716-446655440000",
                                        "status": "cancelled"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/credit-notes/{uuid}/send": {
            "post": {
                "operationId": "flowaccounting.credit-notes-send",
                "summary": "Rechnungskorrektur per E-Mail versenden",
                "description": "Versendet die ausgestellte Rechnungskorrektur an genau eine Adresse; mehrere Empfänger werden mit 422 abgelehnt. Erfordert einen Header Idempotency-Key im UUID-Format. Ohne recipient_emails gilt die hinterlegte Adresse des Kunden.",
                "tags": [
                    "flowaccounting.credit-notes"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "recipient_emails": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Genau eine abweichende Empfängeradresse"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/credit-notes/{uuid}/pdf": {
            "get": {
                "operationId": "flowaccounting.credit-notes-pdf",
                "summary": "PDF der Rechnungskorrektur herunterladen",
                "description": "Liefert die Rechnungskorrektur als PDF-Datei (application/pdf) im Dokumentlayout des Teams. Ausgestellte Rechnungskorrekturen liefern die beim Ausstellen gespeicherte Datei (Header X-FlowAccounting-Document-Source: frozen), sonst regenerated.",
                "tags": [
                    "flowaccounting.credit-notes"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/octet-stream": {
                                "schema": {
                                    "type": "string",
                                    "format": "binary"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/credit-notes/{uuid}/einvoice": {
            "get": {
                "operationId": "flowaccounting.credit-notes-einvoice",
                "summary": "Archivierte E-Rechnung herunterladen",
                "description": "Liefert die beim Ausstellen archivierte E-Rechnung der Rechnungskorrektur Byte für Byte: bei XRechnung die XML-Datei (application/xml), bei ZUGFeRD das PDF/A-3 mit eingebetteter XML (application/pdf). Antwort ist ein Datei-Download, kein JSON; es wird nie neu erzeugt. Header: X-FlowAccounting-Einvoice-SHA256 (SHA-256 der gelieferten Datei), X-FlowAccounting-Einvoice-XML-SHA256 (SHA-256 der Rechnungs-XML, bei ZUGFeRD der eingebetteten), X-FlowAccounting-Einvoice-Uuid (Archiveintrag). Ohne archivierte E-Rechnung (Entwurf, klassisches PDF, vor der Archivierung ausgestellt) antwortet der Endpoint mit 404 und error: einvoice_not_archived; besteht die Datei die Hash-Prüfung nicht, mit 409 und error: einvoice_integrity_failed. Eine unbekannte UUID oder eine Rechnungskorrektur eines anderen Teams ergibt 404.",
                "tags": [
                    "flowaccounting.credit-notes"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/octet-stream": {
                                "schema": {
                                    "type": "string",
                                    "format": "binary"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/credit-notes/{uuid}/einvoice/validation": {
            "get": {
                "operationId": "flowaccounting.credit-notes-einvoice-validation",
                "summary": "Prüfbericht der archivierten E-Rechnung",
                "description": "Liefert den letzten Prüfbericht der archivierten E-Rechnung der Rechnungskorrektur. Nur lesend. Die Prüfung lief beim Archivieren auf genau den ausgestellten Bytes (Wohlgeformtheit, XSD, Geschäftsregeln nach EN 16931 und XRechnung, Pflichtangaben nach § 14 Abs. 4 UStG). validation_status ist valid, valid_with_warnings, business_rule_errors, mandatory_field_errors oder format_error. report.messages ist eine Liste mit code (z. B. BR-DE-2, FAC-PFLICHT-6), severity (error oder warning), category (format, business_rule, mandatory_vat) und message. Ohne archivierte E-Rechnung 404 mit error: einvoice_not_archived; eine unbekannte UUID oder eine Rechnungskorrektur eines anderen Teams ergibt 404.",
                "tags": [
                    "flowaccounting.credit-notes"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "8d1f2c4e-6a0b-4c1d-9e2f-3a4b5c6d7e8f",
                                        "document_uuid": "550e8400-e29b-41d4-a716-446655440000",
                                        "format": "xrechnung",
                                        "profile": "xrechnung_3",
                                        "specification_id": "urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0",
                                        "type_code": "380",
                                        "invoice_number": "RE-00042",
                                        "xml_sha256": "3f5a…",
                                        "file_sha256": "3f5a…",
                                        "archived_at": "2026-11-24T10:00:00+01:00",
                                        "validation_status": "valid_with_warnings",
                                        "report": {
                                            "uuid": "0c9e…",
                                            "engine": "internal",
                                            "engine_version": "internal-1.0",
                                            "status": "valid_with_warnings",
                                            "errors_count": 0,
                                            "warnings_count": 1,
                                            "messages": [
                                                {
                                                    "code": "FAC-FX-2",
                                                    "severity": "warning",
                                                    "category": "mandatory_vat",
                                                    "message": "Die Umsatzsteuer in Euro (BT-111) beruht auf einem vorläufigen Kurs, der BMF-Monatskurs ist noch nicht veröffentlicht."
                                                }
                                            ],
                                            "created_at": "2026-11-24T10:00:00+01:00"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/expenses": {
            "get": {
                "operationId": "flowaccounting.expenses-list",
                "summary": "Ausgaben auflisten",
                "description": "Ruft eine paginierte Liste aller Ausgaben des Teams ab, sortiert nach Buchungsdatum, absteigend.",
                "tags": [
                    "flowaccounting.expenses"
                ],
                "parameters": [
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "Filter: pending oder booked",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "supplier_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Filter nach Lieferanten-UUID",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "expense_category_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Filter nach Kategorie-UUID",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Suchbegriff (Beschreibung, Lieferanten-Rechnungsnummer)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "intake_status",
                        "in": "query",
                        "required": false,
                        "description": "Filter nach Eingangsstatus: needs_review liefert die Prüf-Queue (alle offenen Belege vor der Prüfung), außerdem received, processing, failed oder reviewed",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "missing_receipt",
                        "in": "query",
                        "required": false,
                        "description": "Nur Belege mit Vorsteuer, aber ohne Rechnungsdatei (Aufgabe „Beleg fehlt“)",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "from",
                        "in": "query",
                        "required": false,
                        "description": "Buchungsdatum ab (YYYY-MM-DD)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "required": false,
                        "description": "Buchungsdatum bis (YYYY-MM-DD)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Anzahl pro Seite (1-200, Standard: 25)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowaccounting.expenses-create",
                "summary": "Ausgabe erfassen",
                "description": "Erfasst eine Ausgabe im Status pending; gebucht wird sie in einem eigenen Schritt über POST /flowaccounting/expenses/{uuid}/book. Netto-, Steuer- und Bruttobetrag werden aus gross_amount, tax_rate und vat_mode berechnet. Eine zweite Ausgabe mit derselben Lieferanten-Rechnungsnummer desselben Lieferanten (oder derselben Nummer und derselben USt-IdNr. auf dem Beleg) wird mit 422 abgelehnt, außer der Aufruf bestätigt mit confirm_not_duplicate und einer Begründung in duplicate_reason (mindestens 10 Zeichen), dass es keine Dublette ist. Die Entscheidung wird mit Begründung, Zeitpunkt und Bearbeiter an der Ausgabe gespeichert. Eine Rechnungskorrektur mit umgekehrtem Vorzeichen gilt nicht als Dublette.",
                "tags": [
                    "flowaccounting.expenses"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "550e8400-e29b-41d4-a716-446655440000",
                                        "status": "pending",
                                        "has_receipt": false
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "booking_date": {
                                        "type": "string",
                                        "description": "Buchungsdatum (YYYY-MM-DD)"
                                    },
                                    "gross_amount": {
                                        "type": "number",
                                        "description": "Bruttobetrag"
                                    },
                                    "tax_rate": {
                                        "type": "number",
                                        "description": "Steuersatz in Prozent (Standard: Steuersatz des Teams)"
                                    },
                                    "vat_mode": {
                                        "type": "string",
                                        "description": "full, none oder reverse_charge (Standard: full)"
                                    },
                                    "currency_code": {
                                        "type": "string",
                                        "description": "EUR, USD, CHF oder GBP"
                                    },
                                    "supplier_uuid": {
                                        "type": "string",
                                        "description": "Lieferanten-UUID"
                                    },
                                    "expense_category_uuid": {
                                        "type": "string",
                                        "description": "Kategorie-UUID"
                                    },
                                    "supplier_invoice_number": {
                                        "type": "string",
                                        "description": "Rechnungsnummer des Lieferanten"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Kurze Beschreibung"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Interne Notiz"
                                    },
                                    "confirm_not_duplicate": {
                                        "type": "boolean",
                                        "description": "Bestätigt, dass ein Beleg mit derselben Rechnungsnummer keine Dublette ist (nur mit duplicate_reason)"
                                    },
                                    "duplicate_reason": {
                                        "type": "string",
                                        "description": "Begründung zu confirm_not_duplicate, 10 bis 500 Zeichen"
                                    }
                                },
                                "required": [
                                    "booking_date",
                                    "gross_amount"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/expenses/{uuid}": {
            "get": {
                "operationId": "flowaccounting.expenses-show",
                "summary": "Ausgaben-Details abrufen",
                "description": "Ausgaben-Details einschließlich der berechneten Beträge sowie has_receipt und receipt_name. intake_status zeigt den Weg durch die Prüf-Queue (needs_review, failed, reviewed …), reviewed_at den Zeitpunkt der Prüfung, duplicate_decision eine Dublettenentscheidung (not_duplicate) und missing_receipt, ob Vorsteuer angesetzt ist, aber die Rechnungsdatei fehlt.",
                "tags": [
                    "flowaccounting.expenses"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowaccounting.expenses-update",
                "summary": "Ausgabe aktualisieren",
                "description": "Ändert eine Ausgabe im Status pending. Bereits gebuchte Ausgaben bleiben unverändert und werden mit 422 abgelehnt. Eine geänderte Lieferanten-Rechnungsnummer wird wie beim Erfassen auf Dubletten geprüft (confirm_not_duplicate, duplicate_reason).",
                "tags": [
                    "flowaccounting.expenses"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "gross_amount": {
                                        "type": "number",
                                        "description": "Bruttobetrag"
                                    },
                                    "expense_category_uuid": {
                                        "type": "string",
                                        "description": "Kategorie-UUID"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Kurze Beschreibung"
                                    },
                                    "confirm_not_duplicate": {
                                        "type": "boolean",
                                        "description": "Bestätigt, dass ein Beleg mit derselben Rechnungsnummer keine Dublette ist (nur mit duplicate_reason)"
                                    },
                                    "duplicate_reason": {
                                        "type": "string",
                                        "description": "Begründung zu confirm_not_duplicate, 10 bis 500 Zeichen"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowaccounting.expenses-delete",
                "summary": "Ausgabe löschen",
                "description": "Löscht eine Ausgabe im Status pending; sonst 422.",
                "tags": [
                    "flowaccounting.expenses"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/expenses/{uuid}/receipt": {
            "post": {
                "operationId": "flowaccounting.expenses-receipt-upload",
                "summary": "Beleg hochladen",
                "description": "Hängt den Beleg als multipart/form-data an die Ausgabe. Erlaubt sind PDF, JPEG und PNG bis 10 MB; der Typ wird aus dem Dateiinhalt bestimmt. Ein vorhandener Beleg wird ersetzt, sobald der neue gespeichert ist, und bleibt als frühere Fassung erhalten. Eine gebuchte Ausgabe ohne Belegdatei nimmt die fehlende Rechnung einmal auf (Aufgabe „Beleg fehlt“); hat sie schon einen Beleg, antwortet die API mit 422 expense_booked, ist dieselbe Datei schon Beleg einer anderen Ausgabe des Teams mit 422 receipt_duplicate, bei einer Datei, die kein Beleg ist, mit 422 invalid_receipt.",
                "tags": [
                    "flowaccounting.expenses"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "550e8400-e29b-41d4-a716-446655440000",
                                        "has_receipt": true,
                                        "receipt_name": "beleg.pdf"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "file": {
                                        "type": "string",
                                        "format": "binary",
                                        "description": "Belegdatei (PDF, JPEG oder PNG, höchstens 10 MB)"
                                    }
                                },
                                "required": [
                                    "file"
                                ]
                            }
                        }
                    }
                }
            },
            "get": {
                "operationId": "flowaccounting.expenses-receipt-download",
                "summary": "Beleg herunterladen",
                "description": "Liefert die hinterlegte Belegdatei. Ohne Beleg antwortet die API mit 404. Die Datei wird vor der Auslieferung gegen ihren SHA-256 geprüft; fehlt sie oder stimmt sie nicht mehr, antwortet die API mit 409 receipt_integrity_failed. Hat die Sicherheitsprüfung beim Eingang etwas gefunden (Skript, Startaktion, Schadcode), antwortet die API mit 409 receipt_flagged und den Befunden in security_flags, bis der Aufruf acknowledge_security_findings=1 mitgibt.",
                "tags": [
                    "flowaccounting.expenses"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "acknowledge_security_findings",
                        "in": "query",
                        "required": false,
                        "description": "Bestätigt, dass eine Datei mit Sicherheitsbefund trotzdem geliefert werden soll",
                        "schema": {
                            "type": "boolean"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/octet-stream": {
                                "schema": {
                                    "type": "string",
                                    "format": "binary"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/expenses/{uuid}/book": {
            "post": {
                "operationId": "flowaccounting.expenses-book",
                "summary": "Ausgabe buchen",
                "description": "Bucht eine Ausgabe im Status pending: Sie wechselt in den Status booked und erhält das Zahlungsdatum paid_date. Erst eine gebuchte Ausgabe zählt in den Berichten, und zwar im Zeitraum ihres Zahlungsdatums. Die Reihenfolge ist: Ausgabe anlegen, Beleg hochladen, buchen. Nach dem Buchen sind Ändern, Löschen und der Austausch des Belegs über die API gesperrt (422). Das Buchen lässt sich über die API nicht rückgängig machen; eine gebuchte Ausgabe wird in der Weboberfläche korrigiert. Der Aufruf ist über den Status abgesichert: Eine Wiederholung bucht nichts und liefert 422 mit expense_booked.",
                "tags": [
                    "flowaccounting.expenses"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "550e8400-e29b-41d4-a716-446655440000",
                                        "status": "booked",
                                        "paid_date": "2026-03-14",
                                        "available_actions": []
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "paid_date": {
                                        "type": "string",
                                        "description": "Zahlungsdatum (YYYY-MM-DD), höchstens heute"
                                    }
                                },
                                "required": [
                                    "paid_date"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/expenses/{uuid}/review": {
            "post": {
                "operationId": "flowaccounting.expenses-review",
                "summary": "Beleg als geprüft markieren",
                "description": "Markiert eine offene Ausgabe aus der Prüf-Queue als geprüft (intake_status wird reviewed, reviewed_at und der Bearbeiter werden gespeichert). Gebucht wird weiter nur über POST /flowaccounting/expenses/{uuid}/book. Voraussetzung sind ein Bruttobetrag und ein Belegdatum, sonst 422 review_incomplete. Hat ein früherer Beleg denselben Lieferanten und dieselbe Rechnungsnummer (oder dieselbe Nummer und USt-IdNr.), antwortet die API mit 422 duplicate_undecided, bis der Aufruf confirm_not_duplicate mit duplicate_reason mitgibt; ohne Bestätigung bucht auch /book eine solche Ausgabe nicht (422 duplicate_undecided). Bereits gebuchte Ausgaben: 422 expense_booked.",
                "tags": [
                    "flowaccounting.expenses"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "550e8400-e29b-41d4-a716-446655440000",
                                        "status": "pending",
                                        "intake_status": "reviewed",
                                        "reviewed_at": "2026-11-26T10:00:00+01:00",
                                        "duplicate_decision": null
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "confirm_not_duplicate": {
                                        "type": "boolean",
                                        "description": "Bestätigt, dass ein Beleg mit derselben Rechnungsnummer keine Dublette ist"
                                    },
                                    "duplicate_reason": {
                                        "type": "string",
                                        "description": "Begründung zu confirm_not_duplicate, 10 bis 500 Zeichen"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/suppliers": {
            "get": {
                "operationId": "flowaccounting.suppliers-list",
                "summary": "Lieferanten auflisten",
                "description": "Ruft eine paginierte Liste aller Lieferanten des Teams ab, alphabetisch sortiert.",
                "tags": [
                    "flowaccounting.suppliers"
                ],
                "parameters": [
                    {
                        "name": "is_active",
                        "in": "query",
                        "required": false,
                        "description": "Filter: nur aktive oder nur inaktive Lieferanten",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Suchbegriff im Namen",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Anzahl pro Seite (1-200, Standard: 25)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowaccounting.suppliers-create",
                "summary": "Lieferant anlegen",
                "description": "Legt einen Lieferanten an.",
                "tags": [
                    "flowaccounting.suppliers"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name des Lieferanten"
                                    },
                                    "address": {
                                        "type": "string",
                                        "description": "Anschrift"
                                    },
                                    "vat_id": {
                                        "type": "string",
                                        "description": "Umsatzsteuer-Identifikationsnummer"
                                    },
                                    "tax_id": {
                                        "type": "string",
                                        "description": "Steuernummer"
                                    },
                                    "email": {
                                        "type": "string",
                                        "description": "E-Mail-Adresse"
                                    },
                                    "phone": {
                                        "type": "string",
                                        "description": "Telefonnummer"
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "Aktiv (Standard: true)"
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/suppliers/{uuid}": {
            "get": {
                "operationId": "flowaccounting.suppliers-show",
                "summary": "Lieferanten-Details abrufen",
                "description": "Lieferanten-Details abrufen.",
                "tags": [
                    "flowaccounting.suppliers"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowaccounting.suppliers-update",
                "summary": "Lieferant aktualisieren",
                "description": "Ändert einen Lieferanten. Es werden nur die gesendeten Felder geändert.",
                "tags": [
                    "flowaccounting.suppliers"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name des Lieferanten"
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "Aktiv"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowaccounting.suppliers-delete",
                "summary": "Lieferant löschen",
                "description": "Löscht einen Lieferanten, auf den noch keine Ausgabe gebucht ist. Andernfalls antwortet die API mit 422 und dem Hinweis, den Lieferanten zu deaktivieren.",
                "tags": [
                    "flowaccounting.suppliers"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/expense-categories": {
            "get": {
                "operationId": "flowaccounting.expense-categories-list",
                "summary": "Ausgabenkategorien auflisten",
                "description": "Ruft eine paginierte Liste aller Ausgabenkategorien des Teams ab, alphabetisch sortiert.",
                "tags": [
                    "flowaccounting.expense-categories"
                ],
                "parameters": [
                    {
                        "name": "is_active",
                        "in": "query",
                        "required": false,
                        "description": "Filter: nur aktive oder nur inaktive Kategorien",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Suchbegriff im Namen",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Anzahl pro Seite (1-200, Standard: 25)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowaccounting.expense-categories-create",
                "summary": "Ausgabenkategorie anlegen",
                "description": "Legt eine Ausgabenkategorie an. Mit parent_uuid wird sie einer übergeordneten Kategorie untergeordnet; eine Verkettung im Kreis wird mit 422 abgelehnt.",
                "tags": [
                    "flowaccounting.expense-categories"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name der Kategorie"
                                    },
                                    "number": {
                                        "type": "string",
                                        "description": "Kontonummer"
                                    },
                                    "parent_uuid": {
                                        "type": "string",
                                        "description": "UUID der übergeordneten Kategorie"
                                    },
                                    "euer_group": {
                                        "type": "string",
                                        "description": "Zuordnung in der Einnahmenüberschussrechnung"
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "Aktiv (Standard: true)"
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/expense-categories/{uuid}": {
            "get": {
                "operationId": "flowaccounting.expense-categories-show",
                "summary": "Ausgabenkategorie abrufen",
                "description": "Details einer Ausgabenkategorie einschließlich parent_uuid.",
                "tags": [
                    "flowaccounting.expense-categories"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowaccounting.expense-categories-update",
                "summary": "Ausgabenkategorie aktualisieren",
                "description": "Ändert eine Ausgabenkategorie. Es werden nur die gesendeten Felder geändert.",
                "tags": [
                    "flowaccounting.expense-categories"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name der Kategorie"
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "Aktiv"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowaccounting.expense-categories-delete",
                "summary": "Ausgabenkategorie löschen",
                "description": "Antwortet mit 422: Kategorien werden deaktiviert und nicht gelöscht. Der Endpoint besteht, damit der Grund benannt wird statt stillschweigend zu wirken.",
                "tags": [
                    "flowaccounting.expense-categories"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/income-categories": {
            "get": {
                "operationId": "flowaccounting.income-categories-list",
                "summary": "Einnahmenkategorien auflisten",
                "description": "Ruft eine paginierte Liste aller Einnahmenkategorien des Teams ab, alphabetisch sortiert.",
                "tags": [
                    "flowaccounting.income-categories"
                ],
                "parameters": [
                    {
                        "name": "is_active",
                        "in": "query",
                        "required": false,
                        "description": "Filter: nur aktive oder nur inaktive Kategorien",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "income_group",
                        "in": "query",
                        "required": false,
                        "description": "Filter: umsatz, kapital, privat oder sonstige",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Suchbegriff im Namen",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Anzahl pro Seite (1-200, Standard: 25)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowaccounting.income-categories-create",
                "summary": "Einnahmenkategorie anlegen",
                "description": "Legt eine Einnahmenkategorie an.",
                "tags": [
                    "flowaccounting.income-categories"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name der Kategorie"
                                    },
                                    "number": {
                                        "type": "string",
                                        "description": "Kontonummer"
                                    },
                                    "income_group": {
                                        "type": "string",
                                        "description": "umsatz, kapital, privat oder sonstige"
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "Aktiv (Standard: true)"
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/income-categories/{uuid}": {
            "get": {
                "operationId": "flowaccounting.income-categories-show",
                "summary": "Einnahmenkategorie abrufen",
                "description": "Details einer Einnahmenkategorie.",
                "tags": [
                    "flowaccounting.income-categories"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowaccounting.income-categories-update",
                "summary": "Einnahmenkategorie aktualisieren",
                "description": "Ändert eine Einnahmenkategorie. Es werden nur die gesendeten Felder geändert.",
                "tags": [
                    "flowaccounting.income-categories"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name der Kategorie"
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "Aktiv"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowaccounting.income-categories-delete",
                "summary": "Einnahmenkategorie löschen",
                "description": "Antwortet mit 422: Kategorien werden deaktiviert und nicht gelöscht.",
                "tags": [
                    "flowaccounting.income-categories"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/reports/{kind}": {
            "get": {
                "operationId": "flowaccounting.reports-show",
                "summary": "Bericht abrufen",
                "description": "Liefert einen Bericht für den angegebenen Zeitraum. Mögliche Werte für kind: open_items (offene Posten), revenue (Rechnungsumsatz), revenue_per_client (Umsatz je Kunde), cash_flow (Einnahmen und Ausgaben nach Zahlungseingang), euer (Einnahmenüberschussrechnung) und profit_loss (Gewinn und Verlust). client_uuid ist nur bei open_items, revenue und revenue_per_client zulässig, sonst 422. Entwürfe und stornierte Rechnungen bleiben in jedem Bericht außen vor.",
                "tags": [
                    "flowaccounting.reports"
                ],
                "parameters": [
                    {
                        "name": "kind",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "from",
                        "in": "query",
                        "required": true,
                        "description": "Beginn des Zeitraums (YYYY-MM-DD)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "required": true,
                        "description": "Ende des Zeitraums (YYYY-MM-DD, nicht vor from)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "client_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Auf einen Kunden einschränken",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Seite der Ergebnisliste, 50 Zeilen je Seite",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "report": "revenue",
                                        "from": "2026-01-01",
                                        "to": "2026-12-31",
                                        "basis": "invoice_date_excluding_drafts_and_cancellations",
                                        "totals": [
                                            {
                                                "currency_code": "EUR",
                                                "net_amount": 48250,
                                                "gross_amount": 57417.5,
                                                "invoice_count": 37
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/context": {
            "get": {
                "operationId": "flowaccounting.context-show",
                "summary": "Schreibkontext abrufen",
                "description": "Liefert die Dokumentvorgaben des Teams, die Steuersätze, die Kurzform des heute geltenden Steuerprofils (tax_profile), die Funktionen mit allowed und reason (features) und je Datensatzart die vollständige Liste der schreibbaren Felder. Damit lässt sich ein gültiger Rumpf für Angebote, Rechnungen, Rechnungskorrekturen, Ausgaben, Lieferanten und Kategorien aufbauen, ohne die Feldnamen zu erraten. Verknüpfungen erscheinen unter ihren öffentlichen Namen, etwa client_uuid statt einer internen Nummer. In tax_profile stehen vat_regime und tax_residence_country nur bei bestätigtem Profil, sonst null; default_tax_rate ist der Standardsatz neuer Positionen.",
                "tags": [
                    "flowaccounting.reports"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "defaults": {
                                            "default_currency": "EUR",
                                            "default_payment_days": 14
                                        },
                                        "tax_rates": [
                                            {
                                                "uuid": "550e8400-e29b-41d4-a716-446655440000",
                                                "name": "Regelsatz",
                                                "rate": 19
                                            }
                                        ],
                                        "tax_profile": {
                                            "exists": true,
                                            "confirmed": true,
                                            "valid_from": "0001-01-01",
                                            "tax_residence_country": "DE",
                                            "vat_regime": "standard",
                                            "charges_german_vat": true,
                                            "is_small_business": false,
                                            "vat_return_required": true,
                                            "default_tax_rate": 19,
                                            "functional_currency": "EUR",
                                            "open_questions": []
                                        },
                                        "features": [
                                            {
                                                "key": "ai_receipt_extraction",
                                                "allowed": false,
                                                "reason": "disabled"
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/tax-profile": {
            "get": {
                "operationId": "flowaccounting.tax-profile-show",
                "summary": "Steuerprofil abrufen",
                "description": "Liefert die Version des Steuerprofils, die heute oder am Tag aus date gilt, mit ihren Ableitungen: charges_german_vat (Belege dürfen deutsche Umsatzsteuer ausweisen), is_small_business (bestätigter Kleinunternehmer nach § 19 UStG), is_registered_in_germany, allows_reverse_charge_output, input_vat_deductible, vat_return_required (Umsatzsteuer-Voranmeldung für den Zeitraum ab dem Tag), default_tax_rate (Standardsatz neuer Positionen in Prozent) und functional_currency (Buchhaltungswährung). Hat das Team noch keine Version, ist exists false und alle Ableitungen beschreiben das heutige Verhalten. Mögliche Werte: vat_regime standard, small_business oder not_registered_de; vat_basis accrual (Soll) oder cash (Ist); vat_filing_frequency monthly, quarterly oder exempt.",
                "tags": [
                    "flowaccounting.tax-profile"
                ],
                "parameters": [
                    {
                        "name": "date",
                        "in": "query",
                        "required": false,
                        "description": "Stichtag (YYYY-MM-DD), Standard: heute",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "550e8400-e29b-41d4-a716-446655440000",
                                        "exists": true,
                                        "date": "2026-11-22",
                                        "valid_from": "0001-01-01",
                                        "valid_until": null,
                                        "confirmed": true,
                                        "source": "wizard",
                                        "tax_residence_country": "DE",
                                        "vat_regime": "small_business",
                                        "vat_basis": null,
                                        "vat_filing_frequency": null,
                                        "legal_form": "freelancer",
                                        "fiscal_year_start_month": 1,
                                        "open_questions": [],
                                        "charges_german_vat": false,
                                        "is_small_business": true,
                                        "is_registered_in_germany": true,
                                        "allows_reverse_charge_output": false,
                                        "input_vat_deductible": false,
                                        "vat_return_required": false,
                                        "default_tax_rate": 0,
                                        "functional_currency": "EUR",
                                        "revision": 3,
                                        "labels": {
                                            "vat_regime": "Kleinunternehmer (§ 19 UStG)"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/tax-profile/history": {
            "get": {
                "operationId": "flowaccounting.tax-profile-history",
                "summary": "Verlauf des Steuerprofils",
                "description": "Liefert alle Versionen des Steuerprofils, die älteste zuerst, in derselben Form wie GET /flowaccounting/tax-profile. valid_until ist der letzte Tag einer Version, bei der jüngsten null. Zeitraumbezogene Ableitungen gelten jeweils für den ersten Tag der Version.",
                "tags": [
                    "flowaccounting.tax-profile"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "550e8400-e29b-41d4-a716-446655440000",
                                            "valid_from": "0001-01-01",
                                            "valid_until": "2026-12-31",
                                            "vat_regime": "small_business"
                                        },
                                        {
                                            "uuid": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
                                            "valid_from": "2027-01-01",
                                            "valid_until": null,
                                            "vat_regime": "standard"
                                        }
                                    ],
                                    "meta": {
                                        "total": 2
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/features": {
            "get": {
                "operationId": "flowaccounting.features-index",
                "summary": "Funktionen abrufen",
                "description": "Liefert je FlowAccounting-Funktion, ob sie wirksam ist (allowed), und die einzelnen Ebenen: module_active (FlowAccounting aktiv), applicable (passt zum Steuerprofil), entitled (im Paket enthalten) und enabled (vom Team eingeschaltet). reason nennt die erste Ebene, die nicht erfüllt ist: module_inactive, not_applicable, not_entitled, disabled, sonst allowed.",
                "tags": [
                    "flowaccounting.tax-profile"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "key": "ai_receipt_extraction",
                                            "label": "KI-Belegauslesung",
                                            "module_active": true,
                                            "entitled": true,
                                            "applicable": true,
                                            "enabled": false,
                                            "allowed": false,
                                            "reason": "disabled"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/flowai/v1/models": {
            "servers": [
                {
                    "url": "https://creativeskyline.de",
                    "description": "FlowAI API"
                }
            ],
            "get": {
                "operationId": "flowai.models-list",
                "summary": "Modelle auflisten",
                "description": "Listet die verfügbaren Modell-Aliase des abonnementgebundenen Schlüssels auf. Der Cursor ist jeweils der öffentliche Modell-Alias.",
                "tags": [
                    "flowai.models"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "description": "Anzahl der Einträge von 1 bis 100, Standard 100",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "after",
                        "in": "query",
                        "required": false,
                        "description": "Alias aus last_id der vorherigen Seite",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "object": "list",
                                    "data": [
                                        {
                                            "id": "flowai",
                                            "object": "model",
                                            "created": 1735000000,
                                            "owned_by": "creativeskyline",
                                            "pricing": {
                                                "prompt": "0.000001",
                                                "completion": "0.000002"
                                            }
                                        }
                                    ],
                                    "has_more": false,
                                    "first_id": "flowai",
                                    "last_id": "flowai",
                                    "flowai_request_id": "01HXYZ…ULID"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/flowai/v1/models/{model_id}": {
            "servers": [
                {
                    "url": "https://creativeskyline.de",
                    "description": "FlowAI API"
                }
            ],
            "get": {
                "operationId": "flowai.models-show",
                "summary": "Ein Modell abrufen",
                "description": "Liefert einen einzelnen Eintrag der Modellliste mit Preisen, Fähigkeiten, den tatsächlich geltenden FlowAI-Grenzen und dem Abschalttermin. Die Kennung ist der Modell-Alias; mit einem Routing-Schlüssel die vollständige Anbieterkennung einschließlich enthaltener Schrägstriche.",
                "tags": [
                    "flowai.models"
                ],
                "parameters": [
                    {
                        "name": "model_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "id": "claude",
                                    "object": "model",
                                    "created": 1735000000,
                                    "owned_by": "creativeskyline",
                                    "pricing": {
                                        "prompt": "0.000003",
                                        "completion": "0.000015"
                                    },
                                    "context_length": 200000,
                                    "max_output_tokens": 64000,
                                    "capabilities": {
                                        "reasoning": true,
                                        "reasoning_levels": [
                                            "low",
                                            "medium",
                                            "high"
                                        ],
                                        "web_search": false,
                                        "web_search_forced": false,
                                        "tools": true,
                                        "tool_choice": true,
                                        "parallel_tool_calls": true,
                                        "vision": true,
                                        "json_object": false,
                                        "json_schema": false,
                                        "sampling": true,
                                        "streaming": true
                                    },
                                    "supported_parameters": [
                                        "temperature",
                                        "top_p",
                                        "max_tokens",
                                        "tools",
                                        "tool_choice",
                                        "stream"
                                    ],
                                    "flowai_limits": {
                                        "input_tokens": 200000,
                                        "max_output_tokens": 64000,
                                        "max_messages": 50,
                                        "max_payload_bytes": 131072,
                                        "max_chars_per_message": 32000
                                    },
                                    "deprecated_at": null,
                                    "flowai_request_id": "01HXYZ…ULID"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/flowai/v1/chat": {
            "servers": [
                {
                    "url": "https://creativeskyline.de",
                    "description": "FlowAI API"
                }
            ],
            "post": {
                "operationId": "flowai.chat-send",
                "summary": "Nachricht senden",
                "description": "Sendet eine Nachricht an Ihr FlowAI und liefert die Antwort samt Kennung der Unterhaltung.",
                "tags": [
                    "flowai.chat"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "object": "chat",
                                    "conversation": "018f1234-5678-7abc-9def-0123456789ab",
                                    "id": "018f9999-1111-7abc-9def-0123456789ab",
                                    "model": "claude",
                                    "status": "completed",
                                    "message": {
                                        "role": "assistant",
                                        "content": "Wir liefern innerhalb von zwei Werktagen."
                                    },
                                    "flowai_request_id": "01HXYZ…ULID"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "message": {
                                        "type": "string",
                                        "description": "Die neue Nachricht, 1 bis 32.000 Zeichen"
                                    },
                                    "conversation": {
                                        "type": "string",
                                        "format": "uuid",
                                        "description": "Kennung aus einer vorherigen Antwort; ohne Angabe beginnt eine neue Unterhaltung"
                                    },
                                    "model": {
                                        "type": "string",
                                        "description": "Modell-Alias aus GET /models; ohne Angabe gilt flowai"
                                    },
                                    "stream": {
                                        "type": "boolean",
                                        "description": "true liefert die Antwort als Server-Sent Events; Standard false"
                                    }
                                },
                                "required": [
                                    "message"
                                ]
                            },
                            "example": {
                                "message": "Fasse unsere Lieferbedingungen zusammen.",
                                "model": "claude"
                            }
                        }
                    }
                }
            }
        },
        "/api/flowai/v1/chat/{conversation_uuid}": {
            "servers": [
                {
                    "url": "https://creativeskyline.de",
                    "description": "FlowAI API"
                }
            ],
            "get": {
                "operationId": "flowai.chat-show",
                "summary": "Letzte Antwort einer Unterhaltung abrufen",
                "description": "Liefert den neuesten Zug einer Unterhaltung, ohne einen neuen zu starten.",
                "tags": [
                    "flowai.chat"
                ],
                "parameters": [
                    {
                        "name": "conversation_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "object": "chat",
                                    "conversation": "018f1234-5678-7abc-9def-0123456789ab",
                                    "id": "018f9999-1111-7abc-9def-0123456789ab",
                                    "model": "claude",
                                    "status": "completed",
                                    "message": {
                                        "role": "assistant",
                                        "content": "Wir liefern innerhalb von zwei Werktagen."
                                    },
                                    "flowai_request_id": "01HXYZ…ULID"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/flowai/v1/files": {
            "servers": [
                {
                    "url": "https://creativeskyline.de",
                    "description": "FlowAI API"
                }
            ],
            "post": {
                "operationId": "flowai.files-create",
                "summary": "Datei hochladen",
                "description": "Speichert eine Datei für spätere FlowAI-Anfragen. Verwenden Sie multipart/form-data.",
                "tags": [
                    "flowai.files"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "id": "file-018f1234-5678-7abc-9def-0123456789ab",
                                    "object": "file",
                                    "bytes": 2048,
                                    "created_at": 1735000000,
                                    "expires_at": null,
                                    "filename": "analyse.pdf",
                                    "purpose": "user_data",
                                    "status": "processed",
                                    "status_details": null,
                                    "flowai_request_id": "01HXYZ…ULID"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "file": {
                                        "type": "string",
                                        "format": "binary",
                                        "description": "Hochzuladende Datei"
                                    },
                                    "purpose": {
                                        "type": "string",
                                        "description": "user_data oder vision"
                                    }
                                },
                                "required": [
                                    "file",
                                    "purpose"
                                ]
                            }
                        }
                    }
                }
            },
            "get": {
                "operationId": "flowai.files-list",
                "summary": "Dateien auflisten",
                "description": "Listet die Dateien des Workspace mit stabilem Cursor auf.",
                "tags": [
                    "flowai.files"
                ],
                "parameters": [
                    {
                        "name": "purpose",
                        "in": "query",
                        "required": false,
                        "description": "Filter: user_data oder vision",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "order",
                        "in": "query",
                        "required": false,
                        "description": "Sortierung: asc oder desc",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "description": "Anzahl von 1 bis 100",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "after",
                        "in": "query",
                        "required": false,
                        "description": "Öffentliche Datei-ID aus last_id",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "object": "list",
                                    "data": [
                                        {
                                            "id": "file-018f1234-5678-7abc-9def-0123456789ab",
                                            "object": "file",
                                            "bytes": 2048,
                                            "filename": "analyse.pdf",
                                            "purpose": "user_data",
                                            "status": "processed"
                                        }
                                    ],
                                    "has_more": false,
                                    "first_id": "file-018f1234-5678-7abc-9def-0123456789ab",
                                    "last_id": "file-018f1234-5678-7abc-9def-0123456789ab",
                                    "flowai_request_id": "01HXYZ…ULID"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/flowai/v1/files/{file_uuid}": {
            "servers": [
                {
                    "url": "https://creativeskyline.de",
                    "description": "FlowAI API"
                }
            ],
            "get": {
                "operationId": "flowai.files-show",
                "summary": "Dateimetadaten abrufen",
                "description": "Liefert Metadaten, aber nicht den Dateiinhalt.",
                "tags": [
                    "flowai.files"
                ],
                "parameters": [
                    {
                        "name": "file_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "id": "file-018f1234-5678-7abc-9def-0123456789ab",
                                    "object": "file",
                                    "bytes": 2048,
                                    "created_at": 1735000000,
                                    "expires_at": null,
                                    "filename": "analyse.pdf",
                                    "purpose": "user_data",
                                    "status": "processed",
                                    "status_details": null,
                                    "flowai_request_id": "01HXYZ…ULID"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowai.files-delete",
                "summary": "Datei löschen",
                "description": "Löscht die gespeicherten Bytes und ihre Metadaten.",
                "tags": [
                    "flowai.files"
                ],
                "parameters": [
                    {
                        "name": "file_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "id": "file-018f1234-5678-7abc-9def-0123456789ab",
                                    "object": "file",
                                    "deleted": true,
                                    "flowai_request_id": "01HXYZ…ULID"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/flowai/v1/files/{file_uuid}/content": {
            "servers": [
                {
                    "url": "https://creativeskyline.de",
                    "description": "FlowAI API"
                }
            ],
            "get": {
                "operationId": "flowai.files-content",
                "summary": "Dateiinhalt herunterladen",
                "description": "Liefert die gespeicherten Bytes als Download mit dem ursprünglichen Medientyp.",
                "tags": [
                    "flowai.files"
                ],
                "parameters": [
                    {
                        "name": "file_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/octet-stream": {
                                "schema": {
                                    "type": "string",
                                    "format": "binary"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/flowai/v1/webhook_endpoints": {
            "servers": [
                {
                    "url": "https://creativeskyline.de",
                    "description": "FlowAI API"
                }
            ],
            "post": {
                "operationId": "flowai.webhooks-create",
                "summary": "Webhook anlegen",
                "description": "Registriert ein HTTPS-Ziel und gibt das Signatur-Secret einmalig zurück.",
                "tags": [
                    "flowai.webhooks"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "id": "018f1234-5678-7abc-9def-0123456789ab",
                                    "object": "webhook_endpoint",
                                    "url": "https://example.com/flowai",
                                    "events": [
                                        "response.completed"
                                    ],
                                    "description": "Produktiv",
                                    "is_active": true,
                                    "deactivated_at": null,
                                    "deactivation_reason": null,
                                    "last_delivered_at": null,
                                    "created": 1735000000,
                                    "secret": "whsec_example",
                                    "flowai_request_id": "01HXYZ…ULID"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "url": {
                                        "type": "string",
                                        "description": "Öffentlich erreichbare HTTPS-Adresse, maximal 2.048 Zeichen"
                                    },
                                    "events": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Mindestens ein unterstützter Ereignistyp"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Optionale Beschreibung, maximal 255 Zeichen"
                                    }
                                },
                                "required": [
                                    "url",
                                    "events"
                                ]
                            }
                        }
                    }
                }
            },
            "get": {
                "operationId": "flowai.webhooks-list",
                "summary": "Webhooks auflisten",
                "description": "Listet die Webhook-Ziele des Workspace ohne Secrets auf.",
                "tags": [
                    "flowai.webhooks"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "description": "Anzahl von 1 bis 100",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "after",
                        "in": "query",
                        "required": false,
                        "description": "UUID aus last_id",
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "object": "list",
                                    "data": [
                                        {
                                            "id": "018f1234-5678-7abc-9def-0123456789ab",
                                            "object": "webhook_endpoint",
                                            "url": "https://example.com/flowai",
                                            "events": [
                                                "response.completed"
                                            ],
                                            "is_active": true
                                        }
                                    ],
                                    "has_more": false,
                                    "first_id": "018f1234-5678-7abc-9def-0123456789ab",
                                    "last_id": "018f1234-5678-7abc-9def-0123456789ab",
                                    "flowai_request_id": "01HXYZ…ULID"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/flowai/v1/webhook_endpoints/{webhook_uuid}": {
            "servers": [
                {
                    "url": "https://creativeskyline.de",
                    "description": "FlowAI API"
                }
            ],
            "get": {
                "operationId": "flowai.webhooks-show",
                "summary": "Webhook abrufen",
                "description": "Liefert ein Webhook-Ziel ohne Signatur-Secret.",
                "tags": [
                    "flowai.webhooks"
                ],
                "parameters": [
                    {
                        "name": "webhook_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "id": "018f1234-5678-7abc-9def-0123456789ab",
                                    "object": "webhook_endpoint",
                                    "url": "https://example.com/flowai",
                                    "events": [
                                        "response.completed"
                                    ],
                                    "description": "Produktiv",
                                    "is_active": true,
                                    "deactivated_at": null,
                                    "deactivation_reason": null,
                                    "last_delivered_at": null,
                                    "created": 1735000000,
                                    "flowai_request_id": "01HXYZ…ULID"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "patch": {
                "operationId": "flowai.webhooks-update",
                "summary": "Webhook ändern",
                "description": "Ändert Ziel, Ereignisse, Beschreibung oder Aktivierungsstatus.",
                "tags": [
                    "flowai.webhooks"
                ],
                "parameters": [
                    {
                        "name": "webhook_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "id": "018f1234-5678-7abc-9def-0123456789ab",
                                    "object": "webhook_endpoint",
                                    "url": "https://example.com/flowai",
                                    "events": [
                                        "response.completed"
                                    ],
                                    "description": "Aktualisiert",
                                    "is_active": true,
                                    "deactivated_at": null,
                                    "deactivation_reason": null,
                                    "last_delivered_at": null,
                                    "created": 1735000000,
                                    "flowai_request_id": "01HXYZ…ULID"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "url": {
                                        "type": "string",
                                        "description": "Neue öffentlich erreichbare HTTPS-Adresse"
                                    },
                                    "events": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Neue Liste unterstützter Ereignistypen"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Neue Beschreibung oder null"
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "Deaktiviert oder reaktiviert das Ziel"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowai.webhooks-delete",
                "summary": "Webhook löschen",
                "description": "Löscht das Ziel und seinen Zustellungsverlauf.",
                "tags": [
                    "flowai.webhooks"
                ],
                "parameters": [
                    {
                        "name": "webhook_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "id": "018f1234-5678-7abc-9def-0123456789ab",
                                    "object": "webhook_endpoint",
                                    "deleted": true,
                                    "flowai_request_id": "01HXYZ…ULID"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/flowai/v1/webhook_endpoints/{webhook_uuid}/deliveries": {
            "servers": [
                {
                    "url": "https://creativeskyline.de",
                    "description": "FlowAI API"
                }
            ],
            "get": {
                "operationId": "flowai.webhook-deliveries-list",
                "summary": "Zustellungen auflisten",
                "description": "Listet Zustellungsversuche mit Status und Fehlerdetails auf.",
                "tags": [
                    "flowai.webhooks"
                ],
                "parameters": [
                    {
                        "name": "webhook_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "pending, delivered, failed oder exhausted",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "description": "Anzahl von 1 bis 100",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "after",
                        "in": "query",
                        "required": false,
                        "description": "UUID aus last_id",
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "object": "list",
                                    "data": [
                                        {
                                            "id": "018f1234-5678-7abc-9def-0123456789ab",
                                            "object": "webhook_delivery",
                                            "event_type": "response.completed",
                                            "status": "delivered",
                                            "attempts": 1,
                                            "http_status": 200,
                                            "failure_kind": null,
                                            "created": 1735000000,
                                            "delivered_at": 1735000001,
                                            "failed_at": null,
                                            "next_attempt_at": null,
                                            "response_id": "resp_01HXYZ…"
                                        }
                                    ],
                                    "has_more": false,
                                    "first_id": "018f1234-5678-7abc-9def-0123456789ab",
                                    "last_id": "018f1234-5678-7abc-9def-0123456789ab",
                                    "flowai_request_id": "01HXYZ…ULID"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/flowai/v1/webhook_endpoints/{webhook_uuid}/test": {
            "servers": [
                {
                    "url": "https://creativeskyline.de",
                    "description": "FlowAI API"
                }
            ],
            "post": {
                "operationId": "flowai.webhooks-test",
                "summary": "Testzustellung senden",
                "description": "Stellt eine synthetische Zustellung vom Typ webhook.test in die Warteschlange. Das Ergebnis erscheint im Zustellungsverlauf wie jede andere Zustellung.",
                "tags": [
                    "flowai.webhooks"
                ],
                "parameters": [
                    {
                        "name": "webhook_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "object": "webhook_delivery",
                                    "uuid": "018f1234-5678-7abc-9def-0123456789ab",
                                    "status": "pending",
                                    "flowai_request_id": "01HXYZ…ULID"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/flowai/v1/webhook_endpoints/{webhook_uuid}/rotate_secret": {
            "servers": [
                {
                    "url": "https://creativeskyline.de",
                    "description": "FlowAI API"
                }
            ],
            "post": {
                "operationId": "flowai.webhooks-rotate-secret",
                "summary": "Secret wechseln",
                "description": "Erzeugt ein neues Signatur-Secret und gibt es einmalig zurück. Das bisherige Secret bleibt bis zum genannten Zeitpunkt gültig. Benötigt einen Verwaltungsschlüssel.",
                "tags": [
                    "flowai.webhooks"
                ],
                "parameters": [
                    {
                        "name": "webhook_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "object": "webhook_endpoint",
                                    "uuid": "018f1234-5678-7abc-9def-0123456789ab",
                                    "secret": "whsec_example",
                                    "secondary_secret_expires_at": 1735086400,
                                    "flowai_request_id": "01HXYZ…ULID"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowcall/context": {
            "get": {
                "operationId": "flowcall.flowcall-context",
                "summary": "Projekte, Rechte und Begriffe abrufen",
                "description": "Liefert alle erreichbaren Telefonie-Projekte mit den eigenen Rechten darin, die zehn Berechtigungsnamen, die üblichen Gesprächsergebnisse und die Angabe, ob dieser Schlüssel als Inhaber handelt. Ein Aufruf, damit ein Programm die Begriffe dieser API nicht fest einbauen muss.",
                "tags": [
                    "flowcall.context"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "acts_as_owner": false,
                                        "permission_flags": [
                                            "team_verwalten",
                                            "team_rollen_verwalten",
                                            "callhistory_all",
                                            "projekte_verwalten",
                                            "projekt_bearbeiten",
                                            "projekt_alle_leads",
                                            "projekt_leads_export",
                                            "projekt_telefonie",
                                            "projekt_lead_hinzufuegen",
                                            "projekt_unstimmigkeiten"
                                        ],
                                        "lead_statuses": [
                                            "Offen",
                                            "Übersprungen",
                                            "Kein Interesse",
                                            "Keinen erreicht",
                                            "Falsche Rufnummer",
                                            "AP nicht im hause",
                                            "Wiedervorlage",
                                            "E-Mail senden",
                                            "Termin vereinbart"
                                        ],
                                        "projects": [
                                            {
                                                "uuid": "8f1c4a72-3d95-4e06-b1a8-5c7e2d0f9b41",
                                                "name": "Herbstaktion Handwerk",
                                                "status": "active",
                                                "rights": {
                                                    "projekt_telefonie": true,
                                                    "projekt_alle_leads": true,
                                                    "projekte_verwalten": false
                                                }
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowcall/projects": {
            "get": {
                "operationId": "flowcall.flowcall-projects-index",
                "summary": "Telefonie-Projekte auflisten",
                "description": "Alle Telefonie-Projekte, die dieser Schlüssel erreicht, neueste zuerst.",
                "tags": [
                    "flowcall.projects"
                ],
                "parameters": [
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Einträge pro Seite, 1 bis 200, Standard 25.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Seitenzahl, Standard 1.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "8f1c4a72-3d95-4e06-b1a8-5c7e2d0f9b41",
                                            "name": "Herbstaktion Handwerk",
                                            "status": "active",
                                            "call_again_after_attempts": "3",
                                            "appointment_link": "https://termine.example.com/herbst",
                                            "email_service": true,
                                            "sender_name": "Vertrieb",
                                            "sender_email": "vertrieb@example.com",
                                            "form_fields": [],
                                            "created_at": "2026-09-01T09:00:00+02:00",
                                            "updated_at": "2026-09-18T11:20:00+02:00"
                                        }
                                    ],
                                    "meta": {
                                        "current_page": 1,
                                        "per_page": 25,
                                        "total": 1,
                                        "last_page": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowcall.flowcall-projects-store",
                "summary": "Ein Telefonie-Projekt anlegen",
                "description": "Macht aus einem bestehenden Kundenprojekt ein Telefonie-Projekt, oder legt beides in einem Zug an. Genau eines von project_uuid und client_uuid wird benötigt. Trägt das Kundenprojekt bereits eine Telefonie-Konfiguration, antwortet der Aufruf mit HTTP 422 und dem Fehler already_exists. Diese Berechtigung wird teamweit geprüft, weil ein Projekt, das es noch nicht gibt, keine eigene Berechtigungszeile haben kann.",
                "tags": [
                    "flowcall.projects"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "8f1c4a72-3d95-4e06-b1a8-5c7e2d0f9b41",
                                        "name": "Herbstaktion Handwerk",
                                        "status": "active",
                                        "call_again_after_attempts": "3",
                                        "appointment_link": null,
                                        "email_service": false,
                                        "sender_name": null,
                                        "sender_email": null,
                                        "form_fields": []
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "project_uuid": {
                                        "type": "string",
                                        "description": "Ein bestehendes Kundenprojekt des Teams. Pflicht, wenn client_uuid fehlt."
                                    },
                                    "client_uuid": {
                                        "type": "string",
                                        "description": "Ein Kunde des Teams, unter dem ein neues Projekt entsteht. Pflicht, wenn project_uuid fehlt."
                                    },
                                    "name": {
                                        "type": "string",
                                        "description": "Name des neuen Projekts, höchstens 255 Zeichen. Pflicht zusammen mit client_uuid."
                                    },
                                    "appointment_link": {
                                        "type": "string",
                                        "description": "Adresse der Terminbuchung, http oder https, höchstens 2048 Zeichen."
                                    },
                                    "call_again_after_attempts": {
                                        "type": "string",
                                        "description": "Nach wie vielen erfolglosen Versuchen erneut angerufen wird. Freitext, höchstens 10 Zeichen, Standard 3."
                                    },
                                    "email_service": {
                                        "type": "boolean",
                                        "description": "Schaltet den E-Mail-Versand des Projekts ein."
                                    },
                                    "sender_name": {
                                        "type": "string",
                                        "description": "Absendername, wird nur bei eingeschaltetem E-Mail-Versand gespeichert."
                                    },
                                    "sender_email": {
                                        "type": "string",
                                        "description": "Absenderadresse, wird nur bei eingeschaltetem E-Mail-Versand gespeichert."
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowcall/projects/{uuid}": {
            "get": {
                "operationId": "flowcall.flowcall-projects-show",
                "summary": "Ein Telefonie-Projekt abrufen",
                "description": "Ein Projekt mit den eigenen Rechten darin, dem Zeitraum, dem vereinbarten Umfang, der Beschreibung und den Zahlen der Übersicht. Unbearbeitet meint dabei einen Lead ganz ohne Ergebniszeile, was etwas anderes ist als ein Lead mit dem Ergebnis Offen.",
                "tags": [
                    "flowcall.projects"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "8f1c4a72-3d95-4e06-b1a8-5c7e2d0f9b41",
                                        "name": "Herbstaktion Handwerk",
                                        "status": "active",
                                        "call_again_after_attempts": "3",
                                        "email_service": true,
                                        "form_fields": [],
                                        "rights": {
                                            "projekt_telefonie": true,
                                            "projekt_alle_leads": true
                                        },
                                        "start_date": "2026-09-01",
                                        "end_date": "2026-12-31",
                                        "hours": "40 pro Monat",
                                        "information": "Zielgruppe Handwerksbetriebe ab zehn Mitarbeitenden.",
                                        "stats": {
                                            "leads": 1240,
                                            "locked": 3,
                                            "untouched": 480,
                                            "by_status": {
                                                "Termin vereinbart": 62,
                                                "Kein Interesse": 190
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowcall/projects/{uuid}/settings": {
            "put": {
                "operationId": "flowcall.flowcall-projects-settings",
                "summary": "Die Einstellungen eines Projekts ändern",
                "description": "Ändert die Telefonie-Einstellungen, die keine Zugangsdaten sind. Ein weggelassenes Feld bleibt unverändert. Wird der E-Mail-Versand abgeschaltet, verliert das Projekt seine Absenderangaben, damit es nie unter einem Absender weiterschreibt, an den sich niemand erinnert. Benötigt projekte_verwalten.",
                "tags": [
                    "flowcall.projects"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "8f1c4a72-3d95-4e06-b1a8-5c7e2d0f9b41",
                                        "name": "Herbstaktion Handwerk",
                                        "status": "active",
                                        "call_again_after_attempts": "5",
                                        "appointment_link": "https://termine.example.com/herbst",
                                        "email_service": false,
                                        "sender_name": null,
                                        "sender_email": null,
                                        "form_fields": []
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "appointment_link": {
                                        "type": "string",
                                        "description": "Adresse der Terminbuchung, http oder https, höchstens 2048 Zeichen, oder null."
                                    },
                                    "call_again_after_attempts": {
                                        "type": "string",
                                        "description": "Freitext, höchstens 10 Zeichen, oder null."
                                    },
                                    "email_service": {
                                        "type": "boolean",
                                        "description": "Schaltet den E-Mail-Versand des Projekts ein oder aus."
                                    },
                                    "sender_name": {
                                        "type": "string",
                                        "description": "Absendername, höchstens 255 Zeichen, oder null."
                                    },
                                    "sender_email": {
                                        "type": "string",
                                        "description": "Absenderadresse, höchstens 255 Zeichen, oder null."
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowcall/projects/{uuid}/dates": {
            "put": {
                "operationId": "flowcall.flowcall-projects-dates",
                "summary": "Zeitraum, Umfang und Beschreibung ändern",
                "description": "Setzt den Zeitraum, den vereinbarten Umfang und die Projektbeschreibung. Der Umfang ist Freitext, weil dort Angaben wie 40 pro Monat stehen, die eine reine Zahl zurückweisen würde. Benötigt projekte_verwalten.",
                "tags": [
                    "flowcall.projects"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "start_date": "2026-09-01",
                                        "end_date": "2026-12-31",
                                        "hours": "40 pro Monat",
                                        "information": "Zielgruppe Handwerksbetriebe ab zehn Mitarbeitenden."
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "start_date": {
                                        "type": "string",
                                        "description": "Beginn im Format JJJJ-MM-TT, oder null."
                                    },
                                    "end_date": {
                                        "type": "string",
                                        "description": "Ende im Format JJJJ-MM-TT, nicht vor dem Beginn, oder null."
                                    },
                                    "hours": {
                                        "type": "string",
                                        "description": "Vereinbarter Umfang als Freitext, höchstens 255 Zeichen, oder null."
                                    },
                                    "information": {
                                        "type": "string",
                                        "description": "Beschreibung des Projekts, höchstens 200000 Zeichen, oder null."
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowcall/projects/{uuid}/status": {
            "put": {
                "operationId": "flowcall.flowcall-projects-status",
                "summary": "Ein Projekt ein- oder ausschalten",
                "description": "Setzt den Status des Kundenprojekts auf active oder inactive. Der Status wirkt über FlowCall hinaus, weil er auf dem Kundenprojekt liegt. Benötigt projekte_verwalten.",
                "tags": [
                    "flowcall.projects"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "8f1c4a72-3d95-4e06-b1a8-5c7e2d0f9b41",
                                        "name": "Herbstaktion Handwerk",
                                        "status": "inactive",
                                        "email_service": true,
                                        "form_fields": []
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "status": {
                                        "type": "string",
                                        "description": "active oder inactive. Ein anderer Wert wird zurückgewiesen."
                                    }
                                },
                                "required": [
                                    "status"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowcall/projects/{uuid}/leads/unworked": {
            "delete": {
                "operationId": "flowcall.flowcall-projects-leads-unworked",
                "summary": "Unbearbeitete Leads eines Projekts löschen",
                "description": "Entfernt jeden Lead des Projekts, den niemand angefasst hat. Unbearbeitet heißt: weder ein Ergebnis noch ein Kommentar. Ein Lead, der einmal angerufen wurde, wird davon nie erfasst. Benötigt projekte_verwalten.",
                "tags": [
                    "flowcall.projects"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "deleted": 480
                                    },
                                    "message": "480 unbearbeitete Leads wurden gelöscht."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowcall/projects/{uuid}/guideline": {
            "get": {
                "operationId": "flowcall.flowcall-guideline-show",
                "summary": "Den Gesprächsleitfaden abrufen",
                "description": "Liefert den gemeinsamen Leitfaden des Projekts oder die eigene Fassung. Benötigt projekt_bearbeiten oder projekt_telefonie.",
                "tags": [
                    "flowcall.guideline"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "type",
                        "in": "query",
                        "required": false,
                        "description": "original oder user. Standard ist original.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "d4a9b021-6e37-4c58-90f1-2b8c5e7d0a63",
                                        "type": "original",
                                        "content": "Guten Tag, mein Name ist ...",
                                        "updated_at": "2026-09-14T10:05:00+02:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowcall.flowcall-guideline-update",
                "summary": "Den Gesprächsleitfaden schreiben",
                "description": "Schreibt den Leitfaden. Die gemeinsame Fassung benötigt projekt_bearbeiten, die eigene Fassung projekt_telefonie.",
                "tags": [
                    "flowcall.guideline"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "d4a9b021-6e37-4c58-90f1-2b8c5e7d0a63",
                                        "type": "original",
                                        "content": "Guten Tag, mein Name ist ...",
                                        "updated_at": "2026-09-20T08:30:00+02:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "content": {
                                        "type": "string",
                                        "description": "Der Text, höchstens 200000 Zeichen."
                                    },
                                    "type": {
                                        "type": "string",
                                        "description": "original oder user. Standard ist original."
                                    }
                                },
                                "required": [
                                    "content"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowcall/projects/{uuid}/form": {
            "get": {
                "operationId": "flowcall.flowcall-form-show",
                "summary": "Das Gesprächsformular abrufen",
                "description": "Die Felder, die während eines Gesprächs ausgefüllt werden. Benötigt projekt_bearbeiten oder projekt_telefonie.",
                "tags": [
                    "flowcall.guideline"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "fields": [
                                            {
                                                "label": "Anzahl Mitarbeitende",
                                                "typ": "number",
                                                "placeholder": "z. B. 15"
                                            },
                                            {
                                                "label": "Interesse an",
                                                "typ": "select",
                                                "optionen": [
                                                    "Webseite",
                                                    "Wartung"
                                                ]
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowcall.flowcall-form-update",
                "summary": "Das Gesprächsformular ersetzen",
                "description": "Ersetzt die Felderliste vollständig. Eine leere Liste entfernt das Formular. Benötigt projekte_verwalten.",
                "tags": [
                    "flowcall.guideline"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "fields": [
                                            {
                                                "label": "Anzahl Mitarbeitende",
                                                "typ": "number",
                                                "placeholder": "z. B. 15"
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "fields": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Die vollständige Felderliste. Das Feld muss vorhanden sein, darf aber leer sein.",
                                        "properties": {
                                            "*.label": {
                                                "type": "string",
                                                "description": "Beschriftung des Feldes, höchstens 255 Zeichen."
                                            },
                                            "*.typ": {
                                                "type": "string",
                                                "description": "text, textarea, select, checkbox, radio, date oder number."
                                            },
                                            "*.placeholder": {
                                                "type": "string",
                                                "description": "Platzhaltertext, höchstens 255 Zeichen."
                                            },
                                            "*.optionen": {
                                                "type": "array",
                                                "items": [],
                                                "description": "Auswahlmöglichkeiten für select, checkbox und radio, je höchstens 255 Zeichen."
                                            }
                                        }
                                    }
                                },
                                "required": [
                                    "fields"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowcall/projects/{uuid}/imports": {
            "get": {
                "operationId": "flowcall.flowcall-imports-index",
                "summary": "Importe eines Projekts auflisten",
                "description": "Die hochgeladenen Leadlisten eines Projekts, neueste zuerst. Der Zustand ist eine kleine Kette: uploaded heißt, die Datei liegt vor und nichts ist geschehen, queued heißt, die Zuordnung steht und die Arbeit wartet, processing heißt, sie läuft, danach finished oder failed. Benötigt projekte_verwalten.",
                "tags": [
                    "flowcall.imports"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Einträge pro Seite, 1 bis 200, Standard 25.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Seitenzahl, Standard 1.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "b20e6c47-91fd-4a35-8c07-3e1b9d5a7f28",
                                            "status": "finished",
                                            "filename": "handwerk-september.csv",
                                            "total_rows": 1240,
                                            "processed_rows": 1240,
                                            "mapping": {
                                                "Firma": "firma",
                                                "Telefon": "phone_numbers:Zentrale",
                                                "Notiz": null
                                            },
                                            "error_message": null,
                                            "created_at": "2026-09-05T14:02:00+02:00",
                                            "updated_at": "2026-09-05T14:09:00+02:00"
                                        }
                                    ],
                                    "meta": {
                                        "current_page": 1,
                                        "per_page": 25,
                                        "total": 1,
                                        "last_page": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowcall.flowcall-imports-store",
                "summary": "Eine Leadliste hochladen",
                "description": "Nimmt eine Leadliste als multipart/form-data entgegen und antwortet mit HTTP 201. Ohne mapping trägt die Antwort die Spaltenüberschriften der Datei und die möglichen Zielfelder, und der Import wartet. Mit mapping startet er sofort; eine unbrauchbare Zuordnung antwortet mit HTTP 422 und dem Fehler invalid_mapping. Benötigt projekte_verwalten.",
                "tags": [
                    "flowcall.imports"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "b20e6c47-91fd-4a35-8c07-3e1b9d5a7f28",
                                        "status": "uploaded",
                                        "filename": "handwerk-september.csv",
                                        "total_rows": 0,
                                        "processed_rows": 0,
                                        "mapping": null,
                                        "error_message": null,
                                        "headers": [
                                            "Firma",
                                            "Telefon",
                                            "Notiz"
                                        ],
                                        "mappable_fields": [
                                            "firma",
                                            "ansprechpartner",
                                            "vorname",
                                            "nachname",
                                            "anschrift",
                                            "strasse",
                                            "hausnummer",
                                            "plz",
                                            "stadt",
                                            "bundesland",
                                            "land",
                                            "phone_numbers",
                                            "emails",
                                            "websites"
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "file": {
                                        "type": "string",
                                        "format": "binary",
                                        "description": "Die Leadliste als txt, csv, xls oder xlsx, höchstens 50 MB."
                                    },
                                    "mapping": {
                                        "type": "object",
                                        "description": "Zuordnung Spaltenüberschrift zu Zielfeld. Ein Wert darf hinter einem Doppelpunkt die Bezeichnung einer Wertesammlung tragen, etwa emails:Allgemein. null bedeutet, die Spalte wird übergangen."
                                    },
                                    "url": {
                                        "type": "string",
                                        "description": "Wird ausdrücklich zurückgewiesen. Eine Datei wird hochgeladen, nicht von einer Adresse geholt."
                                    }
                                },
                                "required": [
                                    "file"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowcall/projects/{uuid}/imports/{importUuid}/mapping": {
            "put": {
                "operationId": "flowcall.flowcall-imports-mapping",
                "summary": "Die Spaltenzuordnung eines Imports setzen",
                "description": "Vereinbart die Spaltenzuordnung einer hochgeladenen Liste und übergibt den Import an die Warteschlange. Jede Spaltenüberschrift der Datei gehört in die Zuordnung, auch die, die auf nichts abgebildet wird; sie trägt dann den Wert null. Eine unbrauchbare Zuordnung antwortet mit HTTP 422 und dem Fehler invalid_mapping. Benötigt projekte_verwalten.",
                "tags": [
                    "flowcall.imports"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "importUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "b20e6c47-91fd-4a35-8c07-3e1b9d5a7f28",
                                        "status": "queued",
                                        "filename": "handwerk-september.csv",
                                        "total_rows": 0,
                                        "processed_rows": 0,
                                        "mapping": {
                                            "Firma": "firma",
                                            "Telefon": "phone_numbers:Zentrale",
                                            "Notiz": null
                                        },
                                        "error_message": null
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "mapping": {
                                        "type": "object",
                                        "description": "Zuordnung Spaltenüberschrift zu Zielfeld, mindestens ein Eintrag. Ein Wert darf hinter einem Doppelpunkt die Bezeichnung einer Wertesammlung tragen, etwa emails:Allgemein. null bedeutet, die Spalte wird übergangen."
                                    }
                                },
                                "required": [
                                    "mapping"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowcall/projects/{uuid}/imports/{importUuid}/retry": {
            "post": {
                "operationId": "flowcall.flowcall-imports-retry",
                "summary": "Einen Import erneut starten",
                "description": "Startet einen fehlgeschlagenen Import mit der Zuordnung, die er bereits trägt. Ein Import in einem anderen Zustand antwortet mit HTTP 409 und dem Fehler not_retryable. Benötigt projekte_verwalten.",
                "tags": [
                    "flowcall.imports"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "importUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "b20e6c47-91fd-4a35-8c07-3e1b9d5a7f28",
                                        "status": "queued",
                                        "filename": "handwerk-september.csv",
                                        "total_rows": 1240,
                                        "processed_rows": 0,
                                        "error_message": null
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowcall/projects/{uuid}/exports": {
            "get": {
                "operationId": "flowcall.flowcall-exports-index",
                "summary": "Exporte eines Projekts auflisten",
                "description": "Die Exporte eines Projekts mit ihrem Zustand und ihrer Ablauffrist. Benötigt projekt_leads_export.",
                "tags": [
                    "flowcall.exports"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Einträge pro Seite, 1 bis 200, Standard 25.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Seitenzahl, Standard 1.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "6ad3f158-70c2-4b91-a5de-0f4c8b26e719",
                                            "status": "completed",
                                            "recipient_email": "vertrieb@example.com",
                                            "filename": "leads-herbstaktion.xlsx",
                                            "expires_at": "2026-09-21T14:02:00+02:00",
                                            "expired": false,
                                            "created_at": "2026-09-20T14:02:00+02:00"
                                        }
                                    ],
                                    "meta": {
                                        "current_page": 1,
                                        "per_page": 25,
                                        "total": 1,
                                        "last_page": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowcall.flowcall-exports-store",
                "summary": "Einen Export starten",
                "description": "Stellt einen Export der Leads in die Warteschlange und antwortet mit HTTP 202. Ohne recipient_email geht die Ankündigung an die eigene Adresse. Benötigt projekt_leads_export.",
                "tags": [
                    "flowcall.exports"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "6ad3f158-70c2-4b91-a5de-0f4c8b26e719",
                                        "status": "pending",
                                        "recipient_email": "vertrieb@example.com",
                                        "filename": null,
                                        "expires_at": null,
                                        "expired": false,
                                        "created_at": "2026-09-20T14:02:00+02:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "recipient_email": {
                                        "type": "string",
                                        "description": "Empfänger der Ankündigung. Standard ist die eigene Adresse."
                                    },
                                    "status": {
                                        "type": "string",
                                        "description": "Schränkt auf ein Gesprächsergebnis ein. Der Wert all umfasst alle Leads und ist der Standard."
                                    },
                                    "include_call_results": {
                                        "type": "boolean",
                                        "description": "Nimmt den Gesprächsverlauf mit in die Datei."
                                    },
                                    "max_call_results": {
                                        "type": "integer",
                                        "description": "Wie viele Einträge des Verlaufs je Lead, 1 bis 100, Standard 5."
                                    },
                                    "include_comments": {
                                        "type": "boolean",
                                        "description": "Nimmt die Kommentare mit in die Datei."
                                    },
                                    "max_comments": {
                                        "type": "integer",
                                        "description": "Wie viele Kommentare je Lead, 1 bis 100, Standard 5."
                                    },
                                    "highlight_rows": {
                                        "type": "boolean",
                                        "description": "Hebt die Zeilen nach ihrem Gesprächsergebnis farblich hervor."
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowcall/projects/{uuid}/exports/{exportUuid}/download": {
            "get": {
                "operationId": "flowcall.flowcall-exports-download",
                "summary": "Eine fertige Exportdatei abrufen",
                "description": "Liefert die fertige Datei als Download. Ein Export, der noch läuft, fehlgeschlagen oder abgelaufen ist, antwortet mit HTTP 409 und dem Fehler not_ready. Ist die Datei nicht mehr vorhanden, antwortet der Abruf mit HTTP 410 und dem Fehler file_missing. Benötigt projekt_leads_export.",
                "tags": [
                    "flowcall.exports"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "exportUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/octet-stream": {
                                "schema": {
                                    "type": "string",
                                    "format": "binary"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowcall/leads": {
            "get": {
                "operationId": "flowcall.flowcall-leads-index",
                "summary": "Leads auflisten",
                "description": "Die Leads aller erreichbaren Projekte, neueste zuerst, gefiltert und seitenweise. Ohne project_uuid umfasst die Liste jedes Projekt, das dieser Schlüssel sieht.",
                "tags": [
                    "flowcall.leads"
                ],
                "parameters": [
                    {
                        "name": "project_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Auf ein Telefonie-Projekt einschränken.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "Nur Leads mit diesem Gesprächsergebnis, etwa Termin vereinbart.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "assigned_user_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Nur Leads, die diesem Teammitglied zugeordnet sind.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Sucht in Firma, Ansprechpartner, Vorname, Nachname und Stadt.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "follow_up_due",
                        "in": "query",
                        "required": false,
                        "description": "Nur Leads, deren Wiedervorlage heute fällig oder überfällig ist.",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "locked",
                        "in": "query",
                        "required": false,
                        "description": "Nur Leads, die gerade in Bearbeitung sind, oder nur die freien.",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "untouched",
                        "in": "query",
                        "required": false,
                        "description": "Nur Leads ganz ohne Ergebniszeile.",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Einträge pro Seite, 1 bis 200, Standard 25.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Seitenzahl, Standard 1.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "f37a2d08-5b14-4e9c-8207-6d0a1f8c3b52",
                                            "project_uuid": "8f1c4a72-3d95-4e06-b1a8-5c7e2d0f9b41",
                                            "company": "Mustermann Bedachungen",
                                            "contact_person": "Frau Keller",
                                            "first_name": null,
                                            "last_name": null,
                                            "address": null,
                                            "street": "Hauptstraße",
                                            "house_number": "12",
                                            "postcode": "50667",
                                            "city": "Köln",
                                            "state": "Nordrhein-Westfalen",
                                            "country": "Deutschland",
                                            "phone_numbers": [
                                                {
                                                    "label": "Zentrale",
                                                    "value": "0221 1234567"
                                                }
                                            ],
                                            "emails": [
                                                {
                                                    "label": "Allgemein",
                                                    "value": "info@example.com"
                                                }
                                            ],
                                            "websites": [],
                                            "extra": [],
                                            "form_data": [],
                                            "locked": false,
                                            "locked_until": null,
                                            "status": "Wiedervorlage",
                                            "created_at": "2026-09-05T14:09:00+02:00",
                                            "updated_at": "2026-09-19T16:42:00+02:00"
                                        }
                                    ],
                                    "meta": {
                                        "current_page": 1,
                                        "per_page": 25,
                                        "total": 1,
                                        "last_page": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowcall.flowcall-leads-store",
                "summary": "Einen Lead anlegen",
                "description": "Legt einen Lead in einem Telefonie-Projekt an und antwortet mit HTTP 201. Die Kennung vergibt die Plattform; eine eigene Referenz gehört in extra. Benötigt projekt_lead_hinzufuegen.",
                "tags": [
                    "flowcall.leads"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "f37a2d08-5b14-4e9c-8207-6d0a1f8c3b52",
                                        "project_uuid": "8f1c4a72-3d95-4e06-b1a8-5c7e2d0f9b41",
                                        "company": "Mustermann Bedachungen",
                                        "contact_person": "Frau Keller",
                                        "city": "Köln",
                                        "phone_numbers": [
                                            {
                                                "label": "Zentrale",
                                                "value": "0221 1234567"
                                            }
                                        ],
                                        "emails": [],
                                        "websites": [],
                                        "extra": [],
                                        "form_data": [],
                                        "locked": false,
                                        "locked_until": null
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "project_uuid": {
                                        "type": "string",
                                        "description": "Das Telefonie-Projekt, angesprochen über die UUID des Kundenprojekts."
                                    },
                                    "company": {
                                        "type": "string",
                                        "description": "Firma, höchstens 255 Zeichen."
                                    },
                                    "contact_person": {
                                        "type": "string",
                                        "description": "Ansprechpartner, höchstens 255 Zeichen."
                                    },
                                    "first_name": {
                                        "type": "string",
                                        "description": "Vorname, höchstens 255 Zeichen."
                                    },
                                    "last_name": {
                                        "type": "string",
                                        "description": "Nachname, höchstens 255 Zeichen."
                                    },
                                    "address": {
                                        "type": "string",
                                        "description": "Vollständige Anschrift als ein Feld, höchstens 1000 Zeichen."
                                    },
                                    "street": {
                                        "type": "string",
                                        "description": "Straße, höchstens 255 Zeichen."
                                    },
                                    "house_number": {
                                        "type": "string",
                                        "description": "Hausnummer, höchstens 50 Zeichen."
                                    },
                                    "postcode": {
                                        "type": "string",
                                        "description": "Postleitzahl, höchstens 20 Zeichen."
                                    },
                                    "city": {
                                        "type": "string",
                                        "description": "Stadt, höchstens 255 Zeichen."
                                    },
                                    "state": {
                                        "type": "string",
                                        "description": "Bundesland, höchstens 255 Zeichen."
                                    },
                                    "country": {
                                        "type": "string",
                                        "description": "Land, höchstens 255 Zeichen."
                                    },
                                    "phone_numbers": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Liste aus Paaren mit label und value. Ein bloßer Text ohne Bezeichnung wird nicht entgegengenommen."
                                    },
                                    "emails": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Liste aus Paaren mit label und value."
                                    },
                                    "websites": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Liste aus Paaren mit label und value."
                                    },
                                    "extra": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Weitere Angaben, frei strukturiert. Der richtige Ort für eine eigene Referenz."
                                    },
                                    "form_data": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Antworten des Gesprächsformulars, abgelegt unter den Schlüsseln der Felder."
                                    },
                                    "project_id": {
                                        "type": "integer",
                                        "description": "Wird zurückgewiesen. Stattdessen project_uuid verwenden."
                                    },
                                    "team_id": {
                                        "type": "integer",
                                        "description": "Wird zurückgewiesen. Das Team folgt aus dem API-Schlüssel."
                                    }
                                },
                                "required": [
                                    "project_uuid"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowcall/leads/{uuid}": {
            "get": {
                "operationId": "flowcall.flowcall-leads-show",
                "summary": "Einen Lead abrufen",
                "description": "Ein Lead mit seinem aktuellen Gesprächsergebnis, der zuständigen Person und allem, was daran hängt. Die Teillisten sind begrenzt: bis zu 50 Anrufe, 50 Kommentare und 50 E-Mails sowie die Wiedervorlage. Wer den vollen Verlauf braucht, nimmt die eigenen Listen. Benötigt projekt_alle_leads oder projekt_telefonie.",
                "tags": [
                    "flowcall.leads"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "f37a2d08-5b14-4e9c-8207-6d0a1f8c3b52",
                                        "project_uuid": "8f1c4a72-3d95-4e06-b1a8-5c7e2d0f9b41",
                                        "company": "Mustermann Bedachungen",
                                        "city": "Köln",
                                        "locked": false,
                                        "status": "Wiedervorlage",
                                        "assigned_user_uuid": "3f8b1c6e-2d44-4a9b-8e77-5c1a0b9d3e22",
                                        "calls": [
                                            {
                                                "uuid": "0c95e2a7-48b3-4d61-90fa-7e2c5b8d1436",
                                                "status": "Keinen erreicht",
                                                "agent_name": "Anna Berger",
                                                "created_at": "2026-09-18T09:15:00+02:00"
                                            }
                                        ],
                                        "comments": [
                                            {
                                                "uuid": "a1d7b309-64ce-4f28-8b05-9c3e7f0a2d54",
                                                "text": "Ruft nächste Woche zurück.",
                                                "system": false,
                                                "agent_name": "Anna Berger",
                                                "created_at": "2026-09-19T16:42:00+02:00"
                                            }
                                        ],
                                        "follow_ups": [
                                            {
                                                "uuid": "5e8c0b43-2fa7-4916-8d3c-1b6a9e4f7c20",
                                                "date": "2026-09-25",
                                                "time": "09:30",
                                                "agent_name": "Anna Berger"
                                            }
                                        ],
                                        "emails": []
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowcall.flowcall-leads-update",
                "summary": "Einen Lead ändern",
                "description": "Ändert die Stammdaten eines Leads. Ein weggelassenes Feld bleibt unverändert. Die Änderung wird als Kommentar festgehalten, genau wie in der Oberfläche; solche Kommentare tragen in der Kommentarliste die Angabe system. Die Felder sind dieselben wie beim Anlegen. project_uuid, project_id und team_id werden zurückgewiesen. Benötigt projekt_bearbeiten oder projekt_telefonie.",
                "tags": [
                    "flowcall.leads"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "f37a2d08-5b14-4e9c-8207-6d0a1f8c3b52",
                                        "project_uuid": "8f1c4a72-3d95-4e06-b1a8-5c7e2d0f9b41",
                                        "company": "Mustermann Bedachungen GmbH",
                                        "city": "Köln",
                                        "locked": false,
                                        "updated_at": "2026-09-20T10:11:00+02:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "company": {
                                        "type": "string",
                                        "description": "Firma, höchstens 255 Zeichen."
                                    },
                                    "contact_person": {
                                        "type": "string",
                                        "description": "Ansprechpartner, höchstens 255 Zeichen."
                                    },
                                    "first_name": {
                                        "type": "string",
                                        "description": "Vorname, höchstens 255 Zeichen."
                                    },
                                    "last_name": {
                                        "type": "string",
                                        "description": "Nachname, höchstens 255 Zeichen."
                                    },
                                    "address": {
                                        "type": "string",
                                        "description": "Vollständige Anschrift als ein Feld, höchstens 1000 Zeichen."
                                    },
                                    "street": {
                                        "type": "string",
                                        "description": "Straße, höchstens 255 Zeichen."
                                    },
                                    "house_number": {
                                        "type": "string",
                                        "description": "Hausnummer, höchstens 50 Zeichen."
                                    },
                                    "postcode": {
                                        "type": "string",
                                        "description": "Postleitzahl, höchstens 20 Zeichen."
                                    },
                                    "city": {
                                        "type": "string",
                                        "description": "Stadt, höchstens 255 Zeichen."
                                    },
                                    "state": {
                                        "type": "string",
                                        "description": "Bundesland, höchstens 255 Zeichen."
                                    },
                                    "country": {
                                        "type": "string",
                                        "description": "Land, höchstens 255 Zeichen."
                                    },
                                    "phone_numbers": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Liste aus Paaren mit label und value."
                                    },
                                    "emails": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Liste aus Paaren mit label und value."
                                    },
                                    "websites": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Liste aus Paaren mit label und value."
                                    },
                                    "extra": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Weitere Angaben, frei strukturiert."
                                    },
                                    "form_data": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Antworten des Gesprächsformulars."
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowcall.flowcall-leads-destroy",
                "summary": "Einen Lead löschen",
                "description": "Entfernt den Lead samt seinen Anrufen, Kommentaren, Wiedervorlagen und E-Mails. Benötigt projekte_verwalten.",
                "tags": [
                    "flowcall.leads"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Lead gelöscht."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowcall/leads/{uuid}/status": {
            "put": {
                "operationId": "flowcall.flowcall-leads-status",
                "summary": "Das Ergebnis eines Gesprächs festhalten",
                "description": "Schreibt das aktuelle Gesprächsergebnis des Leads und überschreibt dabei das bisherige. In einem Zug entstehen wahlweise ein Kommentar, ein Eintrag im Gesprächsverlauf und eine neue Wiedervorlage. Jedes festgehaltene Ergebnis schließt die offene Wiedervorlage, sofern nicht zugleich ein neues Datum mitgegeben wird. Benötigt projekt_telefonie.",
                "tags": [
                    "flowcall.leads"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "lead_uuid": "f37a2d08-5b14-4e9c-8207-6d0a1f8c3b52",
                                        "status": "Wiedervorlage",
                                        "follow_up_date": "2026-09-25"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "status": {
                                        "type": "string",
                                        "description": "Das Gesprächsergebnis, höchstens 255 Zeichen. Üblich sind Offen, Übersprungen, Kein Interesse, Keinen erreicht, Falsche Rufnummer, AP nicht im hause, Wiedervorlage, E-Mail senden und Termin vereinbart; das Feld ist Freitext."
                                    },
                                    "comment": {
                                        "type": "string",
                                        "description": "Wird als Kommentar am Lead festgehalten, höchstens 60000 Zeichen."
                                    },
                                    "follow_up_date": {
                                        "type": "string",
                                        "description": "Neue Wiedervorlage im Format JJJJ-MM-TT. Ohne Angabe wird die offene Wiedervorlage geschlossen."
                                    },
                                    "follow_up_time": {
                                        "type": "string",
                                        "description": "Uhrzeit der Wiedervorlage im Format HH:MM, Standard 08:00."
                                    },
                                    "log_call": {
                                        "type": "boolean",
                                        "description": "Ob zusätzlich ein Eintrag im Gesprächsverlauf entsteht. Standard ist true; false passt zu einem übersprungenen Lead, der nie als Anruf gezählt hat."
                                    }
                                },
                                "required": [
                                    "status"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowcall/leads/{uuid}/lock": {
            "post": {
                "operationId": "flowcall.flowcall-leads-lock",
                "summary": "Einen Lead in Bearbeitung nehmen",
                "description": "Nimmt den Lead für die eigene Bearbeitung, damit zwei Personen ihn nicht gleichzeitig anrufen. Ein Lead, den bereits jemand bearbeitet, antwortet mit HTTP 409, statt stillschweigend übernommen zu werden. Benötigt projekt_telefonie.",
                "tags": [
                    "flowcall.leads"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "lead_uuid": "f37a2d08-5b14-4e9c-8207-6d0a1f8c3b52",
                                        "locked": true,
                                        "locked_until": "2026-09-20T10:45:00+02:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowcall.flowcall-leads-unlock",
                "summary": "Einen Lead wieder freigeben",
                "description": "Gibt den Lead zurück in die gemeinsame Liste. Benötigt projekt_telefonie.",
                "tags": [
                    "flowcall.leads"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Sperre aufgehoben."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowcall/leads/{uuid}/comments": {
            "get": {
                "operationId": "flowcall.flowcall-comments-index",
                "summary": "Kommentare eines Leads auflisten",
                "description": "Die Kommentare eines Leads, neueste zuerst. Benötigt projekt_telefonie.",
                "tags": [
                    "flowcall.comments"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Einträge pro Seite, 1 bis 200, Standard 25.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Seitenzahl, Standard 1.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "a1d7b309-64ce-4f28-8b05-9c3e7f0a2d54",
                                            "lead_uuid": "f37a2d08-5b14-4e9c-8207-6d0a1f8c3b52",
                                            "agent_uuid": "3f8b1c6e-2d44-4a9b-8e77-5c1a0b9d3e22",
                                            "agent_name": "Anna Berger",
                                            "text": "Ruft nächste Woche zurück.",
                                            "system": false,
                                            "created_at": "2026-09-19T16:42:00+02:00",
                                            "updated_at": "2026-09-19T16:42:00+02:00"
                                        }
                                    ],
                                    "meta": {
                                        "current_page": 1,
                                        "per_page": 25,
                                        "total": 1,
                                        "last_page": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowcall.flowcall-comments-store",
                "summary": "Einen Kommentar schreiben",
                "description": "Hält eine Notiz am Lead fest und antwortet mit HTTP 201. Benötigt projekt_telefonie.",
                "tags": [
                    "flowcall.comments"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "a1d7b309-64ce-4f28-8b05-9c3e7f0a2d54",
                                        "lead_uuid": "f37a2d08-5b14-4e9c-8207-6d0a1f8c3b52",
                                        "agent_name": "Anna Berger",
                                        "text": "Ruft nächste Woche zurück.",
                                        "system": false,
                                        "created_at": "2026-09-19T16:42:00+02:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "text": {
                                        "type": "string",
                                        "description": "Der Text, höchstens 60000 Zeichen."
                                    }
                                },
                                "required": [
                                    "text"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowcall/leads/{uuid}/comments/{commentUuid}": {
            "put": {
                "operationId": "flowcall.flowcall-comments-update",
                "summary": "Einen Kommentar ändern",
                "description": "Schreibt einen Kommentar um. Nur die Person, die ihn verfasst hat, darf das; jede andere erhält HTTP 403. Benötigt projekt_telefonie.",
                "tags": [
                    "flowcall.comments"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "commentUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "a1d7b309-64ce-4f28-8b05-9c3e7f0a2d54",
                                        "text": "Ruft übernächste Woche zurück.",
                                        "system": false,
                                        "updated_at": "2026-09-20T09:00:00+02:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "text": {
                                        "type": "string",
                                        "description": "Der neue Text, höchstens 60000 Zeichen."
                                    }
                                },
                                "required": [
                                    "text"
                                ]
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowcall.flowcall-comments-destroy",
                "summary": "Einen Kommentar löschen",
                "description": "Entfernt einen Kommentar. Nur die Person, die ihn verfasst hat, darf das; jede andere erhält HTTP 403. Benötigt projekt_telefonie.",
                "tags": [
                    "flowcall.comments"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "commentUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Kommentar gelöscht."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowcall/leads/{uuid}/follow-ups": {
            "get": {
                "operationId": "flowcall.flowcall-follow-ups-index",
                "summary": "Wiedervorlagen eines Leads auflisten",
                "description": "Die Wiedervorlage des Leads, nach Datum und Uhrzeit geordnet. Da ein Lead höchstens eine trägt, ist die Liste leer oder einelementig. Benötigt projekt_telefonie.",
                "tags": [
                    "flowcall.follow-ups"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "5e8c0b43-2fa7-4916-8d3c-1b6a9e4f7c20",
                                            "lead_uuid": "f37a2d08-5b14-4e9c-8207-6d0a1f8c3b52",
                                            "agent_uuid": "3f8b1c6e-2d44-4a9b-8e77-5c1a0b9d3e22",
                                            "agent_name": "Anna Berger",
                                            "date": "2026-09-25",
                                            "time": "09:30",
                                            "created_at": "2026-09-19T16:42:00+02:00",
                                            "updated_at": "2026-09-19T16:42:00+02:00"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowcall.flowcall-follow-ups-store",
                "summary": "Eine Wiedervorlage setzen",
                "description": "Legt den Lead für einen Tag zurück auf die Liste und antwortet mit HTTP 201. Eine bestehende Wiedervorlage wird dabei ersetzt. Benötigt projekt_telefonie.",
                "tags": [
                    "flowcall.follow-ups"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "5e8c0b43-2fa7-4916-8d3c-1b6a9e4f7c20",
                                        "lead_uuid": "f37a2d08-5b14-4e9c-8207-6d0a1f8c3b52",
                                        "agent_name": "Anna Berger",
                                        "date": "2026-09-25",
                                        "time": "09:30"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "date": {
                                        "type": "string",
                                        "description": "Datum im Format JJJJ-MM-TT."
                                    },
                                    "time": {
                                        "type": "string",
                                        "description": "Uhrzeit im Format HH:MM, Standard 08:00."
                                    }
                                },
                                "required": [
                                    "date"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowcall/leads/{uuid}/follow-ups/{followUpUuid}": {
            "put": {
                "operationId": "flowcall.flowcall-follow-ups-update",
                "summary": "Eine Wiedervorlage verschieben",
                "description": "Verschiebt eine bestehende Wiedervorlage. Datum und Uhrzeit lassen sich einzeln ändern. Benötigt projekt_telefonie.",
                "tags": [
                    "flowcall.follow-ups"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "followUpUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "5e8c0b43-2fa7-4916-8d3c-1b6a9e4f7c20",
                                        "date": "2026-09-28",
                                        "time": "14:00",
                                        "updated_at": "2026-09-20T09:05:00+02:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "date": {
                                        "type": "string",
                                        "description": "Neues Datum im Format JJJJ-MM-TT."
                                    },
                                    "time": {
                                        "type": "string",
                                        "description": "Neue Uhrzeit im Format HH:MM."
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowcall.flowcall-follow-ups-destroy",
                "summary": "Eine Wiedervorlage löschen",
                "description": "Entfernt die Wiedervorlage, ohne ein Gesprächsergebnis zu schreiben. Benötigt projekt_telefonie.",
                "tags": [
                    "flowcall.follow-ups"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "followUpUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Wiedervorlage gelöscht."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowcall/leads/{uuid}/calls": {
            "get": {
                "operationId": "flowcall.flowcall-calls-index",
                "summary": "Den Gesprächsverlauf eines Leads abrufen",
                "description": "Die Einträge des Gesprächsverlaufs, neueste zuerst. Benötigt projekt_telefonie.",
                "tags": [
                    "flowcall.calls"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Einträge pro Seite, 1 bis 200, Standard 25.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Seitenzahl, Standard 1.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "0c95e2a7-48b3-4d61-90fa-7e2c5b8d1436",
                                            "lead_uuid": "f37a2d08-5b14-4e9c-8207-6d0a1f8c3b52",
                                            "agent_uuid": "3f8b1c6e-2d44-4a9b-8e77-5c1a0b9d3e22",
                                            "agent_name": "Anna Berger",
                                            "status": "Keinen erreicht",
                                            "created_at": "2026-09-18T09:15:00+02:00"
                                        }
                                    ],
                                    "meta": {
                                        "current_page": 1,
                                        "per_page": 25,
                                        "total": 1,
                                        "last_page": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowcall.flowcall-calls-store",
                "summary": "Einen Anruf nachtragen",
                "description": "Trägt einen Anruf nach, der anderswo stattgefunden hat, und antwortet mit HTTP 201. Geschrieben wird allein der Eintrag im Verlauf; das aktuelle Gesprächsergebnis des Leads bleibt, wo es ist. Benötigt projekt_telefonie.",
                "tags": [
                    "flowcall.calls"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "0c95e2a7-48b3-4d61-90fa-7e2c5b8d1436",
                                        "lead_uuid": "f37a2d08-5b14-4e9c-8207-6d0a1f8c3b52",
                                        "agent_name": "Anna Berger",
                                        "status": "Keinen erreicht",
                                        "created_at": "2026-09-20T11:00:00+02:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "status": {
                                        "type": "string",
                                        "description": "Das Ergebnis dieses Anrufs, höchstens 255 Zeichen. Üblich sind dieselben neun Begriffe wie beim Gesprächsergebnis; das Feld ist Freitext."
                                    }
                                },
                                "required": [
                                    "status"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowcall/leads/{uuid}/emails": {
            "get": {
                "operationId": "flowcall.flowcall-emails-index",
                "summary": "E-Mails eines Leads auflisten",
                "description": "Die an den Lead geschriebenen E-Mails, neueste zuerst. Die Zeitstempel für Zustellung, Öffnung, Klick und Unzustellbarkeit füllt der Versanddienst später; bis dahin bleiben sie leer. Benötigt projekt_telefonie.",
                "tags": [
                    "flowcall.emails"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Einträge pro Seite, 1 bis 200, Standard 25.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Seitenzahl, Standard 1.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "7b1e0d46-93ac-4f27-8051-4d6a2c9f5e83",
                                            "lead_uuid": "f37a2d08-5b14-4e9c-8207-6d0a1f8c3b52",
                                            "status": "ausstehend",
                                            "address": "info@example.com",
                                            "subject": "Unser Gespräch",
                                            "body": "Guten Tag, wie besprochen ...",
                                            "attachment": null,
                                            "delivered_at": null,
                                            "opened_at": null,
                                            "clicked_at": null,
                                            "bounced_at": null,
                                            "created_at": "2026-09-19T16:45:00+02:00"
                                        }
                                    ],
                                    "meta": {
                                        "current_page": 1,
                                        "per_page": 25,
                                        "total": 1,
                                        "last_page": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowcall.flowcall-emails-store",
                "summary": "Eine E-Mail an den Lead einreihen",
                "description": "Reiht eine E-Mail aus der Projektvorlage ein und antwortet mit HTTP 202. Wird ein Wiedervorlagedatum mitgegeben, kommt der Lead an diesem Tag zurück auf die Liste; ohne Datum wird die offene Wiedervorlage geschlossen. Benötigt projekt_telefonie.",
                "tags": [
                    "flowcall.emails"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "7b1e0d46-93ac-4f27-8051-4d6a2c9f5e83",
                                        "lead_uuid": "f37a2d08-5b14-4e9c-8207-6d0a1f8c3b52",
                                        "status": "ausstehend",
                                        "address": "info@example.com",
                                        "subject": "Unser Gespräch",
                                        "delivered_at": null,
                                        "created_at": "2026-09-20T11:30:00+02:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "address": {
                                        "type": "string",
                                        "description": "Empfängeradresse, höchstens 255 Zeichen."
                                    },
                                    "subject": {
                                        "type": "string",
                                        "description": "Betreff, höchstens 255 Zeichen. Ohne Angabe gilt die Projektvorlage."
                                    },
                                    "body": {
                                        "type": "string",
                                        "description": "Text, höchstens 200000 Zeichen. Ohne Angabe gilt die Projektvorlage."
                                    },
                                    "skip_verification": {
                                        "type": "boolean",
                                        "description": "Markiert die Adresse ohne Prüfung als gültig, wie es das Kästchen in der Oberfläche tut. Der Vorgang wird am Lead als Kommentar festgehalten."
                                    },
                                    "follow_up_date": {
                                        "type": "string",
                                        "description": "Wiedervorlage im Format JJJJ-MM-TT."
                                    },
                                    "follow_up_time": {
                                        "type": "string",
                                        "description": "Uhrzeit der Wiedervorlage im Format HH:MM, Standard 08:00."
                                    }
                                },
                                "required": [
                                    "address"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowcall/roles": {
            "get": {
                "operationId": "flowcall.flowcall-roles-index",
                "summary": "Rollen auflisten",
                "description": "Alle FlowCall-Rollen des Teams mit ihren zehn Berechtigungen, alphabetisch. Benötigt team_rollen_verwalten.",
                "tags": [
                    "flowcall.team"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "9c40b7e2-1a58-4d63-b07f-8e5c2a1d9f34",
                                            "name": "agent",
                                            "flags": {
                                                "team_verwalten": false,
                                                "team_rollen_verwalten": false,
                                                "callhistory_all": false,
                                                "projekte_verwalten": false,
                                                "projekt_bearbeiten": false,
                                                "projekt_alle_leads": false,
                                                "projekt_leads_export": false,
                                                "projekt_telefonie": true,
                                                "projekt_lead_hinzufuegen": true,
                                                "projekt_unstimmigkeiten": false
                                            },
                                            "created_at": "2026-08-12T10:00:00+02:00",
                                            "updated_at": "2026-08-12T10:00:00+02:00"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowcall.flowcall-roles-store",
                "summary": "Eine Rolle anlegen",
                "description": "Legt eine Rolle an und antwortet mit HTTP 201. Der Name wird in Kleinbuchstaben gespeichert und muss im Team eindeutig sein; ein bereits vergebener Name antwortet mit HTTP 422 und dem Fehler already_exists. Nicht genannte Berechtigungen werden abgelehnt gesetzt. Benötigt team_rollen_verwalten.",
                "tags": [
                    "flowcall.team"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "9c40b7e2-1a58-4d63-b07f-8e5c2a1d9f34",
                                        "name": "agent",
                                        "flags": {
                                            "team_verwalten": false,
                                            "team_rollen_verwalten": false,
                                            "callhistory_all": false,
                                            "projekte_verwalten": false,
                                            "projekt_bearbeiten": false,
                                            "projekt_alle_leads": false,
                                            "projekt_leads_export": false,
                                            "projekt_telefonie": true,
                                            "projekt_lead_hinzufuegen": true,
                                            "projekt_unstimmigkeiten": false
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Der Name der Rolle, höchstens 255 Zeichen. Er wird in Kleinbuchstaben gespeichert."
                                    },
                                    "flags": {
                                        "type": "object",
                                        "description": "Die Berechtigungen als Wahrheitswerte, benannt nach den zehn Namen aus dem Überblick. Ein unbekannter Name wird zurückgewiesen, statt stillschweigend übergangen zu werden."
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowcall/roles/{uuid}": {
            "put": {
                "operationId": "flowcall.flowcall-roles-update",
                "summary": "Eine Rolle ändern",
                "description": "Ändert Name und Berechtigungen. Eine nicht genannte Berechtigung bleibt unverändert. Ein Umbenennen trägt den neuen Namen im selben Schritt in die Zuweisungen und in die Projektberechtigungen nach. Ein bereits vergebener Name antwortet mit HTTP 422 und dem Fehler already_exists. Benötigt team_rollen_verwalten.",
                "tags": [
                    "flowcall.team"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "9c40b7e2-1a58-4d63-b07f-8e5c2a1d9f34",
                                        "name": "agent senior",
                                        "flags": {
                                            "projekt_telefonie": true,
                                            "projekt_alle_leads": true,
                                            "projekt_leads_export": true
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Der neue Name, höchstens 255 Zeichen. Er wird in Kleinbuchstaben gespeichert."
                                    },
                                    "flags": {
                                        "type": "object",
                                        "description": "Die zu ändernden Berechtigungen als Wahrheitswerte. Nicht genannte bleiben, wie sie sind."
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowcall.flowcall-roles-destroy",
                "summary": "Eine Rolle löschen",
                "description": "Löscht eine Rolle, die niemand mehr trägt. Trägt sie noch jemand, antwortet der Aufruf mit HTTP 409 und dem Fehler role_in_use. Benötigt team_rollen_verwalten.",
                "tags": [
                    "flowcall.team"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Rolle gelöscht."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowcall/members": {
            "get": {
                "operationId": "flowcall.flowcall-members-index",
                "summary": "Teammitglieder auflisten",
                "description": "Alle Mitglieder des FlowCall-Teams mit der Rolle, die sie tragen. Die UUID des Eintrags benennt die Mitgliedschaft, user_uuid die Person. Benötigt team_verwalten.",
                "tags": [
                    "flowcall.team"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "c8f52e07-4b1a-4936-80d7-2e6c9a3f5b18",
                                            "user_uuid": "3f8b1c6e-2d44-4a9b-8e77-5c1a0b9d3e22",
                                            "name": "Anna Berger",
                                            "email": "anna@example.com",
                                            "role": "agent",
                                            "created_at": "2026-08-12T10:05:00+02:00"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowcall/members/{userUuid}/role": {
            "put": {
                "operationId": "flowcall.flowcall-members-role",
                "summary": "Einem Mitglied eine Rolle geben",
                "description": "Weist einem Mitglied des Teams eine FlowCall-Rolle zu. Die Rolle wird über ihre UUID benannt, damit ein Umbenennen nicht mit einer Neuzuweisung verwechselt wird. Die Zuweisung wirkt sofort in allen Projektberechtigungen dieser Person. Eine Person außerhalb des Teams antwortet mit HTTP 404. Benötigt team_verwalten.",
                "tags": [
                    "flowcall.team"
                ],
                "parameters": [
                    {
                        "name": "userUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "c8f52e07-4b1a-4936-80d7-2e6c9a3f5b18",
                                        "user_uuid": "3f8b1c6e-2d44-4a9b-8e77-5c1a0b9d3e22",
                                        "name": "Anna Berger",
                                        "email": "anna@example.com",
                                        "role": "agent senior"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "role_uuid": {
                                        "type": "string",
                                        "description": "UUID der FlowCall-Rolle."
                                    }
                                },
                                "required": [
                                    "role_uuid"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowcall/call-history": {
            "get": {
                "operationId": "flowcall.flowcall-call-history",
                "summary": "Das Telefonprotokoll abrufen",
                "description": "Die Gespräche aus der angebundenen Telefonanlage, neueste zuerst. Mit callhistory_all umfasst die Liste das ganze Team, sonst nur die eigenen Gespräche. Ist eine Zeile einem Lead zugeordnet, trägt sie dessen UUID.",
                "tags": [
                    "flowcall.call-history"
                ],
                "parameters": [
                    {
                        "name": "direction",
                        "in": "query",
                        "required": false,
                        "description": "Richtung des Gesprächs, wie die Telefonanlage sie meldet, etwa inbound oder outbound.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "since",
                        "in": "query",
                        "required": false,
                        "description": "Nur Gespräche ab diesem Zeitpunkt, als Datum oder Zeitstempel.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Einträge pro Seite, 1 bis 200, Standard 25.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Seitenzahl, Standard 1.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "direction": "outbound",
                                            "status": "answered",
                                            "from_number": "+4922112345",
                                            "to_number": "+492211234567",
                                            "start_time": "2026-09-18 09:15:02",
                                            "answered_time": "2026-09-18 09:15:11",
                                            "end_time": "2026-09-18 09:18:40",
                                            "duration": 209,
                                            "comment": null,
                                            "lead_uuid": "f37a2d08-5b14-4e9c-8207-6d0a1f8c3b52"
                                        }
                                    ],
                                    "meta": {
                                        "current_page": 1,
                                        "per_page": 25,
                                        "total": 1,
                                        "last_page": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowcall/reports/leads": {
            "get": {
                "operationId": "flowcall.flowcall-reports-leads",
                "summary": "Leadbestand",
                "description": "Wie es um die Leads der erreichbaren Projekte steht: die Gesamtzahl, wie viele gerade in Bearbeitung sind, wie viele noch niemand angefasst hat und die Verteilung über die Gesprächsergebnisse.",
                "tags": [
                    "flowcall.reports"
                ],
                "parameters": [
                    {
                        "name": "project_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Auf ein Telefonie-Projekt einschränken.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "total": 1240,
                                        "locked": 3,
                                        "untouched": 480,
                                        "by_status": {
                                            "Offen": 120,
                                            "Keinen erreicht": 310,
                                            "Kein Interesse": 190,
                                            "Wiedervorlage": 78,
                                            "Termin vereinbart": 62
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowcall/reports/calls": {
            "get": {
                "operationId": "flowcall.flowcall-reports-calls",
                "summary": "Anrufaufkommen",
                "description": "Wie viel telefoniert wurde, von wem und mit welchem Ergebnis. Das Fenster wird in Tagen zurückgerechnet und liegt bei höchstens einem Jahr, weil die Auswertung auf dem vollständigen Gesprächsverlauf arbeitet.",
                "tags": [
                    "flowcall.reports"
                ],
                "parameters": [
                    {
                        "name": "project_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Auf ein Telefonie-Projekt einschränken.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "days",
                        "in": "query",
                        "required": false,
                        "description": "Zeitfenster in Tagen, 1 bis 365, Standard 14.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "window_days": 14,
                                        "total": 842,
                                        "mine": 214,
                                        "by_agent": [
                                            {
                                                "user_uuid": "3f8b1c6e-2d44-4a9b-8e77-5c1a0b9d3e22",
                                                "calls": 214
                                            }
                                        ],
                                        "by_status": {
                                            "Keinen erreicht": 401,
                                            "Kein Interesse": 233,
                                            "Termin vereinbart": 38
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowcall/reports/follow-ups": {
            "get": {
                "operationId": "flowcall.flowcall-reports-follow-ups",
                "summary": "Wiedervorlagen",
                "description": "Was überfällig ist, was heute ansteht und was als Nächstes kommt. Die Vorschau umfasst die zwanzig nächsten Wiedervorlagen.",
                "tags": [
                    "flowcall.reports"
                ],
                "parameters": [
                    {
                        "name": "project_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Auf ein Telefonie-Projekt einschränken.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "overdue": 12,
                                        "today": 7,
                                        "mine": 5,
                                        "next": [
                                            {
                                                "uuid": "5e8c0b43-2fa7-4916-8d3c-1b6a9e4f7c20",
                                                "lead_uuid": "f37a2d08-5b14-4e9c-8207-6d0a1f8c3b52",
                                                "agent_uuid": "3f8b1c6e-2d44-4a9b-8e77-5c1a0b9d3e22",
                                                "agent_name": "Anna Berger",
                                                "date": "2026-09-25",
                                                "time": "09:30"
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowcontacts/contacts": {
            "get": {
                "operationId": "flowcontacts.contacts-list",
                "summary": "Kontakte auflisten",
                "description": "Ruft eine Liste Ihrer persönlichen Kontakte ab. Die Antwort enthält alle verknüpften Daten wie E-Mails, Telefonnummern und Adressen.",
                "tags": [
                    "flowcontacts.endpoints"
                ],
                "parameters": [
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "Filter nach Status: active, archived, all",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Suchbegriff (Name, Firma, Job, E-Mail)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Anzahl der Ergebnisse (max 200)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "data": [
                                        {
                                            "uuid": "123e4567-e89b-12d3-a456-426614174000",
                                            "id": 1042,
                                            "first_name": "Max",
                                            "last_name": "Mustermann",
                                            "company": "Firma GmbH",
                                            "job_title": null,
                                            "notes": null,
                                            "birthday": null,
                                            "avatar_url": null,
                                            "avatar_sha1": null,
                                            "is_shared": false,
                                            "is_own": true,
                                            "status": "active",
                                            "emails": [
                                                {
                                                    "label": "Privat",
                                                    "address": "max@example.com",
                                                    "is_primary": true
                                                }
                                            ],
                                            "phones": [],
                                            "addresses": [],
                                            "created_at": "2026-07-21T10:00:00+00:00",
                                            "updated_at": "2026-07-21T10:00:00+00:00"
                                        }
                                    ],
                                    "meta": {
                                        "current_page": 1,
                                        "per_page": 15,
                                        "total": 42
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowcontacts.contact-create",
                "summary": "Kontakt erstellen",
                "description": "Erstellt einen neuen privaten Kontakt. Breaking Change: Die frühere Upsert-Semantik über eine uuid im Body existiert nicht mehr; Aktualisierungen laufen über PUT /flowcontacts/contacts/{uuid}.",
                "tags": [
                    "flowcontacts.endpoints"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "data": {
                                        "uuid": "223e4567-e89b-12d3-a456-426614174111",
                                        "id": 1043,
                                        "first_name": "Erika",
                                        "last_name": "Mustermann",
                                        "company": null,
                                        "job_title": "Designerin",
                                        "notes": null,
                                        "birthday": null,
                                        "avatar_url": null,
                                        "avatar_sha1": null,
                                        "is_shared": false,
                                        "is_own": true,
                                        "status": "active",
                                        "emails": [
                                            {
                                                "label": "Geschäftlich",
                                                "address": "erika@muster.de",
                                                "is_primary": true
                                            }
                                        ],
                                        "phones": [],
                                        "addresses": [],
                                        "created_at": "2026-07-21T10:00:00+00:00",
                                        "updated_at": "2026-07-21T10:00:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "first_name": {
                                        "type": "string",
                                        "description": "Vorname"
                                    },
                                    "last_name": {
                                        "type": "string",
                                        "description": "Nachname"
                                    },
                                    "company": {
                                        "type": "string",
                                        "description": "Firma"
                                    },
                                    "job_title": {
                                        "type": "string",
                                        "description": "Berufsbezeichnung"
                                    },
                                    "email_addresses": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Array aus E-Mail-Objekten mit label, address und is_primary"
                                    },
                                    "phone_numbers": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Array aus Telefon-Objekten mit label, number und is_primary"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowcontacts/contacts/{uuid}": {
            "get": {
                "operationId": "flowcontacts.contact-detail",
                "summary": "Kontakt-Details abrufen",
                "description": "Ruft die vollständigen Details eines einzelnen Kontakts ab, inklusive E-Mails, Telefonnummern und Adressen. Empfohlener Weg ist die Adressierung per UUID. Übergangsweise wird zusätzlich die numerische ID akzeptiert (/flowcontacts/contacts/123) &ndash; dieser Weg ist veraltet und läuft aus, sobald die FlowContacts-App vollständig auf UUIDs umgestellt ist. Neue Integrationen dürfen ausschließlich UUIDs verwenden. Die Antwort enthält neben uuid übergangsweise wieder das Feld id; Unterobjekte (E-Mails, Telefonnummern, Adressen) tragen weiterhin keine IDs.",
                "tags": [
                    "flowcontacts.endpoints"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "data": {
                                        "uuid": "123e4567-e89b-12d3-a456-426614174000",
                                        "id": 1042,
                                        "first_name": "Max",
                                        "last_name": "Mustermann",
                                        "company": "Firma GmbH",
                                        "job_title": null,
                                        "notes": null,
                                        "birthday": null,
                                        "avatar_url": null,
                                        "avatar_sha1": null,
                                        "is_shared": false,
                                        "is_own": true,
                                        "status": "active",
                                        "emails": [
                                            {
                                                "label": "Privat",
                                                "address": "max@example.com",
                                                "is_primary": true
                                            }
                                        ],
                                        "phones": [],
                                        "addresses": [],
                                        "created_at": "2026-07-21T10:00:00+00:00",
                                        "updated_at": "2026-07-21T10:00:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowcontacts.contact-update",
                "summary": "Kontakt aktualisieren",
                "description": "Aktualisiert einen bestehenden Kontakt per UUID (Teil-Update: nur gesendete Felder werden geschrieben). Übergangsweise wird auch die numerische ID im Pfad akzeptiert; dieser Weg ist veraltet und läuft aus. Ein unbekannter oder fremder Pfadwert ergibt in beiden Formen HTTP 404.",
                "tags": [
                    "flowcontacts.endpoints"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "data": {
                                        "uuid": "223e4567-e89b-12d3-a456-426614174111",
                                        "id": 1043,
                                        "first_name": "Erika",
                                        "last_name": "Mustermann",
                                        "company": "Muster Design",
                                        "job_title": "Designerin",
                                        "notes": null,
                                        "birthday": null,
                                        "avatar_url": null,
                                        "avatar_sha1": null,
                                        "is_shared": false,
                                        "is_own": true,
                                        "status": "active",
                                        "emails": [
                                            {
                                                "label": "Geschäftlich",
                                                "address": "erika@muster.de",
                                                "is_primary": true
                                            }
                                        ],
                                        "phones": [],
                                        "addresses": [],
                                        "created_at": "2026-07-21T10:00:00+00:00",
                                        "updated_at": "2026-07-21T11:00:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "first_name": {
                                        "type": "string",
                                        "description": "Vorname"
                                    },
                                    "last_name": {
                                        "type": "string",
                                        "description": "Nachname"
                                    },
                                    "company": {
                                        "type": "string",
                                        "description": "Firma"
                                    },
                                    "job_title": {
                                        "type": "string",
                                        "description": "Berufsbezeichnung"
                                    },
                                    "email_addresses": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Array aus E-Mail-Objekten mit label, address und is_primary"
                                    },
                                    "phone_numbers": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Array aus Telefon-Objekten mit label, number und is_primary"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowcontacts.contact-delete",
                "summary": "Kontakt löschen",
                "description": "Löscht einen Kontakt per UUID (Soft-Delete). Übergangsweise wird auch die numerische ID im Pfad akzeptiert; dieser Weg ist veraltet und läuft aus. Ein unbekannter oder fremder Pfadwert ergibt in beiden Formen HTTP 404.",
                "tags": [
                    "flowcontacts.endpoints"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowcontacts/contacts/{uuid}/avatar": {
            "post": {
                "operationId": "flowcontacts.contact-avatar-upload",
                "summary": "Profilbild hochladen",
                "description": "Lädt das Profilbild eines Kontakts als multipart/form-data hoch und ersetzt ein vorhandenes Bild. Das Bild wird serverseitig auf 500&times;500 Pixel zugeschnitten und als JPEG gespeichert, ein zuvor hinterlegtes Bild wird entfernt. Erlaubt sind JPEG, PNG und WebP bis 8&nbsp;MB. HEIC und HEIF werden nicht unterstützt &ndash; iOS-Clients konvertieren vor dem Upload nach JPEG. Profilbilder sind bewusst nicht Teil des Sync-Push-Protokolls; Änderungen erkennen Clients über avatar_sha1 im Sync-Pull.",
                "tags": [
                    "flowcontacts.endpoints"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "data": {
                                        "avatar_url": "https://api.flowsuite.one/flowcontacts/contacts/123e4567-e89b-12d3-a456-426614174000/avatar",
                                        "avatar_sha1": "da39a3ee5e6b4b0d3255bfef95601890afd80709",
                                        "avatar_updated_at": "2026-08-16T10:00:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "avatar": {
                                        "type": "string",
                                        "format": "binary",
                                        "description": "Bilddatei als multipart/form-data-Feld (JPEG, PNG oder WebP, max. 8 MB)"
                                    }
                                },
                                "required": [
                                    "avatar"
                                ]
                            }
                        }
                    }
                }
            },
            "get": {
                "operationId": "flowcontacts.contact-avatar-download",
                "summary": "Profilbild abrufen",
                "description": "Liefert die Bilddaten des Profilbilds, in der Regel als image/jpeg. Die Antwort trägt einen ETag mit dem SHA-1 der Bytes; ein Aufruf mit If-None-Match wird mit 304 Not Modified ohne Inhalt beantwortet. Externe Profilbilder, etwa aus Google Kontakte, werden per 302 auf ihre Original-URL weitergeleitet. Ohne hinterlegtes Bild antwortet der Endpunkt mit 404. Wichtig: die URL ist wie jeder andere Endpunkt tokengeschützt &ndash; sie muss mit dem Authorization-Header abgerufen werden und funktioniert nicht in einem einfachen Bild-Tag.",
                "tags": [
                    "flowcontacts.endpoints"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/octet-stream": {
                                "schema": {
                                    "type": "string",
                                    "format": "binary"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowcontacts.contact-avatar-delete",
                "summary": "Profilbild löschen",
                "description": "Entfernt das Profilbild des Kontakts samt gespeicherter Datei. Der Aufruf ist idempotent: auch ohne hinterlegtes Bild antwortet der Server mit 204 No Content.",
                "tags": [
                    "flowcontacts.endpoints"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/clients": {
            "get": {
                "operationId": "flowcrm.customers-list",
                "summary": "Kunden auflisten",
                "description": "Ruft die Kunden Ihres Teams ab, ohne weitere Angabe nur die aktiven. Mit status=archived erhalten Sie die archivierten Kunden, mit status=all beide. Jeder Kunde enthält seine Tags und Quellen. Verwenden Sie für die Adressierung einzelner Kunden ausschließlich das Feld uuid.",
                "tags": [
                    "flowcrm.customers"
                ],
                "parameters": [
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "Welche Kunden geliefert werden: <code>active</code> (Standard), <code>archived</code> oder <code>all</code> für beide. Jeder andere Wert führt zu 422",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Einträge pro Seite (1 bis 500, Standard 500). Die Antwort enthält zusätzlich einen <code>meta</code>-Block mit <code>current_page</code>, <code>per_page</code>, <code>total</code> und <code>last_page</code>.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Seitennummer, beginnend bei 1",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "count": 1,
                                    "data": [
                                        {
                                            "uuid": "123e4567-e89b-12d3-a456-426614174000",
                                            "name": "Mustermann GmbH",
                                            "email": "info@mustermann.de",
                                            "phone": "+49 123 456789",
                                            "contact_person": null,
                                            "source": null,
                                            "whmcs_client_id": null,
                                            "external_id": null,
                                            "stripe_customer_id": null,
                                            "website": "https://mustermann.de",
                                            "address_line_1": null,
                                            "address_line_2": null,
                                            "postal_code": "10115",
                                            "city": "Berlin",
                                            "state": null,
                                            "country": "DE",
                                            "currency": "EUR",
                                            "tax_id": null,
                                            "notes": null,
                                            "status": "active",
                                            "tags": [],
                                            "sources": [],
                                            "created_at": "2026-07-21T10:00:00+00:00",
                                            "updated_at": "2026-07-21T10:00:00+00:00"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowcrm.customers-create",
                "summary": "Kunde anlegen (Find-or-Create)",
                "description": "Legt einen Kunden im Team des Tokens an. Idempotent per Find-or-Create: Zuerst wird über eine gesetzte external_id gesucht, danach über die E-Mail-Adresse (teamweit, Gross-/Kleinschreibung egal). Wird ein bestehender Kunde gefunden, auch ein archivierter, gibt die Antwort diesen mit created: false zurück und synchronisiert nur die mitgesendeten tag_uuids und sources. Nur bei einer echten Neuanlage ist created: true (HTTP 201). Kollidiert die E-Mail oder external_id mit einem Kunden im Papierkorb, antwortet der Endpunkt mit HTTP 409.",
                "tags": [
                    "flowcrm.customers"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "created": true,
                                    "data": {
                                        "uuid": "8c1a5d2e-0f4b-4a9c-9d3e-2b7f0a6c1e44",
                                        "name": "Mustermann GmbH",
                                        "email": "info@mustermann.de",
                                        "phone": "+49 30 123456",
                                        "contact_person": "Erika Musterfrau",
                                        "source": "messe-2026",
                                        "whmcs_client_id": null,
                                        "external_id": "MSG-4711",
                                        "stripe_customer_id": null,
                                        "website": null,
                                        "address_line_1": "Hauptstrasse 1",
                                        "address_line_2": null,
                                        "postal_code": "10115",
                                        "city": "Berlin",
                                        "state": null,
                                        "country": "DE",
                                        "currency": "EUR",
                                        "tax_id": null,
                                        "notes": null,
                                        "status": "active",
                                        "tags": [
                                            {
                                                "uuid": "b2c1a7a6-1249-4827-b533-ef1c65c1e273",
                                                "title": "VIP",
                                                "slug": "vip",
                                                "source": "api"
                                            }
                                        ],
                                        "sources": [
                                            "messe-2026"
                                        ],
                                        "created_at": "2026-07-21T10:00:00+00:00",
                                        "updated_at": "2026-07-21T10:00:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name des Kunden"
                                    },
                                    "email": {
                                        "type": "string",
                                        "description": "E-Mail-Adresse (dient als Find-or-Create-Schlüssel)"
                                    },
                                    "phone": {
                                        "type": "string",
                                        "description": "Telefonnummer"
                                    },
                                    "source": {
                                        "type": "string",
                                        "description": "Einzelne Herkunftsquelle als Freitext"
                                    },
                                    "external_id": {
                                        "type": "string",
                                        "description": "Maschinen-Kennung für den Upsert-Abgleich (hat Vorrang vor der E-Mail)"
                                    },
                                    "match_by_email": {
                                        "type": "boolean",
                                        "description": "Standard <code>true</code>. <code>false</code> überspringt zusammen mit <code>external_id</code> den Abgleich über die E-Mail und legt einen eigenen Kunden an"
                                    },
                                    "whmcs_client_id": {
                                        "type": "integer",
                                        "description": "Optionale WHMCS-Kunden-ID"
                                    },
                                    "address_line_1": {
                                        "type": "string",
                                        "description": "Adresszeile 1"
                                    },
                                    "address_line_2": {
                                        "type": "string",
                                        "description": "Adresszeile 2"
                                    },
                                    "postal_code": {
                                        "type": "string",
                                        "description": "Postleitzahl"
                                    },
                                    "city": {
                                        "type": "string",
                                        "description": "Ort"
                                    },
                                    "country": {
                                        "type": "string",
                                        "description": "Land (ISO-Code oder Name)"
                                    },
                                    "contact_person": {
                                        "type": "string",
                                        "description": "Ansprechpartner"
                                    },
                                    "tax_id": {
                                        "type": "string",
                                        "description": "Steuernummer"
                                    },
                                    "vat_id": {
                                        "type": "string",
                                        "description": "USt-IdNr. des Kunden (max. 32 Zeichen). Für E-Rechnungen mit Reverse Charge erforderlich"
                                    },
                                    "tax_treatment": {
                                        "type": "string",
                                        "description": "Steuerbehandlung: standard (mit Umsatzsteuer, Vorgabe) | reverse_charge (EU, Steuerschuld beim Empfänger) | reverse_charge_domestic (§ 13b UStG Inland) | intra_community_supply (steuerfreie innergemeinschaftliche Lieferung) | export (steuerfreie Ausfuhr) | non_taxable_abroad (nicht im Inland steuerbar) | tax_exempt (steuerfrei nach § 4 UStG). Alle Werte außer standard erzeugen Belege ohne Umsatzsteuer. reverse_charge, reverse_charge_domestic und intra_community_supply nur für Geschäftskunden (B2B). reverse_charge_domestic und tax_exempt gibt es nur nach deutschem Recht: Ein Team, für das laut Steuerprofil kein deutsches Recht gilt, kann sie nicht neu setzen (422), ein schon gespeicherter Wert bleibt erlaubt."
                                    },
                                    "billing_language": {
                                        "type": "string",
                                        "description": "Rechnungssprache des Kunden: de (Vorgabe) | en | pt. Gilt als Belegsprache neuer Rechnungen, wenn dort keine angegeben ist"
                                    },
                                    "tag_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Liste team-eigener Tag-UUIDs aus <code>GET /tags</code>, die dem Kunden zugeordnet werden. Eine unbekannte, teamfremde oder gelöschte UUID führt zu HTTP 422, es wird dann nichts angelegt"
                                    },
                                    "sources": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Liste von Herkunftsquellen als Freitext"
                                    },
                                    "stripe_customer_id": {
                                        "type": "string",
                                        "description": "Optionale Stripe-Kunden-ID (Präfix cus_), wird in die Zahlungszuordnung geschrieben"
                                    }
                                },
                                "required": [
                                    "name",
                                    "email"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/clients/search": {
            "get": {
                "operationId": "flowcrm.customers-search",
                "summary": "Kunden suchen",
                "description": "Durchsucht die Kunden Ihres Teams nach Name, E-Mail-Adresse, Telefonnummer oder Webseite. Ohne weitere Angabe werden nur aktive Kunden gefunden, status bezieht archivierte ein.",
                "tags": [
                    "flowcrm.customers"
                ],
                "parameters": [
                    {
                        "name": "search",
                        "in": "query",
                        "required": true,
                        "description": "Suchbegriff für die Kundensuche",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "Welche Kunden geliefert werden: <code>active</code> (Standard), <code>archived</code> oder <code>all</code> für beide. Jeder andere Wert führt zu 422",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Einträge pro Seite (1 bis 500, Standard 500). Die Antwort enthält zusätzlich einen <code>meta</code>-Block mit <code>current_page</code>, <code>per_page</code>, <code>total</code> und <code>last_page</code>.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Seitennummer, beginnend bei 1",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/clients/{uuid}": {
            "patch": {
                "operationId": "flowcrm.customers-update",
                "summary": "Kunde aktualisieren",
                "description": "Aktualisiert einen team-eigenen Kunden anhand seiner UUID. Nur explizit gesendete Felder werden geschrieben, ausgelassene Felder bleiben unverändert; ein Feld mit dem Wert null gilt als nicht gesendet. Archivieren und reaktivieren: Ein inaktiver Kunde heißt in FlowSuite archiviert. status: archived archiviert den Kunden und seine Projekte, status: active reaktiviert ihn; die Projekte bleiben dabei archiviert und werden einzeln reaktiviert. Ein nach DSGVO gelöschter Kunde lässt sich nicht reaktivieren (422). Breaking Change: Der frühere numerische Pfad /clients/{id} wurde ersatzlos entfernt (HTTP 404); es gilt ausschließlich der UUID-Pfad.",
                "tags": [
                    "flowcrm.customers"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "8c1a5d2e-0f4b-4a9c-9d3e-2b7f0a6c1e44",
                                        "name": "Mustermann GmbH",
                                        "email": "info@mustermann.de",
                                        "phone": "+49 30 999888",
                                        "contact_person": "Erika Musterfrau",
                                        "source": "messe-2026",
                                        "whmcs_client_id": null,
                                        "external_id": "MSG-4711",
                                        "stripe_customer_id": null,
                                        "website": null,
                                        "address_line_1": "Hauptstrasse 1",
                                        "address_line_2": null,
                                        "postal_code": "10115",
                                        "city": "Berlin",
                                        "state": null,
                                        "country": "DE",
                                        "currency": "EUR",
                                        "tax_id": null,
                                        "notes": null,
                                        "status": "active",
                                        "tags": [],
                                        "sources": [],
                                        "created_at": "2026-07-21T10:00:00+00:00",
                                        "updated_at": "2026-07-21T11:30:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name des Kunden"
                                    },
                                    "email": {
                                        "type": "string",
                                        "description": "E-Mail-Adresse"
                                    },
                                    "contact_person": {
                                        "type": "string",
                                        "description": "Ansprechpartner"
                                    },
                                    "phone": {
                                        "type": "string",
                                        "description": "Telefonnummer"
                                    },
                                    "website": {
                                        "type": "string",
                                        "description": "Webseite"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Interne Notizen zum Kunden"
                                    },
                                    "status": {
                                        "type": "string",
                                        "description": "active | archived. Archiviert oder reaktiviert den Kunden, siehe Beschreibung"
                                    },
                                    "tag_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Tag-UUIDs, die dem Kunden zusätzlich zugeordnet werden. Vorhandene Tags bleiben erhalten; entfernt wird über <code>PATCH /clients/{uuid}/metadata</code> mit <code>remove_tag_uuids</code>"
                                    },
                                    "sources": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Herkunftsquellen als Freitext, die dem Kunden zusätzlich zugeordnet werden"
                                    },
                                    "address_line_1": {
                                        "type": "string",
                                        "description": "Adresszeile 1"
                                    },
                                    "address_line_2": {
                                        "type": "string",
                                        "description": "Adresszeile 2"
                                    },
                                    "postal_code": {
                                        "type": "string",
                                        "description": "Postleitzahl"
                                    },
                                    "city": {
                                        "type": "string",
                                        "description": "Ort"
                                    },
                                    "state": {
                                        "type": "string",
                                        "description": "Bundesland / Region"
                                    },
                                    "country": {
                                        "type": "string",
                                        "description": "Land"
                                    },
                                    "tax_id": {
                                        "type": "string",
                                        "description": "Steuernummer"
                                    },
                                    "vat_id": {
                                        "type": "string",
                                        "description": "USt-IdNr. des Kunden (max. 32 Zeichen). Für E-Rechnungen mit Reverse Charge erforderlich"
                                    },
                                    "tax_treatment": {
                                        "type": "string",
                                        "description": "Steuerbehandlung: standard | reverse_charge | reverse_charge_domestic | intra_community_supply | export | non_taxable_abroad | tax_exempt. reverse_charge, reverse_charge_domestic und intra_community_supply nur für Geschäftskunden (B2B). reverse_charge_domestic und tax_exempt gibt es nur nach deutschem Recht: Ein Team, für das laut Steuerprofil kein deutsches Recht gilt, kann sie nicht neu setzen (422), ein schon gespeicherter Wert bleibt erlaubt."
                                    },
                                    "billing_language": {
                                        "type": "string",
                                        "description": "Rechnungssprache des Kunden: de | en | pt"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "get": {
                "operationId": "flowcrm.customers-show",
                "summary": "Kunde abrufen",
                "description": "Ruft einen einzelnen Kunden Ihres Teams über seine uuid ab. Unbekannte oder teamfremde Kunden führen zu 404.",
                "tags": [
                    "flowcrm.customers"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowcrm.customers-delete",
                "summary": "Kunde löschen (DSGVO)",
                "description": "Löscht den Kunden im Sinne der DSGVO. Aufbewahrungspflichtige Buchhaltungsbelege bleiben erhalten. Ein auf diesem Weg gelöschter Kunde lässt sich nicht wiederherstellen. Soll ein Kunde nur aus dem aktiven Bestand verschwinden, archivieren Sie ihn stattdessen über PATCH /clients/{uuid} mit status: archived.",
                "tags": [
                    "flowcrm.customers"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "include_export",
                        "in": "query",
                        "required": false,
                        "description": "Bei <code>true</code> enthält die Antwort zusätzlich den DSGVO-Datenexport des Kunden",
                        "schema": {
                            "type": "boolean"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/clients/lookup": {
            "get": {
                "operationId": "flowcrm.customers-lookup",
                "summary": "Kunde nachschlagen",
                "description": "Exakte Suche nach genau einem Kunden, ohne jemals einen anzulegen. Ohne weitere Angabe werden nur aktive Kunden gefunden, status bezieht archivierte ein. Mindestens einer der Parameter ist erforderlich. Bei mehreren Angaben gilt die feste Reihenfolge external_id, dann customer_number, dann Zusatzfeld (custom_field_uuid mit custom_field_value), dann email (ohne Beachtung der Groß- und Kleinschreibung). duplicate_count nennt die Zahl der Treffer, data enthält den ältesten.",
                "tags": [
                    "flowcrm.customers"
                ],
                "parameters": [
                    {
                        "name": "external_id",
                        "in": "query",
                        "required": false,
                        "description": "Externe Kennung des Kunden (max. 255)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "customer_number",
                        "in": "query",
                        "required": false,
                        "description": "Kundennummer (max. 255)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "custom_field_uuid",
                        "in": "query",
                        "required": false,
                        "description": "UUID eines Zusatzfeldes dieses Teams. Nur zusammen mit <code>custom_field_value</code>. Eine fremde UUID verhält sich wie eine unbekannte (422). Referenz- und Mehrfachauswahlfelder werden nicht unterstützt",
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "custom_field_value",
                        "in": "query",
                        "required": false,
                        "description": "Exakter Wert des Zusatzfeldes, genau so, wie er geschrieben wird (Datum als JJJJ-MM-TT, Auswahlfeld als Optionswert). Nur zusammen mit <code>custom_field_uuid</code>",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "email",
                        "in": "query",
                        "required": false,
                        "description": "E-Mail-Adresse (max. 255)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "Welche Kunden geliefert werden: <code>active</code> (Standard), <code>archived</code> oder <code>all</code> für beide. Jeder andere Wert führt zu 422",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/clients/{uuid}/restore": {
            "post": {
                "operationId": "flowcrm.customers-restore",
                "summary": "Kunde wiederherstellen",
                "description": "Holt einen Kunden aus dem Papierkorb zurück. Für archivierte Kunden ist dieser Endpunkt nicht gedacht, sie werden über PATCH /clients/{uuid} mit status: active reaktiviert. Ein nicht gelöschter Kunde wird unverändert zurückgegeben; die Antwort weist aus, ob eine Wiederherstellung stattgefunden hat. Nach DSGVO gelöschte Kunden sind davon ausgenommen.",
                "tags": [
                    "flowcrm.customers"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/clients/{uuid}/timeline": {
            "get": {
                "operationId": "flowcrm.timeline-list",
                "summary": "Timeline-Einträge auflisten",
                "description": "Ruft alle Timeline-Einträge für einen bestimmten Kunden chronologisch sortiert ab. Jeder Eintrag enthält seine uuid für Ändern und Löschen.",
                "tags": [
                    "flowcrm.timeline"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "client": {
                                        "uuid": "5b1c8a52-7f0e-4d0b-b5a4-2f6f0e7d9c10",
                                        "name": "Muster GmbH"
                                    },
                                    "timeline": [
                                        {
                                            "uuid": "0d6f5b0e-3c1a-4a52-9a53-0c8c1f1f2a11",
                                            "type": "note",
                                            "title": "",
                                            "content": "Angebot per E-Mail verschickt.",
                                            "event_date": "2026-10-07T09:30:00.000000Z",
                                            "formatted_date": "07.10.2026 09:30",
                                            "relative_date": "vor 2 Stunden",
                                            "user": "Max Mustermann",
                                            "automatic": false,
                                            "editable": true,
                                            "created_at": "2026-10-07T09:31:12.000000Z"
                                        }
                                    ],
                                    "count": 1
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowcrm.timeline-create",
                "summary": "Timeline-Eintrag erstellen",
                "description": "Erstellt einen neuen Timeline-Eintrag für den angegebenen Kunden. Erfordert wie jede Timeline-Änderung das FlowCRM-Schreibrecht, sonst HTTP 403. Existiert bereits ein eigener Eintrag mit identischem Inhalt und identischem event_date, wird kein zweiter angelegt: Die Antwort ist dann HTTP 200 mit duplicate: true und dem vorhandenen Eintrag. Ohne event_date entsteht immer ein neuer Eintrag.",
                "tags": [
                    "flowcrm.timeline"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Timeline entry created successfully",
                                    "duplicate": false,
                                    "timeline_entry": {
                                        "uuid": "0d6f5b0e-3c1a-4a52-9a53-0c8c1f1f2a11",
                                        "type": "note",
                                        "title": "",
                                        "content": "Angebot per E-Mail verschickt.",
                                        "event_date": "2026-10-07T09:30:00.000000Z",
                                        "formatted_date": "07.10.2026 09:30",
                                        "relative_date": "vor 2 Stunden",
                                        "user": "Max Mustermann",
                                        "automatic": false,
                                        "editable": true,
                                        "created_at": "2026-10-07T09:31:12.000000Z"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "content": {
                                        "type": "string",
                                        "description": "Text des Eintrags. Ältere Clients, die nur title senden, bleiben gültig: Der Titel wird dann als Text übernommen."
                                    },
                                    "event_date": {
                                        "type": "string",
                                        "description": "Ereignisdatum (ISO 8601, Standard: jetzt)"
                                    },
                                    "title": {
                                        "type": "string",
                                        "description": "Veraltet. Neben content wird er verworfen, allein gesendet wird er als content gespeichert."
                                    }
                                },
                                "required": [
                                    "content"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/clients/{uuid}/timeline/{entry_uuid}": {
            "patch": {
                "operationId": "flowcrm.timeline-update",
                "summary": "Timeline-Eintrag ändern",
                "description": "Korrigiert einen eigenen, manuell verfassten Eintrag. Einträge anderer Personen und automatisch erzeugte Einträge, etwa aus einer Besprechungszuordnung, antworten mit HTTP 403 und behalten ihre Quelle.",
                "tags": [
                    "flowcrm.timeline"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "entry_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "content": {
                                        "type": "string",
                                        "description": "Neuer Inhalt"
                                    },
                                    "title": {
                                        "type": "string",
                                        "description": "Veraltet. Wird angenommen und nicht gespeichert."
                                    },
                                    "type": {
                                        "type": "string",
                                        "description": "note, meeting, email, call, text, coffee, food, networking, party oder other"
                                    },
                                    "event_date": {
                                        "type": "string",
                                        "description": "Neuer Zeitpunkt"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowcrm.timeline-delete",
                "summary": "Timeline-Eintrag löschen",
                "description": "Entfernt einen eigenen, manuell verfassten Eintrag.",
                "tags": [
                    "flowcrm.timeline"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "entry_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/clients/{uuid}/timeline/bulk-delete": {
            "post": {
                "operationId": "flowcrm.timeline-bulk-delete",
                "summary": "Mehrere Timeline-Einträge löschen",
                "description": "Entfernt bis zu 200 eigene, manuell verfasste Einträge eines Kunden in einem Aufruf. Für jeden Eintrag gilt dieselbe Regel wie beim einzelnen Löschen. Fremde, automatisch erzeugte und unbekannte Einträge brechen den Aufruf nicht ab, sondern erscheinen mit ihrem Ergebnis in results.",
                "tags": [
                    "flowcrm.timeline"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "deleted": 1,
                                    "skipped": 1,
                                    "results": [
                                        {
                                            "uuid": "0d6f5b0e-3c1a-4a52-9a53-0c8c1f1f2a11",
                                            "status": "deleted"
                                        },
                                        {
                                            "uuid": "7a2e4c90-91d3-4f6b-8e0a-5b3c2d1e0f99",
                                            "status": "forbidden",
                                            "message": "Nur eigene Timeline-Einträge können bearbeitet werden."
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "entry_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Liste der zu löschenden Eintrags-UUIDs (1 bis 200, jede nur einmal)"
                                    }
                                },
                                "required": [
                                    "entry_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/clients/{uuid}/timeline/search": {
            "get": {
                "operationId": "flowcrm.timeline-search",
                "summary": "Timeline durchsuchen",
                "description": "Durchsucht die Timeline-Einträge eines Kunden nach Inhalt. Bei älteren Einträgen wird auch der frühere Titel durchsucht. Die Treffer haben dieselbe Form wie in der Liste.",
                "tags": [
                    "flowcrm.timeline"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "required": true,
                        "description": "Suchbegriff",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/contacts": {
            "get": {
                "operationId": "flowcrm.contacts-list",
                "summary": "Kontakte auflisten",
                "description": "Listet die Kontakte auf, die der verwendete Schlüssel sehen darf: geteilte Teamkontakte und die eigenen privaten Kontakte.",
                "tags": [
                    "flowcrm.contacts"
                ],
                "parameters": [
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Sucht in Vorname, Nachname, Firma sowie in hinterlegten E-Mail-Adressen und Rufnummern",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "client_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Nur Kontakte des angegebenen Kunden",
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "<code>active</code> (Standard), <code>archived</code> oder <code>all</code>",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "visibility",
                        "in": "query",
                        "required": false,
                        "description": "<code>team</code> oder <code>private</code>; ohne Angabe beides",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "custom_field_uuid",
                        "in": "query",
                        "required": false,
                        "description": "UUID eines Zusatzfeldes dieses Teams. Nur zusammen mit <code>custom_field_value</code>. Eine fremde UUID verhält sich wie eine unbekannte (422). Referenz- und Mehrfachauswahlfelder werden nicht unterstützt",
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "custom_field_value",
                        "in": "query",
                        "required": false,
                        "description": "Exakter Wert des Zusatzfeldes (Datum als JJJJ-MM-TT, Auswahlfeld als Optionswert). Nur zusammen mit <code>custom_field_uuid</code>",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Einträge pro Seite (1 bis 200, Standard 50)",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Seitennummer, beginnend bei 1",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "123e4567-e89b-12d3-a456-426614174000",
                                            "first_name": "Anna",
                                            "last_name": "Beispiel",
                                            "company": "Mustermann GmbH",
                                            "visibility": "team",
                                            "status": "active",
                                            "external_source": null,
                                            "external_id": null,
                                            "emails": [
                                                {
                                                    "uuid": "7a3f1c44-1b2d-4e8a-9c11-5d6e7f8a9b0c",
                                                    "label": "Geschäftlich",
                                                    "email": "anna@mustermann.de",
                                                    "is_primary": true
                                                }
                                            ]
                                        }
                                    ],
                                    "meta": {
                                        "current_page": 1,
                                        "per_page": 50,
                                        "total": 1,
                                        "last_page": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowcrm.contacts-create",
                "summary": "Kontakt anlegen",
                "description": "Legt einen Kontakt an. Mindestens Vor- oder Nachname ist erforderlich. Wird client_uuid gesetzt, entsteht direkt ein Teamkontakt beim angegebenen Kunden. E-Mail, Quellen, Zusatzfelder und externe Kennung werden im selben Schritt geschrieben. Mit external_source und external_id ist der Aufruf wiederholbar: Ein bereits bekannter Kontakt wird unverändert mit created: false und HTTP 200 zurückgegeben, auch wenn er archiviert ist (status weist das aus), neue Kontakte antworten mit 201. Zu einem gelöschten Kontakt gehörende Kennungen führen zu 409 und werden weder wiederhergestellt noch neu angelegt. Externe Kennungen gelten nur für Teamkontakte, bei privaten Kontakten führen sie zu 422.",
                "tags": [
                    "flowcrm.contacts"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "first_name": {
                                        "type": "string",
                                        "description": "Vorname"
                                    },
                                    "last_name": {
                                        "type": "string",
                                        "description": "Nachname"
                                    },
                                    "salutation": {
                                        "type": "string",
                                        "description": "Herr, Frau, Divers, Firma oder keine"
                                    },
                                    "title": {
                                        "type": "string",
                                        "description": "Titel, etwa Dr. oder Prof."
                                    },
                                    "job_title": {
                                        "type": "string",
                                        "description": "Position im Unternehmen"
                                    },
                                    "company": {
                                        "type": "string",
                                        "description": "Firmenname"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Freitext zur Person"
                                    },
                                    "birth_day": {
                                        "type": "integer",
                                        "description": "Geburtstag, 1 bis 31"
                                    },
                                    "birth_month": {
                                        "type": "integer",
                                        "description": "Geburtsmonat, 1 bis 12"
                                    },
                                    "birth_year": {
                                        "type": "integer",
                                        "description": "Geburtsjahr"
                                    },
                                    "client_uuid": {
                                        "type": "string",
                                        "format": "uuid",
                                        "description": "Kunde, zu dem der Kontakt gehört"
                                    },
                                    "visibility": {
                                        "type": "string",
                                        "description": "<code>team</code> (Standard) oder <code>private</code>"
                                    },
                                    "email": {
                                        "type": "string",
                                        "description": "E-Mail-Adresse, wird als primäre Adresse gespeichert"
                                    },
                                    "sources": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Herkunftsquellen als Freitext (max. 20)"
                                    },
                                    "custom_fields": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Zusatzfelder wie bei Leads: Einträge mit <code>definition_uuid</code> oder <code>name</code> und <code>value</code>"
                                    },
                                    "external_source": {
                                        "type": "string",
                                        "description": "Herkunftssystem der externen Kennung. Nur zusammen mit <code>external_id</code>"
                                    },
                                    "external_id": {
                                        "type": "string",
                                        "description": "Kennung im Herkunftssystem, eindeutig je Team und <code>external_source</code>. Nur zusammen mit <code>external_source</code>"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/contacts/{uuid}": {
            "get": {
                "operationId": "flowcrm.contacts-show",
                "summary": "Kontakt abrufen",
                "description": "Liefert einen Kontakt mit allen Wertesammlungen: E-Mail-Adressen, Rufnummern, Anschriften, Links, Profile, Daten und Freifelder.",
                "tags": [
                    "flowcrm.contacts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "patch": {
                "operationId": "flowcrm.contacts-update",
                "summary": "Kontakt aktualisieren",
                "description": "Ändert nur die gesendeten Felder. Über status lässt sich ein Kontakt archivieren und wieder aktivieren. Vor- und Nachname dürfen nicht gleichzeitig leer werden.",
                "tags": [
                    "flowcrm.contacts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "first_name": {
                                        "type": "string",
                                        "description": "Vorname"
                                    },
                                    "last_name": {
                                        "type": "string",
                                        "description": "Nachname"
                                    },
                                    "salutation": {
                                        "type": "string",
                                        "description": "Herr, Frau, Divers, Firma oder keine"
                                    },
                                    "title": {
                                        "type": "string",
                                        "description": "Titel"
                                    },
                                    "job_title": {
                                        "type": "string",
                                        "description": "Position im Unternehmen"
                                    },
                                    "company": {
                                        "type": "string",
                                        "description": "Firmenname"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Freitext zur Person"
                                    },
                                    "birth_day": {
                                        "type": "integer",
                                        "description": "Geburtstag"
                                    },
                                    "birth_month": {
                                        "type": "integer",
                                        "description": "Geburtsmonat"
                                    },
                                    "birth_year": {
                                        "type": "integer",
                                        "description": "Geburtsjahr"
                                    },
                                    "status": {
                                        "type": "string",
                                        "description": "<code>active</code> oder <code>archived</code>"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowcrm.contacts-delete",
                "summary": "Kontakt löschen",
                "description": "Verschiebt den Kontakt in den Papierkorb, genau wie die Kontaktliste in der Oberfläche. Wer den Kontakt nur vorübergehend ausblenden möchte, setzt stattdessen status: archived.",
                "tags": [
                    "flowcrm.contacts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/contacts/{uuid}/client": {
            "put": {
                "operationId": "flowcrm.contacts-assign-client",
                "summary": "Kontakt einem Kunden zuordnen",
                "description": "Ordnet den Kontakt einem Kunden zu oder löst die Zuordnung mit client_uuid: null. Ein bisher privater Kontakt wird dabei bewusst mit dem Team geteilt. Ist beim Kunden noch kein Ansprechpartner hinterlegt, übernimmt er den Namen dieses Kontakts.",
                "tags": [
                    "flowcrm.contacts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "client_uuid": {
                                        "type": "string",
                                        "format": "uuid",
                                        "description": "Kunde, oder <code>null</code> zum Lösen der Zuordnung"
                                    }
                                },
                                "required": [
                                    "client_uuid"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/contacts/{uuid}/values/{collection}": {
            "post": {
                "operationId": "flowcrm.contacts-value-create",
                "summary": "Kontaktwert hinzufügen",
                "description": "Fügt genau einen Wert einer Sammlung hinzu. Mögliche Sammlungen: emails, phones, addresses, links, socials, dates, customs. Pro Sammlung kann höchstens ein Wert is_primary sein; ein neuer Hauptwert löst den bisherigen ab.",
                "tags": [
                    "flowcrm.contacts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "collection",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "label": {
                                        "type": "string",
                                        "description": "Bezeichnung, etwa Arbeit oder Privat. Bei <code>socials</code> stattdessen <code>platform</code>"
                                    },
                                    "email": {
                                        "type": "string",
                                        "description": "Nur bei <code>emails</code>"
                                    },
                                    "phone": {
                                        "type": "string",
                                        "description": "Nur bei <code>phones</code>"
                                    },
                                    "url": {
                                        "type": "string",
                                        "description": "Nur bei <code>links</code> und <code>socials</code>"
                                    },
                                    "date": {
                                        "type": "string",
                                        "description": "Nur bei <code>dates</code>, im Format JJJJ-MM-TT"
                                    },
                                    "value": {
                                        "type": "string",
                                        "description": "Nur bei <code>customs</code>"
                                    },
                                    "is_primary": {
                                        "type": "boolean",
                                        "description": "Nur bei <code>emails</code>, <code>phones</code> und <code>addresses</code>"
                                    }
                                },
                                "required": [
                                    "label"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/contacts/{uuid}/values/{collection}/{value_uuid}": {
            "patch": {
                "operationId": "flowcrm.contacts-value-update",
                "summary": "Kontaktwert ändern",
                "description": "Ändert genau einen Wert. Es müssen nur die tatsächlich geänderten Felder gesendet werden. Bei Anschriften werden hinterlegte Koordinaten verworfen, sobald sich ein Adressfeld ändert.",
                "tags": [
                    "flowcrm.contacts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "collection",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "value_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "label": {
                                        "type": "string",
                                        "description": "Bezeichnung des Werts"
                                    },
                                    "is_primary": {
                                        "type": "boolean",
                                        "description": "Macht den Wert zum Hauptwert der Sammlung"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowcrm.contacts-value-delete",
                "summary": "Kontaktwert entfernen",
                "description": "Entfernt genau einen Wert aus der angegebenen Sammlung.",
                "tags": [
                    "flowcrm.contacts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "collection",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "value_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/clients/{uuid}/projects": {
            "get": {
                "operationId": "flowcrm.projects-list",
                "summary": "Kundenprojekte auflisten",
                "description": "Listet alle Projekte des angegebenen Kunden auf, inklusive Status, Beschreibung und einem modules-Array mit aktiven Integrationen (flowcall, flowtime, flowtasks).",
                "tags": [
                    "flowcrm.projects"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowcrm.projects-create-for-client",
                "summary": "Projekt beim Kunden anlegen",
                "description": "Wie „Projekt anlegen\", der Kunde steht jedoch bereits im Pfad und muss nicht im Rumpf wiederholt werden.",
                "tags": [
                    "flowcrm.projects"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name des Projekts"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Beschreibung"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Interne Notizen"
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/projects": {
            "get": {
                "operationId": "flowcrm.projects-list-all",
                "summary": "Alle Projekte auflisten",
                "description": "Listet die Projekte des Teams über alle Kunden hinweg.",
                "tags": [
                    "flowcrm.projects"
                ],
                "parameters": [
                    {
                        "name": "client_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Nur Projekte des angegebenen Kunden",
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Sucht im Projektnamen",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "<code>active</code> (Standard), <code>archived</code> oder <code>all</code>",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Einträge pro Seite (1 bis 200, Standard 50)",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Seitennummer, beginnend bei 1",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowcrm.projects-create",
                "summary": "Projekt anlegen",
                "description": "Legt ein Projekt beim angegebenen Kunden an.",
                "tags": [
                    "flowcrm.projects"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name des Projekts"
                                    },
                                    "client_uuid": {
                                        "type": "string",
                                        "format": "uuid",
                                        "description": "Kunde, zu dem das Projekt gehört"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Beschreibung"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Interne Notizen"
                                    },
                                    "budget_type": {
                                        "type": "string",
                                        "description": "<code>hours</code> oder <code>amount</code>"
                                    },
                                    "budget_value": {
                                        "type": "number",
                                        "description": "Budgetwert"
                                    },
                                    "budget_currency": {
                                        "type": "string",
                                        "description": "Währung als dreistelliger Code"
                                    },
                                    "budget_interval": {
                                        "type": "string",
                                        "description": "<code>total</code>, <code>monthly</code> oder <code>daily</code>"
                                    },
                                    "budget_enforcement": {
                                        "type": "string",
                                        "description": "<code>soft</code> oder <code>hard</code>"
                                    }
                                },
                                "required": [
                                    "name",
                                    "client_uuid"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/projects/{uuid}": {
            "get": {
                "operationId": "flowcrm.projects-show",
                "summary": "Projekt abrufen",
                "description": "Liefert ein einzelnes Projekt samt Budgetangaben und aktiven Modulen.",
                "tags": [
                    "flowcrm.projects"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "patch": {
                "operationId": "flowcrm.projects-update",
                "summary": "Projekt aktualisieren",
                "description": "Ändert nur die gesendeten Felder. Über client_uuid lässt sich ein Projekt einem anderen Kunden desselben Teams zuordnen, über status archivieren und wieder aktivieren.",
                "tags": [
                    "flowcrm.projects"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name des Projekts"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Beschreibung"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Interne Notizen"
                                    },
                                    "client_uuid": {
                                        "type": "string",
                                        "format": "uuid",
                                        "description": "Neuer Kunde des Projekts"
                                    },
                                    "status": {
                                        "type": "string",
                                        "description": "<code>active</code> oder <code>archived</code>"
                                    },
                                    "budget_type": {
                                        "type": "string",
                                        "description": "<code>hours</code> oder <code>amount</code>"
                                    },
                                    "budget_value": {
                                        "type": "number",
                                        "description": "Budgetwert"
                                    },
                                    "budget_currency": {
                                        "type": "string",
                                        "description": "Währung als dreistelliger Code"
                                    },
                                    "budget_interval": {
                                        "type": "string",
                                        "description": "<code>total</code>, <code>monthly</code> oder <code>daily</code>"
                                    },
                                    "budget_enforcement": {
                                        "type": "string",
                                        "description": "<code>soft</code> oder <code>hard</code>"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowcrm.projects-archive",
                "summary": "Projekt archivieren",
                "description": "Archiviert das Projekt. Es bleibt erhalten, weil Zeiterfassung, Rechnungen und Aufgabenboards weiter darauf verweisen.",
                "tags": [
                    "flowcrm.projects"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/clients/{uuid}/projects/{project_uuid}/timeline": {
            "get": {
                "operationId": "flowcrm.project-timeline-list",
                "summary": "Projekt-Timeline abrufen",
                "description": "Ruft alle Timeline-Einträge für ein bestimmtes Projekt ab, analog zur Kunden-Timeline und in derselben Form, einschließlich uuid je Eintrag.",
                "tags": [
                    "flowcrm.project-timeline"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "project_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowcrm.project-timeline-create",
                "summary": "Projekt-Timeline-Eintrag erstellen",
                "description": "Hängt einen Eintrag an die Projekt-Timeline an. Verfasser und Team ergeben sich aus dem Schlüssel und können nicht im Rumpf gesetzt werden. Ein eigener Eintrag mit identischem Inhalt, Typ und event_date wird nicht doppelt angelegt; die Antwort ist dann HTTP 200 mit duplicate: true.",
                "tags": [
                    "flowcrm.project-timeline"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "project_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "content": {
                                        "type": "string",
                                        "description": "Inhalt des Eintrags"
                                    },
                                    "title": {
                                        "type": "string",
                                        "description": "Veraltet. Wird angenommen und nicht gespeichert."
                                    },
                                    "type": {
                                        "type": "string",
                                        "description": "note (Standard), meeting, email, call, text, coffee, food, networking, party oder other"
                                    },
                                    "event_date": {
                                        "type": "string",
                                        "description": "Zeitpunkt des Ereignisses; ohne Angabe jetzt"
                                    }
                                },
                                "required": [
                                    "content"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/clients/{uuid}/projects/{project_uuid}/timeline/{entry_uuid}": {
            "patch": {
                "operationId": "flowcrm.project-timeline-update",
                "summary": "Projekt-Timeline-Eintrag ändern",
                "description": "Korrigiert einen eigenen, manuell verfassten Eintrag. Einträge anderer Personen und automatisch erzeugte Einträge antworten mit HTTP 403.",
                "tags": [
                    "flowcrm.project-timeline"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "project_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "entry_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "content": {
                                        "type": "string",
                                        "description": "Neuer Inhalt"
                                    },
                                    "title": {
                                        "type": "string",
                                        "description": "Veraltet. Wird angenommen und nicht gespeichert."
                                    },
                                    "type": {
                                        "type": "string",
                                        "description": "Neuer Typ"
                                    },
                                    "event_date": {
                                        "type": "string",
                                        "description": "Neuer Zeitpunkt"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowcrm.project-timeline-delete",
                "summary": "Projekt-Timeline-Eintrag löschen",
                "description": "Entfernt einen eigenen, manuell verfassten Eintrag.",
                "tags": [
                    "flowcrm.project-timeline"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "project_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "entry_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/clients/{uuid}/projects/{project_uuid}/timeline/bulk-delete": {
            "post": {
                "operationId": "flowcrm.project-timeline-bulk-delete",
                "summary": "Mehrere Projekt-Timeline-Einträge löschen",
                "description": "Entfernt bis zu 200 eigene, manuell verfasste Einträge eines Projekts in einem Aufruf. Regeln und Antwort entsprechen dem Sammel-Löschen der Kunden-Timeline.",
                "tags": [
                    "flowcrm.project-timeline"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "project_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "entry_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Liste der zu löschenden Eintrags-UUIDs (1 bis 200, jede nur einmal)"
                                    }
                                },
                                "required": [
                                    "entry_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/clients/{uuid}/todos": {
            "get": {
                "operationId": "flowcrm.clients-todos-list",
                "summary": "Aufgaben auflisten (Kunden)",
                "description": "Listet die Aufgaben des Datensatzes auf. Erledigte Aufgaben erscheinen nur mit include_completed=1.",
                "tags": [
                    "flowcrm.record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "include_completed",
                        "in": "query",
                        "required": false,
                        "description": "Erledigte Aufgaben mit ausgeben",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Einträge pro Seite (1 bis 200, Standard 50)",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Seitennummer, beginnend bei 1",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowcrm.clients-todos-create",
                "summary": "Aufgabe anlegen (Kunden)",
                "description": "Legt eine Aufgabe am Datensatz an. Zuständige werden über ihre Benutzer-UUID benannt und müssen zum Team des Schlüssels gehören. Mit recurring_interval entsteht eine Serie, also eine Aufgabe, die sich nach jedem Erledigen selbst auf den nächsten Termin setzt. Eine Serie braucht ein due_date und kann nicht bereits erledigt angelegt werden; beides antwortet sonst mit HTTP 422.",
                "tags": [
                    "flowcrm.record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "description": "Titel der Aufgabe"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Beschreibung"
                                    },
                                    "due_date": {
                                        "type": "string",
                                        "description": "Fälligkeit im Format JJJJ-MM-TT"
                                    },
                                    "priority": {
                                        "type": "string",
                                        "description": "<code>high</code>, <code>medium</code> (Standard) oder <code>low</code>"
                                    },
                                    "completed": {
                                        "type": "boolean",
                                        "description": "Direkt als erledigt anlegen. Nicht zusammen mit <code>recurring_interval</code>"
                                    },
                                    "recurring_interval": {
                                        "type": "string",
                                        "description": "Wiederholung der Aufgabe: <code>daily</code>, <code>every_2_days</code>, <code>weekly</code>, <code>every_2_weeks</code>, <code>monthly</code>, <code>every_2_months</code>, <code>quarterly</code>, <code>half_yearly</code> oder <code>yearly</code>. Erfordert <code>due_date</code>"
                                    },
                                    "assigned_user_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Benutzer-UUIDs der Zuständigen"
                                    }
                                },
                                "required": [
                                    "title"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/clients/{uuid}/todos/{todo_uuid}": {
            "patch": {
                "operationId": "flowcrm.clients-todos-update",
                "summary": "Aufgabe aktualisieren (Kunden)",
                "description": "Ändert nur die gesendeten Felder. Über completed wird eine Aufgabe erledigt oder wieder geöffnet. Ein weggelassenes assigned_user_uuids lässt die Zuständigkeit unverändert, ein leeres Feld hebt sie auf. Bei einer Serie (Aufgabe mit recurring_interval) erledigt completed: true nur die aktuelle Wiederholung: Die Aufgabe bleibt offen, ihr due_date rückt um ein Intervall vor, und die erledigte Wiederholung wird als eigene, erledigte Aufgabe abgelegt. data ist immer die adressierte Aufgabe, bei einer Serie also weiterhin mit completed: false und dem neuen due_date. Die erledigte Wiederholung steht daneben im Antwortfeld completed_occurrence; in allen anderen Fällen ist es null. Wieder öffnen (completed: false) wirkt auf einfache Aufgaben und auf erledigte Wiederholungen, die Serie selbst ist nie erledigt. Das due_date einer Serie lässt sich nicht direkt ändern (HTTP 422). Ein wiederholter Aufruf würde auch die nächste Wiederholung erledigen: Wer expected_due_date mitsendet, erhält stattdessen HTTP 409 mit dem aktuellen Termin in current_due_date, sobald die Serie bereits weitergerückt ist.",
                "tags": [
                    "flowcrm.record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "todo_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "3f6c1b2a-9d4e-4c7f-8a1b-5e2d7c9f0a11",
                                        "title": "Wochenbericht senden",
                                        "description": null,
                                        "due_date": "2026-10-16",
                                        "priority": "medium",
                                        "completed": false,
                                        "completed_at": null,
                                        "recurring_interval": "weekly",
                                        "assigned_user_uuids": [],
                                        "created_at": "2026-10-01T08:00:00+00:00",
                                        "updated_at": "2026-10-09T09:30:00+00:00"
                                    },
                                    "completed_occurrence": {
                                        "uuid": "b81d4c7e-2a5f-4e3b-9c6d-1f0a8e7b6c22",
                                        "title": "Wochenbericht senden",
                                        "description": null,
                                        "due_date": "2026-10-09",
                                        "priority": "medium",
                                        "completed": true,
                                        "completed_at": "2026-10-09T09:30:00+00:00",
                                        "recurring_interval": null,
                                        "assigned_user_uuids": [],
                                        "created_at": "2026-10-09T09:30:00+00:00",
                                        "updated_at": "2026-10-09T09:30:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "description": "Titel der Aufgabe"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Beschreibung"
                                    },
                                    "due_date": {
                                        "type": "string",
                                        "description": "Fälligkeit im Format JJJJ-MM-TT"
                                    },
                                    "priority": {
                                        "type": "string",
                                        "description": "<code>high</code>, <code>medium</code> oder <code>low</code>"
                                    },
                                    "completed": {
                                        "type": "boolean",
                                        "description": "Erledigt-Zustand. Bei einer Serie erledigt <code>true</code> nur die aktuelle Wiederholung"
                                    },
                                    "recurring_interval": {
                                        "type": "string",
                                        "description": "Wiederholung der Aufgabe: <code>daily</code>, <code>every_2_days</code>, <code>weekly</code>, <code>every_2_weeks</code>, <code>monthly</code>, <code>every_2_months</code>, <code>quarterly</code>, <code>half_yearly</code> oder <code>yearly</code>. Erfordert ein <code>due_date</code>; <code>null</code> beendet die Serie"
                                    },
                                    "expected_due_date": {
                                        "type": "string",
                                        "description": "Nur beim Erledigen einer Serie: der Termin im Format JJJJ-MM-TT, den der Aufrufer gerade sieht. Weicht er vom aktuellen <code>due_date</code> ab, antwortet der Endpunkt mit HTTP 409 und erledigt nichts"
                                    },
                                    "assigned_user_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Benutzer-UUIDs der Zuständigen"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowcrm.clients-todos-delete",
                "summary": "Aufgabe löschen (Kunden)",
                "description": "Entfernt die Aufgabe.",
                "tags": [
                    "flowcrm.record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "todo_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/clients/{uuid}/metadata": {
            "get": {
                "operationId": "flowcrm.clients-metadata-show",
                "summary": "Metadaten abrufen (Kunden)",
                "description": "Liefert Tags, Quellen und Zusatzfelder des Datensatzes sowie die im Team verfügbaren Tags und Zusatzfeld-Definitionen. Eine Definition mit api_managed: true kann nur über die API beschrieben werden und ist in der Oberfläche schreibgeschützt. Zusatzfelder vom Typ reference werden mit der UUID und dem Namen des Ziels beantwortet. Jede Definition nennt ihren type: text, textarea, number, url, dropdown, multiselect, reference, date oder currency. Bei dropdown und multiselect nennt options die wählbaren Optionen mit label und value; der Wert eines multiselect-Feldes ist eine Liste von Options-Werten wie [\"gold\", \"silber\"]. Bei number und currency steht in decimals die Zahl der erlaubten Nachkommastellen, bei currency zusätzlich in currency der feste ISO-4217-Code des Feldes; für alle anderen Typen sind beide Angaben null. Werte vom Typ date haben das Format JJJJ-MM-TT, Werte vom Typ currency sind eine Dezimalzahl mit Punkt als Dezimaltrenner und nennen den Währungscode in currency.",
                "tags": [
                    "flowcrm.record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "tags": [],
                                        "available_tags": [],
                                        "sources": [
                                            "messe-2026"
                                        ],
                                        "custom_field_definitions": [
                                            {
                                                "uuid": "7c1f9a3b-42d5-4e88-9a10-b6c3f2d51e04",
                                                "name": "Branche",
                                                "type": "text",
                                                "reference_source": null,
                                                "decimals": null,
                                                "currency": null,
                                                "options": []
                                            },
                                            {
                                                "uuid": "5e2a9c71-3b0d-4f86-a1c4-7d9e0b6f2a38",
                                                "name": "Vertragsende",
                                                "type": "date",
                                                "reference_source": null,
                                                "decimals": null,
                                                "currency": null,
                                                "options": []
                                            },
                                            {
                                                "uuid": "b84d1f06-9a2e-4c53-8e7b-0f3a6d5c9e12",
                                                "name": "Jahresbudget",
                                                "type": "currency",
                                                "reference_source": null,
                                                "decimals": 2,
                                                "currency": "EUR",
                                                "options": []
                                            }
                                        ],
                                        "custom_field_values": [
                                            {
                                                "definition_uuid": "5e2a9c71-3b0d-4f86-a1c4-7d9e0b6f2a38",
                                                "name": "Vertragsende",
                                                "type": "date",
                                                "value": "2026-12-31",
                                                "currency": null,
                                                "reference": null
                                            },
                                            {
                                                "definition_uuid": "b84d1f06-9a2e-4c53-8e7b-0f3a6d5c9e12",
                                                "name": "Jahresbudget",
                                                "type": "currency",
                                                "value": "12500.00",
                                                "currency": "EUR",
                                                "reference": null
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "patch": {
                "operationId": "flowcrm.clients-metadata-update",
                "summary": "Metadaten ändern (Kunden)",
                "description": "Ergänzt oder entfernt gezielt einzelne Tags, Quellen und Zusatzfeldwerte. Nichts wird als Ganzes ersetzt, ein leerer Wert löscht das jeweilige Zusatzfeld. Zusatzfelder werden über definition_uuid oder ihren eindeutigen name benannt; bei Referenzfeldern ist der Wert die UUID des Ziels. Felder vom Typ multiselect erwarten eine Liste von Options-Werten aus options, die die bisherige Auswahl vollständig ersetzt; eine leere Liste löscht das Feld. Felder vom Typ date erwarten ein Datum im Format JJJJ-MM-TT, Felder vom Typ currency einen Betrag als Zahl oder Zahl-String ohne Währungszeichen und ohne Tausendertrennzeichen. Der Betrag darf höchstens so viele Nachkommastellen haben, wie die Definition in decimals nennt, und wird auf diese Stellenzahl aufgefüllt gespeichert. Ein Wert, der nicht zum Typ passt, führt zu HTTP 422 mit dem Feldbezug custom_fields.{index}; es wird dann nichts geändert.",
                "tags": [
                    "flowcrm.record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "add_tag_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Tags, die ergänzt werden"
                                    },
                                    "remove_tag_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Tags, die entfernt werden"
                                    },
                                    "add_sources": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Quellen, die ergänzt werden"
                                    },
                                    "remove_sources": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Quellen, die entfernt werden"
                                    },
                                    "custom_fields": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Einträge aus <code>definition_uuid</code> oder <code>name</code> und <code>value</code>. Bei <code>date</code> ist <code>value</code> ein Datum wie <code>\"2026-12-31\"</code>, bei <code>currency</code> ein Betrag wie <code>12500.5</code> oder <code>\"12500.50\"</code>, bei <code>multiselect</code> eine Liste wie <code>[\"gold\", \"silber\"]</code>"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/clients/{uuid}/files": {
            "get": {
                "operationId": "flowcrm.clients-files-list",
                "summary": "Dateien auflisten (Kunden)",
                "description": "Listet die Dateien des Datensatzes auf. has_document_source zeigt an, ob die Datei aus Markdown erzeugt wurde und damit überarbeitet statt ersetzt werden kann.",
                "tags": [
                    "flowcrm.record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Einträge pro Seite (1 bis 200, Standard 50)",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Seitennummer, beginnend bei 1",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowcrm.clients-files-upload",
                "summary": "Datei hochladen (Kunden)",
                "description": "Hängt eine hochgeladene Datei an den Datensatz. Übertragung als multipart/form-data, höchstens 50 MB. Nicht zugelassene Dateitypen antworten mit HTTP 422.",
                "tags": [
                    "flowcrm.record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "file": {
                                        "type": "string",
                                        "format": "binary",
                                        "description": "Die hochzuladende Datei"
                                    },
                                    "name": {
                                        "type": "string",
                                        "description": "Abweichender Dateiname"
                                    }
                                },
                                "required": [
                                    "file"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/clients/{uuid}/files/{file_uuid}/download": {
            "get": {
                "operationId": "flowcrm.clients-files-download",
                "summary": "Abruflink für eine Datei (Kunden)",
                "description": "Liefert einen kurzlebigen Abruflink samt Gültigkeitsdauer in Sekunden. Die Antwort enthält den Link, nicht die Bytes.",
                "tags": [
                    "flowcrm.record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "file_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/clients/{uuid}/files/{file_uuid}/text": {
            "get": {
                "operationId": "flowcrm.clients-files-text",
                "summary": "Text einer Datei lesen (Kunden)",
                "description": "Gibt den bereits extrahierten Text der Datei in Abschnitten von 20.000 Zeichen zurück. Der Endpunkt liest nur; er stößt keine neue Extraktion an.",
                "tags": [
                    "flowcrm.record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "file_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "offset",
                        "in": "query",
                        "required": false,
                        "description": "Startposition im Text; <code>next_offset</code> der Antwort führt zum nächsten Abschnitt",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/clients/{uuid}/documents": {
            "post": {
                "operationId": "flowcrm.clients-documents-render",
                "summary": "Dokument aus Markdown erzeugen (Kunden)",
                "description": "Erzeugt aus Markdown ein PDF oder ein Word-Dokument und legt es am Datensatz ab. Mit file_uuid wird eine bestehende, ebenfalls so erzeugte Fassung überarbeitet statt eine zweite daneben zu legen.",
                "tags": [
                    "flowcrm.record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "description": "Titel und zugleich Dateiname ohne Endung"
                                    },
                                    "source_markdown": {
                                        "type": "string",
                                        "description": "Der Inhalt als Markdown"
                                    },
                                    "format": {
                                        "type": "string",
                                        "description": "<code>pdf</code> oder <code>docx</code>"
                                    },
                                    "file_uuid": {
                                        "type": "string",
                                        "format": "uuid",
                                        "description": "Bestehende Fassung, die ersetzt wird"
                                    }
                                },
                                "required": [
                                    "title",
                                    "source_markdown",
                                    "format"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/contacts/{uuid}/todos": {
            "get": {
                "operationId": "flowcrm.contacts-todos-list",
                "summary": "Aufgaben auflisten (Kontakte)",
                "description": "Listet die Aufgaben des Datensatzes auf. Erledigte Aufgaben erscheinen nur mit include_completed=1.",
                "tags": [
                    "flowcrm.record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "include_completed",
                        "in": "query",
                        "required": false,
                        "description": "Erledigte Aufgaben mit ausgeben",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Einträge pro Seite (1 bis 200, Standard 50)",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Seitennummer, beginnend bei 1",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowcrm.contacts-todos-create",
                "summary": "Aufgabe anlegen (Kontakte)",
                "description": "Legt eine Aufgabe am Datensatz an. Zuständige werden über ihre Benutzer-UUID benannt und müssen zum Team des Schlüssels gehören. Mit recurring_interval entsteht eine Serie, also eine Aufgabe, die sich nach jedem Erledigen selbst auf den nächsten Termin setzt. Eine Serie braucht ein due_date und kann nicht bereits erledigt angelegt werden; beides antwortet sonst mit HTTP 422.",
                "tags": [
                    "flowcrm.record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "description": "Titel der Aufgabe"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Beschreibung"
                                    },
                                    "due_date": {
                                        "type": "string",
                                        "description": "Fälligkeit im Format JJJJ-MM-TT"
                                    },
                                    "priority": {
                                        "type": "string",
                                        "description": "<code>high</code>, <code>medium</code> (Standard) oder <code>low</code>"
                                    },
                                    "completed": {
                                        "type": "boolean",
                                        "description": "Direkt als erledigt anlegen. Nicht zusammen mit <code>recurring_interval</code>"
                                    },
                                    "recurring_interval": {
                                        "type": "string",
                                        "description": "Wiederholung der Aufgabe: <code>daily</code>, <code>every_2_days</code>, <code>weekly</code>, <code>every_2_weeks</code>, <code>monthly</code>, <code>every_2_months</code>, <code>quarterly</code>, <code>half_yearly</code> oder <code>yearly</code>. Erfordert <code>due_date</code>"
                                    },
                                    "assigned_user_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Benutzer-UUIDs der Zuständigen"
                                    }
                                },
                                "required": [
                                    "title"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/contacts/{uuid}/todos/{todo_uuid}": {
            "patch": {
                "operationId": "flowcrm.contacts-todos-update",
                "summary": "Aufgabe aktualisieren (Kontakte)",
                "description": "Ändert nur die gesendeten Felder. Über completed wird eine Aufgabe erledigt oder wieder geöffnet. Ein weggelassenes assigned_user_uuids lässt die Zuständigkeit unverändert, ein leeres Feld hebt sie auf. Bei einer Serie (Aufgabe mit recurring_interval) erledigt completed: true nur die aktuelle Wiederholung: Die Aufgabe bleibt offen, ihr due_date rückt um ein Intervall vor, und die erledigte Wiederholung wird als eigene, erledigte Aufgabe abgelegt. data ist immer die adressierte Aufgabe, bei einer Serie also weiterhin mit completed: false und dem neuen due_date. Die erledigte Wiederholung steht daneben im Antwortfeld completed_occurrence; in allen anderen Fällen ist es null. Wieder öffnen (completed: false) wirkt auf einfache Aufgaben und auf erledigte Wiederholungen, die Serie selbst ist nie erledigt. Das due_date einer Serie lässt sich nicht direkt ändern (HTTP 422). Ein wiederholter Aufruf würde auch die nächste Wiederholung erledigen: Wer expected_due_date mitsendet, erhält stattdessen HTTP 409 mit dem aktuellen Termin in current_due_date, sobald die Serie bereits weitergerückt ist.",
                "tags": [
                    "flowcrm.record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "todo_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "3f6c1b2a-9d4e-4c7f-8a1b-5e2d7c9f0a11",
                                        "title": "Wochenbericht senden",
                                        "description": null,
                                        "due_date": "2026-10-16",
                                        "priority": "medium",
                                        "completed": false,
                                        "completed_at": null,
                                        "recurring_interval": "weekly",
                                        "assigned_user_uuids": [],
                                        "created_at": "2026-10-01T08:00:00+00:00",
                                        "updated_at": "2026-10-09T09:30:00+00:00"
                                    },
                                    "completed_occurrence": {
                                        "uuid": "b81d4c7e-2a5f-4e3b-9c6d-1f0a8e7b6c22",
                                        "title": "Wochenbericht senden",
                                        "description": null,
                                        "due_date": "2026-10-09",
                                        "priority": "medium",
                                        "completed": true,
                                        "completed_at": "2026-10-09T09:30:00+00:00",
                                        "recurring_interval": null,
                                        "assigned_user_uuids": [],
                                        "created_at": "2026-10-09T09:30:00+00:00",
                                        "updated_at": "2026-10-09T09:30:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "description": "Titel der Aufgabe"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Beschreibung"
                                    },
                                    "due_date": {
                                        "type": "string",
                                        "description": "Fälligkeit im Format JJJJ-MM-TT"
                                    },
                                    "priority": {
                                        "type": "string",
                                        "description": "<code>high</code>, <code>medium</code> oder <code>low</code>"
                                    },
                                    "completed": {
                                        "type": "boolean",
                                        "description": "Erledigt-Zustand. Bei einer Serie erledigt <code>true</code> nur die aktuelle Wiederholung"
                                    },
                                    "recurring_interval": {
                                        "type": "string",
                                        "description": "Wiederholung der Aufgabe: <code>daily</code>, <code>every_2_days</code>, <code>weekly</code>, <code>every_2_weeks</code>, <code>monthly</code>, <code>every_2_months</code>, <code>quarterly</code>, <code>half_yearly</code> oder <code>yearly</code>. Erfordert ein <code>due_date</code>; <code>null</code> beendet die Serie"
                                    },
                                    "expected_due_date": {
                                        "type": "string",
                                        "description": "Nur beim Erledigen einer Serie: der Termin im Format JJJJ-MM-TT, den der Aufrufer gerade sieht. Weicht er vom aktuellen <code>due_date</code> ab, antwortet der Endpunkt mit HTTP 409 und erledigt nichts"
                                    },
                                    "assigned_user_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Benutzer-UUIDs der Zuständigen"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowcrm.contacts-todos-delete",
                "summary": "Aufgabe löschen (Kontakte)",
                "description": "Entfernt die Aufgabe.",
                "tags": [
                    "flowcrm.record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "todo_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/contacts/{uuid}/metadata": {
            "get": {
                "operationId": "flowcrm.contacts-metadata-show",
                "summary": "Metadaten abrufen (Kontakte)",
                "description": "Liefert Tags, Quellen und Zusatzfelder des Datensatzes sowie die im Team verfügbaren Tags und Zusatzfeld-Definitionen. Eine Definition mit api_managed: true kann nur über die API beschrieben werden und ist in der Oberfläche schreibgeschützt. Zusatzfelder vom Typ reference werden mit der UUID und dem Namen des Ziels beantwortet. Jede Definition nennt ihren type: text, textarea, number, url, dropdown, multiselect, reference, date oder currency. Bei dropdown und multiselect nennt options die wählbaren Optionen mit label und value; der Wert eines multiselect-Feldes ist eine Liste von Options-Werten wie [\"gold\", \"silber\"]. Bei number und currency steht in decimals die Zahl der erlaubten Nachkommastellen, bei currency zusätzlich in currency der feste ISO-4217-Code des Feldes; für alle anderen Typen sind beide Angaben null. Werte vom Typ date haben das Format JJJJ-MM-TT, Werte vom Typ currency sind eine Dezimalzahl mit Punkt als Dezimaltrenner und nennen den Währungscode in currency.",
                "tags": [
                    "flowcrm.record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "tags": [],
                                        "available_tags": [],
                                        "sources": [
                                            "messe-2026"
                                        ],
                                        "custom_field_definitions": [
                                            {
                                                "uuid": "7c1f9a3b-42d5-4e88-9a10-b6c3f2d51e04",
                                                "name": "Branche",
                                                "type": "text",
                                                "reference_source": null,
                                                "decimals": null,
                                                "currency": null,
                                                "options": []
                                            },
                                            {
                                                "uuid": "5e2a9c71-3b0d-4f86-a1c4-7d9e0b6f2a38",
                                                "name": "Vertragsende",
                                                "type": "date",
                                                "reference_source": null,
                                                "decimals": null,
                                                "currency": null,
                                                "options": []
                                            },
                                            {
                                                "uuid": "b84d1f06-9a2e-4c53-8e7b-0f3a6d5c9e12",
                                                "name": "Jahresbudget",
                                                "type": "currency",
                                                "reference_source": null,
                                                "decimals": 2,
                                                "currency": "EUR",
                                                "options": []
                                            }
                                        ],
                                        "custom_field_values": [
                                            {
                                                "definition_uuid": "5e2a9c71-3b0d-4f86-a1c4-7d9e0b6f2a38",
                                                "name": "Vertragsende",
                                                "type": "date",
                                                "value": "2026-12-31",
                                                "currency": null,
                                                "reference": null
                                            },
                                            {
                                                "definition_uuid": "b84d1f06-9a2e-4c53-8e7b-0f3a6d5c9e12",
                                                "name": "Jahresbudget",
                                                "type": "currency",
                                                "value": "12500.00",
                                                "currency": "EUR",
                                                "reference": null
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "patch": {
                "operationId": "flowcrm.contacts-metadata-update",
                "summary": "Metadaten ändern (Kontakte)",
                "description": "Ergänzt oder entfernt gezielt einzelne Tags, Quellen und Zusatzfeldwerte. Nichts wird als Ganzes ersetzt, ein leerer Wert löscht das jeweilige Zusatzfeld. Zusatzfelder werden über definition_uuid oder ihren eindeutigen name benannt; bei Referenzfeldern ist der Wert die UUID des Ziels. Felder vom Typ multiselect erwarten eine Liste von Options-Werten aus options, die die bisherige Auswahl vollständig ersetzt; eine leere Liste löscht das Feld. Felder vom Typ date erwarten ein Datum im Format JJJJ-MM-TT, Felder vom Typ currency einen Betrag als Zahl oder Zahl-String ohne Währungszeichen und ohne Tausendertrennzeichen. Der Betrag darf höchstens so viele Nachkommastellen haben, wie die Definition in decimals nennt, und wird auf diese Stellenzahl aufgefüllt gespeichert. Ein Wert, der nicht zum Typ passt, führt zu HTTP 422 mit dem Feldbezug custom_fields.{index}; es wird dann nichts geändert.",
                "tags": [
                    "flowcrm.record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "add_tag_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Tags, die ergänzt werden"
                                    },
                                    "remove_tag_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Tags, die entfernt werden"
                                    },
                                    "add_sources": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Quellen, die ergänzt werden"
                                    },
                                    "remove_sources": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Quellen, die entfernt werden"
                                    },
                                    "custom_fields": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Einträge aus <code>definition_uuid</code> oder <code>name</code> und <code>value</code>. Bei <code>date</code> ist <code>value</code> ein Datum wie <code>\"2026-12-31\"</code>, bei <code>currency</code> ein Betrag wie <code>12500.5</code> oder <code>\"12500.50\"</code>, bei <code>multiselect</code> eine Liste wie <code>[\"gold\", \"silber\"]</code>"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/contacts/{uuid}/files": {
            "get": {
                "operationId": "flowcrm.contacts-files-list",
                "summary": "Dateien auflisten (Kontakte)",
                "description": "Listet die Dateien des Datensatzes auf. has_document_source zeigt an, ob die Datei aus Markdown erzeugt wurde und damit überarbeitet statt ersetzt werden kann.",
                "tags": [
                    "flowcrm.record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Einträge pro Seite (1 bis 200, Standard 50)",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Seitennummer, beginnend bei 1",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowcrm.contacts-files-upload",
                "summary": "Datei hochladen (Kontakte)",
                "description": "Hängt eine hochgeladene Datei an den Datensatz. Übertragung als multipart/form-data, höchstens 50 MB. Nicht zugelassene Dateitypen antworten mit HTTP 422.",
                "tags": [
                    "flowcrm.record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "file": {
                                        "type": "string",
                                        "format": "binary",
                                        "description": "Die hochzuladende Datei"
                                    },
                                    "name": {
                                        "type": "string",
                                        "description": "Abweichender Dateiname"
                                    }
                                },
                                "required": [
                                    "file"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/contacts/{uuid}/files/{file_uuid}/download": {
            "get": {
                "operationId": "flowcrm.contacts-files-download",
                "summary": "Abruflink für eine Datei (Kontakte)",
                "description": "Liefert einen kurzlebigen Abruflink samt Gültigkeitsdauer in Sekunden. Die Antwort enthält den Link, nicht die Bytes.",
                "tags": [
                    "flowcrm.record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "file_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/contacts/{uuid}/files/{file_uuid}/text": {
            "get": {
                "operationId": "flowcrm.contacts-files-text",
                "summary": "Text einer Datei lesen (Kontakte)",
                "description": "Gibt den bereits extrahierten Text der Datei in Abschnitten von 20.000 Zeichen zurück. Der Endpunkt liest nur; er stößt keine neue Extraktion an.",
                "tags": [
                    "flowcrm.record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "file_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "offset",
                        "in": "query",
                        "required": false,
                        "description": "Startposition im Text; <code>next_offset</code> der Antwort führt zum nächsten Abschnitt",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/contacts/{uuid}/documents": {
            "post": {
                "operationId": "flowcrm.contacts-documents-render",
                "summary": "Dokument aus Markdown erzeugen (Kontakte)",
                "description": "Erzeugt aus Markdown ein PDF oder ein Word-Dokument und legt es am Datensatz ab. Mit file_uuid wird eine bestehende, ebenfalls so erzeugte Fassung überarbeitet statt eine zweite daneben zu legen.",
                "tags": [
                    "flowcrm.record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "description": "Titel und zugleich Dateiname ohne Endung"
                                    },
                                    "source_markdown": {
                                        "type": "string",
                                        "description": "Der Inhalt als Markdown"
                                    },
                                    "format": {
                                        "type": "string",
                                        "description": "<code>pdf</code> oder <code>docx</code>"
                                    },
                                    "file_uuid": {
                                        "type": "string",
                                        "format": "uuid",
                                        "description": "Bestehende Fassung, die ersetzt wird"
                                    }
                                },
                                "required": [
                                    "title",
                                    "source_markdown",
                                    "format"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/projects/{uuid}/todos": {
            "get": {
                "operationId": "flowcrm.projects-todos-list",
                "summary": "Aufgaben auflisten (Projekte)",
                "description": "Listet die Aufgaben des Datensatzes auf. Erledigte Aufgaben erscheinen nur mit include_completed=1.",
                "tags": [
                    "flowcrm.record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "include_completed",
                        "in": "query",
                        "required": false,
                        "description": "Erledigte Aufgaben mit ausgeben",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Einträge pro Seite (1 bis 200, Standard 50)",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Seitennummer, beginnend bei 1",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowcrm.projects-todos-create",
                "summary": "Aufgabe anlegen (Projekte)",
                "description": "Legt eine Aufgabe am Datensatz an. Zuständige werden über ihre Benutzer-UUID benannt und müssen zum Team des Schlüssels gehören. Mit recurring_interval entsteht eine Serie, also eine Aufgabe, die sich nach jedem Erledigen selbst auf den nächsten Termin setzt. Eine Serie braucht ein due_date und kann nicht bereits erledigt angelegt werden; beides antwortet sonst mit HTTP 422.",
                "tags": [
                    "flowcrm.record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "description": "Titel der Aufgabe"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Beschreibung"
                                    },
                                    "due_date": {
                                        "type": "string",
                                        "description": "Fälligkeit im Format JJJJ-MM-TT"
                                    },
                                    "priority": {
                                        "type": "string",
                                        "description": "<code>high</code>, <code>medium</code> (Standard) oder <code>low</code>"
                                    },
                                    "completed": {
                                        "type": "boolean",
                                        "description": "Direkt als erledigt anlegen. Nicht zusammen mit <code>recurring_interval</code>"
                                    },
                                    "recurring_interval": {
                                        "type": "string",
                                        "description": "Wiederholung der Aufgabe: <code>daily</code>, <code>every_2_days</code>, <code>weekly</code>, <code>every_2_weeks</code>, <code>monthly</code>, <code>every_2_months</code>, <code>quarterly</code>, <code>half_yearly</code> oder <code>yearly</code>. Erfordert <code>due_date</code>"
                                    },
                                    "assigned_user_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Benutzer-UUIDs der Zuständigen"
                                    }
                                },
                                "required": [
                                    "title"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/projects/{uuid}/todos/{todo_uuid}": {
            "patch": {
                "operationId": "flowcrm.projects-todos-update",
                "summary": "Aufgabe aktualisieren (Projekte)",
                "description": "Ändert nur die gesendeten Felder. Über completed wird eine Aufgabe erledigt oder wieder geöffnet. Ein weggelassenes assigned_user_uuids lässt die Zuständigkeit unverändert, ein leeres Feld hebt sie auf. Bei einer Serie (Aufgabe mit recurring_interval) erledigt completed: true nur die aktuelle Wiederholung: Die Aufgabe bleibt offen, ihr due_date rückt um ein Intervall vor, und die erledigte Wiederholung wird als eigene, erledigte Aufgabe abgelegt. data ist immer die adressierte Aufgabe, bei einer Serie also weiterhin mit completed: false und dem neuen due_date. Die erledigte Wiederholung steht daneben im Antwortfeld completed_occurrence; in allen anderen Fällen ist es null. Wieder öffnen (completed: false) wirkt auf einfache Aufgaben und auf erledigte Wiederholungen, die Serie selbst ist nie erledigt. Das due_date einer Serie lässt sich nicht direkt ändern (HTTP 422). Ein wiederholter Aufruf würde auch die nächste Wiederholung erledigen: Wer expected_due_date mitsendet, erhält stattdessen HTTP 409 mit dem aktuellen Termin in current_due_date, sobald die Serie bereits weitergerückt ist.",
                "tags": [
                    "flowcrm.record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "todo_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "3f6c1b2a-9d4e-4c7f-8a1b-5e2d7c9f0a11",
                                        "title": "Wochenbericht senden",
                                        "description": null,
                                        "due_date": "2026-10-16",
                                        "priority": "medium",
                                        "completed": false,
                                        "completed_at": null,
                                        "recurring_interval": "weekly",
                                        "assigned_user_uuids": [],
                                        "created_at": "2026-10-01T08:00:00+00:00",
                                        "updated_at": "2026-10-09T09:30:00+00:00"
                                    },
                                    "completed_occurrence": {
                                        "uuid": "b81d4c7e-2a5f-4e3b-9c6d-1f0a8e7b6c22",
                                        "title": "Wochenbericht senden",
                                        "description": null,
                                        "due_date": "2026-10-09",
                                        "priority": "medium",
                                        "completed": true,
                                        "completed_at": "2026-10-09T09:30:00+00:00",
                                        "recurring_interval": null,
                                        "assigned_user_uuids": [],
                                        "created_at": "2026-10-09T09:30:00+00:00",
                                        "updated_at": "2026-10-09T09:30:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "description": "Titel der Aufgabe"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Beschreibung"
                                    },
                                    "due_date": {
                                        "type": "string",
                                        "description": "Fälligkeit im Format JJJJ-MM-TT"
                                    },
                                    "priority": {
                                        "type": "string",
                                        "description": "<code>high</code>, <code>medium</code> oder <code>low</code>"
                                    },
                                    "completed": {
                                        "type": "boolean",
                                        "description": "Erledigt-Zustand. Bei einer Serie erledigt <code>true</code> nur die aktuelle Wiederholung"
                                    },
                                    "recurring_interval": {
                                        "type": "string",
                                        "description": "Wiederholung der Aufgabe: <code>daily</code>, <code>every_2_days</code>, <code>weekly</code>, <code>every_2_weeks</code>, <code>monthly</code>, <code>every_2_months</code>, <code>quarterly</code>, <code>half_yearly</code> oder <code>yearly</code>. Erfordert ein <code>due_date</code>; <code>null</code> beendet die Serie"
                                    },
                                    "expected_due_date": {
                                        "type": "string",
                                        "description": "Nur beim Erledigen einer Serie: der Termin im Format JJJJ-MM-TT, den der Aufrufer gerade sieht. Weicht er vom aktuellen <code>due_date</code> ab, antwortet der Endpunkt mit HTTP 409 und erledigt nichts"
                                    },
                                    "assigned_user_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Benutzer-UUIDs der Zuständigen"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowcrm.projects-todos-delete",
                "summary": "Aufgabe löschen (Projekte)",
                "description": "Entfernt die Aufgabe.",
                "tags": [
                    "flowcrm.record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "todo_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/projects/{uuid}/metadata": {
            "get": {
                "operationId": "flowcrm.projects-metadata-show",
                "summary": "Metadaten abrufen (Projekte)",
                "description": "Liefert Tags, Quellen und Zusatzfelder des Datensatzes sowie die im Team verfügbaren Tags und Zusatzfeld-Definitionen. Eine Definition mit api_managed: true kann nur über die API beschrieben werden und ist in der Oberfläche schreibgeschützt. Zusatzfelder vom Typ reference werden mit der UUID und dem Namen des Ziels beantwortet. Jede Definition nennt ihren type: text, textarea, number, url, dropdown, multiselect, reference, date oder currency. Bei dropdown und multiselect nennt options die wählbaren Optionen mit label und value; der Wert eines multiselect-Feldes ist eine Liste von Options-Werten wie [\"gold\", \"silber\"]. Bei number und currency steht in decimals die Zahl der erlaubten Nachkommastellen, bei currency zusätzlich in currency der feste ISO-4217-Code des Feldes; für alle anderen Typen sind beide Angaben null. Werte vom Typ date haben das Format JJJJ-MM-TT, Werte vom Typ currency sind eine Dezimalzahl mit Punkt als Dezimaltrenner und nennen den Währungscode in currency.",
                "tags": [
                    "flowcrm.record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "tags": [],
                                        "available_tags": [],
                                        "sources": [
                                            "messe-2026"
                                        ],
                                        "custom_field_definitions": [
                                            {
                                                "uuid": "7c1f9a3b-42d5-4e88-9a10-b6c3f2d51e04",
                                                "name": "Branche",
                                                "type": "text",
                                                "reference_source": null,
                                                "decimals": null,
                                                "currency": null,
                                                "options": []
                                            },
                                            {
                                                "uuid": "5e2a9c71-3b0d-4f86-a1c4-7d9e0b6f2a38",
                                                "name": "Vertragsende",
                                                "type": "date",
                                                "reference_source": null,
                                                "decimals": null,
                                                "currency": null,
                                                "options": []
                                            },
                                            {
                                                "uuid": "b84d1f06-9a2e-4c53-8e7b-0f3a6d5c9e12",
                                                "name": "Jahresbudget",
                                                "type": "currency",
                                                "reference_source": null,
                                                "decimals": 2,
                                                "currency": "EUR",
                                                "options": []
                                            }
                                        ],
                                        "custom_field_values": [
                                            {
                                                "definition_uuid": "5e2a9c71-3b0d-4f86-a1c4-7d9e0b6f2a38",
                                                "name": "Vertragsende",
                                                "type": "date",
                                                "value": "2026-12-31",
                                                "currency": null,
                                                "reference": null
                                            },
                                            {
                                                "definition_uuid": "b84d1f06-9a2e-4c53-8e7b-0f3a6d5c9e12",
                                                "name": "Jahresbudget",
                                                "type": "currency",
                                                "value": "12500.00",
                                                "currency": "EUR",
                                                "reference": null
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "patch": {
                "operationId": "flowcrm.projects-metadata-update",
                "summary": "Metadaten ändern (Projekte)",
                "description": "Ergänzt oder entfernt gezielt einzelne Tags, Quellen und Zusatzfeldwerte. Nichts wird als Ganzes ersetzt, ein leerer Wert löscht das jeweilige Zusatzfeld. Zusatzfelder werden über definition_uuid oder ihren eindeutigen name benannt; bei Referenzfeldern ist der Wert die UUID des Ziels. Felder vom Typ multiselect erwarten eine Liste von Options-Werten aus options, die die bisherige Auswahl vollständig ersetzt; eine leere Liste löscht das Feld. Felder vom Typ date erwarten ein Datum im Format JJJJ-MM-TT, Felder vom Typ currency einen Betrag als Zahl oder Zahl-String ohne Währungszeichen und ohne Tausendertrennzeichen. Der Betrag darf höchstens so viele Nachkommastellen haben, wie die Definition in decimals nennt, und wird auf diese Stellenzahl aufgefüllt gespeichert. Ein Wert, der nicht zum Typ passt, führt zu HTTP 422 mit dem Feldbezug custom_fields.{index}; es wird dann nichts geändert.",
                "tags": [
                    "flowcrm.record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "add_tag_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Tags, die ergänzt werden"
                                    },
                                    "remove_tag_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Tags, die entfernt werden"
                                    },
                                    "add_sources": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Quellen, die ergänzt werden"
                                    },
                                    "remove_sources": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Quellen, die entfernt werden"
                                    },
                                    "custom_fields": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Einträge aus <code>definition_uuid</code> oder <code>name</code> und <code>value</code>. Bei <code>date</code> ist <code>value</code> ein Datum wie <code>\"2026-12-31\"</code>, bei <code>currency</code> ein Betrag wie <code>12500.5</code> oder <code>\"12500.50\"</code>, bei <code>multiselect</code> eine Liste wie <code>[\"gold\", \"silber\"]</code>"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/projects/{uuid}/files": {
            "get": {
                "operationId": "flowcrm.projects-files-list",
                "summary": "Dateien auflisten (Projekte)",
                "description": "Listet die Dateien des Datensatzes auf. has_document_source zeigt an, ob die Datei aus Markdown erzeugt wurde und damit überarbeitet statt ersetzt werden kann.",
                "tags": [
                    "flowcrm.record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Einträge pro Seite (1 bis 200, Standard 50)",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Seitennummer, beginnend bei 1",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowcrm.projects-files-upload",
                "summary": "Datei hochladen (Projekte)",
                "description": "Hängt eine hochgeladene Datei an den Datensatz. Übertragung als multipart/form-data, höchstens 50 MB. Nicht zugelassene Dateitypen antworten mit HTTP 422.",
                "tags": [
                    "flowcrm.record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "file": {
                                        "type": "string",
                                        "format": "binary",
                                        "description": "Die hochzuladende Datei"
                                    },
                                    "name": {
                                        "type": "string",
                                        "description": "Abweichender Dateiname"
                                    }
                                },
                                "required": [
                                    "file"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/projects/{uuid}/files/{file_uuid}/download": {
            "get": {
                "operationId": "flowcrm.projects-files-download",
                "summary": "Abruflink für eine Datei (Projekte)",
                "description": "Liefert einen kurzlebigen Abruflink samt Gültigkeitsdauer in Sekunden. Die Antwort enthält den Link, nicht die Bytes.",
                "tags": [
                    "flowcrm.record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "file_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/projects/{uuid}/files/{file_uuid}/text": {
            "get": {
                "operationId": "flowcrm.projects-files-text",
                "summary": "Text einer Datei lesen (Projekte)",
                "description": "Gibt den bereits extrahierten Text der Datei in Abschnitten von 20.000 Zeichen zurück. Der Endpunkt liest nur; er stößt keine neue Extraktion an.",
                "tags": [
                    "flowcrm.record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "file_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "offset",
                        "in": "query",
                        "required": false,
                        "description": "Startposition im Text; <code>next_offset</code> der Antwort führt zum nächsten Abschnitt",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/projects/{uuid}/documents": {
            "post": {
                "operationId": "flowcrm.projects-documents-render",
                "summary": "Dokument aus Markdown erzeugen (Projekte)",
                "description": "Erzeugt aus Markdown ein PDF oder ein Word-Dokument und legt es am Datensatz ab. Mit file_uuid wird eine bestehende, ebenfalls so erzeugte Fassung überarbeitet statt eine zweite daneben zu legen.",
                "tags": [
                    "flowcrm.record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "description": "Titel und zugleich Dateiname ohne Endung"
                                    },
                                    "source_markdown": {
                                        "type": "string",
                                        "description": "Der Inhalt als Markdown"
                                    },
                                    "format": {
                                        "type": "string",
                                        "description": "<code>pdf</code> oder <code>docx</code>"
                                    },
                                    "file_uuid": {
                                        "type": "string",
                                        "format": "uuid",
                                        "description": "Bestehende Fassung, die ersetzt wird"
                                    }
                                },
                                "required": [
                                    "title",
                                    "source_markdown",
                                    "format"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/tags": {
            "get": {
                "operationId": "flowcrm.tags-list",
                "summary": "Tags auflisten",
                "description": "Listet die Tags Ihres Teams alphabetisch nach Titel. Die Liste dient dazu, die uuid eines Tags zu ermitteln, bevor es an einem Kunden, Kontakt oder Lead gesetzt wird. Es genügt der FlowCRM-Zugriff; FlowSend wird dafür nicht benötigt.",
                "tags": [
                    "flowcrm.tags"
                ],
                "parameters": [
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Liefert nur Tags, deren Titel den Text enthält",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Einträge pro Seite (1 bis 200, Standard 50)",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Seitennummer, beginnend bei 1",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "b2c1a7a6-1249-4827-b533-ef1c65c1e273",
                                            "title": "VIP",
                                            "slug": "vip",
                                            "description": null
                                        }
                                    ],
                                    "meta": {
                                        "current_page": 1,
                                        "per_page": 50,
                                        "total": 1,
                                        "last_page": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowcrm.tags-create",
                "summary": "Tag anlegen (Find-or-Create)",
                "description": "Legt ein Tag für Ihr Team an. Der Aufruf lässt sich gefahrlos wiederholen: Gibt es bereits ein Tag mit diesem Namen, wird es mit created: false und HTTP 200 zurückgegeben; Groß- und Kleinschreibung sowie Sonderzeichen spielen beim Vergleich keine Rolle. Ein zuvor gelöschtes Tag gleichen Namens wird zurückgeholt (restored: true, HTTP 201), ohne seine früheren Zuordnungen. Eine echte Neuanlage antwortet mit created: true und HTTP 201. Erfordert das FlowCRM-Schreibrecht. Umbenennen und Löschen von Tags bleibt der FlowSend-API vorbehalten.",
                "tags": [
                    "flowcrm.tags"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "created": true,
                                    "restored": false,
                                    "data": {
                                        "uuid": "b2c1a7a6-1249-4827-b533-ef1c65c1e273",
                                        "title": "VIP",
                                        "slug": "vip",
                                        "description": null
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "description": "Name des Tags, höchstens 100 Zeichen, mit mindestens einem Buchstaben oder einer Ziffer"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Beschreibung, höchstens 1.000 Zeichen. Wird nur bei einer Neuanlage gespeichert"
                                    }
                                },
                                "required": [
                                    "title"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/leads": {
            "get": {
                "operationId": "flowcrm.leads-list",
                "summary": "Leads auflisten",
                "description": "Listet die Leads des Teams paginiert auf. Standardmässig wird nur die offene Pipeline gezeigt (abgeschlossene und konvertierte Leads ausgeblendet); mit pipeline=false wird der volle Satz zurückgegeben. Als Spam markierte Leads fehlen in der Liste, außer mit include_spam=1 oder bei einer exakten Suche nach external_source und external_id: Diese findet einen Lead immer, auch wenn er als Spam markiert ist, damit eine Integration vor dem Anlegen kein Duplikat erzeugt. Die Antwort folgt dem Standard-Paginierungsformat mit data, links und meta.",
                "tags": [
                    "flowcrm.leads"
                ],
                "parameters": [
                    {
                        "name": "pipeline",
                        "in": "query",
                        "required": false,
                        "description": "Standard true (nur offene Pipeline). false zeigt alle Leads inkl. abgeschlossener",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "include_spam",
                        "in": "query",
                        "required": false,
                        "description": "Standard false. 1 nimmt als Spam markierte Leads in die Liste auf (erkennbar an spam_at). Bei einer exakten Suche nach external_source und external_id sind Spam-Leads immer enthalten",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Volltextsuche über Firmenname, Vor-/Nachname und E-Mail",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "external_source",
                        "in": "query",
                        "required": false,
                        "description": "Exakter Filter auf die Herkunft der externen Kennung. Unterliegt dem Pipeline-Standard, für abgeschlossene oder konvertierte Leads pipeline=false mitsenden",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "external_id",
                        "in": "query",
                        "required": false,
                        "description": "Exakter Filter auf die externe Kennung. Unterliegt dem Pipeline-Standard, für abgeschlossene oder konvertierte Leads pipeline=false mitsenden",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "source",
                        "in": "query",
                        "required": false,
                        "description": "Filter auf eine Quelle oder mehrere per Komma getrennt",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "tag_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Filter auf eine team-eigene Tag-UUID",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "assigned_user_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Filter auf die UUID des zugewiesenen Benutzers. Eine UUID ausserhalb des Teams liefert eine leere Liste. Breaking Change: assigned_user_id wird nicht mehr akzeptiert (422)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "created_from",
                        "in": "query",
                        "required": false,
                        "description": "Erstellt ab (Datum, YYYY-MM-DD)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "created_to",
                        "in": "query",
                        "required": false,
                        "description": "Erstellt bis (Datum, YYYY-MM-DD)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "updated_from",
                        "in": "query",
                        "required": false,
                        "description": "Geändert ab (Datum, YYYY-MM-DD)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "updated_to",
                        "in": "query",
                        "required": false,
                        "description": "Geändert bis (Datum, YYYY-MM-DD)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Einträge pro Seite (Standard 50, Maximum 100)",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "include",
                        "in": "query",
                        "required": false,
                        "description": "Zusätzliche Relationen, per Komma: contacts, sources, tags, status, board_cards, assigned_user, notes, custom_fields",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "data": [
                                        {
                                            "uuid": "9b1c7f3e-2a4d-4c8b-8e1a-6f0d2c9b4a11",
                                            "type": "company",
                                            "company_name": "Mustermann GmbH",
                                            "first_name": null,
                                            "last_name": null,
                                            "name": "Mustermann GmbH",
                                            "email": "info@mustermann.de",
                                            "phone": "+49 30 123456",
                                            "website": null,
                                            "address_line_1": null,
                                            "address_line_2": null,
                                            "postal_code": null,
                                            "city": "Berlin",
                                            "state": null,
                                            "country": "DE",
                                            "country_display": null,
                                            "deal_value": "5000.00",
                                            "deal_currency": "EUR",
                                            "notes": null,
                                            "external_source": "messe-2026",
                                            "external_id": "MSG-4711",
                                            "possible_duplicate": false,
                                            "last_api_ingested_at": null,
                                            "spam_at": null,
                                            "lost_at": null,
                                            "lost_reason": null,
                                            "lost_note": null,
                                            "sources": [],
                                            "tags": [],
                                            "contacts": [],
                                            "board_cards": [],
                                            "assigned_user": null,
                                            "notes_log": [],
                                            "created_at": "2026-07-21T10:00:00+00:00",
                                            "updated_at": "2026-07-21T10:00:00+00:00"
                                        }
                                    ],
                                    "links": {
                                        "first": "/api/leads?page=1",
                                        "last": "/api/leads?page=1",
                                        "prev": null,
                                        "next": null
                                    },
                                    "meta": {
                                        "current_page": 1,
                                        "per_page": 50,
                                        "total": 1,
                                        "last_page": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowcrm.leads-create",
                "summary": "Lead anlegen (Upsert)",
                "description": "Legt einen Lead an oder aktualisiert per external_source + external_id idempotent einen bestehenden (Merge nur der gesendeten Felder). Der Status kann hier nie gesetzt werden; ein neuer Lead startet in der Stufe Kalt der Standard-Pipeline. Ein optionales doc-Objekt befüllt beim erstmaligen Anlegen das FlowDoc des Leads, nicht bei einem idempotenten Wiederholungs-POST. Das frühere docs[]-Array wird nicht mehr akzeptiert (422), weil ein Lead genau ein FlowDoc hat. Die Antwort trägt created (bool) und duplicate_warning (Objekt mit matches oder null). HTTP 201 bei Neuanlage, 200 bei idempotenter Aktualisierung.",
                "tags": [
                    "flowcrm.leads"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "created": true,
                                    "data": {
                                        "uuid": "9b1c7f3e-2a4d-4c8b-8e1a-6f0d2c9b4a11",
                                        "type": "company",
                                        "company_name": "Mustermann GmbH",
                                        "first_name": null,
                                        "last_name": null,
                                        "name": "Mustermann GmbH",
                                        "email": "info@mustermann.de",
                                        "phone": "+49 30 123456",
                                        "website": "https://mustermann.de",
                                        "address_line_1": "Hauptstrasse 1",
                                        "address_line_2": null,
                                        "postal_code": "10115",
                                        "city": "Berlin",
                                        "state": null,
                                        "country": "DE",
                                        "country_display": "Deutschland",
                                        "deal_value": "5000.00",
                                        "deal_currency": "EUR",
                                        "notes": "Interessent von der Messe",
                                        "external_source": "messe-2026",
                                        "external_id": "MSG-4711",
                                        "possible_duplicate": false,
                                        "last_api_ingested_at": "2026-07-21T10:00:00+00:00",
                                        "status": {
                                            "uuid": "1f2e3d4c-5b6a-4790-8123-45a6b7c8d9e0",
                                            "key": "kalt",
                                            "name": "Kalt",
                                            "display_name": "Kalt",
                                            "color": "#94a3b8",
                                            "is_won": false,
                                            "is_lost": false,
                                            "is_closed": false,
                                            "is_system": false
                                        },
                                        "sources": [
                                            "messe-2026"
                                        ],
                                        "tags": [
                                            {
                                                "uuid": "b2c1a7a6-1249-4827-b533-ef1c65c1e273",
                                                "title": "VIP",
                                                "source": "api"
                                            }
                                        ],
                                        "contacts": [
                                            {
                                                "uuid": "4f8a2b6c-9d1e-4c3a-8b5f-0a7e6d2c1b9e",
                                                "first_name": "Erika",
                                                "last_name": "Musterfrau",
                                                "email": "erika@mustermann.de",
                                                "phone": null,
                                                "role": "Einkauf"
                                            }
                                        ],
                                        "board_cards": [],
                                        "assigned_user": null,
                                        "notes_log": [],
                                        "created_at": "2026-07-21T10:00:00+00:00",
                                        "updated_at": "2026-07-21T10:00:00+00:00"
                                    },
                                    "duplicate_warning": null
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "type": "string",
                                        "description": "company oder person"
                                    },
                                    "company_name": {
                                        "type": "string",
                                        "description": "Firmenname (Pflicht wenn type=company)"
                                    },
                                    "first_name": {
                                        "type": "string",
                                        "description": "Vorname (Pflicht wenn type=person)"
                                    },
                                    "last_name": {
                                        "type": "string",
                                        "description": "Nachname"
                                    },
                                    "email": {
                                        "type": "string",
                                        "description": "E-Mail-Adresse"
                                    },
                                    "phone": {
                                        "type": "string",
                                        "description": "Telefonnummer"
                                    },
                                    "website": {
                                        "type": "string",
                                        "description": "Webseite"
                                    },
                                    "address_line_1": {
                                        "type": "string",
                                        "description": "Adresszeile 1"
                                    },
                                    "address_line_2": {
                                        "type": "string",
                                        "description": "Adresszeile 2"
                                    },
                                    "postal_code": {
                                        "type": "string",
                                        "description": "Postleitzahl"
                                    },
                                    "city": {
                                        "type": "string",
                                        "description": "Ort"
                                    },
                                    "state": {
                                        "type": "string",
                                        "description": "Bundesland / Region"
                                    },
                                    "country": {
                                        "type": "string",
                                        "description": "Land (ISO-Code)"
                                    },
                                    "country_display": {
                                        "type": "string",
                                        "description": "Anzeigename des Landes"
                                    },
                                    "deal_value": {
                                        "type": "number",
                                        "description": "Potenzieller Auftragswert"
                                    },
                                    "deal_currency": {
                                        "type": "string",
                                        "description": "Währung (3-stelliger ISO-Code)"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Freitext-Notiz am Lead"
                                    },
                                    "external_source": {
                                        "type": "string",
                                        "description": "Quellsystem-Kennung, Teil des Idempotenzschlüssels"
                                    },
                                    "external_id": {
                                        "type": "string",
                                        "description": "Datensatz-Kennung im Quellsystem, Teil des Idempotenzschlüssels"
                                    },
                                    "source_payload": {
                                        "type": "object",
                                        "description": "Roh-Payload der Quelle. Wird gespeichert, erscheint aber nie in der Antwort"
                                    },
                                    "sources": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Liste von Herkunftsquellen als Freitext (max. 20 Einträge)"
                                    },
                                    "tag_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Liste team-eigener Tag-UUIDs (max. 50 Einträge)"
                                    },
                                    "assigned_user_uuid": {
                                        "type": "string",
                                        "description": "UUID eines Team-Mitglieds als zugewiesener Benutzer. Benutzer außerhalb des Teams werden mit 422 abgelehnt. Breaking Change: assigned_user_id wird nicht mehr akzeptiert (Validierungsfehler)"
                                    },
                                    "contacts": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Ansprechpartner-Objekte (first_name, last_name, email, phone, role; max. 50 Einträge)"
                                    },
                                    "custom_fields": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Custom-Field-Werte (definition_uuid oder name, plus value). Bei Feldern vom Typ reference ist value die UUID des Ziels (Kunde, Kontakt, Projekt oder Team-Mitglied), zum Beispiel {\"definition_uuid\": \"...\", \"value\": \"3f7c1a02-9b64-4d1e-a5c8-2e7b90d41f6a\"}. Bei Feldern vom Typ date ist value ein Datum im Format JJJJ-MM-TT, bei Feldern vom Typ currency ein Betrag als Zahl oder Zahl-String ohne Währungszeichen und ohne Tausendertrennzeichen, mit höchstens den in der Definition festgelegten Nachkommastellen, bei Feldern vom Typ multiselect eine Liste von Options-Werten wie [\"gold\", \"silber\"]; ein unpassender Wert führt zu 422 und es wird kein Lead angelegt. Breaking Change: definition_id wird nicht mehr akzeptiert, und eine numerische Ziel-ID in value wird bei Referenzfeldern ebenfalls mit 422 abgelehnt"
                                    },
                                    "doc": {
                                        "type": "object",
                                        "description": "Das FlowDoc des Leads, nur bei Neuanlage. Einziges Feld ist content als Markdown-String; ein Titel ist nicht vorgesehen. Breaking Change: das frühere docs[]-Array wird mit 422 abgelehnt"
                                    }
                                },
                                "required": [
                                    "type"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/leads/{uuid}": {
            "get": {
                "operationId": "flowcrm.leads-show",
                "summary": "Lead abrufen",
                "description": "Ruft einen einzelnen team-eigenen Lead per UUID ab. Status, Quellen, Tags, Ansprechpartner und zugewiesener Benutzer sind enthalten. Custom-Field-Werte nur mit include=custom_fields; Referenzfelder werden ausschließlich per UUID adressiert.",
                "tags": [
                    "flowcrm.leads"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "include",
                        "in": "query",
                        "required": false,
                        "description": "custom_fields, um die Custom-Field-Werte mitzuladen. Referenzfelder liefern die UUID des Ziels in value und referenced_uuid sowie den Anzeigenamen in referenced_name; ist das Ziel nicht mehr vorhanden, ist referenced_uuid null. Felder vom Typ date liefern das Datum als JJJJ-MM-TT, Felder vom Typ currency den Betrag als Dezimalzahl mit Punkt in value und den ISO-4217-Code des Feldes in currency, Felder vom Typ multiselect die Liste der gewählten Options-Werte in value",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "9b1c7f3e-2a4d-4c8b-8e1a-6f0d2c9b4a11",
                                        "type": "company",
                                        "company_name": "Mustermann GmbH",
                                        "first_name": null,
                                        "last_name": null,
                                        "name": "Mustermann GmbH",
                                        "email": "info@mustermann.de",
                                        "phone": "+49 30 123456",
                                        "website": "https://mustermann.de",
                                        "address_line_1": "Hauptstrasse 1",
                                        "address_line_2": null,
                                        "postal_code": "10115",
                                        "city": "Berlin",
                                        "state": null,
                                        "country": "DE",
                                        "country_display": "Deutschland",
                                        "deal_value": "5000.00",
                                        "deal_currency": "EUR",
                                        "notes": "Interessent von der Messe",
                                        "external_source": "messe-2026",
                                        "external_id": "MSG-4711",
                                        "possible_duplicate": false,
                                        "last_api_ingested_at": "2026-07-21T10:00:00+00:00",
                                        "status": {
                                            "uuid": "1f2e3d4c-5b6a-4790-8123-45a6b7c8d9e0",
                                            "key": "kalt",
                                            "name": "Kalt",
                                            "display_name": "Kalt",
                                            "color": "#94a3b8",
                                            "is_won": false,
                                            "is_lost": false,
                                            "is_closed": false,
                                            "is_system": false
                                        },
                                        "sources": [
                                            "messe-2026"
                                        ],
                                        "tags": [],
                                        "contacts": [],
                                        "board_cards": [],
                                        "assigned_user": null,
                                        "notes_log": [],
                                        "custom_fields": [
                                            {
                                                "definition_uuid": "7c1f9a3b-42d5-4e88-9a10-b6c3f2d51e04",
                                                "name": "Branche",
                                                "type": "text",
                                                "value": "Gastronomie"
                                            },
                                            {
                                                "definition_uuid": "0d5b8e21-6c74-4f39-8a2b-91e7c40d3f55",
                                                "name": "Stammkunde",
                                                "type": "reference",
                                                "value": "3f7c1a02-9b64-4d1e-a5c8-2e7b90d41f6a",
                                                "referenced_uuid": "3f7c1a02-9b64-4d1e-a5c8-2e7b90d41f6a",
                                                "referenced_name": "Mustermann GmbH"
                                            },
                                            {
                                                "definition_uuid": "5e2a9c71-3b0d-4f86-a1c4-7d9e0b6f2a38",
                                                "name": "Wunschtermin",
                                                "type": "date",
                                                "value": "2026-12-31"
                                            },
                                            {
                                                "definition_uuid": "b84d1f06-9a2e-4c53-8e7b-0f3a6d5c9e12",
                                                "name": "Jahresbudget",
                                                "type": "currency",
                                                "value": "12500.00",
                                                "currency": "EUR"
                                            }
                                        ],
                                        "created_at": "2026-07-21T10:00:00+00:00",
                                        "updated_at": "2026-07-21T10:00:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "patch": {
                "operationId": "flowcrm.leads-update",
                "summary": "Lead aktualisieren",
                "description": "Aktualisiert die Kernfelder eines team-eigenen Leads (Teil-Update, nur gesendete Felder). Der Status kann hier nicht gesetzt werden (status und status_id werden mit 422 abgelehnt), dafür dient der Status-Endpunkt. Die Antwort trägt zusätzlich duplicate_warning.",
                "tags": [
                    "flowcrm.leads"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "9b1c7f3e-2a4d-4c8b-8e1a-6f0d2c9b4a11",
                                        "type": "company",
                                        "company_name": "Mustermann GmbH",
                                        "name": "Mustermann GmbH",
                                        "email": "kontakt@mustermann.de",
                                        "phone": "+49 30 123456",
                                        "deal_value": "7500.00",
                                        "deal_currency": "EUR",
                                        "external_source": "messe-2026",
                                        "external_id": "MSG-4711",
                                        "possible_duplicate": false,
                                        "status": {
                                            "uuid": "1f2e3d4c-5b6a-4790-8123-45a6b7c8d9e0",
                                            "key": "kalt",
                                            "name": "Kalt",
                                            "display_name": "Kalt",
                                            "color": "#94a3b8",
                                            "is_won": false,
                                            "is_lost": false,
                                            "is_closed": false,
                                            "is_system": false
                                        },
                                        "sources": [],
                                        "tags": [],
                                        "contacts": [],
                                        "board_cards": [],
                                        "assigned_user": null,
                                        "notes_log": [],
                                        "created_at": "2026-07-21T10:00:00+00:00",
                                        "updated_at": "2026-07-21T12:00:00+00:00"
                                    },
                                    "duplicate_warning": null
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "type": "string",
                                        "description": "company oder person"
                                    },
                                    "company_name": {
                                        "type": "string",
                                        "description": "Firmenname"
                                    },
                                    "first_name": {
                                        "type": "string",
                                        "description": "Vorname"
                                    },
                                    "last_name": {
                                        "type": "string",
                                        "description": "Nachname"
                                    },
                                    "email": {
                                        "type": "string",
                                        "description": "E-Mail-Adresse"
                                    },
                                    "phone": {
                                        "type": "string",
                                        "description": "Telefonnummer"
                                    },
                                    "website": {
                                        "type": "string",
                                        "description": "Webseite"
                                    },
                                    "address_line_1": {
                                        "type": "string",
                                        "description": "Adresszeile 1"
                                    },
                                    "address_line_2": {
                                        "type": "string",
                                        "description": "Adresszeile 2"
                                    },
                                    "postal_code": {
                                        "type": "string",
                                        "description": "Postleitzahl"
                                    },
                                    "city": {
                                        "type": "string",
                                        "description": "Ort"
                                    },
                                    "state": {
                                        "type": "string",
                                        "description": "Bundesland / Region"
                                    },
                                    "country": {
                                        "type": "string",
                                        "description": "Land (ISO-Code)"
                                    },
                                    "country_display": {
                                        "type": "string",
                                        "description": "Anzeigename des Landes"
                                    },
                                    "deal_value": {
                                        "type": "number",
                                        "description": "Potenzieller Auftragswert"
                                    },
                                    "deal_currency": {
                                        "type": "string",
                                        "description": "Währung (3-stelliger ISO-Code)"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Freitext-Notiz"
                                    },
                                    "external_source": {
                                        "type": "string",
                                        "description": "Quellsystem-Kennung"
                                    },
                                    "external_id": {
                                        "type": "string",
                                        "description": "Datensatz-Kennung im Quellsystem"
                                    },
                                    "source_payload": {
                                        "type": "object",
                                        "description": "Roh-Payload der Quelle. Wird gespeichert, erscheint aber nie in der Antwort"
                                    },
                                    "sources": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Herkunftsquellen, additiv (fügt nur hinzu, entfernt nie; zum Ersetzen dient PUT /sources; max. 20 Einträge)"
                                    },
                                    "tag_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Team-eigene Tag-UUIDs, additiv (zum Ersetzen dient PUT /tags; max. 50 Einträge)"
                                    },
                                    "assigned_user_uuid": {
                                        "type": "string",
                                        "description": "UUID eines Team-Mitglieds als zugewiesener Benutzer; null entfernt die Zuweisung. Benutzer außerhalb des Teams werden mit 422 abgelehnt. Breaking Change: assigned_user_id wird nicht mehr akzeptiert (Validierungsfehler)"
                                    },
                                    "contacts": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Ansprechpartner-Objekte (first_name, last_name, email, phone, role), additiv: legt neue Ansprechpartner an, verändert oder löscht keine bestehenden (dafür die /contacts-Endpunkte; max. 50 Einträge)"
                                    },
                                    "custom_fields": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Custom-Field-Werte (definition_uuid oder name, plus value). Bei Feldern vom Typ reference ist value die UUID des Ziels (Kunde, Kontakt, Projekt oder Team-Mitglied). Bei Feldern vom Typ date ist value ein Datum im Format JJJJ-MM-TT, bei Feldern vom Typ currency ein Betrag als Zahl oder Zahl-String ohne Währungszeichen und ohne Tausendertrennzeichen, bei Feldern vom Typ multiselect eine Liste von Options-Werten (ersetzt die bisherige Auswahl); ein unpassender Wert führt zu 422. Breaking Change: definition_id wird nicht mehr akzeptiert, und eine numerische Ziel-ID in value wird bei Referenzfeldern ebenfalls mit 422 abgelehnt"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowcrm.leads-delete",
                "summary": "Lead löschen",
                "description": "Löscht einen team-eigenen Lead (Soft-Delete).",
                "tags": [
                    "flowcrm.leads"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Lead gelöscht."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/leads/{uuid}/sources": {
            "put": {
                "operationId": "flowcrm.leads-sources-sync",
                "summary": "Quellen synchronisieren",
                "description": "Voller Sync der Quellen des Leads: die gesendete Liste ersetzt die gespeicherte. Ein leeres Array leert die Quellen. Trimmen, Leer-Entfernen und Deduplizieren übernimmt der Server.",
                "tags": [
                    "flowcrm.lead-relations"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "9b1c7f3e-2a4d-4c8b-8e1a-6f0d2c9b4a11",
                                        "type": "company",
                                        "name": "Mustermann GmbH",
                                        "sources": [
                                            "messe-2026",
                                            "empfehlung"
                                        ],
                                        "tags": [],
                                        "created_at": "2026-07-21T10:00:00+00:00",
                                        "updated_at": "2026-07-21T12:10:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "sources": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Vollständige Liste der Quellen (Freitext, max. 50 Einträge). Muss vorhanden sein; leeres Array leert die Quellen"
                                    }
                                },
                                "required": [
                                    "sources"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/leads/{uuid}/tags": {
            "put": {
                "operationId": "flowcrm.leads-tags-sync",
                "summary": "Tags synchronisieren",
                "description": "Voller Sync der Tags des Leads über team-eigene Tag-UUIDs: die gesendete Liste ersetzt die gespeicherte. Behaltene Tags behalten ihre Pivot-Quelle, neu angehängte erhalten source=api, ausgelassene werden entfernt. Ein leeres Array entfernt alle Tags. Eine Fremd-Team-UUID wird mit 422 abgelehnt.",
                "tags": [
                    "flowcrm.lead-relations"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "9b1c7f3e-2a4d-4c8b-8e1a-6f0d2c9b4a11",
                                        "type": "company",
                                        "name": "Mustermann GmbH",
                                        "sources": [],
                                        "tags": [
                                            {
                                                "uuid": "b2c1a7a6-1249-4827-b533-ef1c65c1e273",
                                                "title": "VIP",
                                                "source": "api"
                                            }
                                        ],
                                        "created_at": "2026-07-21T10:00:00+00:00",
                                        "updated_at": "2026-07-21T12:12:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "tag_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Vollständige Liste team-eigener Tag-UUIDs (max. 50 Einträge). Muss vorhanden sein; leeres Array entfernt alle Tags"
                                    }
                                },
                                "required": [
                                    "tag_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/leads/{uuid}/contacts": {
            "get": {
                "operationId": "flowcrm.leads-contacts-list",
                "summary": "Ansprechpartner auflisten",
                "description": "Listet die Ansprechpartner eines team-eigenen Leads auf.",
                "tags": [
                    "flowcrm.lead-relations"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "4f8a2b6c-9d1e-4c3a-8b5f-0a7e6d2c1b9e",
                                            "first_name": "Erika",
                                            "last_name": "Musterfrau",
                                            "email": "erika@mustermann.de",
                                            "phone": null,
                                            "role": "Einkauf",
                                            "created_at": "2026-07-21T10:00:00+00:00",
                                            "updated_at": "2026-07-21T10:00:00+00:00"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowcrm.leads-contacts-create",
                "summary": "Ansprechpartner anlegen",
                "description": "Legt einen Ansprechpartner am Lead an. Nur first_name ist Pflicht.",
                "tags": [
                    "flowcrm.lead-relations"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "5a9b3c7d-0e2f-4d4b-9c6a-1b8f7e3d2c0f",
                                        "first_name": "Max",
                                        "last_name": "Mustermann",
                                        "email": null,
                                        "phone": "+49 170 111222",
                                        "role": "Geschäftsführung",
                                        "created_at": "2026-07-21T12:20:00+00:00",
                                        "updated_at": "2026-07-21T12:20:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "first_name": {
                                        "type": "string",
                                        "description": "Vorname"
                                    },
                                    "last_name": {
                                        "type": "string",
                                        "description": "Nachname"
                                    },
                                    "email": {
                                        "type": "string",
                                        "description": "E-Mail-Adresse"
                                    },
                                    "phone": {
                                        "type": "string",
                                        "description": "Telefonnummer"
                                    },
                                    "role": {
                                        "type": "string",
                                        "description": "Rolle / Funktion"
                                    }
                                },
                                "required": [
                                    "first_name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/leads/{uuid}/contacts/{contactUuid}": {
            "patch": {
                "operationId": "flowcrm.leads-contacts-update",
                "summary": "Ansprechpartner aktualisieren",
                "description": "Aktualisiert einen Ansprechpartner (Teil-Update). first_name darf, wenn gesendet, nicht leer sein. Der Ansprechpartner wird per UUID innerhalb des Leads adressiert; numerische IDs werden nicht mehr akzeptiert (HTTP 404).",
                "tags": [
                    "flowcrm.lead-relations"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "contactUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "5a9b3c7d-0e2f-4d4b-9c6a-1b8f7e3d2c0f",
                                        "first_name": "Max",
                                        "last_name": "Mustermann",
                                        "email": "max@mustermann.de",
                                        "phone": "+49 170 111222",
                                        "role": "Geschäftsführung",
                                        "created_at": "2026-07-21T12:20:00+00:00",
                                        "updated_at": "2026-07-21T12:25:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "first_name": {
                                        "type": "string",
                                        "description": "Vorname (darf nicht geleert werden)"
                                    },
                                    "last_name": {
                                        "type": "string",
                                        "description": "Nachname"
                                    },
                                    "email": {
                                        "type": "string",
                                        "description": "E-Mail-Adresse"
                                    },
                                    "phone": {
                                        "type": "string",
                                        "description": "Telefonnummer"
                                    },
                                    "role": {
                                        "type": "string",
                                        "description": "Rolle / Funktion"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowcrm.leads-contacts-delete",
                "summary": "Ansprechpartner entfernen",
                "description": "Entfernt einen Ansprechpartner des Leads.",
                "tags": [
                    "flowcrm.lead-relations"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "contactUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Kontaktperson entfernt."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/leads/{uuid}/notes": {
            "get": {
                "operationId": "flowcrm.leads-notes-list",
                "summary": "Notizen auflisten",
                "description": "Listet die Notizen des Leads auf, neueste zuerst. Der Autor wird als Objekt (uuid, name) mitgeliefert.",
                "tags": [
                    "flowcrm.lead-relations"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "body": "Rückruf für Freitag vereinbart.",
                                            "user": {
                                                "uuid": "2b7c4d8e-1f3a-4e5c-0d7b-2c9a8f4e3d1a",
                                                "name": "Sascha"
                                            },
                                            "created_at": "2026-07-21T12:30:00+00:00"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowcrm.leads-notes-create",
                "summary": "Notiz anhängen",
                "description": "Hängt eine Notiz an den Lead an. Notizen sind append-only, es gibt kein Bearbeiten oder Löschen. Der Autor ist immer der Token-Benutzer.",
                "tags": [
                    "flowcrm.lead-relations"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "body": "Angebot per E-Mail versendet.",
                                        "user": {
                                            "uuid": "2b7c4d8e-1f3a-4e5c-0d7b-2c9a8f4e3d1a",
                                            "name": "Sascha"
                                        },
                                        "created_at": "2026-07-21T12:35:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "body": {
                                        "type": "string",
                                        "description": "Notizinhalt (max. 65535 Zeichen)"
                                    }
                                },
                                "required": [
                                    "body"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/leads/{uuid}/status": {
            "put": {
                "operationId": "flowcrm.leads-status-set",
                "summary": "Status setzen",
                "description": "Setzt den Status eines team-eigenen Leads auf einen team-eigenen Status, adressiert per Status-UUID. converted wird mit 422 abgelehnt; eine UUID, die die Validierung passiert, aber keinen auffindbaren Status trifft, liefert 404. Optional lost_reason und lost_note, nur bei einer Verloren-Stufe (sonst 422).",
                "tags": [
                    "flowcrm.lead-status"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "9b1c7f3e-2a4d-4c8b-8e1a-6f0d2c9b4a11",
                                        "type": "company",
                                        "name": "Mustermann GmbH",
                                        "status": {
                                            "uuid": "3c4d5e6f-7a8b-49c0-8d1e-2f3a4b5c6d7e",
                                            "key": null,
                                            "name": "Angebot",
                                            "display_name": "Proposal",
                                            "color": "#f59e0b",
                                            "is_won": false,
                                            "is_lost": false,
                                            "is_closed": false,
                                            "is_system": false,
                                            "is_inbox": false,
                                            "pipeline": {
                                                "uuid": "5d6e7f80-91a2-4b3c-8d4e-5f6a7b8c9d0e",
                                                "name": "Standard"
                                            }
                                        },
                                        "spam_at": null,
                                        "lost_at": null,
                                        "lost_reason": null,
                                        "lost_note": null,
                                        "sources": [],
                                        "tags": [],
                                        "contacts": [],
                                        "board_cards": [],
                                        "assigned_user": null,
                                        "notes_log": [],
                                        "created_at": "2026-07-21T10:00:00+00:00",
                                        "updated_at": "2026-07-21T12:40:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "status_uuid": {
                                        "type": "string",
                                        "description": "UUID eines team-eigenen Lead-Status"
                                    },
                                    "lost_reason": {
                                        "type": "string",
                                        "description": "UUID eines aktiven, team-eigenen Verlustgrunds (siehe GET /leads/lost-reasons). Nur bei einer Verloren-Stufe erlaubt; eine fremde oder deaktivierte UUID wird mit 422 abgelehnt"
                                    },
                                    "lost_note": {
                                        "type": "string",
                                        "description": "Freitext zum Verlust, höchstens 2.000 Zeichen. Nur bei einer Verloren-Stufe erlaubt"
                                    }
                                },
                                "required": [
                                    "status_uuid"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/leads/pipelines": {
            "get": {
                "operationId": "flowcrm.leads-pipelines-list",
                "summary": "Pipelines mit Stufen",
                "description": "Alle Pipelines des Teams in ihrer Reihenfolge, jede mit ihren Stufen (Status) in deren Reihenfolge. Die Standard-Pipeline trägt is_default, die Eingangsstufe einer Pipeline is_inbox. Die UUID einer Stufe ist die status_uuid für den Status-Endpunkt.",
                "tags": [
                    "flowcrm.lead-status"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "5d6e7f80-91a2-4b3c-8d4e-5f6a7b8c9d0e",
                                            "name": "Standard",
                                            "color": "#6366F1",
                                            "sort_order": 0,
                                            "is_default": true,
                                            "stages": [
                                                {
                                                    "uuid": "1f2e3d4c-5b6a-4790-8123-45a6b7c8d9e0",
                                                    "key": "neu",
                                                    "name": "Neu",
                                                    "display_name": "Neu",
                                                    "color": "#3b82f6",
                                                    "sort_order": 0,
                                                    "is_inbox": true,
                                                    "is_won": false,
                                                    "is_lost": false,
                                                    "is_closed": false,
                                                    "is_system": false
                                                },
                                                {
                                                    "uuid": "7a8b9c0d-1e2f-4a3b-8c4d-5e6f7a8b9c0d",
                                                    "key": "verloren",
                                                    "name": "Verloren",
                                                    "display_name": "Verloren",
                                                    "color": "#ef4444",
                                                    "sort_order": 8,
                                                    "is_inbox": false,
                                                    "is_won": false,
                                                    "is_lost": true,
                                                    "is_closed": true,
                                                    "is_system": false
                                                }
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/leads/lost-reasons": {
            "get": {
                "operationId": "flowcrm.leads-lost-reasons-list",
                "summary": "Verlustgründe",
                "description": "Die Verlustgründe des Teams in ihrer Reihenfolge. Deaktivierte Gründe fehlen, außer mit include_inactive=1; beim Statuswechsel werden nur aktive Gründe angenommen.",
                "tags": [
                    "flowcrm.lead-status"
                ],
                "parameters": [
                    {
                        "name": "include_inactive",
                        "in": "query",
                        "required": false,
                        "description": "Standard false. 1 nimmt deaktivierte Gründe mit auf (is_active: false)",
                        "schema": {
                            "type": "boolean"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e",
                                            "name": "Zu teuer",
                                            "sort_order": 0,
                                            "is_active": true
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/leads/{uuid}/timeline": {
            "get": {
                "operationId": "flowcrm.leads-timeline-list",
                "summary": "Timeline abrufen",
                "description": "Ruft die Timeline-Einträge eines team-eigenen Leads paginiert ab (neueste zuerst).",
                "tags": [
                    "flowcrm.lead-timeline"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Einträge pro Seite (Standard 50, Maximum 100)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "lead": {
                                        "uuid": "9b1c7f3e-2a4d-4c8b-8e1a-6f0d2c9b4a11",
                                        "name": "Mustermann GmbH"
                                    },
                                    "data": [
                                        {
                                            "type": "note",
                                            "type_label": "Notiz",
                                            "type_emoji": "📝",
                                            "content": "Erstkontakt auf der Messe.",
                                            "event_date": "2026-07-21T09:00:00+00:00",
                                            "formatted_date": "21.07.2026 09:00",
                                            "relative_date": "vor 4 Stunden",
                                            "user": "Sascha",
                                            "created_at": "2026-07-21T09:00:00+00:00"
                                        }
                                    ],
                                    "meta": {
                                        "current_page": 1,
                                        "per_page": 50,
                                        "total": 1,
                                        "last_page": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowcrm.leads-timeline-create",
                "summary": "Timeline-Eintrag anlegen",
                "description": "Hängt einen Timeline-Eintrag an den Lead an. type wird gegen die erlaubte Timeline-Typenliste geprüft; fehlt type, wird note verwendet. Bei einem konvertierten Lead antwortet der Endpunkt mit HTTP 409.",
                "tags": [
                    "flowcrm.lead-timeline"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "type": "call",
                                        "type_label": "Anruf",
                                        "type_emoji": "📞",
                                        "content": "Telefonat, Angebot angekündigt.",
                                        "event_date": "2026-07-21T13:00:00+00:00",
                                        "formatted_date": "21.07.2026 13:00",
                                        "relative_date": "gerade eben",
                                        "user": "Sascha",
                                        "created_at": "2026-07-21T13:00:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "content": {
                                        "type": "string",
                                        "description": "Inhalt des Eintrags"
                                    },
                                    "type": {
                                        "type": "string",
                                        "description": "Timeline-Typ aus der erlaubten Vokabel (Standard note)"
                                    },
                                    "event_date": {
                                        "type": "string",
                                        "description": "Ereignisdatum (ISO 8601, Standard: jetzt)"
                                    }
                                },
                                "required": [
                                    "content"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/leads/{uuid}/convert": {
            "post": {
                "operationId": "flowcrm.leads-convert",
                "summary": "Lead in Kunden konvertieren",
                "description": "Konvertiert den Lead in einen neuen Kunden. Ohne client_name wird der Name aus dem Lead abgeleitet (Firmenname bei Firma, Vor- und Nachname bei Person). Die Antwort ist der neue Kunde (CmmClient) mit HTTP 201. Ein bereits konvertierter Lead ergibt 409, er weist seinen Kunden über converted_client_uuid aus. Eine bereits an einen anderen Kunden vergebene external_id ergibt 422.",
                "tags": [
                    "flowcrm.lead-convert"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "d4e5f6a7-8b9c-40d1-8e2f-3a4b5c6d7e8f",
                                        "name": "Mustermann GmbH",
                                        "email": "info@mustermann.de",
                                        "phone": "+49 30 123456",
                                        "contact_person": null,
                                        "source": "messe-2026",
                                        "whmcs_client_id": null,
                                        "external_id": null,
                                        "stripe_customer_id": null,
                                        "website": null,
                                        "address_line_1": "Hauptstrasse 1",
                                        "address_line_2": null,
                                        "postal_code": "10115",
                                        "city": "Berlin",
                                        "state": null,
                                        "country": "DE",
                                        "currency": "EUR",
                                        "tax_id": null,
                                        "notes": null,
                                        "status": "active",
                                        "tags": [],
                                        "sources": [
                                            "messe-2026"
                                        ],
                                        "created_at": "2026-07-21T13:10:00+00:00",
                                        "updated_at": "2026-07-21T13:10:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "client_name": {
                                        "type": "string",
                                        "description": "Expliziter Kundenname (überschreibt den abgeleiteten Namen)"
                                    },
                                    "external_id": {
                                        "type": "string",
                                        "description": "Externe Kennung für den neuen Kunden, eindeutig je Team (auch gegenüber Kunden im Papierkorb)"
                                    },
                                    "transfer_contacts": {
                                        "type": "boolean",
                                        "description": "Ansprechpartner mit übernehmen"
                                    },
                                    "transfer_todos": {
                                        "type": "boolean",
                                        "description": "Aufgaben mit übernehmen"
                                    },
                                    "transfer_docs": {
                                        "type": "boolean",
                                        "description": "FlowDocs mit übernehmen"
                                    },
                                    "transfer_custom_fields": {
                                        "type": "boolean",
                                        "description": "Custom-Field-Werte mit übernehmen"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/leads/reports/funnel": {
            "get": {
                "operationId": "flowcrm.leads-report-funnel",
                "summary": "Trichter je Status",
                "description": "Anzahl und Wert der offenen Leads je Status, in der Reihenfolge der Statusliste, dazu die Zahl der Leads ohne Status. name ist der gespeicherte Statusname, display_name der Name in der Sprache der Anfrage (Standardstatus übersetzt, eigene Namen sobald eine Übersetzung vorliegt, sonst name).",
                "tags": [
                    "flowcrm.lead-reports"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "stages": [
                                            {
                                                "status_uuid": "123e4567-e89b-12d3-a456-426614174000",
                                                "name": "Erstkontakt",
                                                "display_name": "Erstkontakt",
                                                "leads": 12,
                                                "value": 48000
                                            }
                                        ],
                                        "without_status": 3
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/leads/reports/assignments": {
            "get": {
                "operationId": "flowcrm.leads-report-assignments",
                "summary": "Verteilung auf Zuständige",
                "description": "Anzahl und Wert der offenen Leads je zuständiger Person. Nicht zugewiesene Leads erscheinen als eigene Zeile mit user: null, damit genau diese Lücke sichtbar bleibt.",
                "tags": [
                    "flowcrm.lead-reports"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/leads/reports/sources": {
            "get": {
                "operationId": "flowcrm.leads-report-sources",
                "summary": "Herkunft der Leads",
                "description": "Anzahl der Leads je Quelle, absteigend sortiert.",
                "tags": [
                    "flowcrm.lead-reports"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/leads/{uuid}/duplicates": {
            "get": {
                "operationId": "flowcrm.leads-duplicates",
                "summary": "Mögliche Dubletten finden",
                "description": "Andere offene Leads mit derselben E-Mail-Adresse oder demselben Firmennamen, höchstens zwanzig. Bewusst eng gefasst: verglichen wird exakt, nicht ähnlich, weil über das Zusammenführen ein Mensch entscheidet.",
                "tags": [
                    "flowcrm.lead-reports"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/lead-boards": {
            "get": {
                "operationId": "flowcrm.lead-boards-list",
                "summary": "Boards auflisten",
                "description": "Listet die Boards des Teams auf. Mit include=columns oder include=columns.cards werden Spalten bzw. Spalten samt Karten mitgeladen.",
                "tags": [
                    "flowcrm.lead-boards"
                ],
                "parameters": [
                    {
                        "name": "include",
                        "in": "query",
                        "required": false,
                        "description": "columns oder columns.cards",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "aa11bb22-cc33-4d44-8e55-6f66aa77bb88",
                                            "name": "Vertrieb",
                                            "is_default": true,
                                            "sort_order": 0,
                                            "created_at": "2026-07-01T08:00:00+00:00",
                                            "updated_at": "2026-07-01T08:00:00+00:00"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowcrm.lead-boards-create",
                "summary": "Board anlegen",
                "description": "Legt ein neues Board an. Bei überschrittenem Limit (5 pro Team) antwortet der Endpunkt mit HTTP 422.",
                "tags": [
                    "flowcrm.lead-boards"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "created": true,
                                    "data": {
                                        "uuid": "bb22cc33-dd44-4e55-8f66-7a77bb88cc99",
                                        "name": "Partner",
                                        "is_default": false,
                                        "sort_order": 1,
                                        "created_at": "2026-07-21T13:20:00+00:00",
                                        "updated_at": "2026-07-21T13:20:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name des Boards"
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/lead-boards/{uuid}": {
            "get": {
                "operationId": "flowcrm.lead-boards-show",
                "summary": "Board abrufen",
                "description": "Ruft ein team-eigenes Board ab. Mit include=columns oder columns.cards inklusive Spalten bzw. Karten. Jede Spalte liefert neben name (gespeicherter Wert, beim Umbenennen zurückzusenden) system_key (Standardspalten des Sales-Boards: cold, warming, setting, closing, won, lost; sonst null) und display_name (Spaltenname in der Sprache der Anfrage, sonst name).",
                "tags": [
                    "flowcrm.lead-boards"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "include",
                        "in": "query",
                        "required": false,
                        "description": "columns oder columns.cards",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "aa11bb22-cc33-4d44-8e55-6f66aa77bb88",
                                        "name": "Vertrieb",
                                        "is_default": true,
                                        "sort_order": 0,
                                        "columns": [
                                            {
                                                "uuid": "cc33dd44-ee55-4f66-8a77-8b88cc99dd00",
                                                "name": "Kalt",
                                                "system_key": "cold",
                                                "display_name": "Kalt",
                                                "sort_order": 0,
                                                "created_at": "2026-07-01T08:00:00+00:00",
                                                "updated_at": "2026-07-01T08:00:00+00:00"
                                            }
                                        ],
                                        "created_at": "2026-07-01T08:00:00+00:00",
                                        "updated_at": "2026-07-01T08:00:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "patch": {
                "operationId": "flowcrm.lead-boards-update",
                "summary": "Board umbenennen",
                "description": "Benennt ein team-eigenes Board um.",
                "tags": [
                    "flowcrm.lead-boards"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "aa11bb22-cc33-4d44-8e55-6f66aa77bb88",
                                        "name": "Vertrieb DACH",
                                        "is_default": true,
                                        "sort_order": 0,
                                        "created_at": "2026-07-01T08:00:00+00:00",
                                        "updated_at": "2026-07-21T13:25:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Neuer Name des Boards"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowcrm.lead-boards-delete",
                "summary": "Board löschen",
                "description": "Löscht ein team-eigenes Board samt seiner Spalten und Karten. Die verknüpften Leads bleiben bestehen.",
                "tags": [
                    "flowcrm.lead-boards"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Board gelöscht."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/lead-boards/{uuid}/columns": {
            "post": {
                "operationId": "flowcrm.lead-board-columns-create",
                "summary": "Spalte anlegen",
                "description": "Legt eine Spalte in einem team-eigenen Board an. Ohne sort_order wird die Spalte hinten angefügt.",
                "tags": [
                    "flowcrm.lead-boards"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "created": true,
                                    "data": {
                                        "uuid": "dd44ee55-ff66-4a77-8b88-9c99dd00ee11",
                                        "name": "In Verhandlung",
                                        "system_key": null,
                                        "display_name": "In Verhandlung",
                                        "sort_order": 1,
                                        "created_at": "2026-07-21T13:30:00+00:00",
                                        "updated_at": "2026-07-21T13:30:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name der Spalte"
                                    },
                                    "sort_order": {
                                        "type": "integer",
                                        "description": "Position der Spalte (Standard: hinten angefügt)"
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/lead-board-columns/{uuid}": {
            "patch": {
                "operationId": "flowcrm.lead-board-columns-update",
                "summary": "Spalte aktualisieren",
                "description": "Aktualisiert Name oder Position einer team-eigenen Spalte.",
                "tags": [
                    "flowcrm.lead-boards"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "dd44ee55-ff66-4a77-8b88-9c99dd00ee11",
                                        "name": "Verhandlung",
                                        "system_key": null,
                                        "display_name": "Verhandlung",
                                        "sort_order": 1,
                                        "created_at": "2026-07-21T13:30:00+00:00",
                                        "updated_at": "2026-07-21T13:35:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Neuer Name der Spalte"
                                    },
                                    "sort_order": {
                                        "type": "integer",
                                        "description": "Neue Position der Spalte"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowcrm.lead-board-columns-delete",
                "summary": "Spalte löschen",
                "description": "Löscht eine team-eigene Spalte. Die Karten der Spalte werden mitentfernt; die verknüpften Leads bleiben bestehen.",
                "tags": [
                    "flowcrm.lead-boards"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Spalte gelöscht."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/lead-board-columns/{uuid}/cards": {
            "post": {
                "operationId": "flowcrm.lead-board-cards-create",
                "summary": "Karte anlegen",
                "description": "Legt eine Karte in einer team-eigenen Spalte an. Genau eine der beiden Varianten angeben: entweder lead_uuid (bestehender Lead) ODER ein verschachteltes lead-Objekt (neuer Lead und Karte in einer Transaktion). Die Karten-eigenen deal_value/deal_currency sind unabhängig von den Deal-Feldern des Leads.",
                "tags": [
                    "flowcrm.lead-boards"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "created": true,
                                    "data": {
                                        "uuid": "ee55ff66-aa77-4b88-9c99-0d00ee11ff22",
                                        "deal_value": "5000.00",
                                        "deal_currency": "EUR",
                                        "sort_order": 0,
                                        "column_uuid": "cc33dd44-ee55-4f66-8a77-8b88cc99dd00",
                                        "lead": {
                                            "uuid": "9b1c7f3e-2a4d-4c8b-8e1a-6f0d2c9b4a11",
                                            "name": "Mustermann GmbH"
                                        },
                                        "created_at": "2026-07-21T13:40:00+00:00",
                                        "updated_at": "2026-07-21T13:40:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "lead_uuid": {
                                        "type": "string",
                                        "description": "UUID eines bestehenden team-eigenen Leads (Alternative zu lead)"
                                    },
                                    "lead": {
                                        "type": "object",
                                        "description": "Neuer Lead (type plus company_name/first_name usw., analog zum Lead-Anlegen; Alternative zu lead_uuid)"
                                    },
                                    "deal_value": {
                                        "type": "number",
                                        "description": "Auftragswert der Karte"
                                    },
                                    "deal_currency": {
                                        "type": "string",
                                        "description": "Währung der Karte (3-stelliger ISO-Code)"
                                    },
                                    "sort_order": {
                                        "type": "integer",
                                        "description": "Position der Karte in der Spalte"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/lead-board-cards/{uuid}": {
            "patch": {
                "operationId": "flowcrm.lead-board-cards-update",
                "summary": "Karte aktualisieren",
                "description": "Aktualisiert die Deal-Felder oder die Position einer team-eigenen Karte. Die Verknüpfung zum Lead und die Spalte werden hier nicht geändert (dafür dient der Move-Endpunkt).",
                "tags": [
                    "flowcrm.lead-boards"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "ee55ff66-aa77-4b88-9c99-0d00ee11ff22",
                                        "deal_value": "6500.00",
                                        "deal_currency": "EUR",
                                        "sort_order": 0,
                                        "column_uuid": "cc33dd44-ee55-4f66-8a77-8b88cc99dd00",
                                        "lead": {
                                            "uuid": "9b1c7f3e-2a4d-4c8b-8e1a-6f0d2c9b4a11",
                                            "name": "Mustermann GmbH"
                                        },
                                        "created_at": "2026-07-21T13:40:00+00:00",
                                        "updated_at": "2026-07-21T13:45:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "deal_value": {
                                        "type": "number",
                                        "description": "Auftragswert der Karte"
                                    },
                                    "deal_currency": {
                                        "type": "string",
                                        "description": "Währung der Karte (3-stelliger ISO-Code)"
                                    },
                                    "sort_order": {
                                        "type": "integer",
                                        "description": "Position der Karte in der Spalte"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowcrm.lead-board-cards-delete",
                "summary": "Karte löschen",
                "description": "Löscht eine team-eigene Karte. Der verknüpfte Lead bleibt bestehen.",
                "tags": [
                    "flowcrm.lead-boards"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Karte gelöscht."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/lead-board-cards/{uuid}/move": {
            "put": {
                "operationId": "flowcrm.lead-board-cards-move",
                "summary": "Karte verschieben",
                "description": "Verschiebt eine team-eigene Karte in eine team-eigene Zielspalte, mit position an einen Index (lückenlos neu nummeriert). Ist die Zielspalte status-gemappt, wird der Lead-Status wie beim Drag-and-Drop gesetzt. Die Verknüpfung der Karte bleibt unverändert. Ohne position und sort_order wird die Karte ans Ende der Spalte gehängt; sort_order und position zusammen ergeben HTTP 422.",
                "tags": [
                    "flowcrm.lead-boards"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "ee55ff66-aa77-4b88-9c99-0d00ee11ff22",
                                        "deal_value": "6500.00",
                                        "deal_currency": "EUR",
                                        "sort_order": 0,
                                        "column_uuid": "dd44ee55-ff66-4a77-8b88-9c99dd00ee11",
                                        "lead": {
                                            "uuid": "9b1c7f3e-2a4d-4c8b-8e1a-6f0d2c9b4a11",
                                            "name": "Mustermann GmbH"
                                        },
                                        "created_at": "2026-07-21T13:40:00+00:00",
                                        "updated_at": "2026-07-21T13:50:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "target_column_uuid": {
                                        "type": "string",
                                        "description": "UUID der team-eigenen Zielspalte"
                                    },
                                    "position": {
                                        "type": "integer",
                                        "description": "Index in der Zielspalte ab 0 (0 = oben), gezählt ohne die verschobene Karte. Ein Index hinter dem Ende hängt an. Beide Spalten werden lückenlos ab 0 neu nummeriert. Nicht zusammen mit sort_order."
                                    },
                                    "sort_order": {
                                        "type": "integer",
                                        "description": "Roher sort_order-Wert, wird ohne Neunummerierung der übrigen Karten gespeichert (bisheriges Verhalten). Nicht zusammen mit position."
                                    }
                                },
                                "required": [
                                    "target_column_uuid"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/leads/{uuid}/docs": {
            "get": {
                "operationId": "flowcrm.leads-docs-show",
                "summary": "Lead-Dokument abrufen",
                "description": "Ruft das FlowDoc eines team-eigenen Leads ab, inklusive latest_version_number. Existiert noch keines, wird es beim ersten Aufruf angelegt und leer zurückgegeben. documentable.type ist crm_lead.",
                "tags": [
                    "flowcrm.flowdoc"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
                                        "title": "Notizen",
                                        "content": {
                                            "type": "doc",
                                            "content": [
                                                {
                                                    "type": "paragraph",
                                                    "content": [
                                                        {
                                                            "type": "text",
                                                            "text": "Angebot bis Freitag."
                                                        }
                                                    ]
                                                }
                                            ]
                                        },
                                        "content_html": "<p>Angebot bis Freitag.</p>",
                                        "documentable": {
                                            "type": "crm_lead",
                                            "uuid": "9b1c7f3e-2a4d-4c8b-8e1a-6f0d2c9b4a11"
                                        },
                                        "created_by_uuid": "2b7c4d8e-1f3a-4e5c-0d7b-2c9a8f4e3d1a",
                                        "latest_version_number": 1,
                                        "created_at": "2026-07-21T14:00:00+00:00",
                                        "updated_at": "2026-07-21T14:00:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowcrm.leads-docs-update",
                "summary": "Lead-Dokument aktualisieren",
                "description": "Ersetzt den Inhalt des FlowDocs vollständig. content muss übergeben werden; null oder ein leerer String leert das Dokument. Jeder Aufruf erzeugt eine neue Version und erhöht latest_version_number. title wird im Body mit 422 abgelehnt.",
                "tags": [
                    "flowcrm.flowdoc"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
                                        "title": "Notizen",
                                        "content": {
                                            "type": "doc",
                                            "content": [
                                                {
                                                    "type": "paragraph",
                                                    "content": [
                                                        {
                                                            "type": "text",
                                                            "text": "Angebot versendet."
                                                        }
                                                    ]
                                                }
                                            ]
                                        },
                                        "content_html": "<p>Angebot versendet.</p>",
                                        "documentable": {
                                            "type": "crm_lead",
                                            "uuid": "9b1c7f3e-2a4d-4c8b-8e1a-6f0d2c9b4a11"
                                        },
                                        "created_by_uuid": "2b7c4d8e-1f3a-4e5c-0d7b-2c9a8f4e3d1a",
                                        "latest_version_number": 2,
                                        "created_at": "2026-07-21T14:00:00+00:00",
                                        "updated_at": "2026-07-21T14:10:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "content": {
                                        "type": "string",
                                        "description": "Markdown-Inhalt, wird serverseitig in TipTap umgewandelt. null oder leerer String leert das Dokument"
                                    }
                                },
                                "required": [
                                    "content"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/clients/{uuid}/docs": {
            "get": {
                "operationId": "flowcrm.clients-docs-show",
                "summary": "Kunden-Dokument abrufen",
                "description": "Ruft das FlowDoc eines team-eigenen Kunden ab, inklusive latest_version_number. Existiert noch keines, wird es beim ersten Aufruf angelegt und leer zurückgegeben. documentable.type ist cmm_client.",
                "tags": [
                    "flowcrm.flowdoc"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "c3d4e5f6-a7b8-4c9d-0e1f-2a3b4c5d6e7f",
                                        "title": "Notizen",
                                        "content": {
                                            "type": "doc",
                                            "content": [
                                                {
                                                    "type": "paragraph",
                                                    "content": [
                                                        {
                                                            "type": "text",
                                                            "text": "Angebot bis Freitag."
                                                        }
                                                    ]
                                                }
                                            ]
                                        },
                                        "content_html": "<p>Angebot bis Freitag.</p>",
                                        "documentable": {
                                            "type": "cmm_client",
                                            "uuid": "8c1a5d2e-0f4b-4a9c-9d3e-2b7f0a6c1e44"
                                        },
                                        "created_by_uuid": "2b7c4d8e-1f3a-4e5c-0d7b-2c9a8f4e3d1a",
                                        "latest_version_number": 1,
                                        "created_at": "2026-07-21T14:00:00+00:00",
                                        "updated_at": "2026-07-21T14:00:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowcrm.clients-docs-update",
                "summary": "Kunden-Dokument aktualisieren",
                "description": "Ersetzt den Inhalt des FlowDocs vollständig. content muss übergeben werden; null oder ein leerer String leert das Dokument. Jeder Aufruf erzeugt eine neue Version und erhöht latest_version_number. title wird im Body mit 422 abgelehnt.",
                "tags": [
                    "flowcrm.flowdoc"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "c3d4e5f6-a7b8-4c9d-0e1f-2a3b4c5d6e7f",
                                        "title": "Notizen",
                                        "content": {
                                            "type": "doc",
                                            "content": [
                                                {
                                                    "type": "paragraph",
                                                    "content": [
                                                        {
                                                            "type": "text",
                                                            "text": "Angebot versendet."
                                                        }
                                                    ]
                                                }
                                            ]
                                        },
                                        "content_html": "<p>Angebot versendet.</p>",
                                        "documentable": {
                                            "type": "cmm_client",
                                            "uuid": "8c1a5d2e-0f4b-4a9c-9d3e-2b7f0a6c1e44"
                                        },
                                        "created_by_uuid": "2b7c4d8e-1f3a-4e5c-0d7b-2c9a8f4e3d1a",
                                        "latest_version_number": 2,
                                        "created_at": "2026-07-21T14:00:00+00:00",
                                        "updated_at": "2026-07-21T14:10:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "content": {
                                        "type": "string",
                                        "description": "Markdown-Inhalt, wird serverseitig in TipTap umgewandelt. null oder leerer String leert das Dokument"
                                    }
                                },
                                "required": [
                                    "content"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/contacts/{uuid}/docs": {
            "get": {
                "operationId": "flowcrm.contacts-docs-show",
                "summary": "Kontakt-Dokument abrufen",
                "description": "Ruft das FlowDoc eines Kontakts (ein privater Kontakt ohne Team ist nur für seinen Eigentümer erreichbar) ab, inklusive latest_version_number. Existiert noch keines, wird es beim ersten Aufruf angelegt und leer zurückgegeben. documentable.type ist cmm_contact.",
                "tags": [
                    "flowcrm.flowdoc"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "e5f6a7b8-c9d0-4e1f-2a3b-4c5d6e7f8a9b",
                                        "title": "Notizen",
                                        "content": {
                                            "type": "doc",
                                            "content": [
                                                {
                                                    "type": "paragraph",
                                                    "content": [
                                                        {
                                                            "type": "text",
                                                            "text": "Angebot bis Freitag."
                                                        }
                                                    ]
                                                }
                                            ]
                                        },
                                        "content_html": "<p>Angebot bis Freitag.</p>",
                                        "documentable": {
                                            "type": "cmm_contact",
                                            "uuid": "7d2e6f3a-1b5c-4d8e-9f0a-3c4b5d6e7f8a"
                                        },
                                        "created_by_uuid": "2b7c4d8e-1f3a-4e5c-0d7b-2c9a8f4e3d1a",
                                        "latest_version_number": 1,
                                        "created_at": "2026-07-21T14:00:00+00:00",
                                        "updated_at": "2026-07-21T14:00:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowcrm.contacts-docs-update",
                "summary": "Kontakt-Dokument aktualisieren",
                "description": "Ersetzt den Inhalt des FlowDocs vollständig. content muss übergeben werden; null oder ein leerer String leert das Dokument. Jeder Aufruf erzeugt eine neue Version und erhöht latest_version_number. title wird im Body mit 422 abgelehnt.",
                "tags": [
                    "flowcrm.flowdoc"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "e5f6a7b8-c9d0-4e1f-2a3b-4c5d6e7f8a9b",
                                        "title": "Notizen",
                                        "content": {
                                            "type": "doc",
                                            "content": [
                                                {
                                                    "type": "paragraph",
                                                    "content": [
                                                        {
                                                            "type": "text",
                                                            "text": "Angebot versendet."
                                                        }
                                                    ]
                                                }
                                            ]
                                        },
                                        "content_html": "<p>Angebot versendet.</p>",
                                        "documentable": {
                                            "type": "cmm_contact",
                                            "uuid": "7d2e6f3a-1b5c-4d8e-9f0a-3c4b5d6e7f8a"
                                        },
                                        "created_by_uuid": "2b7c4d8e-1f3a-4e5c-0d7b-2c9a8f4e3d1a",
                                        "latest_version_number": 2,
                                        "created_at": "2026-07-21T14:00:00+00:00",
                                        "updated_at": "2026-07-21T14:10:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "content": {
                                        "type": "string",
                                        "description": "Markdown-Inhalt, wird serverseitig in TipTap umgewandelt. null oder leerer String leert das Dokument"
                                    }
                                },
                                "required": [
                                    "content"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/projects/{uuid}/docs": {
            "get": {
                "operationId": "flowcrm.projects-docs-show",
                "summary": "Projekt-Dokument abrufen",
                "description": "Ruft das FlowDoc eines Projekts (ein Projekt hat kein eigenes Team und wird über seinen Kunden team-scoped) ab, inklusive latest_version_number. Existiert noch keines, wird es beim ersten Aufruf angelegt und leer zurückgegeben. documentable.type ist cmm_client_project.",
                "tags": [
                    "flowcrm.flowdoc"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "f6a7b8c9-d0e1-4f2a-3b4c-5d6e7f8a9b0c",
                                        "title": "Notizen",
                                        "content": {
                                            "type": "doc",
                                            "content": [
                                                {
                                                    "type": "paragraph",
                                                    "content": [
                                                        {
                                                            "type": "text",
                                                            "text": "Angebot bis Freitag."
                                                        }
                                                    ]
                                                }
                                            ]
                                        },
                                        "content_html": "<p>Angebot bis Freitag.</p>",
                                        "documentable": {
                                            "type": "cmm_client_project",
                                            "uuid": "6e3f7a4b-2c6d-4e9f-0a1b-4d5c6e7f8a9b"
                                        },
                                        "created_by_uuid": "2b7c4d8e-1f3a-4e5c-0d7b-2c9a8f4e3d1a",
                                        "latest_version_number": 1,
                                        "created_at": "2026-07-21T14:00:00+00:00",
                                        "updated_at": "2026-07-21T14:00:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowcrm.projects-docs-update",
                "summary": "Projekt-Dokument aktualisieren",
                "description": "Ersetzt den Inhalt des FlowDocs vollständig. content muss übergeben werden; null oder ein leerer String leert das Dokument. Jeder Aufruf erzeugt eine neue Version und erhöht latest_version_number. title wird im Body mit 422 abgelehnt.",
                "tags": [
                    "flowcrm.flowdoc"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "f6a7b8c9-d0e1-4f2a-3b4c-5d6e7f8a9b0c",
                                        "title": "Notizen",
                                        "content": {
                                            "type": "doc",
                                            "content": [
                                                {
                                                    "type": "paragraph",
                                                    "content": [
                                                        {
                                                            "type": "text",
                                                            "text": "Angebot versendet."
                                                        }
                                                    ]
                                                }
                                            ]
                                        },
                                        "content_html": "<p>Angebot versendet.</p>",
                                        "documentable": {
                                            "type": "cmm_client_project",
                                            "uuid": "6e3f7a4b-2c6d-4e9f-0a1b-4d5c6e7f8a9b"
                                        },
                                        "created_by_uuid": "2b7c4d8e-1f3a-4e5c-0d7b-2c9a8f4e3d1a",
                                        "latest_version_number": 2,
                                        "created_at": "2026-07-21T14:00:00+00:00",
                                        "updated_at": "2026-07-21T14:10:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "content": {
                                        "type": "string",
                                        "description": "Markdown-Inhalt, wird serverseitig in TipTap umgewandelt. null oder leerer String leert das Dokument"
                                    }
                                },
                                "required": [
                                    "content"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/context": {
            "get": {
                "operationId": "flowdrive.flowdrive-context",
                "summary": "Bereiche, geteilte Drives und Grenzen abrufen",
                "description": "Liefert die adressierbaren Bereiche (personal, shared_drive, client, project, contact), alle geteilten Drives mit der eigenen Rechtestufe, den belegten Speicher des Teams sowie die Upload-Grenzen. Jede Dateiendung wird angenommen (allowed_extensions ist null); inline_extensions nennt die Endungen, die im Browser direkt angezeigt werden, alle anderen werden als Download ausgeliefert.",
                "tags": [
                    "flowdrive.context"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "scopes": [
                                            "personal",
                                            "shared_drive",
                                            "client",
                                            "project",
                                            "contact"
                                        ],
                                        "shared_drives": [
                                            {
                                                "uuid": "9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f",
                                                "name": "Vertrieb",
                                                "level": "manage"
                                            }
                                        ],
                                        "storage": {
                                            "total": 184320917,
                                            "shared_drives": 120000000,
                                            "crm": 40000000,
                                            "files": 812
                                        },
                                        "limits": {
                                            "direct_upload_max_bytes": 26214400,
                                            "presigned_upload_max_bytes": 1073741824,
                                            "allowed_extensions": null,
                                            "inline_extensions": [
                                                "pdf",
                                                "jpg",
                                                "png",
                                                "mp4",
                                                "txt"
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/areas": {
            "get": {
                "operationId": "flowdrive.flowdrive-areas",
                "summary": "Bereiche für Apps abrufen",
                "description": "Die Wurzeln, die eine App anzeigt: Mein FlowDrive (private), der geteilte Team-Drive (team), jedes geteilte Drive mit Berechtigung (drive:{uuid}) samt eigener Stufe und der FlowCRM-Bereich (crm). entry_count zählt die Einträge der obersten Ebene, bei crm die Container. Der Schlüssel key wird als area an GET /flowdrive/entries übergeben.",
                "tags": [
                    "flowdrive.context"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "key": "private",
                                            "kind": "private",
                                            "uuid": null,
                                            "name": "Mein FlowDrive",
                                            "level": "manage",
                                            "entry_count": 12
                                        },
                                        {
                                            "key": "team",
                                            "kind": "team",
                                            "uuid": null,
                                            "name": "Geteilter FlowDrive",
                                            "level": "manage",
                                            "entry_count": 4
                                        },
                                        {
                                            "key": "drive:9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f",
                                            "kind": "drive",
                                            "uuid": "9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f",
                                            "name": "Vertrieb",
                                            "level": "edit",
                                            "entry_count": 7
                                        },
                                        {
                                            "key": "crm",
                                            "kind": "crm",
                                            "uuid": null,
                                            "name": "FlowCRM",
                                            "level": "manage",
                                            "entry_count": 3
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/changes": {
            "get": {
                "operationId": "flowdrive.flowdrive-changes",
                "summary": "Änderungen synchronisieren",
                "description": "Änderungsfeed für synchronisierende Apps. Ohne cursor beginnt er mit einer vollständigen Aufzählung aller sichtbaren Einträge (full_sync: true), danach liefert er nur Änderungen: upserts sind neue oder geänderte Einträge, deletions nennen Einträge im Papierkorb (trashed), endgültig gelöschte (purged) und in ein anderes Team verschobene (moved). meta.next_cursor wird beim nächsten Aufruf mitgegeben; solange meta.has_more true ist, sofort weiterlesen. Der Feed liegt wenige Sekunden hinter der Echtzeit. Ein upsert bedeutet nicht zwingend neuen Inhalt: Ob sich die Bytes einer Datei geändert haben, zeigt erst ein geänderter content_token. reset_required: true bedeutet, dass der Cursor ungültig oder älter als 30 Tage war und die Aufzählung neu beginnt. accessible_drive_uuids nennt die geteilten Drives, auf die aktuell eine Berechtigung besteht; Einträge anderer Drives sind zu entfernen. Mit include_managed=1 enthält der Feed zusätzlich den FlowSend-Systemordner des Teams (parent_uuid null, area team) und die Medien darin (parent_uuid = uuid des Ordners), jeweils mit managed_by flowsend und schreibgeschützt, für jedes Teammitglied; deren Papierkorb und endgültiges Löschen erscheinen als deletions. Die Einstellung gehört zum Cursor: Ein Cursor, der mit der anderen Einstellung gelesen wurde, antwortet mit reset_required: true und einer neuen Aufzählung.",
                "tags": [
                    "flowdrive.context"
                ],
                "parameters": [
                    {
                        "name": "cursor",
                        "in": "query",
                        "required": false,
                        "description": "Undurchsichtiger Cursor aus meta.next_cursor der letzten Antwort.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "description": "Höchstzahl je Liste, 1 bis 500, Standard 200.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "include_managed",
                        "in": "query",
                        "required": false,
                        "description": "1 nimmt den FlowSend-Systemordner des Teams und seine Medien in den Feed auf (managed_by flowsend, schreibgeschützt). Ohne den Parameter oder mit 0 bleibt der Feed unverändert. Erlaubt sind 1 und 0, andere Werte antworten mit HTTP 422. Ein Wechsel der Einstellung bei bestehendem Cursor antwortet mit reset_required: true.",
                        "schema": {
                            "type": "boolean"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "full_sync": false,
                                        "reset_required": false,
                                        "upserts": [
                                            {
                                                "uuid": "3c5b0a11-...",
                                                "name": "Angebot.pdf",
                                                "kind": "file",
                                                "parent_uuid": "7e1a9c33-...",
                                                "area": "team",
                                                "etag": "5f1c...",
                                                "content_token": "a94a8fe5..."
                                            }
                                        ],
                                        "deletions": [
                                            {
                                                "uuid": "b81e0f2a-...",
                                                "reason": "trashed"
                                            }
                                        ],
                                        "accessible_drive_uuids": [
                                            "9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f"
                                        ]
                                    },
                                    "meta": {
                                        "next_cursor": "eyJwIjoiZCIsInQiOjE3...",
                                        "has_more": false,
                                        "server_time": "2026-11-22T10:15:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/entries": {
            "get": {
                "operationId": "flowdrive.flowdrive-entries-index",
                "summary": "Einträge auflisten oder suchen",
                "description": "Listet Ordner, Dateien und externe Verlinkungen. Sichtbar sind eigene private Einträge, die Einträge des geteilten Team-Drives, Einträge an Kunden, Projekten und sichtbaren Kontakten sowie die Inhalte der geteilten Drives, auf denen eine Berechtigung besteht. Ordner stehen vor Dateien, danach wird nach sort sortiert. Jeder Eintrag trägt zusätzlich area, etag, thumbnail_status, thumbnail_url (kurzlebige Vorschauadresse oder null) sowie level, can_edit, can_share, can_delete und can_download für den Aufrufer, dazu is_favorite, version_count und content_token. content_token ist eine Inhaltsrevision von Dateien: Der Wert ändert sich nur, wenn der Dateiinhalt wechselt (Ersetzen, Wiederherstellen einer Version, neu erzeugtes CRM-Dokument), nicht beim Umbenennen, Verschieben, bei einer neuen Vorschau oder wenn FlowDrive den Inhalt im Hintergrund auswertet. Anders als etag eignet er sich deshalb, um zu entscheiden, ob eine zwischengespeicherte Datei neu geladen werden muss. Ordner und externe Verlinkungen tragen null. managed_by nennt das Modul, das einen Eintrag verwaltet: flowsend für den FlowSend-Systemordner und seine Medien, sonst null. Solche Einträge sind schreibgeschützt (can_edit, can_share und can_delete sind false); Umbenennen, Löschen, Freigeben sowie Anlegen, Hochladen und Kopieren in den FlowSend-Ordner antworten mit HTTP 403 und error managed_read_only. Mit parent_uuid des FlowSend-Ordners (uuid aus dem managed-Block) liefert die Liste dessen Medien, für jedes Teammitglied; sie lassen sich wie jede Datei über download-url abrufen.",
                "tags": [
                    "flowdrive.entries-read"
                ],
                "parameters": [
                    {
                        "name": "scope",
                        "in": "query",
                        "required": false,
                        "description": "personal, shared_drive, client, project oder contact. Ohne Angabe wird über alle sichtbaren Bereiche gelesen.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "scope_uuid",
                        "in": "query",
                        "required": false,
                        "description": "UUID des geteilten Drives, Kunden, Projekts oder Kontakts. Pflicht für alle Bereiche außer personal.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "parent_uuid",
                        "in": "query",
                        "required": false,
                        "description": "UUID des Ordners, dessen Inhalt gelistet wird. Ohne Angabe wird die oberste Ebene geliefert.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Sucht im gesamten Bereich nach Namensbestandteilen und übergeht dabei parent_uuid. Die Suche im Geteilten FlowDrive (area=team) und die Suche ohne area und scope finden auch den FlowSend-Systemordner des Teams und seine Medien (managed_by flowsend, schreibgeschützt).",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "area",
                        "in": "query",
                        "required": false,
                        "description": "Alternative zu scope: private, team, crm oder drive:{uuid} (siehe GET /flowdrive/areas). area=crm ohne parent_uuid und search liefert die Kunden, Projekte und Kontakte mit Dateien als Container (kind crm_client, crm_project, crm_contact); ihr Inhalt wird über scope=client|project|contact gelesen. Die Container sind wie jede andere Liste über page und per_page seitenweise abrufbar (feste Reihenfolge: Kunden, Projekte, Kontakte, jeweils nach Name) und tragen dasselbe meta mit current_page, per_page, total und last_page.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "include_managed",
                        "in": "query",
                        "required": false,
                        "description": "Nur mit area=team: 1 ergänzt auf Seite 1 der obersten Ebene (ohne parent_uuid, ohne search, kind leer oder folder) den Schlüssel managed mit den von Modulen verwalteten Ordnern wie im Web: FlowCRM (uuid null, wenn Kunden, Projekte oder Kontakte mit sichtbaren Dateien existieren; Inhalt über area=crm&crm_node=root), FlowAI (uuid null, wenn FlowAI Dokumente für den Aufrufer erzeugt hat; Inhalt über GET /flowdrive/flowai/artifacts) und FlowSend (uuid des Systemordners, sobald das Team ihn hat; Inhalt über parent_uuid). Jeder Eintrag: key, managed_by, name, uuid, entry_count. Ohne den Parameter bleibt die Antwort unverändert. Erlaubt sind 1 und 0, andere Werte antworten mit HTTP 422.",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "crm_node",
                        "in": "query",
                        "required": false,
                        "description": "Nur mit area=crm, nie mit parent_uuid oder search: eine Ebene des verschachtelten FlowCRM-Baums wie im Web, im Container-Format von area=crm und seitenweise. root liefert die Kunden (entry_count = eigene Einträge plus Projekt-Container) und danach einen Container kind crm_contacts (uuid null, entry_count = Zahl der Kontakte mit Dateien), contacts die Kontakt-Container (crm_contact), client:{uuid} die Projekt-Container (crm_project) dieses Kunden (HTTP 404 für einen Kunden eines anderen Teams). Die Dateien eines Kunden, Projekts oder Kontakts liest weiterhin scope=client|project|contact mit scope_uuid. area=crm ohne crm_node bleibt die bisherige flache Liste.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "kind",
                        "in": "query",
                        "required": false,
                        "description": "Auf folder, file oder link einschränken.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "required": false,
                        "description": "name (Standard), size, created_at, updated_at oder type. Ordner stehen immer zuerst.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "direction",
                        "in": "query",
                        "required": false,
                        "description": "asc (Standard) oder desc.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Einträge pro Seite, 1 bis 200, Standard 50.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Seitennummer, Standard 1.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "3c5b0a11-2d44-4f6e-9a77-88cc1d2e3f40",
                                            "name": "Angebote",
                                            "kind": "folder",
                                            "scope": "team",
                                            "size": null,
                                            "mime_type": null,
                                            "parent_uuid": null,
                                            "shared_drive_uuid": "9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f",
                                            "trashed": false,
                                            "area": "drive",
                                            "etag": "5f1c...",
                                            "thumbnail_status": null,
                                            "thumbnail_url": null,
                                            "level": "edit",
                                            "can_edit": true,
                                            "can_share": false,
                                            "can_delete": false,
                                            "can_download": false,
                                            "content_token": null,
                                            "managed_by": null
                                        }
                                    ],
                                    "meta": {
                                        "current_page": 1,
                                        "per_page": 50,
                                        "total": 1,
                                        "last_page": 1
                                    },
                                    "managed": [
                                        {
                                            "key": "flowcrm",
                                            "managed_by": "flowcrm",
                                            "name": "FlowCRM",
                                            "uuid": null,
                                            "entry_count": 3
                                        },
                                        {
                                            "key": "flowai",
                                            "managed_by": "flowai",
                                            "name": "FlowAI",
                                            "uuid": null,
                                            "entry_count": 2
                                        },
                                        {
                                            "key": "flowsend",
                                            "managed_by": "flowsend",
                                            "name": "FlowSend",
                                            "uuid": "5a0e8c71-1f2b-4c3d-9e4f-6a7b8c9d0e1f",
                                            "entry_count": 14
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowdrive.flowdrive-entries-store",
                "summary": "Datei direkt hochladen",
                "description": "Multipart-Upload für kleine Dateien. Die Obergrenze nennt \"limits.direct_upload_max_bytes\" im Überblick (standardmäßig 25 MB) und liegt deutlich unter der Grenze des vorsignierten Wegs, weil diese Bytes durch die Anwendung laufen. Größere Dateien gehen über Upload-Adresse und Bestätigung.",
                "tags": [
                    "flowdrive.entries-write"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "3c5b0a11-...",
                                        "name": "Angebot.pdf",
                                        "kind": "file",
                                        "size": 284410,
                                        "mime_type": "application/pdf"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "file": {
                                        "type": "string",
                                        "format": "binary",
                                        "description": "Die Datei selbst. Jede Dateiendung wird angenommen."
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Freitext, höchstens 2000 Zeichen."
                                    },
                                    "parent_uuid": {
                                        "type": "string",
                                        "description": "UUID des Zielordners."
                                    },
                                    "client_uuid": {
                                        "type": "string",
                                        "description": "UUID des Kunden."
                                    },
                                    "project_uuid": {
                                        "type": "string",
                                        "description": "UUID des Projekts."
                                    },
                                    "contact_uuid": {
                                        "type": "string",
                                        "description": "UUID des Kontakts."
                                    },
                                    "shared_drive_uuid": {
                                        "type": "string",
                                        "description": "UUID des geteilten Drives."
                                    },
                                    "target_root": {
                                        "type": "string",
                                        "description": "private (Mein FlowDrive) oder team (Wurzel des geteilten Team-Drives, für alle Teammitglieder beschreibbar). Nur ohne parent_uuid und ohne Bezugs-UUID."
                                    }
                                },
                                "required": [
                                    "file"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/entries/{uuid}": {
            "get": {
                "operationId": "flowdrive.flowdrive-entries-show",
                "summary": "Einzelnen Eintrag abrufen",
                "description": "Liefert einen Eintrag samt Pfad vom obersten Ordner seines Bereichs bis zu ihm selbst. Eine UUID aus einem fremden Team wird wie eine unbekannte UUID mit HTTP 404 beantwortet.",
                "tags": [
                    "flowdrive.entries-read"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "3c5b0a11-...",
                                        "name": "Angebot Muster GmbH.pdf",
                                        "kind": "file",
                                        "size": 284410,
                                        "size_human": "277,7 KB",
                                        "mime_type": "application/pdf",
                                        "parent_uuid": "7e1a9c33-...",
                                        "trashed": false
                                    },
                                    "breadcrumbs": [
                                        {
                                            "uuid": "7e1a9c33-...",
                                            "name": "Angebote",
                                            "kind": "folder"
                                        },
                                        {
                                            "uuid": "3c5b0a11-...",
                                            "name": "Angebot Muster GmbH.pdf",
                                            "kind": "file"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowdrive.flowdrive-entries-update",
                "summary": "Eintrag umbenennen",
                "description": "Ändert Namen und Beschreibung. Ein Ortswechsel ist eine eigene Aktion. Kollidiert der neue Name am selben Ort, wird eine Zählung angehängt. Erfordert die Stufe edit.",
                "tags": [
                    "flowdrive.entries-write"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "3c5b0a11-...",
                                        "name": "Angebot final.pdf",
                                        "kind": "file"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Neuer Name, höchstens 240 Zeichen."
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Neuer Freitext, höchstens 2000 Zeichen."
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowdrive.flowdrive-entries-destroy",
                "summary": "Eintrag in den Papierkorb legen",
                "description": "Legt einen Eintrag samt allem darunter in den Papierkorb. Erfordert die Stufe manage. Systemordner und Einträge, die noch in einem Newsletter verwendet werden, werden abgewiesen.",
                "tags": [
                    "flowdrive.entries-trash"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "In den Papierkorb verschoben."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/entries/{uuid}/content": {
            "get": {
                "operationId": "flowdrive.flowdrive-entries-content",
                "summary": "Extrahierten Text einer Datei abrufen",
                "description": "Liefert den bereits indexierten Text einer Datei, also denselben Text, den die KI-Werkzeuge lesen. Es wird nichts neu ausgelesen: Ist die Datei noch nicht indexiert, ist \"indexed\" false und \"text\" leer. Für Ordner antwortet die Route mit HTTP 422.",
                "tags": [
                    "flowdrive.entries-read"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "3c5b0a11-...",
                                        "name": "Angebot Muster GmbH.pdf",
                                        "mime_type": "application/pdf",
                                        "indexed": true,
                                        "text": "Angebot Nr. 2026-0184 ..."
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/entries/{uuid}/download-url": {
            "get": {
                "operationId": "flowdrive.flowdrive-entries-download-url",
                "summary": "Zeitlich begrenzten Abruflink erzeugen",
                "description": "Erzeugt eine vorsignierte Adresse direkt auf die gespeicherten Bytes. Die Gültigkeitsdauer steht in \"expires_at\". Dateitypen, die ein Browser ausführen kann (svg, html, xml), werden über signierte Kopfzeilen stets als Download ausgeliefert und nie eingebettet dargestellt. Bei einer externen Verlinkung wird deren Zieladresse mit \"expires_at\": null geliefert.",
                "tags": [
                    "flowdrive.entries-read"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "url": "https://s3.example.com/team-1/drives/...?X-Amz-Signature=...",
                                        "expires_at": "2026-09-21T15:30:00+00:00",
                                        "kind": "file"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/entries/{uuid}/download": {
            "get": {
                "operationId": "flowdrive.flowdrive-entries-download",
                "summary": "Datei direkt herunterladen",
                "description": "Liefert die Datei zum Herunterladen. Liegt sie im Objektspeicher, antwortet die Route mit einer Weiterleitung (HTTP 302) auf die vorsignierte Adresse, damit die Bytes nicht durch die Anwendung laufen; folgen Sie dieser Weiterleitung. Für Ordner und externe Verlinkungen antwortet die Route mit HTTP 422.",
                "tags": [
                    "flowdrive.entries-read"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/octet-stream": {
                                "schema": {
                                    "type": "string",
                                    "format": "binary"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/folders": {
            "post": {
                "operationId": "flowdrive.flowdrive-folders-store",
                "summary": "Ordner anlegen",
                "description": "Legt einen Ordner an. Besteht der Name am Zielort bereits, wird automatisch eine Zählung angehängt. Der Name ist auf 240 Zeichen begrenzt, damit diese Zählung und Umlaute noch Platz haben.",
                "tags": [
                    "flowdrive.entries-write"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "7e1a9c33-...",
                                        "name": "Angebote",
                                        "kind": "folder",
                                        "scope": "team",
                                        "parent_uuid": null
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name des Ordners, höchstens 240 Zeichen."
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Freitext, höchstens 2000 Zeichen."
                                    },
                                    "parent_uuid": {
                                        "type": "string",
                                        "description": "UUID des übergeordneten Ordners."
                                    },
                                    "client_uuid": {
                                        "type": "string",
                                        "description": "UUID des Kunden, an dem der Ordner hängt."
                                    },
                                    "project_uuid": {
                                        "type": "string",
                                        "description": "UUID des Projekts, an dem der Ordner hängt."
                                    },
                                    "contact_uuid": {
                                        "type": "string",
                                        "description": "UUID des Kontakts, an dem der Ordner hängt."
                                    },
                                    "shared_drive_uuid": {
                                        "type": "string",
                                        "description": "UUID des geteilten Drives. Erfordert mindestens die Stufe edit."
                                    },
                                    "target_root": {
                                        "type": "string",
                                        "description": "private (Mein FlowDrive) oder team (Wurzel des geteilten Team-Drives, für alle Teammitglieder beschreibbar). Nur ohne parent_uuid und ohne Bezugs-UUID."
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/external-links": {
            "post": {
                "operationId": "flowdrive.flowdrive-external-links-store",
                "summary": "Externe Verlinkung anlegen",
                "description": "Legt eine Verlinkung auf eine fremde Adresse an. Zugelassen sind ausschließlich http- und https-Adressen; alles andere wird mit HTTP 422 abgewiesen.",
                "tags": [
                    "flowdrive.entries-write"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "5b7c1d20-...",
                                        "name": "Preisliste 2026",
                                        "kind": "link",
                                        "external_url": "https://example.com/preise"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Anzeigename, höchstens 240 Zeichen."
                                    },
                                    "url": {
                                        "type": "string",
                                        "description": "Zieladresse, nur http oder https, höchstens 2048 Zeichen."
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Freitext, höchstens 2000 Zeichen."
                                    },
                                    "parent_uuid": {
                                        "type": "string",
                                        "description": "UUID des übergeordneten Ordners."
                                    },
                                    "client_uuid": {
                                        "type": "string",
                                        "description": "UUID des Kunden."
                                    },
                                    "project_uuid": {
                                        "type": "string",
                                        "description": "UUID des Projekts."
                                    },
                                    "contact_uuid": {
                                        "type": "string",
                                        "description": "UUID des Kontakts."
                                    },
                                    "shared_drive_uuid": {
                                        "type": "string",
                                        "description": "UUID des geteilten Drives."
                                    },
                                    "target_root": {
                                        "type": "string",
                                        "description": "private (Mein FlowDrive) oder team (Wurzel des geteilten Team-Drives, für alle Teammitglieder beschreibbar). Nur ohne parent_uuid und ohne Bezugs-UUID."
                                    }
                                },
                                "required": [
                                    "name",
                                    "url"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/entries/upload-url": {
            "post": {
                "operationId": "flowdrive.flowdrive-entries-upload-url",
                "summary": "Upload-Adresse anfordern",
                "description": "Schritt eins des vorsignierten Uploads. Liefert eine Adresse, an die die Datei per HTTP PUT gesendet wird; die Bytes laufen dabei nie durch die Anwendung. Die Größe wird geprüft, bevor eine Adresse ausgegeben wird (standardmäßig höchstens 1 GB je Datei); jede Dateiendung wird angenommen. Der gespeicherte Inhaltstyp wird serverseitig aus dem Dateinamen abgeleitet, ein übergebener \"mime_type\" wird dafür bewusst nicht verwendet.",
                "tags": [
                    "flowdrive.entries-write"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "put_url": "https://s3.example.com/team-1/drives/...?X-Amz-Signature=...",
                                        "put_headers": {
                                            "Content-Type": "application/pdf"
                                        },
                                        "s3_key": "team-1/drives/0f9a...pdf",
                                        "expires_at": "2026-09-21T15:00:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Dateiname mit Endung, höchstens 240 Zeichen."
                                    },
                                    "size": {
                                        "type": "integer",
                                        "description": "Größe in Bytes."
                                    },
                                    "mime_type": {
                                        "type": "string",
                                        "description": "Nur informativ; der gespeicherte Inhaltstyp wird aus der Dateiendung abgeleitet."
                                    },
                                    "parent_uuid": {
                                        "type": "string",
                                        "description": "UUID des Zielordners. Wird bereits hier geprüft."
                                    },
                                    "client_uuid": {
                                        "type": "string",
                                        "description": "UUID des Kunden."
                                    },
                                    "project_uuid": {
                                        "type": "string",
                                        "description": "UUID des Projekts."
                                    },
                                    "contact_uuid": {
                                        "type": "string",
                                        "description": "UUID des Kontakts."
                                    },
                                    "shared_drive_uuid": {
                                        "type": "string",
                                        "description": "UUID des geteilten Drives."
                                    },
                                    "target_root": {
                                        "type": "string",
                                        "description": "private (Mein FlowDrive) oder team (Wurzel des geteilten Team-Drives, für alle Teammitglieder beschreibbar). Nur ohne parent_uuid und ohne Bezugs-UUID."
                                    }
                                },
                                "required": [
                                    "name",
                                    "size"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/entries/confirm": {
            "post": {
                "operationId": "flowdrive.flowdrive-entries-confirm",
                "summary": "Upload bestätigen",
                "description": "Schritt zwei des vorsignierten Uploads. Der Schlüssel muss zum eigenen Team gehören, das Objekt muss bereits im Speicher liegen, und die tatsächliche Länge im Speicher hat Vorrang vor der gemeldeten Größe. Ein bereits bestätigter Schlüssel liefert den vorhandenen Eintrag zurück statt eines zweiten. on_conflict regelt eine gleichnamige Datei am Zielort: keep_both (Standard) legt \"Name (1).ext\" an, replace ersetzt den Inhalt der Datei aus replace_uuid (Antwort 200 mit replaced: true), skip legt nichts an und verwirft das Objekt (200 mit skipped: true), ask antwortet mit HTTP 409 error name_conflict samt existing und can_replace; Objekt und Schlüssel bleiben dann erhalten und können erneut bestätigt werden. Das gilt bei ask auch, wenn ein anderer Schreiber (Weboberfläche, FlowAI, eine Kopie) denselben Namen gleichzeitig anlegt: Die Prüfung wiederholt sich unmittelbar vor dem Anlegen, statt still \"Name (1).ext\" zu vergeben. Fehler bei replace (alle im flachen Format {\"success\": false, \"error\": \"\", \"message\": \"...\"}; das Objekt bleibt jeweils erhalten, sodass derselbe Schlüssel mit keep_both bestätigt werden kann): HTTP 403 forbidden, wenn die Stufe edit fehlt, auch wenn sie erst zwischen Prüfung und Sperre der Zieldatei entzogen wurde; HTTP 422 replace_target_mismatch, wenn replace_uuid nicht die gleichnamige Datei mit gleicher Endung am Zielort ist oder die Zieldatei zwischen Prüfung und Sperre verschoben, umbenannt oder anders zugeordnet wurde; HTTP 422 replace_target_missing, wenn die Zieldatei in diesem Zeitraum gelöscht oder in den Papierkorb verschoben wurde oder keine einfache Datei mehr ist; HTTP 409 replace_target_changed, wenn expected_content_token mitgeschickt wurde und die Zieldatei inzwischen einen anderen Inhalt hat (jemand anderes hat sie ersetzt oder eine Version wiederhergestellt). Mit expected_content_token wird das Ersetzen bedingt: Der Vergleich läuft unter der Zeilensperre der Zieldatei, eine zwischenzeitliche Änderung wird also nie still überschrieben, und das Objekt kann als Konfliktkopie mit keep_both bestätigt werden. Ohne den Parameter ersetzt replace wie bisher bedingungslos; eine Wiederholung derselben Bestätigung nach Erfolg bleibt wirkungslos. Weitere Fehler: HTTP 422 invalid_key (Schlüssel gehört nicht zum Team), object_missing (Objekt liegt nicht im Speicher), file_too_large, upload_rejected (Typ oder Inhalt abgelehnt); HTTP 409 upload_trashed (bestätigter Eintrag liegt im Papierkorb).",
                "tags": [
                    "flowdrive.entries-write"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "3c5b0a11-...",
                                        "name": "Angebot.pdf",
                                        "kind": "file",
                                        "size": 284410
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "s3_key": {
                                        "type": "string",
                                        "description": "Der Schlüssel aus der Antwort der Upload-Adresse."
                                    },
                                    "name": {
                                        "type": "string",
                                        "description": "Angezeigter Dateiname, höchstens 240 Zeichen."
                                    },
                                    "size": {
                                        "type": "integer",
                                        "description": "Nur informativ; maßgeblich ist die Länge im Speicher."
                                    },
                                    "mime_type": {
                                        "type": "string",
                                        "description": "Nur informativ; abgeleitet wird aus der Dateiendung."
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Freitext, höchstens 2000 Zeichen."
                                    },
                                    "on_conflict": {
                                        "type": "string",
                                        "description": "keep_both (Standard), replace, skip oder ask."
                                    },
                                    "replace_uuid": {
                                        "type": "string",
                                        "description": "Pflicht bei replace: UUID der gleichnamigen Datei am Zielort mit gleicher Endung; erfordert die Stufe edit."
                                    },
                                    "expected_content_token": {
                                        "type": "string",
                                        "description": "Nur bei replace: content_token der Zieldatei, auf dem die eigene Änderung beruht (40 Hex-Zeichen). Ersetzt nur, solange die Datei noch diesen Inhalt hat, sonst HTTP 409 replace_target_changed."
                                    },
                                    "parent_uuid": {
                                        "type": "string",
                                        "description": "UUID des Zielordners."
                                    },
                                    "client_uuid": {
                                        "type": "string",
                                        "description": "UUID des Kunden."
                                    },
                                    "project_uuid": {
                                        "type": "string",
                                        "description": "UUID des Projekts."
                                    },
                                    "contact_uuid": {
                                        "type": "string",
                                        "description": "UUID des Kontakts."
                                    },
                                    "shared_drive_uuid": {
                                        "type": "string",
                                        "description": "UUID des geteilten Drives."
                                    },
                                    "target_root": {
                                        "type": "string",
                                        "description": "private (Mein FlowDrive) oder team (Wurzel des geteilten Team-Drives, für alle Teammitglieder beschreibbar). Nur ohne parent_uuid und ohne Bezugs-UUID."
                                    }
                                },
                                "required": [
                                    "s3_key",
                                    "name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/entries/conflicts": {
            "post": {
                "operationId": "flowdrive.flowdrive-entries-conflicts",
                "summary": "Namenskonflikte vor dem Upload prüfen",
                "description": "Nennt für bis zu 200 Dateinamen die gleichnamigen Dateien, die am Zielort bereits liegen (Groß- und Kleinschreibung sowie Akzente zählen nicht), damit vor dem Upload nachgefragt werden kann. Gleichnamige Ordner und Verlinkungen sind kein Konflikt. can_replace sagt, ob der Aufrufer den Inhalt ersetzen darf.",
                "tags": [
                    "flowdrive.entries-write"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "conflicts": [
                                            {
                                                "name": "Angebot.pdf",
                                                "existing": {
                                                    "uuid": "3c5b0a11-...",
                                                    "name": "Angebot.pdf",
                                                    "size": 284410,
                                                    "updated_at": "2026-11-20T09:12:00+00:00"
                                                },
                                                "can_replace": true
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "names": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Dateinamen, 1 bis 200, je höchstens 240 Zeichen."
                                    },
                                    "parent_uuid": {
                                        "type": "string",
                                        "description": "UUID des Zielordners."
                                    },
                                    "client_uuid": {
                                        "type": "string",
                                        "description": "UUID des Kunden."
                                    },
                                    "project_uuid": {
                                        "type": "string",
                                        "description": "UUID des Projekts."
                                    },
                                    "contact_uuid": {
                                        "type": "string",
                                        "description": "UUID des Kontakts."
                                    },
                                    "shared_drive_uuid": {
                                        "type": "string",
                                        "description": "UUID des geteilten Drives."
                                    },
                                    "target_root": {
                                        "type": "string",
                                        "description": "private (Mein FlowDrive) oder team (Wurzel des geteilten Team-Drives, für alle Teammitglieder beschreibbar). Nur ohne parent_uuid und ohne Bezugs-UUID."
                                    }
                                },
                                "required": [
                                    "names"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/entries/{uuid}/move": {
            "post": {
                "operationId": "flowdrive.flowdrive-entries-move",
                "summary": "Eintrag verschieben",
                "description": "Verschiebt einen Eintrag in einen anderen Ordner oder, mit \"parent_uuid\": null, auf die oberste Ebene seines bisherigen Bereichs. Ordner nehmen ihren gesamten Inhalt mit. Das Feld ist ausdrücklich anzugeben, weil ein Weglassen nicht von einem gewollten Verschieben nach oben zu unterscheiden wäre. Lehnt der Server das Verschieben aus einer Regel ab, antwortet er mit HTTP 422 und einem Fehlercode in error, etwa private_foreign_items (im verschobenen Ordner liegen Einträge anderer Personen, das Ziel ist privat), into_descendant (Ziel liegt im verschobenen Ordner), changed_concurrently (Eintrag oder Ziel wurden gerade geändert, erneut versuchen) oder flowsend_boundary.",
                "tags": [
                    "flowdrive.entries-write"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "3c5b0a11-...",
                                        "name": "Angebot.pdf",
                                        "parent_uuid": "7e1a9c33-..."
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "parent_uuid": {
                                        "type": "string",
                                        "description": "UUID des Zielordners oder null für die oberste Ebene. Das Ziel muss ein Ordner sein und die Stufe edit erfordern. Entfällt, wenn target_root gesendet wird."
                                    },
                                    "target_root": {
                                        "type": "string",
                                        "description": "Statt parent_uuid: private verschiebt in die Wurzel von Mein FlowDrive, team in die Wurzel des geteilten Team-Drives. Bezüge zu Kunde, Projekt, Kontakt oder geteiltem Drive werden dabei gelöst."
                                    }
                                },
                                "required": [
                                    "parent_uuid"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/entries/{uuid}/copy": {
            "post": {
                "operationId": "flowdrive.flowdrive-entries-copy",
                "summary": "Eintrag kopieren",
                "description": "Kopiert eine Datei, eine externe Verlinkung oder einen ganzen Ordner samt Inhalt an einen anderen Ort. Die Kopie läuft im Hintergrund: Die Anfrage prüft sofort alle Regeln und antwortet mit HTTP 202 und dem Kopiervorgang (operation, Status queued). Den Fortschritt und das Ergebnis liefert GET /flowdrive/copies/{uuid} mit der UUID des Vorgangs; wenn er fertig ist, enthält root_entry_uuids die UUID des obersten kopierten Eintrags. Das Ziel wird bestimmt wie beim Anlegen: Mit \"parent_uuid\" landet die Kopie in diesem Ordner und übernimmt dessen Bereich. Ohne Ordner entscheidet genau eine der Angaben client_uuid, project_uuid, contact_uuid oder shared_drive_uuid, die Kopie liegt dann auf der obersten Ebene dieses Bereichs. Fehlt jede Angabe, landet sie auf der obersten Ebene von \"Mein FlowDrive\" (Bereich personal) des Aufrufers. Mit \"target_root\": \"team\" landet sie stattdessen auf der obersten Ebene des Geteilten FlowDrive des Teams, in den jedes Teammitglied mit FlowDrive-Zugriff schreiben darf; \"target_root\": \"private\" ist gleichbedeutend mit dem Weglassen. target_root lässt sich nicht mit parent_uuid oder einer der Bereichs-UUIDs kombinieren (HTTP 422 mit einem Validierungsfehler an target_root). Für die Quelle genügt die Stufe view, für das Ziel ist edit erforderlich. Kopien zu Kunden, Projekten und Kontakten verlangen zusätzlich Schreibrechte in FlowCRM. Jede Kopie erhält eine neue UUID und ein eigenes Objekt im Speicher; kollidiert der Name im Ziel, wird eine Zählung angehängt. Nicht mitkopiert werden Einträge im Papierkorb, Unterelemente ohne Leserecht, Freigabelinks und Analyseergebnisse des Originals. Ein Vorgang umfasst standardmäßig höchstens 5000 Einträge (jeder Ordner zählt mit, auch der kopierte Ordner selbst) und 20 GiB. Je Benutzer sind standardmäßig 20 Kopiervorgänge pro Minute erlaubt, gemeinsam für API und Weboberfläche (darüber HTTP 429 mit rate_limited und Retry-After). Fehler bei der Anfrage: HTTP 403 bei fehlenden Rechten an Quelle oder Ziel (access_denied, crm_permission bei fehlenden FlowCRM-Schreibrechten); HTTP 404, wenn Quelle oder Zielordner nicht im eigenen Team sichtbar sind; HTTP 422 mit einem Validierungsfehler an parent_uuid, wenn das Ziel kein Ordner ist, an target_root bei einem unbekannten Wert oder einer unzulässigen Kombination, sowie mit invalid_target (Ziel liegt im kopierten Ordner), protected_entry (FlowSend-Systemordner) oder limit_exceeded (zu viele Einträge oder Bytes). Scheitert die Kopie später im Hintergrund, steht das im Vorgang (Status failed mit error); angelegt bleibt dann nichts.",
                "tags": [
                    "flowdrive.entries-write"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "operation": {
                                        "uuid": "5b8e2f10-...",
                                        "status": "queued",
                                        "total_items": 42,
                                        "copied_items": 0,
                                        "failed_sources": 0,
                                        "target_label": "Muster GmbH / Angebote",
                                        "root_entry_uuids": [],
                                        "error": null,
                                        "created_at": "2026-11-12T09:30:00+01:00",
                                        "started_at": null,
                                        "finished_at": null
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "parent_uuid": {
                                        "type": "string",
                                        "description": "UUID des Zielordners. Er muss ein Ordner sein, der Aufrufer braucht dort die Stufe edit, und er darf nicht im kopierten Ordner selbst liegen."
                                    },
                                    "client_uuid": {
                                        "type": "string",
                                        "description": "UUID des Kunden, wenn die Kopie auf die oberste Ebene seiner Dateien soll."
                                    },
                                    "project_uuid": {
                                        "type": "string",
                                        "description": "UUID des Projekts, wenn die Kopie auf die oberste Ebene seiner Dateien soll."
                                    },
                                    "contact_uuid": {
                                        "type": "string",
                                        "description": "UUID des Kontakts. Bei einem privaten Kontakt bleibt die Kopie privat."
                                    },
                                    "shared_drive_uuid": {
                                        "type": "string",
                                        "description": "UUID des geteilten Drives; erfordert dort die Stufe edit."
                                    },
                                    "target_root": {
                                        "type": "string",
                                        "description": "Oberste Ebene ohne Bereichs-UUID: private (Mein FlowDrive des Aufrufers, Standard) oder team (Geteilter FlowDrive des Teams). Nicht zusammen mit parent_uuid, client_uuid, project_uuid, contact_uuid oder shared_drive_uuid."
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/copies/{uuid}": {
            "get": {
                "operationId": "flowdrive.flowdrive-copies-show",
                "summary": "Kopiervorgang abfragen",
                "description": "Liefert Status und Fortschritt eines Kopiervorgangs, den POST /flowdrive/entries/{uuid}/copy gestartet hat. status ist queued (wartet), running (läuft), completed (alles kopiert), partial (ein Teil der Quellen konnte nicht kopiert werden, der Rest ist angelegt) oder failed (nichts angelegt). total_items ist die Zahl der geplanten Einträge, copied_items wächst während der Kopie. root_entry_uuids enthält die obersten Einträge der fertigen Kopien, error den Grund eines Fehlschlags in der Sprache des Benutzers. Fragen Sie den Vorgang höchstens alle paar Sekunden ab, bis status completed, partial oder failed ist. Sichtbar ist ein Vorgang nur für den Benutzer, der ihn gestartet hat, und nur im Team, in dem er gestartet wurde; sonst antwortet die API mit HTTP 404.",
                "tags": [
                    "flowdrive.entries-write"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "operation": {
                                        "uuid": "5b8e2f10-...",
                                        "status": "completed",
                                        "total_items": 42,
                                        "copied_items": 42,
                                        "failed_sources": 0,
                                        "target_label": "Muster GmbH / Angebote",
                                        "root_entry_uuids": [
                                            "9d2f4b70-..."
                                        ],
                                        "error": null,
                                        "created_at": "2026-11-12T09:30:00+01:00",
                                        "started_at": "2026-11-12T09:30:01+01:00",
                                        "finished_at": "2026-11-12T09:30:19+01:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/entries/{uuid}/restore": {
            "post": {
                "operationId": "flowdrive.flowdrive-entries-restore",
                "summary": "Eintrag wiederherstellen",
                "description": "Holt einen Eintrag samt allem darunter aus dem Papierkorb zurück. Erfordert die Stufe manage. Liegt der Eintrag nicht im Papierkorb, antwortet die Route mit HTTP 422.",
                "tags": [
                    "flowdrive.entries-trash"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "3c5b0a11-...",
                                        "name": "Angebot.pdf",
                                        "trashed": false
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/entries/{uuid}/purge": {
            "delete": {
                "operationId": "flowdrive.flowdrive-entries-purge",
                "summary": "Eintrag endgültig löschen",
                "description": "Löscht einen Eintrag im Papierkorb endgültig und entfernt die gespeicherten Bytes. Erfordert die Stufe manage. Liegt der Eintrag nicht im Papierkorb, antwortet die Route mit HTTP 422.",
                "tags": [
                    "flowdrive.entries-trash"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Endgültig gelöscht."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/entries/{uuid}/versions": {
            "get": {
                "operationId": "flowdrive.flowdrive-versions-index",
                "summary": "Versionen einer Datei auflisten",
                "description": "Ältere Inhalte einer Datei, neueste zuerst. Braucht Lesezugriff auf die Datei.",
                "tags": [
                    "flowdrive.versions-favorites"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "5e0c7a2b-...",
                                            "size": 48211,
                                            "size_human": "47,1 KB",
                                            "mime_type": "application/pdf",
                                            "created_at": "2026-11-20T09:12:00+00:00",
                                            "created_by_uuid": "1f3e...",
                                            "created_by_name": "Lena Hoffmann"
                                        }
                                    ],
                                    "meta": {
                                        "keep_per_file": 10,
                                        "retention_days": 90
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/versions/{uuid}/download-url": {
            "get": {
                "operationId": "flowdrive.flowdrive-versions-download-url",
                "summary": "Abruflink einer Version erzeugen",
                "description": "Zeitlich begrenzter Download-Link der Version, immer als Anhang mit dem Namen der Datei. Braucht Lesezugriff.",
                "tags": [
                    "flowdrive.versions-favorites"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "url": "https://s3.example/...",
                                        "expires_at": "2026-11-22T11:15:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/versions/{uuid}/restore": {
            "post": {
                "operationId": "flowdrive.flowdrive-versions-restore",
                "summary": "Version wiederherstellen",
                "description": "Macht die Version wieder zum aktuellen Inhalt; der bisherige Inhalt wird dabei selbst zur Version. UUID, Name, Ort und Freigabelinks der Datei bleiben. Braucht Bearbeitungsrecht. Antwort ist der aktualisierte Eintrag.",
                "tags": [
                    "flowdrive.versions-favorites"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "3c5b0a11-...",
                                        "name": "Angebot.pdf",
                                        "kind": "file",
                                        "version_count": 2,
                                        "is_favorite": false
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/versions/{uuid}": {
            "delete": {
                "operationId": "flowdrive.flowdrive-versions-destroy",
                "summary": "Version löschen",
                "description": "Löscht die Version endgültig. Braucht Bearbeitungsrecht.",
                "tags": [
                    "flowdrive.versions-favorites"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/favorites": {
            "get": {
                "operationId": "flowdrive.flowdrive-favorites-index",
                "summary": "Favoriten auflisten",
                "description": "Mit Stern markierte Einträge des Aufrufers im aktuellen Team, zuletzt markierte zuerst. Einträge ohne Zugriff mehr fallen heraus.",
                "tags": [
                    "flowdrive.versions-favorites"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "3c5b0a11-...",
                                            "name": "Angebot.pdf",
                                            "kind": "file",
                                            "is_favorite": true
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/entries/{uuid}/favorite": {
            "put": {
                "operationId": "flowdrive.flowdrive-favorites-store",
                "summary": "Eintrag als Favorit markieren",
                "description": "Markiert eine Datei oder einen Ordner mit Stern. Idempotent, braucht Lesezugriff. Antwort ist der Eintrag.",
                "tags": [
                    "flowdrive.versions-favorites"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "3c5b0a11-...",
                                        "is_favorite": true
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowdrive.flowdrive-favorites-destroy",
                "summary": "Favorit entfernen",
                "description": "Entfernt den Stern. Idempotent. Antwort ist der Eintrag.",
                "tags": [
                    "flowdrive.versions-favorites"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "3c5b0a11-...",
                                        "is_favorite": false
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/recent": {
            "get": {
                "operationId": "flowdrive.flowdrive-recent-index",
                "summary": "Zuletzt verwendet",
                "description": "Einträge, die der Aufrufer zuletzt geöffnet (Abruflink, Download, Text), hochgeladen oder bearbeitet (Ersetzen, Umbenennen, Version wiederhergestellt) hat, neueste zuerst. Einträge im Papierkorb oder ohne Zugriff fallen heraus.",
                "tags": [
                    "flowdrive.versions-favorites"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "description": "1 bis 200, Standard 50.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "action": "opened",
                                            "last_at": "2026-11-22T10:01:00+00:00",
                                            "entry": {
                                                "uuid": "3c5b0a11-...",
                                                "name": "Angebot.pdf",
                                                "kind": "file"
                                            }
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/entries/{uuid}/share-links": {
            "get": {
                "operationId": "flowdrive.flowdrive-share-links-index",
                "summary": "Freigabelinks eines Eintrags auflisten",
                "description": "Listet alle öffentlichen Links eines Eintrags, neueste zuerst. Das gesetzte Kennwort wird nie ausgegeben, nur ob eines existiert.",
                "tags": [
                    "flowdrive.share-links"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "a1b2c3d4-...",
                                            "token": "2f9c...",
                                            "public_url": "https://app.example.com/share/drive/2f9c...",
                                            "target_type": "file",
                                            "allow_download": true,
                                            "has_password": false,
                                            "expires_at": "2026-10-01T00:00:00+00:00",
                                            "is_expired": false
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowdrive.flowdrive-share-links-store",
                "summary": "Freigabelink erstellen",
                "description": "Erstellt einen öffentlichen Link. Für einen Eintrag in einem geteilten Drive wird die Stufe manage benötigt, für einen privaten Eintrag die Eigentümerschaft, und für einen Eintrag an einem Kontakt entscheidet dessen aktuelle Sichtbarkeit. Ein Eintrag im Papierkorb kann nicht freigegeben werden.",
                "tags": [
                    "flowdrive.share-links"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "a1b2c3d4-...",
                                        "token": "2f9c...",
                                        "public_url": "https://app.example.com/share/drive/2f9c...",
                                        "allow_download": true,
                                        "has_password": false,
                                        "expires_at": null,
                                        "is_expired": false
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "allow_download": {
                                        "type": "boolean",
                                        "description": "true erlaubt das Herunterladen, false nur die Ansicht."
                                    },
                                    "password": {
                                        "type": "string",
                                        "description": "Optionales Kennwort, mindestens 4 Zeichen. Wird nur als Hash gespeichert."
                                    },
                                    "expires_at": {
                                        "type": "string",
                                        "description": "Ablaufzeitpunkt, muss in der Zukunft liegen."
                                    }
                                },
                                "required": [
                                    "allow_download"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/share-links/{uuid}": {
            "delete": {
                "operationId": "flowdrive.flowdrive-share-links-destroy",
                "summary": "Freigabelink entziehen",
                "description": "Nimmt einen öffentlichen Link zurück. Die Adresse ist danach sofort ungültig. Ein Link eines fremden Teams wird wie eine unbekannte UUID mit HTTP 404 beantwortet.",
                "tags": [
                    "flowdrive.share-links"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Freigabe-Link entfernt."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/entries/{uuid}/shares": {
            "get": {
                "operationId": "flowdrive.flowdrive-shares-index",
                "summary": "Freigaben eines Eintrags",
                "description": "Aktive persönliche Freigaben des Eintrags. Gleiche Berechtigung wie beim Erstellen eines Freigabelinks.",
                "tags": [
                    "flowdrive.personal-shares"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "…",
                                            "type": "internal",
                                            "permission": "view",
                                            "entry_uuid": "…",
                                            "grantee": {
                                                "uuid": "…",
                                                "name": "Lena Hoffmann",
                                                "email": "lena@example.com",
                                                "avatar_url": "…"
                                            },
                                            "email": null,
                                            "message": null,
                                            "expires_at": null,
                                            "last_accessed_at": null,
                                            "created_by_name": "…",
                                            "created_at": "…"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowdrive.flowdrive-shares-store",
                "summary": "Eintrag persönlich freigeben",
                "description": "Teilt mit einem Teammitglied (type=internal) oder lädt eine externe Adresse ein (type=external). Eine bestehende Freigabe derselben Person wird aktualisiert, eine erneute Einladung derselben Adresse ersetzt den Link.",
                "tags": [
                    "flowdrive.personal-shares"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "…",
                                        "type": "external",
                                        "permission": "upload",
                                        "email": "kunde@example.com",
                                        "grantee": null,
                                        "expires_at": "2026-12-01T00:00:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "type": "string",
                                        "description": "internal oder external."
                                    },
                                    "user_uuid": {
                                        "type": "string",
                                        "description": "Pflicht bei internal: Mitglied des eigenen Teams."
                                    },
                                    "email": {
                                        "type": "string",
                                        "description": "Pflicht bei external."
                                    },
                                    "permission": {
                                        "type": "string",
                                        "description": "internal: view oder edit. external: view, download oder upload (nur Ordner)."
                                    },
                                    "expires_at": {
                                        "type": "string",
                                        "description": "Ablaufzeitpunkt in der Zukunft."
                                    },
                                    "message": {
                                        "type": "string",
                                        "description": "Nachricht in der Einladung (external), höchstens 1000 Zeichen."
                                    }
                                },
                                "required": [
                                    "type",
                                    "permission"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/shares/{uuid}": {
            "patch": {
                "operationId": "flowdrive.flowdrive-shares-update",
                "summary": "Freigabe ändern",
                "description": "Ändert Berechtigung und Ablauf. expires_at: null entfernt den Ablauf.",
                "tags": [
                    "flowdrive.personal-shares"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "permission": {
                                        "type": "string",
                                        "description": "Neue Stufe."
                                    },
                                    "expires_at": {
                                        "type": "string",
                                        "description": "Neuer Ablauf oder null."
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowdrive.flowdrive-shares-destroy",
                "summary": "Freigabe entziehen",
                "description": "Beendet die Freigabe sofort. Auch die berechtigte Person selbst kann eine interne Freigabe so verlassen.",
                "tags": [
                    "flowdrive.personal-shares"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/members": {
            "get": {
                "operationId": "flowdrive.flowdrive-members",
                "summary": "Teammitglieder für die Auswahl",
                "description": "Mitglieder des eigenen Teams ohne den Aufrufer, höchstens 50.",
                "tags": [
                    "flowdrive.personal-shares"
                ],
                "parameters": [
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Filter auf Name oder E-Mail.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "…",
                                            "name": "Lena Hoffmann",
                                            "email": "lena@example.com",
                                            "avatar_url": "…"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/shared-with-me": {
            "get": {
                "operationId": "flowdrive.flowdrive-shared-with-me",
                "summary": "Mit mir geteilt",
                "description": "Einträge, die Teammitglieder mit dem Aufrufer geteilt haben, als normale Einträge mit shared_by_name, share_permission und share_uuid. Unterordner öffnet man mit GET /flowdrive/entries?parent_uuid=… . Dasselbe liefert GET /flowdrive/entries?area=shared.",
                "tags": [
                    "flowdrive.personal-shares"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "…",
                                            "name": "Angebote",
                                            "kind": "folder",
                                            "level": "view",
                                            "shared_by_name": "Max Muster",
                                            "share_permission": "view",
                                            "share_uuid": "…"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/flowai/artifacts": {
            "get": {
                "operationId": "flowdrive.flowdrive-flowai-artifacts-index",
                "summary": "FlowAI-Dokumente auflisten",
                "description": "Listet die Dokumente des FlowAI-Ordners, neueste zuerst. name und mime_type beschreiben die Datei, die /content ausliefert: Ein Dokument mit Markdown-Quelle wird als PDF (oder als Word, wenn Word angefordert war) ausgeliefert, ein gespeichertes PDF, Word-Dokument oder eine Tabelle als gespeicherte Datei. size ist null, wenn die Datei erst beim Abruf erzeugt wird. can_download ist false, wenn dem Aufrufer FlowAI fehlt.",
                "tags": [
                    "flowdrive.flowai-documents"
                ],
                "parameters": [
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Dokumente pro Seite, 1 bis 200, Standard 50.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Seitennummer, Standard 1.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "8b3f2e10-4c5d-4e6f-8a7b-9c0d1e2f3a4b",
                                            "name": "Monatsbericht.pdf",
                                            "kind": "file",
                                            "mime_type": "application/pdf",
                                            "size": null,
                                            "created_at": "2026-11-24T09:12:00+00:00",
                                            "updated_at": "2026-11-24T09:12:00+00:00",
                                            "created_by_name": "Sascha",
                                            "managed_by": "flowai",
                                            "can_download": true
                                        }
                                    ],
                                    "meta": {
                                        "current_page": 1,
                                        "per_page": 50,
                                        "total": 1,
                                        "last_page": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/flowai/artifacts/{uuid}/content": {
            "get": {
                "operationId": "flowdrive.flowdrive-flowai-artifacts-content",
                "summary": "FlowAI-Dokument herunterladen",
                "description": "Liefert die Bytes eines Dokuments als Anhang (Content-Disposition: attachment, X-Content-Type-Options: nosniff), so wie der Download-Knopf im Web: die gespeicherte Datei oder den Export der Markdown-Quelle in ihr Endformat. Ein Dokument außerhalb der Liste antwortet mit HTTP 404. Ohne FlowAI-Zugriff antwortet die Route mit HTTP 403 und error flowai_access_denied (kein Modul-Code, der FlowDrive-Zugriff bleibt bestehen). Kann das Dokument gerade nicht erzeugt werden, antwortet sie mit HTTP 503 und error render_unavailable (bei PDF mit Retry-After und retry_after), bei leerem Inhalt mit HTTP 422 render_empty und bei einem anderen Fehler mit HTTP 500 render_failed; die beiden letzten tragen eine reference für den Support. Weil Markdown-Dokumente bei jedem Abruf erzeugt werden, sind je Benutzer standardmäßig 30 Abrufe pro Minute erlaubt; darüber antwortet die Route mit HTTP 429, error rate_limited, Retry-After und retry_after.",
                "tags": [
                    "flowdrive.flowai-documents"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/octet-stream": {
                                "schema": {
                                    "type": "string",
                                    "format": "binary"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/drives": {
            "get": {
                "operationId": "flowdrive.flowdrive-drives-index",
                "summary": "Geteilte Drives auflisten",
                "description": "Listet alle geteilten Drives, auf die der Aufrufer Zugriff hat, jeweils mit der eigenen Rechtestufe.",
                "tags": [
                    "flowdrive.shared-drives"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "9d2f4c1a-...",
                                            "name": "Vertrieb",
                                            "level": "manage",
                                            "created_by_name": "Sascha"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowdrive.flowdrive-drives-store",
                "summary": "Geteiltes Drive anlegen",
                "description": "Legt ein geteiltes Drive an. Der Aufrufer erhält sofort die Stufe manage.",
                "tags": [
                    "flowdrive.shared-drives"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "9d2f4c1a-...",
                                        "name": "Vertrieb",
                                        "level": "manage"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name des Drives, höchstens 255 Zeichen."
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/drives/{uuid}": {
            "get": {
                "operationId": "flowdrive.flowdrive-drives-show",
                "summary": "Geteiltes Drive abrufen",
                "description": "Liefert ein einzelnes geteiltes Drive samt eigener Rechtestufe. Erfordert mindestens die Stufe view.",
                "tags": [
                    "flowdrive.shared-drives"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "9d2f4c1a-...",
                                        "name": "Vertrieb",
                                        "level": "view"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowdrive.flowdrive-drives-update",
                "summary": "Geteiltes Drive umbenennen",
                "description": "Benennt ein geteiltes Drive um. Erfordert die Stufe manage.",
                "tags": [
                    "flowdrive.shared-drives"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "9d2f4c1a-...",
                                        "name": "Vertrieb Nord",
                                        "level": "manage"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Neuer Name, höchstens 255 Zeichen."
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowdrive.flowdrive-drives-destroy",
                "summary": "Geteiltes Drive löschen",
                "description": "Löscht ein geteiltes Drive endgültig, zusammen mit allen enthaltenen Dateien, Ordnern und ihren gespeicherten Bytes. Das Drive ist sofort nicht mehr erreichbar, die Bytes werden kurz danach im Hintergrund entfernt; es gibt keinen Papierkorb und keinen Weg zurück. Enthält das Drive den FlowSend-Ordner oder Medien, die FlowSend noch verwendet, oder liegen in seinen Ordnern Einträge aus einem anderen Bereich von FlowDrive, antwortet die Route mit HTTP 422 (`delete_blocked`) und ändert nichts. Erfordert die Stufe manage.",
                "tags": [
                    "flowdrive.shared-drives"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Geteiltes Drive endgültig gelöscht."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/drives/{uuid}/members": {
            "get": {
                "operationId": "flowdrive.flowdrive-drives-members-index",
                "summary": "Mitglieder eines geteilten Drives auflisten",
                "description": "Listet alle Mitglieder mit ihrer Rechtestufe. Erfordert mindestens die Stufe view.",
                "tags": [
                    "flowdrive.shared-drives"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "user_uuid": "4f8a9c5d-...",
                                            "name": "Melanie",
                                            "email": "melanie@example.com",
                                            "level": "edit"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowdrive.flowdrive-drives-members-store",
                "summary": "Mitglied hinzufügen oder Stufe ändern",
                "description": "Fügt ein Mitglied hinzu oder ändert dessen Stufe; beides ist derselbe Aufruf. Der Benutzer muss zum Team gehören, sonst antwortet die Route mit HTTP 404. Erfordert die Stufe manage.",
                "tags": [
                    "flowdrive.shared-drives"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "user_uuid": "4f8a9c5d-...",
                                        "name": "Melanie",
                                        "level": "edit"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "user_uuid": {
                                        "type": "string",
                                        "description": "UUID des Teammitglieds."
                                    },
                                    "level": {
                                        "type": "string",
                                        "description": "view, edit oder manage."
                                    }
                                },
                                "required": [
                                    "user_uuid",
                                    "level"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/drives/{uuid}/members/{userUuid}": {
            "delete": {
                "operationId": "flowdrive.flowdrive-drives-members-destroy",
                "summary": "Mitglied entfernen",
                "description": "Entzieht einem Mitglied den Zugriff. Das letzte verwaltende Mitglied kann sich nicht selbst entfernen, weil das Drive sonst herrenlos wäre; dieser Fall antwortet mit HTTP 422. Erfordert die Stufe manage.",
                "tags": [
                    "flowdrive.shared-drives"
                ],
                "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": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Mitglied entfernt."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/reports/storage": {
            "get": {
                "operationId": "flowdrive.flowdrive-reports-storage",
                "summary": "Belegten Speicher abrufen",
                "description": "Nennt den belegten Speicher des Teams in Bytes, aufgeteilt nach geteilten Drives und Einträgen an Kunden oder Projekten, dazu die Anzahl der Dateien. Die Zahlen gelten für das ganze Team, nicht für den einzelnen Benutzer.",
                "tags": [
                    "flowdrive.reports"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "total": 184320917,
                                        "shared_drives": 120000000,
                                        "crm": 40000000,
                                        "files": 812
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/reports/trash": {
            "get": {
                "operationId": "flowdrive.flowdrive-reports-trash",
                "summary": "Papierkorb auflisten",
                "description": "Listet die Einträge im Papierkorb, neueste zuerst, eingeschränkt auf das, was der Aufrufer sehen darf. Statt einer Gesamtzahl meldet die Antwort \"has_more\", weil die Sichtbarkeit je Eintrag entschieden wird.",
                "tags": [
                    "flowdrive.reports"
                ],
                "parameters": [
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Einträge pro Seite, 1 bis 200, Standard 20.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Seitennummer, Standard 1.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "3c5b0a11-...",
                                            "name": "Altes Angebot.pdf",
                                            "kind": "file",
                                            "trashed": true,
                                            "deleted_at": "2026-09-14T08:12:00+00:00"
                                        }
                                    ],
                                    "meta": {
                                        "current_page": 1,
                                        "per_page": 20,
                                        "has_more": false
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/reports/shares": {
            "get": {
                "operationId": "flowdrive.flowdrive-reports-shares",
                "summary": "Alle Freigabelinks auflisten",
                "description": "Listet jeden öffentlichen Link des Teams, dessen zugehörigen Eintrag der Aufrufer sehen darf. Gedacht für die regelmäßige Durchsicht: welche Dateien sind derzeit ohne Anmeldung erreichbar.",
                "tags": [
                    "flowdrive.reports"
                ],
                "parameters": [
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Einträge pro Seite, 1 bis 200, Standard 20.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Seitennummer, Standard 1.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "a1b2c3d4-...",
                                            "public_url": "https://app.example.com/share/drive/2f9c...",
                                            "entry_uuid": "3c5b0a11-...",
                                            "allow_download": true,
                                            "has_password": true,
                                            "expires_at": "2026-10-01T00:00:00+00:00",
                                            "is_expired": false
                                        }
                                    ],
                                    "meta": {
                                        "current_page": 1,
                                        "per_page": 20,
                                        "has_more": false
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/context": {
            "get": {
                "operationId": "flowevents.flowevents-context",
                "summary": "Erlaubte Werte, Vorgaben und Verfügbarkeit abrufen",
                "description": "Liefert alle erlaubten Werte für Veranstaltungsstatus, Format, Struktur, Buchungsart, Teilnehmerstatus, Rolle, Zertifizierungsstatus, Zimmertyp und Postenart, die Feldtypen der Feedback-Formulare samt Grenzen der Sternebewertung, die möglichen Versand- und Exportarten, die gespeicherten Unterschriften-Vorgaben des Teams sowie die Angabe, ob FlowAccounting für dieses Team erreichbar ist.",
                "tags": [
                    "flowevents.context"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "event_statuses": [
                                            "draft",
                                            "active",
                                            "cancelled",
                                            "closed"
                                        ],
                                        "event_formats": [
                                            "offline",
                                            "online"
                                        ],
                                        "participant_statuses": [
                                            "registered",
                                            "confirmed",
                                            "waitlisted",
                                            "cancelled"
                                        ],
                                        "room_types": [
                                            "single",
                                            "double",
                                            "multi"
                                        ],
                                        "price_item_kinds": [
                                            "accommodation",
                                            "catering",
                                            "room_fee",
                                            "other"
                                        ],
                                        "feedback_field_types": [
                                            "text",
                                            "textarea",
                                            "select",
                                            "checkbox",
                                            "radio",
                                            "rating",
                                            "section_heading",
                                            "paragraph"
                                        ],
                                        "signature_defaults": {
                                            "enabled": true,
                                            "text": "Hiermit bestätige ich meine Teilnahme."
                                        },
                                        "accounting_available": true,
                                        "pagination": {
                                            "default_per_page": 50,
                                            "max_per_page": 200
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/reports/participants": {
            "get": {
                "operationId": "flowevents.flowevents-reports-participants",
                "summary": "Anmeldestand",
                "description": "Zählt die Teilnehmer einer Veranstaltung je Status. Alle vier Status sind immer enthalten, auch wenn keiner vorliegt.",
                "tags": [
                    "flowevents.reports"
                ],
                "parameters": [
                    {
                        "name": "event_uuid",
                        "in": "query",
                        "required": true,
                        "description": "UUID der Veranstaltung.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "event_uuid": "9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f",
                                        "counts": {
                                            "registered": 8,
                                            "confirmed": 12,
                                            "cancelled": 1,
                                            "waitlisted": 3
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/reports/occupancy": {
            "get": {
                "operationId": "flowevents.flowevents-reports-occupancy",
                "summary": "Auslastung",
                "description": "Nennt Kapazität, belegte Plätze, freie Plätze und die Länge der Warteliste. Bei einer Veranstaltung ohne Kapazität ist free null und nicht null Plätze, denn ohne Obergrenze gibt es nichts zu zählen.",
                "tags": [
                    "flowevents.reports"
                ],
                "parameters": [
                    {
                        "name": "event_uuid",
                        "in": "query",
                        "required": true,
                        "description": "UUID der Veranstaltung.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "event_uuid": "9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f",
                                        "capacity": 20,
                                        "taken": 20,
                                        "free": 0,
                                        "waitlisted": 3
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/reports/rooms": {
            "get": {
                "operationId": "flowevents.flowevents-reports-rooms",
                "summary": "Zimmerbelegung",
                "description": "Listet die Zimmer dieser Veranstaltung mit der für sie geltenden Kapazität und der aktuellen Belegung sowie die Zahl der noch nicht zugeteilten Teilnehmer. Eine abweichende Kapazität gilt nur für diese Veranstaltung.",
                "tags": [
                    "flowevents.reports"
                ],
                "parameters": [
                    {
                        "name": "event_uuid",
                        "in": "query",
                        "required": true,
                        "description": "UUID der Veranstaltung.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "event_uuid": "9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f",
                                        "rooms": [
                                            {
                                                "room_uuid": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
                                                "name": "Zimmer 12",
                                                "room_type": "double",
                                                "capacity": 2,
                                                "capacity_override": null,
                                                "occupied": 1
                                            }
                                        ],
                                        "unassigned": 4
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/reports/attendance": {
            "get": {
                "operationId": "flowevents.flowevents-reports-attendance",
                "summary": "Anwesenheit je Termin",
                "description": "Zählt je Termin die anwesend gemeldeten Teilnehmer, die insgesamt erfassten Zellen und die abgegebenen Hausaufgaben. Die Differenz zwischen present und recorded sind die vermerkten Abwesenheiten.",
                "tags": [
                    "flowevents.reports"
                ],
                "parameters": [
                    {
                        "name": "event_uuid",
                        "in": "query",
                        "required": true,
                        "description": "UUID der Veranstaltung.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "event_uuid": "9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f",
                                        "tracks_homework": true,
                                        "sessions": [
                                            {
                                                "session_uuid": "2b3c4d5e-6f70-4a8b-9c0d-1e2f3a4b5c6d",
                                                "starts_at": "2026-10-12T09:00:00+02:00",
                                                "present": 18,
                                                "recorded": 20,
                                                "homework_submitted": 15
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/reports/feedback": {
            "get": {
                "operationId": "flowevents.flowevents-reports-feedback",
                "summary": "Feedback-Auswertung",
                "description": "Wertet die abgegebenen Rückmeldungen einer Veranstaltung aus. Die Antworten werden nach der Frage gruppiert, zu der sie gehören, und nicht nach der Fassung, unter der sie gegeben wurden. Eine zweimal umformulierte Frage bleibt dadurch eine Frage.",
                "tags": [
                    "flowevents.reports"
                ],
                "parameters": [
                    {
                        "name": "event_uuid",
                        "in": "query",
                        "required": true,
                        "description": "UUID der Veranstaltung.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "event_uuid": "9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f",
                                        "submission_count": 14,
                                        "questions": {
                                            "812": {
                                                "label": "Wie zufrieden waren Sie?",
                                                "field_type": "rating",
                                                "answers": [
                                                    {
                                                        "participant_name": "Anna Berger",
                                                        "value": "5",
                                                        "submission_id": 44
                                                    }
                                                ],
                                                "aggregate": {
                                                    "average": 4.6
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/events": {
            "get": {
                "operationId": "flowevents.flowevents-events-index",
                "summary": "Veranstaltungen auflisten",
                "description": "Listet die Veranstaltungen des Teams. Sortiert wird nach dem frühesten Termin; Veranstaltungen ohne Termin stehen am Ende. Der Zeitraum bezieht sich auf die Termine, nicht auf das Anlagedatum.",
                "tags": [
                    "flowevents.events"
                ],
                "parameters": [
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "draft, active, cancelled oder closed.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "format",
                        "in": "query",
                        "required": false,
                        "description": "offline oder online.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Volltextsuche im Titel.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "from",
                        "in": "query",
                        "required": false,
                        "description": "Frühester Termin (YYYY-MM-DD).",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "required": false,
                        "description": "Spätester Termin (YYYY-MM-DD).",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Einträge je Seite, 1 bis 200. Vorgabe 50.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Seitennummer, ab 1.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f",
                                            "title": "Grundkurs Herbst",
                                            "status": "active",
                                            "format": "offline",
                                            "structure": "multi_part",
                                            "booking_mode": "open",
                                            "capacity": 20,
                                            "price_regular": "480.00",
                                            "sessions": [
                                                {
                                                    "uuid": "2b3c4d5e-6f70-4a8b-9c0d-1e2f3a4b5c6d",
                                                    "starts_at": "2026-10-12T09:00:00+02:00"
                                                }
                                            ]
                                        }
                                    ],
                                    "meta": {
                                        "current_page": 1,
                                        "per_page": 50,
                                        "total": 7,
                                        "last_page": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowevents.flowevents-events-store",
                "summary": "Veranstaltung anlegen",
                "description": "Legt eine Veranstaltung samt Terminen und optionalen Posten an. Mindestens ein Termin ist Pflicht. Eine Inhouse-Veranstaltung benötigt eine Firma. Eine neue Veranstaltung ist immer aktiv; der Status lässt sich nicht mitschicken.",
                "tags": [
                    "flowevents.events"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f",
                                        "title": "Grundkurs Herbst",
                                        "status": "active",
                                        "booking_mode": "open",
                                        "sessions": [
                                            {
                                                "uuid": "2b3c4d5e-6f70-4a8b-9c0d-1e2f3a4b5c6d",
                                                "starts_at": "2026-10-12T09:00:00+02:00",
                                                "sort_order": 0
                                            }
                                        ],
                                        "price_items": []
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "description": "Titel, höchstens 255 Zeichen."
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Beschreibung, höchstens 5000 Zeichen."
                                    },
                                    "format": {
                                        "type": "string",
                                        "description": "offline oder online. Vorgabe offline. Bei online werden Zimmer und Verpflegung abgeschaltet."
                                    },
                                    "structure": {
                                        "type": "string",
                                        "description": "simple oder multi_part. Bei simple wird nur der erste Termin gespeichert."
                                    },
                                    "booking_mode": {
                                        "type": "string",
                                        "description": "open oder inhouse. Vorgabe open. Später unveränderlich."
                                    },
                                    "client_uuid": {
                                        "type": "string",
                                        "description": "UUID der buchenden Firma. Pflicht bei booking_mode inhouse."
                                    },
                                    "project_uuid": {
                                        "type": "string",
                                        "description": "UUID des Projekts der Firma."
                                    },
                                    "capacity": {
                                        "type": "integer",
                                        "description": "Höchstzahl der Plätze. Bei Inhouse ohne Wirkung."
                                    },
                                    "price_regular": {
                                        "type": "number",
                                        "description": "Regulärer Seminarpreis."
                                    },
                                    "price_reduced": {
                                        "type": "number",
                                        "description": "Ermäßigter Preis."
                                    },
                                    "price_early_bird": {
                                        "type": "number",
                                        "description": "Frühbucherpreis."
                                    },
                                    "early_bird_until": {
                                        "type": "string",
                                        "description": "Frühbucherfrist (YYYY-MM-DD). Ohne Frühbucherpreis wirkungslos."
                                    },
                                    "seminar_fee_tax_rate": {
                                        "type": "number",
                                        "description": "Steuersatz in Prozent. Leer bedeutet Vorgabe des Teams."
                                    },
                                    "prices_include_tax": {
                                        "type": "boolean",
                                        "description": "Ob die Preise brutto verstanden werden."
                                    },
                                    "uses_accommodation": {
                                        "type": "boolean",
                                        "description": "Ob Kost und Logis genutzt werden."
                                    },
                                    "tracks_homework": {
                                        "type": "boolean",
                                        "description": "Ob Hausaufgaben erfasst werden."
                                    },
                                    "signatures_enabled": {
                                        "type": "boolean",
                                        "description": "Ob Unterschriften eingeholt werden."
                                    },
                                    "signature_confirmation_text": {
                                        "type": "string",
                                        "description": "Bestätigungstext der Unterschriftenseite."
                                    },
                                    "feedback_enabled": {
                                        "type": "boolean",
                                        "description": "Ob Feedback eingeholt werden kann (Versand, Auswertung, Export)."
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Interne Notizen."
                                    },
                                    "sessions": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Mindestens ein Termin mit starts_at, optional ends_at, venue_uuid und online_access_info."
                                    },
                                    "price_items": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Posten mit name, kind, amount, optional tax_rate und is_optional."
                                    }
                                },
                                "required": [
                                    "title",
                                    "sessions"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/events/{uuid}": {
            "get": {
                "operationId": "flowevents.flowevents-events-show",
                "summary": "Veranstaltung abrufen",
                "description": "Liefert eine Veranstaltung mit ihren Terminen, ihren Posten und dem Anmeldestand je Status.",
                "tags": [
                    "flowevents.events"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f",
                                        "title": "Grundkurs Herbst",
                                        "status": "active",
                                        "sessions": [],
                                        "price_items": [
                                            {
                                                "uuid": "3c4d5e6f-7081-4b9c-0d1e-2f3a4b5c6d7e",
                                                "name": "Vollpension",
                                                "kind": "catering",
                                                "amount": "120.00",
                                                "is_optional": true,
                                                "is_invoiced": false
                                            }
                                        ],
                                        "participant_counts": {
                                            "registered": 8,
                                            "confirmed": 12,
                                            "cancelled": 1,
                                            "waitlisted": 3
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowevents.flowevents-events-update",
                "summary": "Veranstaltung ändern",
                "description": "Ändert eine Veranstaltung. Nicht mitgeschickte Felder bleiben unverändert. Werden sessions oder price_items mitgeschickt, gilt die Liste vollständig. Ein bereits abgerechneter Posten lässt sich nicht entfernen und führt zu HTTP 409.",
                "tags": [
                    "flowevents.events"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f",
                                        "title": "Grundkurs Herbst 2026",
                                        "status": "active"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "description": "Titel."
                                    },
                                    "format": {
                                        "type": "string",
                                        "description": "offline oder online."
                                    },
                                    "structure": {
                                        "type": "string",
                                        "description": "simple oder multi_part."
                                    },
                                    "capacity": {
                                        "type": "integer",
                                        "description": "Höchstzahl der Plätze."
                                    },
                                    "sessions": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Vollständige Terminliste. Vorhandene Termine tragen ihre uuid."
                                    },
                                    "price_items": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Vollständige Postenliste. Vorhandene Posten tragen ihre uuid."
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowevents.flowevents-events-destroy",
                "summary": "Veranstaltung löschen",
                "description": "Löscht eine Veranstaltung. Es ist ein weiches Löschen: Teilnehmer, erfasste Anwesenheit und geschriebene Rechnungen behalten ihren Zusammenhang.",
                "tags": [
                    "flowevents.events"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Veranstaltung gelöscht."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/events/{uuid}/cancel": {
            "post": {
                "operationId": "flowevents.flowevents-events-cancel",
                "summary": "Veranstaltung absagen",
                "description": "Setzt eine aktive Veranstaltung auf abgesagt. Eine Veranstaltung, die nicht aktiv ist, wird mit HTTP 409 abgelehnt. Nach der Absage sind keine Anmeldungen mehr möglich.",
                "tags": [
                    "flowevents.events"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f",
                                        "status": "cancelled"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/events/{uuid}/close": {
            "post": {
                "operationId": "flowevents.flowevents-events-close",
                "summary": "Veranstaltung abschließen",
                "description": "Setzt eine aktive Veranstaltung auf abgeschlossen. Eine Veranstaltung, die nicht aktiv ist, wird mit HTTP 409 abgelehnt.",
                "tags": [
                    "flowevents.events"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f",
                                        "status": "closed"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/events/{uuid}/duplicate": {
            "post": {
                "operationId": "flowevents.flowevents-events-duplicate",
                "summary": "Veranstaltung duplizieren",
                "description": "Legt eine Kopie an. Die Kopie ist aktiv, trägt den Zusatz Kopie im Titel und übernimmt die Termine ohne ihre Zeiten, denn der nächste Durchlauf findet an anderen Tagen statt. Teilnehmer werden nicht kopiert, Zimmer eines Tagungshauses schon.",
                "tags": [
                    "flowevents.events"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "4d5e6f70-8192-4c0d-1e2f-3a4b5c6d7e8f",
                                        "title": "Grundkurs Herbst (Kopie)",
                                        "status": "active"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/events/{uuid}/sessions": {
            "get": {
                "operationId": "flowevents.flowevents-sessions-index",
                "summary": "Termine einer Veranstaltung auflisten",
                "description": "Listet alle Termine einer Veranstaltung in ihrer Reihenfolge.",
                "tags": [
                    "flowevents.sessions"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "2b3c4d5e-6f70-4a8b-9c0d-1e2f3a4b5c6d",
                                            "title": null,
                                            "starts_at": "2026-10-12T09:00:00+02:00",
                                            "ends_at": "2026-10-14T17:00:00+02:00",
                                            "venue_uuid": "5e6f7081-9203-4d1e-2f3a-4b5c6d7e8f90",
                                            "sort_order": 0
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowevents.flowevents-sessions-store",
                "summary": "Termin hinzufügen",
                "description": "Fügt einer Veranstaltung einen Termin hinzu. Zugangsdaten für online werden nur bei einer Online-Veranstaltung gespeichert.",
                "tags": [
                    "flowevents.sessions"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "6f708192-a304-4e2f-3a4b-5c6d7e8f9001",
                                        "starts_at": "2026-11-09T09:00:00+01:00",
                                        "sort_order": 3
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "starts_at": {
                                        "type": "string",
                                        "description": "Beginn als Datum oder Zeitstempel."
                                    },
                                    "ends_at": {
                                        "type": "string",
                                        "description": "Ende, nicht vor dem Beginn."
                                    },
                                    "title": {
                                        "type": "string",
                                        "description": "Bezeichnung des Termins."
                                    },
                                    "venue_uuid": {
                                        "type": "string",
                                        "description": "UUID des Tagungshauses."
                                    },
                                    "online_access_info": {
                                        "type": "string",
                                        "description": "Zugangsdaten, nur bei Online-Veranstaltungen."
                                    },
                                    "capacity": {
                                        "type": "integer",
                                        "description": "Eigene Kapazität des Termins."
                                    },
                                    "guest_price": {
                                        "type": "number",
                                        "description": "Preis für Gasthörer je Termin."
                                    },
                                    "sort_order": {
                                        "type": "integer",
                                        "description": "Reihenfolge. Ohne Angabe ans Ende."
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Interne Notizen."
                                    }
                                },
                                "required": [
                                    "starts_at"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/sessions/{uuid}": {
            "put": {
                "operationId": "flowevents.flowevents-sessions-update",
                "summary": "Termin ändern",
                "description": "Ändert einen Termin. Nicht mitgeschickte Felder bleiben unverändert. Das Ende wird gegen den Beginn geprüft, den der Termin nach dieser Anfrage hat, nicht nur gegen den in dieser Anfrage.",
                "tags": [
                    "flowevents.sessions"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "2b3c4d5e-6f70-4a8b-9c0d-1e2f3a4b5c6d",
                                        "starts_at": "2026-10-13T09:00:00+02:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "starts_at": {
                                        "type": "string",
                                        "description": "Beginn."
                                    },
                                    "ends_at": {
                                        "type": "string",
                                        "description": "Ende, nicht vor dem Beginn."
                                    },
                                    "title": {
                                        "type": "string",
                                        "description": "Bezeichnung."
                                    },
                                    "venue_uuid": {
                                        "type": "string",
                                        "description": "UUID des Tagungshauses, null löst die Zuordnung."
                                    },
                                    "online_access_info": {
                                        "type": "string",
                                        "description": "Zugangsdaten, nur bei Online-Veranstaltungen."
                                    },
                                    "capacity": {
                                        "type": "integer",
                                        "description": "Eigene Kapazität."
                                    },
                                    "guest_price": {
                                        "type": "number",
                                        "description": "Preis für Gasthörer."
                                    },
                                    "sort_order": {
                                        "type": "integer",
                                        "description": "Reihenfolge."
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Interne Notizen."
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowevents.flowevents-sessions-destroy",
                "summary": "Termin löschen",
                "description": "Löscht einen Termin. Es ist ein weiches Löschen, die erfasste Anwesenheit bleibt erhalten.",
                "tags": [
                    "flowevents.sessions"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Termin gelöscht."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/participants": {
            "get": {
                "operationId": "flowevents.flowevents-participants-index",
                "summary": "Teilnehmer auflisten",
                "description": "Listet Teilnehmer des Teams, neueste Anmeldung zuerst, wahlweise auf eine Veranstaltung, einen Status oder eine Rolle eingegrenzt.",
                "tags": [
                    "flowevents.participants"
                ],
                "parameters": [
                    {
                        "name": "event_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Nur Teilnehmer dieser Veranstaltung.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "registered, confirmed, waitlisted oder cancelled.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "role",
                        "in": "query",
                        "required": false,
                        "description": "regular oder guest_listener.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Einträge je Seite, 1 bis 200. Vorgabe 50.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Seitennummer, ab 1.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "7081 92a3-b415-4f30-4b5c-6d7e8f900112",
                                            "name": "Anna Berger",
                                            "email": "anna@example.com",
                                            "status": "confirmed",
                                            "role": "regular",
                                            "assigned_price": "480.00",
                                            "room_uuid": null
                                        }
                                    ],
                                    "meta": {
                                        "current_page": 1,
                                        "per_page": 50,
                                        "total": 24,
                                        "last_page": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/events/{uuid}/participants": {
            "post": {
                "operationId": "flowevents.flowevents-participants-store",
                "summary": "Teilnehmer anmelden",
                "description": "Meldet einen CRM-Kunden auf einer Veranstaltung an. Ob ein Platz oder die Warteliste herauskommt, entscheidet die Kapazität und steht im zurückgegebenen Status. Eine zweite aktive Anmeldung desselben Kunden wird mit HTTP 409 abgelehnt.",
                "tags": [
                    "flowevents.participants"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "708192a3-b415-4f30-4b5c-6d7e8f900112",
                                        "name": "Anna Berger",
                                        "status": "registered",
                                        "role": "regular",
                                        "assigned_price": "480.00"
                                    },
                                    "meta": {
                                        "early_bird_fallback_applied": false
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "client_uuid": {
                                        "type": "string",
                                        "description": "UUID des CRM-Kunden."
                                    },
                                    "role": {
                                        "type": "string",
                                        "description": "regular oder guest_listener. Vorgabe regular."
                                    },
                                    "price_tier": {
                                        "type": "string",
                                        "description": "regular, reduced oder early_bird. Vorgabe regular."
                                    },
                                    "assigned_price": {
                                        "type": "number",
                                        "description": "Abweichender Preis. Die Frühbucherfrist gewinnt darüber."
                                    },
                                    "remarks": {
                                        "type": "string",
                                        "description": "Bemerkungen."
                                    },
                                    "session_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Gebuchte Termine eines Gasthörers."
                                    },
                                    "price_item_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Gebuchte Posten. Ohne Angabe gelten alle nicht optionalen Posten."
                                    },
                                    "price_item_overrides": {
                                        "type": "object",
                                        "description": "Abweichende Beträge je Posten-UUID."
                                    }
                                },
                                "required": [
                                    "client_uuid"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/participants/{uuid}": {
            "get": {
                "operationId": "flowevents.flowevents-participants-show",
                "summary": "Teilnehmer abrufen",
                "description": "Liefert einen Teilnehmer mit seiner Veranstaltung, seinem Zimmer und seinen gebuchten Posten.",
                "tags": [
                    "flowevents.participants"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "708192a3-b415-4f30-4b5c-6d7e8f900112",
                                        "name": "Anna Berger",
                                        "status": "confirmed",
                                        "payment_status": "open",
                                        "price_item_selections": [
                                            {
                                                "price_item_uuid": "3c4d5e6f-7081-4b9c-0d1e-2f3a4b5c6d7e",
                                                "name": "Vollpension",
                                                "effective_amount": "120.00"
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowevents.flowevents-participants-update",
                "summary": "Teilnehmer ändern",
                "description": "Ändert einen Teilnehmer. Der Status cancelled wird abgelehnt. Ein Wechsel von regulär auf Gasthörer, der erfasste Anwesenheit verwerfen würde, verlangt confirm_attendance_loss. Ein Nachrücken von der Warteliste wird gegen die Kapazität geprüft.",
                "tags": [
                    "flowevents.participants"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "708192a3-b415-4f30-4b5c-6d7e8f900112",
                                        "status": "confirmed",
                                        "role": "regular"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "status": {
                                        "type": "string",
                                        "description": "registered, confirmed oder waitlisted."
                                    },
                                    "role": {
                                        "type": "string",
                                        "description": "regular oder guest_listener."
                                    },
                                    "price_tier": {
                                        "type": "string",
                                        "description": "Preisstufe."
                                    },
                                    "assigned_price": {
                                        "type": "number",
                                        "description": "Abweichender Preis. Bei einem Gasthörer immer leer."
                                    },
                                    "remarks": {
                                        "type": "string",
                                        "description": "Bemerkungen."
                                    },
                                    "dietary_notes": {
                                        "type": "string",
                                        "description": "Hinweise zur Verpflegung."
                                    },
                                    "bed_linen_required": {
                                        "type": "boolean",
                                        "description": "Ob Bettwäsche gebraucht wird."
                                    },
                                    "certification_status": {
                                        "type": "string",
                                        "description": "none, first_graduation oder final_certificate."
                                    },
                                    "confirm_attendance_loss": {
                                        "type": "boolean",
                                        "description": "Bestätigt den Verlust erfasster Anwesenheit beim Rollenwechsel."
                                    },
                                    "session_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Gebuchte Termine eines Gasthörers."
                                    },
                                    "price_item_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Gebuchte Posten."
                                    },
                                    "price_item_overrides": {
                                        "type": "object",
                                        "description": "Abweichende Beträge je Posten-UUID."
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/participants/{uuid}/confirm": {
            "post": {
                "operationId": "flowevents.flowevents-participants-confirm",
                "summary": "Teilnahme bestätigen",
                "description": "Setzt einen Teilnehmer auf bestätigt. Ein stornierter Teilnehmer wird mit HTTP 409 abgelehnt.",
                "tags": [
                    "flowevents.participants"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "708192a3-b415-4f30-4b5c-6d7e8f900112",
                                        "status": "confirmed"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/participants/{uuid}/cancel": {
            "post": {
                "operationId": "flowevents.flowevents-participants-cancel",
                "summary": "Teilnehmer stornieren",
                "description": "Storniert einen Teilnehmer. Die Raten werden storniert, offene Rechnungen aufgehoben und der nächste Wartende rückt nach. Bezahlte Rechnungen bleiben bestehen. Die Antwort nennt die Zahlen und, falls vorhanden, den nachgerückten Teilnehmer.",
                "tags": [
                    "flowevents.participants"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "708192a3-b415-4f30-4b5c-6d7e8f900112",
                                        "status": "cancelled"
                                    },
                                    "meta": {
                                        "promoted_participant_uuid": "8192a3b4-1546-4031-5c6d-7e8f90011223",
                                        "cancelled_invoices": 1,
                                        "preserved_paid_invoices": 0,
                                        "skipped_invoices": 0,
                                        "failed_invoice_numbers": []
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/participants/{uuid}/promote": {
            "post": {
                "operationId": "flowevents.flowevents-participants-promote",
                "summary": "Von der Warteliste nachrücken",
                "description": "Rückt einen Wartenden von Hand nach. Eine Kapazitätsprüfung findet bewusst nicht statt: Wer hier nachrückt, überschreitet die Obergrenze wissentlich. Ein Teilnehmer, der nicht auf der Warteliste steht, wird mit HTTP 409 abgelehnt.",
                "tags": [
                    "flowevents.participants"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "8192a3b4-1546-4031-5c6d-7e8f90011223",
                                        "status": "registered",
                                        "waitlist_position": null
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/participants/{uuid}/price-items": {
            "get": {
                "operationId": "flowevents.flowevents-participants-price-items-index",
                "summary": "Gebuchte Posten abrufen",
                "description": "Listet die von diesem Teilnehmer gebuchten Posten mit dem tatsächlich geltenden Betrag. Ohne abweichenden Betrag gilt der Betrag der Veranstaltung.",
                "tags": [
                    "flowevents.participants"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "92a3b415-4630-4152-6d7e-8f9001122334",
                                            "price_item_uuid": "3c4d5e6f-7081-4b9c-0d1e-2f3a4b5c6d7e",
                                            "name": "Vollpension",
                                            "kind": "catering",
                                            "amount_override": null,
                                            "effective_amount": "120.00"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowevents.flowevents-participants-price-items-update",
                "summary": "Gebuchte Posten setzen",
                "description": "Setzt die Postenauswahl eines Teilnehmers. Die Liste ersetzt die Auswahl vollständig; ein Posten, der bereits auf einer Rechnung steht, lässt sich nicht abwählen und führt zu HTTP 409. Posten fremder Veranstaltungen werden verworfen.",
                "tags": [
                    "flowevents.participants"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "price_item_uuid": "3c4d5e6f-7081-4b9c-0d1e-2f3a4b5c6d7e",
                                            "name": "Vollpension",
                                            "amount_override": "95.00",
                                            "effective_amount": "95.00"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "price_item_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Die vollständige Auswahl. Eine leere Liste bucht alles ab."
                                    },
                                    "price_item_overrides": {
                                        "type": "object",
                                        "description": "Abweichende Beträge, nach Posten-UUID geschlüsselt."
                                    }
                                },
                                "required": [
                                    "price_item_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/participants/{uuid}/invoice": {
            "post": {
                "operationId": "flowevents.flowevents-participants-invoice",
                "summary": "Rechnung für einen Teilnehmer erstellen",
                "description": "Erstellt eine Rechnung über die ausgewählten Posten. postens benennt nur, was abgerechnet wird, nie wie viel: jeder Betrag und jeder Steuersatz wird serverseitig aus der eigenen Veranstaltung des Teilnehmers gelesen. Ohne FlowAccounting, bei bestehendem Ratenplan, bei einem bereits abgerechneten Posten oder ohne Rechnungsempfänger antwortet der Aufruf mit HTTP 409 und nennt den Grund.",
                "tags": [
                    "flowevents.participants"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "invoice_uuid": "a3b41546-3041-4263-7e8f-900112233445",
                                        "invoice_number": "RE-2026-0142",
                                        "participant_uuid": "708192a3-b415-4f30-4b5c-6d7e8f900112"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "postens": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Liste aus seminar_fee und den UUIDs der abzurechnenden Posten, höchstens 20 Einträge."
                                    }
                                },
                                "required": [
                                    "postens"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/events/{uuid}/billing": {
            "get": {
                "operationId": "flowevents.flowevents-events-billing-index",
                "summary": "Abrechnungsbild einer Veranstaltung abrufen",
                "description": "Liefert den Abrechnungsstand aller Teilnehmer einer Veranstaltung in einem Aufruf: Zahlungsstatus, vereinbarter Preis, Zahlart und die zugehörigen Abrechnungsposten samt Rechnungsnummern. Zusätzlich die Posten der Veranstaltung selbst, die zu keinem Teilnehmer gehören, etwa die Firmenrechnung einer Inhouse-Veranstaltung. Benötigt FlowAccounting und antwortet sonst mit HTTP 403.",
                "tags": [
                    "flowevents.participants"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "event_uuid": "9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f",
                                        "booking_mode": "open",
                                        "manual_payment_status": "open",
                                        "participants": [
                                            {
                                                "uuid": "708192a3-b415-4f30-4b5c-6d7e8f900112",
                                                "name": "Anna Berger",
                                                "payment_status": "open",
                                                "assigned_price": "480.00",
                                                "invoice_links": [
                                                    {
                                                        "uuid": "b4154630-4152-4374-8f90-011223344556",
                                                        "link_type": "seminar_fee",
                                                        "invoice_number": "RE-2026-0142"
                                                    }
                                                ]
                                            }
                                        ],
                                        "event_invoice_links": []
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/participants/{uuid}/installments": {
            "get": {
                "operationId": "flowevents.flowevents-participants-installments-index",
                "summary": "Abrechnungsposten und Raten abrufen",
                "description": "Listet die Abrechnungsposten eines Teilnehmers samt Ratenplan. Eine Rate gibt es, bevor es ihre Rechnung gibt: invoice_uuid bleibt leer, bis der Lauf die Rechnung schreibt. Das ist der Normalzustand einer künftigen Rate und kein Fehler.",
                "tags": [
                    "flowevents.participants"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "b4154630-4152-4374-8f90-011223344556",
                                            "link_type": "installment",
                                            "installment_number": 1,
                                            "installment_amount": "160.00",
                                            "planned_due_date": "2026-10-01",
                                            "invoice_uuid": null
                                        }
                                    ],
                                    "meta": {
                                        "installment_count": 3
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/events/{uuid}/attendance": {
            "get": {
                "operationId": "flowevents.flowevents-attendance-index",
                "summary": "Anwesenheitsraster abrufen",
                "description": "Liefert das vollständige Raster einer Veranstaltung: alle Termine, alle aktiven Teilnehmer und je Kombination den Anwesenheits- und Hausaufgabenzustand.",
                "tags": [
                    "flowevents.attendance"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "event_uuid": "9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f",
                                        "tracks_homework": true,
                                        "sessions": [
                                            {
                                                "uuid": "2b3c4d5e-6f70-4a8b-9c0d-1e2f3a4b5c6d",
                                                "starts_at": "2026-10-12T09:00:00+02:00"
                                            }
                                        ],
                                        "participants": [
                                            {
                                                "uuid": "708192a3-b415-4f30-4b5c-6d7e8f900112",
                                                "name": "Anna Berger",
                                                "attendance": [
                                                    {
                                                        "session_uuid": "2b3c4d5e-6f70-4a8b-9c0d-1e2f3a4b5c6d",
                                                        "attended": true,
                                                        "homework_submitted": null,
                                                        "notes": null
                                                    }
                                                ]
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/participants/{uuid}/attendance/{sessionUuid}": {
            "put": {
                "operationId": "flowevents.flowevents-attendance-update",
                "summary": "Anwesenheit erfassen",
                "description": "Schreibt eine Zelle des Rasters. Ein nicht mitgeschicktes Feld bleibt unberührt, ein ausdrückliches null setzt es auf nicht erfasst zurück. Hausaufgaben lassen sich nur erfassen, wenn die Veranstaltung sie führt.",
                "tags": [
                    "flowevents.attendance"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "sessionUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "15463041-5237-4485-9001-122334455667",
                                        "session_uuid": "2b3c4d5e-6f70-4a8b-9c0d-1e2f3a4b5c6d",
                                        "participant_uuid": "708192a3-b415-4f30-4b5c-6d7e8f900112",
                                        "attended": true,
                                        "homework_submitted": null
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "attended": {
                                        "type": "boolean",
                                        "description": "true, false oder null."
                                    },
                                    "homework_submitted": {
                                        "type": "boolean",
                                        "description": "true, false oder null. Nur bei Veranstaltungen mit Hausaufgaben."
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Notiz zur Zelle."
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/events/{uuid}/rooms": {
            "get": {
                "operationId": "flowevents.flowevents-event-rooms-index",
                "summary": "Zimmer einer Veranstaltung auflisten",
                "description": "Listet die Zimmer dieser Veranstaltung mit der für sie geltenden Kapazität und der aktuellen Belegung.",
                "tags": [
                    "flowevents.event-rooms"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
                                            "name": "Zimmer 12",
                                            "room_type": "double",
                                            "capacity": 2,
                                            "venue_uuid": "5e6f7081-9203-4d1e-2f3a-4b5c6d7e8f90",
                                            "is_ad_hoc": false,
                                            "capacity_override": null,
                                            "effective_capacity": 2,
                                            "occupied": 1
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowevents.flowevents-event-rooms-store",
                "summary": "Zimmer zur Veranstaltung hinzufügen",
                "description": "Stellt vorhandene Zimmer einer Veranstaltung zur Verfügung. Der Aufruf ist wiederholbar: ein bereits zugeordnetes Zimmer behält seine Zuordnung und seine abweichende Kapazität.",
                "tags": [
                    "flowevents.event-rooms"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
                                            "name": "Zimmer 12",
                                            "effective_capacity": 2,
                                            "occupied": 0
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "room_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "UUIDs der Zimmer, mindestens eine."
                                    }
                                },
                                "required": [
                                    "room_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/events/{uuid}/rooms/ad-hoc": {
            "post": {
                "operationId": "flowevents.flowevents-event-rooms-ad-hoc",
                "summary": "Zimmer für diese Veranstaltung anlegen",
                "description": "Legt ein Zimmer an, das zu keinem Tagungshaus gehört und nur für diese Veranstaltung gedacht ist. Genau deshalb lässt es sich später wieder vollständig entfernen.",
                "tags": [
                    "flowevents.event-rooms"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "3b4c5d6e-7f80-4192-a3b4-c5d6e7f80112",
                                        "name": "Ferienwohnung nebenan",
                                        "room_type": "multi",
                                        "capacity": 4,
                                        "venue_uuid": null,
                                        "is_ad_hoc": true
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Bezeichnung des Zimmers."
                                    },
                                    "room_type": {
                                        "type": "string",
                                        "description": "single, double oder multi."
                                    },
                                    "capacity": {
                                        "type": "integer",
                                        "description": "Anzahl der Betten, 1 bis 999."
                                    }
                                },
                                "required": [
                                    "name",
                                    "room_type",
                                    "capacity"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/events/{uuid}/rooms/{roomUuid}/capacity": {
            "put": {
                "operationId": "flowevents.flowevents-event-rooms-capacity",
                "summary": "Abweichende Kapazität setzen",
                "description": "Setzt die Kapazität, die dieses Zimmer für diese eine Veranstaltung hat. Die Abweichung hängt an der Zuordnung und nicht am Zimmer, ein Doppelzimmer wird dadurch nicht dauerhaft zum Einzelzimmer. null stellt die eigene Kapazität des Zimmers wieder her.",
                "tags": [
                    "flowevents.event-rooms"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "roomUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
                                            "name": "Zimmer 12",
                                            "capacity": 2,
                                            "capacity_override": 1,
                                            "effective_capacity": 1,
                                            "occupied": 1
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "capacity_override": {
                                        "type": "integer",
                                        "description": "1 bis 999 oder null."
                                    }
                                },
                                "required": [
                                    "capacity_override"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/events/{uuid}/rooms/{roomUuid}": {
            "delete": {
                "operationId": "flowevents.flowevents-event-rooms-destroy",
                "summary": "Zimmer von der Veranstaltung entfernen",
                "description": "Nimmt ein Zimmer von der Veranstaltung. Alle darin untergebrachten Teilnehmer verlieren zuerst ihren Platz. Ein eigens angelegtes Zimmer wird dabei gelöscht, ein Zimmer eines Tagungshauses bleibt bestehen.",
                "tags": [
                    "flowevents.event-rooms"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "roomUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Zimmer von der Veranstaltung entfernt."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/participants/{uuid}/room": {
            "put": {
                "operationId": "flowevents.flowevents-participants-room",
                "summary": "Teilnehmer einem Zimmer zuteilen",
                "description": "Teilt einen Teilnehmer einem Zimmer zu oder nimmt ihn heraus. room_uuid ist Pflicht und darf null sein; null hebt die Zuteilung auf. Ein volles Zimmer antwortet mit HTTP 409 samt Belegung und Kapazität, mit confirm_overbooking wird trotzdem geschrieben.",
                "tags": [
                    "flowevents.event-rooms"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "708192a3-b415-4f30-4b5c-6d7e8f900112",
                                        "name": "Anna Berger",
                                        "room_uuid": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "room_uuid": {
                                        "type": "string",
                                        "description": "UUID des Zimmers oder null zum Herausnehmen."
                                    },
                                    "confirm_overbooking": {
                                        "type": "boolean",
                                        "description": "Bestätigt eine Überbelegung ausdrücklich."
                                    }
                                },
                                "required": [
                                    "room_uuid"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/venues": {
            "get": {
                "operationId": "flowevents.flowevents-venues-index",
                "summary": "Tagungshäuser auflisten",
                "description": "Listet die Tagungshäuser des Teams mit ihren Zimmern, nach Name sortiert.",
                "tags": [
                    "flowevents.venues"
                ],
                "parameters": [
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Suche in Name und Ort.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Einträge je Seite, 1 bis 200. Vorgabe 50.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Seitennummer, ab 1.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "5e6f7081-9203-4d1e-2f3a-4b5c6d7e8f90",
                                            "name": "Haus am See",
                                            "city": "Konstanz",
                                            "country": "Deutschland",
                                            "rooms": [
                                                {
                                                    "uuid": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
                                                    "name": "Zimmer 12",
                                                    "room_type": "double",
                                                    "capacity": 2
                                                }
                                            ]
                                        }
                                    ],
                                    "meta": {
                                        "current_page": 1,
                                        "per_page": 50,
                                        "total": 3,
                                        "last_page": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowevents.flowevents-venues-store",
                "summary": "Tagungshaus anlegen",
                "description": "Legt ein Tagungshaus an.",
                "tags": [
                    "flowevents.venues"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "5e6f7081-9203-4d1e-2f3a-4b5c6d7e8f90",
                                        "name": "Haus am See",
                                        "city": "Konstanz",
                                        "rooms": []
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name des Hauses."
                                    },
                                    "address": {
                                        "type": "string",
                                        "description": "Anschrift, höchstens 500 Zeichen."
                                    },
                                    "city": {
                                        "type": "string",
                                        "description": "Ort."
                                    },
                                    "country": {
                                        "type": "string",
                                        "description": "Land."
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Interne Notizen."
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/venues/{uuid}": {
            "get": {
                "operationId": "flowevents.flowevents-venues-show",
                "summary": "Tagungshaus abrufen",
                "description": "Liefert ein Tagungshaus mit seinen Zimmern.",
                "tags": [
                    "flowevents.venues"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "5e6f7081-9203-4d1e-2f3a-4b5c6d7e8f90",
                                        "name": "Haus am See",
                                        "address": "Seestrasse 4",
                                        "rooms": []
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowevents.flowevents-venues-update",
                "summary": "Tagungshaus ändern",
                "description": "Ändert ein Tagungshaus. Nicht mitgeschickte Felder bleiben unverändert.",
                "tags": [
                    "flowevents.venues"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "5e6f7081-9203-4d1e-2f3a-4b5c6d7e8f90",
                                        "name": "Haus am See (neu)"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name des Hauses."
                                    },
                                    "address": {
                                        "type": "string",
                                        "description": "Anschrift."
                                    },
                                    "city": {
                                        "type": "string",
                                        "description": "Ort."
                                    },
                                    "country": {
                                        "type": "string",
                                        "description": "Land."
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Interne Notizen."
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowevents.flowevents-venues-destroy",
                "summary": "Tagungshaus löschen",
                "description": "Löscht ein Tagungshaus. Es ist ein weiches Löschen; die Zimmer bleiben unverändert bestehen, damit keine bestehende Zuteilung stillschweigend aufgelöst wird.",
                "tags": [
                    "flowevents.venues"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Tagungshaus gelöscht."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/venues/{uuid}/rooms": {
            "get": {
                "operationId": "flowevents.flowevents-venue-rooms-index",
                "summary": "Zimmer eines Tagungshauses auflisten",
                "description": "Listet die Zimmer eines Tagungshauses, nach Name sortiert.",
                "tags": [
                    "flowevents.venues"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
                                            "name": "Zimmer 12",
                                            "room_type": "double",
                                            "capacity": 2,
                                            "venue_uuid": "5e6f7081-9203-4d1e-2f3a-4b5c6d7e8f90",
                                            "is_ad_hoc": false
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowevents.flowevents-venue-rooms-store",
                "summary": "Zimmer anlegen",
                "description": "Legt ein Zimmer in einem Tagungshaus an.",
                "tags": [
                    "flowevents.venues"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
                                        "name": "Zimmer 12",
                                        "room_type": "double",
                                        "capacity": 2,
                                        "venue_uuid": "5e6f7081-9203-4d1e-2f3a-4b5c6d7e8f90"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Bezeichnung des Zimmers."
                                    },
                                    "room_type": {
                                        "type": "string",
                                        "description": "single, double oder multi."
                                    },
                                    "capacity": {
                                        "type": "integer",
                                        "description": "Anzahl der Betten, 1 bis 999."
                                    }
                                },
                                "required": [
                                    "name",
                                    "room_type",
                                    "capacity"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/rooms/{uuid}": {
            "put": {
                "operationId": "flowevents.flowevents-rooms-update",
                "summary": "Zimmer ändern",
                "description": "Ändert ein Zimmer. Das Tagungshaus lässt sich nicht wechseln und wird abgelehnt, wenn es mitgeschickt wird.",
                "tags": [
                    "flowevents.venues"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
                                        "name": "Zimmer 12a",
                                        "capacity": 3
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Bezeichnung."
                                    },
                                    "room_type": {
                                        "type": "string",
                                        "description": "single, double oder multi."
                                    },
                                    "capacity": {
                                        "type": "integer",
                                        "description": "Anzahl der Betten, 1 bis 999."
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowevents.flowevents-rooms-destroy",
                "summary": "Zimmer löschen",
                "description": "Löscht ein Zimmer. Es ist ein weiches Löschen.",
                "tags": [
                    "flowevents.venues"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Zimmer gelöscht."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/events/{uuid}/signatures/send": {
            "post": {
                "operationId": "flowevents.flowevents-signatures-send",
                "summary": "Unterschriften anfordern",
                "description": "Verschickt die Unterschriften-Mails. Mit scope unsigned erhalten nur die Teilnehmer eine Mail, die noch nicht unterschrieben haben, mit all alle erneut. Die Antwort nennt die erzeugten Token, die eingereihten Mails und die Empfänger ohne Adresse.",
                "tags": [
                    "flowevents.mailings"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "event_uuid": "9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f",
                                        "scope": "unsigned",
                                        "tokens_created": 12,
                                        "mails_queued": 11,
                                        "skipped_no_email": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "scope": {
                                        "type": "string",
                                        "description": "unsigned oder all. Vorgabe unsigned."
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/events/{uuid}/feedback/send": {
            "post": {
                "operationId": "flowevents.flowevents-feedback-send",
                "summary": "Feedback anfordern",
                "description": "Verschickt die Feedback-Mails zu einem Formular und friert dabei eine Fassung des Formulars ein. Mit scope pending erhalten nur die Teilnehmer eine Mail, die noch nicht geantwortet haben.",
                "tags": [
                    "flowevents.mailings"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "event_uuid": "9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f",
                                        "form_uuid": "c5d6e7f8-0112-4233-4455-66778899aabb",
                                        "scope": "pending",
                                        "tokens_created": 12,
                                        "mails_queued": 12,
                                        "skipped_no_email": 0,
                                        "frozen_version_number": 2
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "form_uuid": {
                                        "type": "string",
                                        "description": "UUID des Feedback-Formulars."
                                    },
                                    "scope": {
                                        "type": "string",
                                        "description": "pending oder all. Vorgabe pending."
                                    }
                                },
                                "required": [
                                    "form_uuid"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/events/{uuid}/feedback/evaluation": {
            "get": {
                "operationId": "flowevents.flowevents-feedback-evaluation",
                "summary": "Feedback einer Veranstaltung auswerten",
                "description": "Wertet die Rückmeldungen zu einer Veranstaltung aus, gruppiert nach der Frage und nicht nach der Fassung. Inhaltlich dieselbe Antwort wie die Auswertung unter reports, nur über die Veranstaltung im Pfad adressiert.",
                "tags": [
                    "flowevents.mailings"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "event_uuid": "9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f",
                                        "submission_count": 14,
                                        "questions": {
                                            "812": {
                                                "label": "Wie zufrieden waren Sie?",
                                                "field_type": "rating",
                                                "answers": [],
                                                "aggregate": {
                                                    "average": 4.6
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/feedback-forms": {
            "get": {
                "operationId": "flowevents.flowevents-feedback-forms-index",
                "summary": "Feedback-Formulare auflisten",
                "description": "Listet die Feedback-Formulare des Teams mit der Nummer ihrer lebenden Fassung und der Zahl ihrer Felder.",
                "tags": [
                    "flowevents.feedback-forms"
                ],
                "parameters": [
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Suche in Name und Beschreibung.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Einträge je Seite, 1 bis 200. Vorgabe 50.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Seitennummer, ab 1.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "c5d6e7f8-0112-4233-4455-66778899aabb",
                                            "name": "Abschlussfeedback",
                                            "description": null,
                                            "version_number": 2,
                                            "field_count": 7
                                        }
                                    ],
                                    "meta": {
                                        "current_page": 1,
                                        "per_page": 50,
                                        "total": 2,
                                        "last_page": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowevents.flowevents-feedback-forms-store",
                "summary": "Feedback-Formular anlegen",
                "description": "Legt ein Formular an. Fassung 1 wird sofort mitangelegt, sodass das Formular vom ersten Moment an bearbeitbar ist.",
                "tags": [
                    "flowevents.feedback-forms"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "c5d6e7f8-0112-4233-4455-66778899aabb",
                                        "name": "Abschlussfeedback",
                                        "version_number": 1,
                                        "field_count": 0,
                                        "fields": []
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name des Formulars."
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Beschreibung, höchstens 1000 Zeichen."
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/feedback-forms/{uuid}": {
            "get": {
                "operationId": "flowevents.flowevents-feedback-forms-show",
                "summary": "Feedback-Formular abrufen",
                "description": "Liefert ein Formular mit den Feldern seiner lebenden Fassung in ihrer Reihenfolge.",
                "tags": [
                    "flowevents.feedback-forms"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "c5d6e7f8-0112-4233-4455-66778899aabb",
                                        "name": "Abschlussfeedback",
                                        "version_number": 2,
                                        "field_count": 1,
                                        "fields": [
                                            {
                                                "uuid": "d6e7f801-1223-4344-5566-778899aabbcc",
                                                "field_type": "rating",
                                                "label": "Wie zufrieden waren Sie?",
                                                "is_required": true,
                                                "options": {
                                                    "max": 5,
                                                    "display": "numbers"
                                                },
                                                "sort_order": 1
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowevents.flowevents-feedback-forms-update",
                "summary": "Feedback-Formular ändern",
                "description": "Ändert Name oder Beschreibung eines Formulars. Nicht mitgeschickte Felder bleiben unverändert.",
                "tags": [
                    "flowevents.feedback-forms"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "c5d6e7f8-0112-4233-4455-66778899aabb",
                                        "name": "Abschlussfeedback 2026"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name des Formulars."
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Beschreibung."
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowevents.flowevents-feedback-forms-destroy",
                "summary": "Feedback-Formular löschen",
                "description": "Löscht ein Formular. Liegen bereits Antworten vor, wird das Löschen mit HTTP 409 abgelehnt, weil die Antworten sonst ohne ihre Fragen dastünden.",
                "tags": [
                    "flowevents.feedback-forms"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Feedback-Formular gelöscht."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/feedback-forms/{uuid}/fields": {
            "get": {
                "operationId": "flowevents.flowevents-feedback-fields-index",
                "summary": "Felder eines Formulars auflisten",
                "description": "Listet die Felder der lebenden Fassung in ihrer Reihenfolge.",
                "tags": [
                    "flowevents.feedback-forms"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "d6e7f801-1223-4344-5566-778899aabbcc",
                                            "field_type": "select",
                                            "label": "Wie haben Sie von uns erfahren?",
                                            "is_required": false,
                                            "options": [
                                                "Empfehlung",
                                                "Suchmaschine"
                                            ],
                                            "sort_order": 1
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowevents.flowevents-feedback-fields-store",
                "summary": "Feld hinzufügen",
                "description": "Fügt der lebenden Fassung ein Feld hinzu. Der Feldtyp ist Pflicht und lässt sich später nicht mehr ändern. Ohne weitere Angaben gelten die Vorgaben des Typs.",
                "tags": [
                    "flowevents.feedback-forms"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "e7f80112-2334-4455-6677-8899aabbccdd",
                                        "field_type": "rating",
                                        "label": "Wie zufrieden waren Sie?",
                                        "options": {
                                            "max": 5,
                                            "display": "numbers"
                                        },
                                        "sort_order": 2
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "field_type": {
                                        "type": "string",
                                        "description": "text, textarea, select, checkbox, radio, rating, section_heading oder paragraph."
                                    },
                                    "label": {
                                        "type": "string",
                                        "description": "Beschriftung, höchstens 255 Zeichen."
                                    },
                                    "help_text": {
                                        "type": "string",
                                        "description": "Hilfetext, höchstens 1000 Zeichen."
                                    },
                                    "is_required": {
                                        "type": "boolean",
                                        "description": "Ob eine Antwort verlangt wird."
                                    },
                                    "options": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Antworttexte bei select, radio und checkbox; bei rating ein Objekt mit max zwischen 2 und 10 und display (numbers oder stars, Standard numbers). Bei stars ist max höchstens 5."
                                    }
                                },
                                "required": [
                                    "field_type"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/feedback-forms/{uuid}/fields/order": {
            "put": {
                "operationId": "flowevents.flowevents-feedback-fields-order",
                "summary": "Felder neu anordnen",
                "description": "Setzt die Reihenfolge der Felder. Die Liste ist die neue Reihenfolge vollständig; eine UUID, die zu einem anderen Formular gehört, wird verworfen.",
                "tags": [
                    "flowevents.feedback-forms"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "e7f80112-2334-4455-6677-8899aabbccdd",
                                            "sort_order": 1
                                        },
                                        {
                                            "uuid": "d6e7f801-1223-4344-5566-778899aabbcc",
                                            "sort_order": 2
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "field_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "UUIDs der Felder in der gewünschten Reihenfolge."
                                    }
                                },
                                "required": [
                                    "field_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/feedback-forms/{uuid}/fields/{fieldUuid}": {
            "put": {
                "operationId": "flowevents.flowevents-feedback-fields-update",
                "summary": "Feld ändern",
                "description": "Ändert Beschriftung, Hilfetext, Pflichtangabe oder Antwortmöglichkeiten eines Feldes. Der Feldtyp lässt sich nicht ändern und wird abgelehnt, wenn er mitgeschickt wird. Ein Stern-Höchstwert wird auf den erlaubten Bereich begrenzt.",
                "tags": [
                    "flowevents.feedback-forms"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "fieldUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "e7f80112-2334-4455-6677-8899aabbccdd",
                                        "label": "Wie zufrieden sind Sie?",
                                        "options": {
                                            "max": 10,
                                            "display": "numbers"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "label": {
                                        "type": "string",
                                        "description": "Beschriftung."
                                    },
                                    "help_text": {
                                        "type": "string",
                                        "description": "Hilfetext."
                                    },
                                    "is_required": {
                                        "type": "boolean",
                                        "description": "Ob eine Antwort verlangt wird."
                                    },
                                    "options": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Antworttexte oder, bei rating, ein Objekt mit max und display (numbers oder stars)."
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowevents.flowevents-feedback-fields-destroy",
                "summary": "Feld löschen",
                "description": "Löscht ein Feld aus der lebenden Fassung. Bereits eingefrorene Fassungen und die zu ihnen gegebenen Antworten bleiben unberührt.",
                "tags": [
                    "flowevents.feedback-forms"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "fieldUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Feld gelöscht."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/events/{uuid}/exports/contacts": {
            "get": {
                "operationId": "flowevents.flowevents-exports-contacts",
                "summary": "Kontaktliste exportieren",
                "description": "Liefert die Kontaktliste als CSV: Name, E-Mail, Telefon, Firma, Adresse, Rolle und Bemerkungen. Diese Liste enthält bewusst keine Geldbeträge und braucht deshalb kein FlowAccounting.",
                "tags": [
                    "flowevents.exports"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "statuses",
                        "in": "query",
                        "required": false,
                        "description": "registered, confirmed, waitlisted, cancelled. Vorgabe registered und confirmed.",
                        "schema": {
                            "type": "array",
                            "items": []
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "text/event-stream": {
                                "schema": {
                                    "type": "string"
                                },
                                "example": "Name;E-Mail;Telefon;Firma;Adresse;Rolle;Bemerkungen"
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/events/{uuid}/exports/rooms": {
            "get": {
                "operationId": "flowevents.flowevents-exports-rooms",
                "summary": "Zimmerliste exportieren",
                "description": "Liefert die Zimmerliste als CSV: Name, Zimmer, Zimmertyp, Sonderkost und Bettwäsche. Hat die Veranstaltung keinen Posten der Art accommodation (Unterkunft), antwortet der Aufruf mit HTTP 409 statt mit einer leeren Datei.",
                "tags": [
                    "flowevents.exports"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "statuses",
                        "in": "query",
                        "required": false,
                        "description": "registered, confirmed, waitlisted, cancelled. Vorgabe registered und confirmed.",
                        "schema": {
                            "type": "array",
                            "items": []
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "text/event-stream": {
                                "schema": {
                                    "type": "string"
                                },
                                "example": "Name;Zimmer;Zimmertyp;Sonderkost;Bettwäsche"
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/events/{uuid}/exports/cost-payment": {
            "get": {
                "operationId": "flowevents.flowevents-exports-cost-payment",
                "summary": "Kosten und Zahlung exportieren",
                "description": "Liefert Seminargebühr, Preisstufe, Kost und Logis, Gesamtbetrag und Zahlungsstatus als CSV. Benötigt FlowAccounting. Bei einer Inhouse-Veranstaltung enthält die Datei die Firmensumme statt einer Zeile je Teilnehmer.",
                "tags": [
                    "flowevents.exports"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "statuses",
                        "in": "query",
                        "required": false,
                        "description": "registered, confirmed, waitlisted, cancelled. Vorgabe registered und confirmed.",
                        "schema": {
                            "type": "array",
                            "items": []
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "text/event-stream": {
                                "schema": {
                                    "type": "string"
                                },
                                "example": "Name;E-Mail;Seminargebühr;Preisstufe;Kost & Logis;Gesamt (brutto);Zahlungsstatus"
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/events/{uuid}/exports/full": {
            "get": {
                "operationId": "flowevents.flowevents-exports-full",
                "summary": "Gesamtübersicht exportieren",
                "description": "Liefert alle Spalten in einer Datei: Kontaktdaten, Rolle, Preise, Zahlungs- und Zertifizierungsstatus, Zimmer, Sonderkost, Bettwäsche und Bemerkungen. Benötigt FlowAccounting.",
                "tags": [
                    "flowevents.exports"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "statuses",
                        "in": "query",
                        "required": false,
                        "description": "registered, confirmed, waitlisted, cancelled. Vorgabe registered und confirmed.",
                        "schema": {
                            "type": "array",
                            "items": []
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "text/event-stream": {
                                "schema": {
                                    "type": "string"
                                },
                                "example": "Name;E-Mail;Telefon;Firma;Adresse;Rolle;Preis-Stufe;Seminargebühr;Kost & Logis;Gesamt (brutto);Zahlungsstatus;Zertifizierungsstatus;Zimmer;Zimmertyp;Sonderkost;Bettwäsche;Bemerkungen"
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/events/{uuid}/exports/feedback": {
            "get": {
                "operationId": "flowevents.flowevents-exports-feedback",
                "summary": "Feedback-Antworten exportieren",
                "description": "Liefert die abgegebenen Antworten als CSV mit einer Zeile je beantworteter Frage. Benötigt FlowAccounting. Liegen keine Antworten vor, antwortet der Aufruf mit HTTP 409 statt mit einer Datei, die nur eine Kopfzeile enthält.",
                "tags": [
                    "flowevents.exports"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "text/event-stream": {
                                "schema": {
                                    "type": "string"
                                },
                                "example": "Teilnehmer;Frage;Antwort"
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/public/flowleads/forms/{key}": {
            "get": {
                "operationId": "flowleads.flowleads-forms-show",
                "summary": "Formulardefinition abrufen",
                "description": "Liefert die Felder des Formulars (Schlüssel, Beschriftung, Typ text, email, tel, textarea, select oder checkbox, Pflichtangabe, Auswahlmöglichkeiten, Höchstlänge), einen frischen signierten Zeitstempel, die Namen des versteckten Felds und des Zeitstempels, die Adresse zum Einreichen und die Darstellungsart: inline oder iframe (bei Turnstile). Ein unbekannter oder deaktivierter Schlüssel antwortet mit HTTP 404.",
                "tags": [
                    "flowleads.forms"
                ],
                "parameters": [
                    {
                        "name": "key",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "ok": true,
                                    "form": {
                                        "key": "FORMULAR_SCHLUESSEL",
                                        "mode": "inline",
                                        "fields": [
                                            {
                                                "key": "name",
                                                "label": "Name",
                                                "type": "text",
                                                "required": true,
                                                "options": [],
                                                "max_length": 500
                                            },
                                            {
                                                "key": "email",
                                                "label": "E-Mail",
                                                "type": "email",
                                                "required": true,
                                                "options": [],
                                                "max_length": 255
                                            },
                                            {
                                                "key": "message",
                                                "label": "Nachricht",
                                                "type": "textarea",
                                                "required": false,
                                                "options": [],
                                                "max_length": 5000
                                            }
                                        ],
                                        "token": "ZEITSTEMPEL.SIGNATUR",
                                        "honeypot": "homepage",
                                        "token_field": "fl_ts",
                                        "submit_url": "https://api.flowsuite.one/public/flowleads/forms/k3x9q2m7v1c8n4b6z0p5r2t7w9y1a3d5",
                                        "page_url": "https://flowsuite.one/f/k3x9q2m7v1c8n4b6z0p5r2t7w9y1a3d5",
                                        "iframe_url": "https://flowsuite.one/f/k3x9q2m7v1c8n4b6z0p5r2t7w9y1a3d5?embed=1",
                                        "labels": {
                                            "submit": "Absenden",
                                            "sending": "Wird gesendet …",
                                            "required": "Mit * markierte Felder sind Pflichtfelder.",
                                            "choose": "Bitte wählen",
                                            "error": "Die Anfrage konnte gerade nicht gesendet werden. Bitte versuchen Sie es später erneut."
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "security": []
            },
            "post": {
                "operationId": "flowleads.flowleads-forms-submit",
                "summary": "Anfrage einreichen",
                "description": "Reicht eine Einsendung als JSON oder als Formulardaten ein. Bei Erfolg wird ein Lead in der eingestellten Pipeline angelegt (Quelle, Tags und Zuweisung aus dem Formular) und die Antwort lautet {\"ok\": true, \"message\": ...}, bei gesetzter Weiterleitung zusätzlich redirect_url. Fehler antworten mit ok false: 403 bei nicht erlaubter Website, 404 bei unbekanntem oder deaktiviertem Formular, 413 über 32 KB, 422 bei ungültigen Feldern (errors nach Feldschlüssel), abgelaufenem oder zu schnellem Zeitstempel oder fehlgeschlagener Turnstile-Prüfung, 429 bei überschrittenem Ratenlimit. Ist die KI-Spamprüfung des Formulars aktiv, liest die KI die Einsendung und verschiebt eindeutigen Spam nachträglich in die Spam-Ansicht.",
                "tags": [
                    "flowleads.forms"
                ],
                "parameters": [
                    {
                        "name": "key",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "ok": true,
                                    "message": "Vielen Dank! Ihre Anfrage ist bei uns eingegangen."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "fields": {
                                        "type": "object",
                                        "description": "Die Werte nach Feldschlüssel, z. B. {\"name\": \"Erika Mustermann\", \"email\": \"erika@beispiel.de\"}. Checkboxen senden \"1\" oder \"0\". Unbekannte Schlüssel werden verworfen."
                                    },
                                    "fl_ts": {
                                        "type": "string",
                                        "description": "Der signierte Zeitstempel token aus der Formulardefinition, mindestens 3 Sekunden und höchstens 24 Stunden alt."
                                    },
                                    "homepage": {
                                        "type": "string",
                                        "description": "Verstecktes Feld gegen Bots. Muss leer bleiben oder fehlen."
                                    },
                                    "cf-turnstile-response": {
                                        "type": "string",
                                        "description": "Turnstile-Token, nur bei Formularen mit Cloudflare Turnstile (gehostete Seite oder iframe)."
                                    }
                                },
                                "required": [
                                    "fields",
                                    "fl_ts"
                                ]
                            }
                        }
                    }
                },
                "security": []
            }
        },
        "/flowsaas/context": {
            "get": {
                "operationId": "flowsaas.flowsaas-context",
                "summary": "Portale, Vokabular und eigene Rechte abrufen",
                "description": "Liefert alle Portale des Teams mit Status, Schlagwörtern und offenen Moderationszahlen, dazu die möglichen Moderationszustände, die verfügbaren Webhook-Ereignisse und ob dieser Schlüssel die Verwaltungsberechtigung besitzt.",
                "tags": [
                    "flowsaas.context"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "is_manager": true,
                                        "moderation_states": [
                                            "pending",
                                            "approved",
                                            "rejected",
                                            "spam"
                                        ],
                                        "webhook_events": [
                                            "post.created",
                                            "post.status_changed",
                                            "post.updated",
                                            "comment.created",
                                            "vote.created"
                                        ],
                                        "portals": [
                                            {
                                                "uuid": "9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f",
                                                "name": "Produktfeedback",
                                                "public_url": "https://creativeskyline.de/p/produktfeedback",
                                                "statuses": [],
                                                "tags": [],
                                                "pending_posts": 2,
                                                "pending_comments": 0
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/reports/moderation": {
            "get": {
                "operationId": "flowsaas.flowsaas-reports-moderation",
                "summary": "Offene Moderation abrufen",
                "description": "Zählt die wartenden Ideen und Kommentare aller Portale des Teams und liefert je bis zu zwanzig davon, neueste zuerst.",
                "tags": [
                    "flowsaas.context"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "pending_posts": 2,
                                        "pending_comments": 1,
                                        "posts": [],
                                        "comments": []
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/reports/top-ideas": {
            "get": {
                "operationId": "flowsaas.flowsaas-reports-top-ideas",
                "summary": "Beliebteste Ideen abrufen",
                "description": "Die zwanzig freigegebenen Ideen mit den meisten Stimmen. Zusammengeführte Ideen bleiben außen vor, ihre Stimmen zählen bei der Idee, in die sie übernommen wurden.",
                "tags": [
                    "flowsaas.context"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "ideas": [
                                            {
                                                "uuid": "c1b5a0d2-9e33-4f10-8a77-6b2c4d1e9f08",
                                                "title": "Dunkelmodus",
                                                "votes_count": 42
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/reports/roadmap": {
            "get": {
                "operationId": "flowsaas.flowsaas-reports-roadmap",
                "summary": "Veröffentlichte Roadmap abrufen",
                "description": "Die ersten fünfzig Roadmap-Einträge aller Portale in ihrer veröffentlichten Reihenfolge, jeweils mit Titel, Spalte und Stimmenzahl der dahinterliegenden Idee.",
                "tags": [
                    "flowsaas.context"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "items": [
                                            {
                                                "uuid": "5f1e7b90-2c44-4a19-9f3d-7c8b1a2e6d05",
                                                "title": "Dunkelmodus",
                                                "status_name": "In Arbeit",
                                                "votes_count": 42,
                                                "sort_order": 0
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/reports/activity": {
            "get": {
                "operationId": "flowsaas.flowsaas-reports-activity",
                "summary": "Aktivität der letzten 30 Tage abrufen",
                "description": "Zählt neue Ideen und Kommentare der letzten dreißig Tage und liefert die zehn jüngsten Ideen dazu.",
                "tags": [
                    "flowsaas.context"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "window_days": 30,
                                        "new_ideas": 7,
                                        "new_comments": 12,
                                        "latest": []
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/portals": {
            "get": {
                "operationId": "flowsaas.flowsaas-portals-index",
                "summary": "Portale auflisten",
                "description": "Alle Portale des Teams, neueste zuerst, mit der Zahl ihrer Ideen und der wartenden Beiträge.",
                "tags": [
                    "flowsaas.portals"
                ],
                "parameters": [
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Sucht in Name und Adresse des Portals.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "is_active",
                        "in": "query",
                        "required": false,
                        "description": "Nur eingeschaltete beziehungsweise nur abgeschaltete Portale.",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Einträge pro Seite, 1 bis 200, Standard 50.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Seitenzahl, Standard 1.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f",
                                            "name": "Produktfeedback",
                                            "slug": "produktfeedback",
                                            "public_url": "https://creativeskyline.de/p/produktfeedback",
                                            "is_public": true,
                                            "is_active": true,
                                            "tag_limit": 3,
                                            "posts_count": 18,
                                            "pending_posts_count": 2
                                        }
                                    ],
                                    "meta": {
                                        "current_page": 1,
                                        "per_page": 50,
                                        "total": 1,
                                        "last_page": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowsaas.flowsaas-portals-store",
                "summary": "Portal anlegen",
                "description": "Legt ein Portal im Team des API-Schlüssels an, samt der fünf Standard-Status und der vier Standard-Schlagwörter. Verlangt die Verwaltungsberechtigung.",
                "tags": [
                    "flowsaas.portals"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f",
                                        "name": "Produktfeedback",
                                        "slug": "produktfeedback",
                                        "is_public": true,
                                        "is_active": true
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Anzeigename, mindestens drei Zeichen."
                                    },
                                    "slug": {
                                        "type": "string",
                                        "description": "Öffentliche Adresse unter /p/. Muss installationsweit eindeutig sein; ohne Angabe aus dem Namen abgeleitet."
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Kurzbeschreibung für die Portalseite."
                                    },
                                    "is_public": {
                                        "type": "boolean",
                                        "description": "Ob das Portal öffentlich erreichbar ist. Standard true."
                                    },
                                    "subdomain": {
                                        "type": "string",
                                        "description": "Eigene Subdomain, wird nur gespeichert; das Portal ist derzeit nur unter /p/ erreichbar. Ohne Angabe wird der Slug übernommen."
                                    },
                                    "default_language": {
                                        "type": "string",
                                        "description": "de, en oder pt. Standard de."
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/portals/{uuid}": {
            "get": {
                "operationId": "flowsaas.flowsaas-portals-show",
                "summary": "Portal abrufen",
                "description": "Ein Portal mit seinen Status, seinen Schlagwörtern und den offenen Moderationszahlen.",
                "tags": [
                    "flowsaas.portals"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f",
                                        "name": "Produktfeedback",
                                        "statuses": [],
                                        "tags": [],
                                        "pending_posts": 2,
                                        "pending_comments": 0
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowsaas.flowsaas-portals-update",
                "summary": "Portal ändern",
                "description": "Ändert die gesendeten Felder; alles Übrige bleibt unangetastet. Enthält die Anfrage is_public, is_active oder seo_indexable, ist die Verwaltungsberechtigung nötig.",
                "tags": [
                    "flowsaas.portals"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f",
                                        "name": "Produktwünsche",
                                        "tag_limit": 3
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Anzeigename."
                                    },
                                    "slug": {
                                        "type": "string",
                                        "description": "Öffentliche Adresse. Eine Änderung bricht bestehende Links."
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Kurzbeschreibung."
                                    },
                                    "is_public": {
                                        "type": "boolean",
                                        "description": "Öffentliche Erreichbarkeit. Verwaltungsberechtigung nötig."
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "Portal ein- oder ausschalten. Verwaltungsberechtigung nötig."
                                    },
                                    "seo_indexable": {
                                        "type": "boolean",
                                        "description": "Indexierung durch Suchmaschinen. Verwaltungsberechtigung nötig."
                                    },
                                    "subdomain": {
                                        "type": "string",
                                        "description": "Eigene Subdomain. Wird nur gespeichert, derzeit ohne Wirkung."
                                    },
                                    "custom_domain": {
                                        "type": "string",
                                        "description": "Eigene Domain. Wird nur gespeichert, derzeit ohne Wirkung."
                                    },
                                    "dark_mode_enabled": {
                                        "type": "boolean",
                                        "description": "Dunkler Modus im Portal."
                                    },
                                    "default_language": {
                                        "type": "string",
                                        "description": "de, en oder pt."
                                    },
                                    "voting_without_auth": {
                                        "type": "boolean",
                                        "description": "Abstimmen ohne Anmeldung erlauben."
                                    },
                                    "post_approval_required": {
                                        "type": "boolean",
                                        "description": "Neue Ideen erst nach Freigabe zeigen."
                                    },
                                    "comment_approval_required": {
                                        "type": "boolean",
                                        "description": "Neue Kommentare erst nach Freigabe zeigen."
                                    },
                                    "allow_anonymous_read": {
                                        "type": "boolean",
                                        "description": "Lesen ohne Anmeldung erlauben. Wird nur gespeichert; das Portal ist derzeit immer ohne Anmeldung lesbar."
                                    },
                                    "lock_completed_ideas": {
                                        "type": "boolean",
                                        "description": "Abgeschlossene Ideen für Stimmen und Kommentare sperren."
                                    },
                                    "tag_limit": {
                                        "type": "integer",
                                        "description": "Höchstzahl Schlagwörter je Idee. 0 bedeutet keine Grenze."
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowsaas.flowsaas-portals-destroy",
                "summary": "Portal löschen",
                "description": "Löscht das Portal mit allen Ideen, Stimmen, Kommentaren, Status, Schlagwörtern, Roadmap-Einträgen und Webhooks. Verlangt die Verwaltungsberechtigung und ist nicht umkehrbar.",
                "tags": [
                    "flowsaas.portals"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Portal \"Produktfeedback\" gelöscht."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/portals/{uuid}/toggle-active": {
            "post": {
                "operationId": "flowsaas.flowsaas-portals-toggle-active",
                "summary": "Portal ein- oder ausschalten",
                "description": "Kehrt den Schalter is_active um, ohne etwas im Portal zu verändern. Verlangt die Verwaltungsberechtigung.",
                "tags": [
                    "flowsaas.portals"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f",
                                        "is_active": false
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/portals/{uuid}/delete-all-ideas": {
            "post": {
                "operationId": "flowsaas.flowsaas-portals-delete-all-ideas",
                "summary": "Alle Ideen eines Portals löschen",
                "description": "Löscht jede Idee des Portals mit ihren Stimmen, Kommentaren, Verlauf und Roadmap-Einträgen. Das Portal selbst und sein Vokabular bleiben bestehen. Verlangt die Verwaltungsberechtigung und ist nicht umkehrbar.",
                "tags": [
                    "flowsaas.portals"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "deleted_posts": 18
                                    },
                                    "message": "Alle Ideen dieses Portals wurden gelöscht."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/portals/{uuid}/company": {
            "get": {
                "operationId": "flowsaas.flowsaas-portals-company-show",
                "summary": "Erscheinungsbild abrufen",
                "description": "Logos, Farbgebung und Anzeigename des Portals. Ein Portal ohne gepflegtes Erscheinungsbild antwortet mit seiner UUID und sonst leeren Feldern.",
                "tags": [
                    "flowsaas.portals"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "portal_uuid": "9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f",
                                        "name": "Creative Skyline",
                                        "logo_url": "https://creativeskyline.de/storage/portals/logos/logo.png",
                                        "primary_color": "#6392D9"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowsaas.flowsaas-portals-company-update",
                "summary": "Erscheinungsbild ändern",
                "description": "Schreibt die gesendeten Felder und legt den Datensatz bei der ersten Änderung an. Die Bildfelder erwarten fertige Adressen; die Schnittstelle lädt selbst keine Datei herunter.",
                "tags": [
                    "flowsaas.portals"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "portal_uuid": "9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f",
                                        "name": "Creative Skyline",
                                        "primary_color": "#6392D9"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Angezeigter Name im Portalkopf."
                                    },
                                    "logo_url": {
                                        "type": "string",
                                        "description": "Adresse des Logos für den hellen Modus."
                                    },
                                    "logo_dark_url": {
                                        "type": "string",
                                        "description": "Adresse des Logos für den dunklen Modus."
                                    },
                                    "logo_landscape_url": {
                                        "type": "string",
                                        "description": "Adresse des Querformat-Logos."
                                    },
                                    "logo_landscape_dark_url": {
                                        "type": "string",
                                        "description": "Adresse des Querformat-Logos für den dunklen Modus."
                                    },
                                    "logo_layout_mode": {
                                        "type": "string",
                                        "description": "square oder landscape."
                                    },
                                    "logo_display_mode": {
                                        "type": "string",
                                        "description": "logo_and_name oder logo_only."
                                    },
                                    "logo_link": {
                                        "type": "string",
                                        "description": "Ziel, auf das das Logo verweist."
                                    },
                                    "favicon_url": {
                                        "type": "string",
                                        "description": "Adresse des Favicons."
                                    },
                                    "open_graph_image_url": {
                                        "type": "string",
                                        "description": "Adresse des Vorschaubildes für soziale Netzwerke."
                                    },
                                    "primary_color": {
                                        "type": "string",
                                        "description": "Akzentfarbe als Hex-Wert, etwa #6392D9."
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/portals/{uuid}/statuses": {
            "get": {
                "operationId": "flowsaas.flowsaas-portals-statuses-index",
                "summary": "Status eines Portals auflisten",
                "description": "Alle Status des Portals in ihrer eigenen Reihenfolge. Die Liste ist nicht seitenweise, sie ist immer vollständig.",
                "tags": [
                    "flowsaas.vocabulary"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "3a7c2f11-8b4e-4d62-9a05-1c6e8f0b2d43",
                                            "name": "Feedback",
                                            "color": "#6392D9",
                                            "is_completed": false,
                                            "sort_order": 1
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowsaas.flowsaas-portals-statuses-store",
                "summary": "Status anlegen",
                "description": "Hängt einen Status an das Ende der Liste des Portals.",
                "tags": [
                    "flowsaas.vocabulary"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "3a7c2f11-8b4e-4d62-9a05-1c6e8f0b2d43",
                                        "name": "Wird geprüft",
                                        "sort_order": 6
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Anzeigename des Status."
                                    },
                                    "color": {
                                        "type": "string",
                                        "description": "Farbe als sechsstelliger Hex-Wert, etwa #6392D9."
                                    },
                                    "is_completed": {
                                        "type": "boolean",
                                        "description": "Markiert den Status als Abschluss. Zusammen mit lock_completed_ideas sperrt er Stimmen und Kommentare."
                                    },
                                    "sort_order": {
                                        "type": "integer",
                                        "description": "Position in der Liste. Ohne Angabe ans Ende."
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/portals/{uuid}/statuses/reorder": {
            "post": {
                "operationId": "flowsaas.flowsaas-portals-statuses-reorder",
                "summary": "Status umsortieren",
                "description": "Setzt die Reihenfolge der Status des Portals auf die gesendete Liste. UUIDs anderer Portale desselben Teams werden übergangen.",
                "tags": [
                    "flowsaas.vocabulary"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "3a7c2f11-8b4e-4d62-9a05-1c6e8f0b2d43",
                                            "name": "Fertig",
                                            "sort_order": 1
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "status_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Die Status-UUIDs in der gewünschten Reihenfolge."
                                    }
                                },
                                "required": [
                                    "status_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/statuses/{uuid}": {
            "put": {
                "operationId": "flowsaas.flowsaas-statuses-update",
                "summary": "Status ändern",
                "description": "Ändert Name, Farbe, Abschlusskennzeichen oder Position eines Status.",
                "tags": [
                    "flowsaas.vocabulary"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "3a7c2f11-8b4e-4d62-9a05-1c6e8f0b2d43",
                                        "name": "In Prüfung",
                                        "color": "#10B981",
                                        "is_completed": true
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Anzeigename."
                                    },
                                    "color": {
                                        "type": "string",
                                        "description": "Sechsstelliger Hex-Wert."
                                    },
                                    "is_completed": {
                                        "type": "boolean",
                                        "description": "Abschlusskennzeichen."
                                    },
                                    "sort_order": {
                                        "type": "integer",
                                        "description": "Position in der Liste."
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowsaas.flowsaas-statuses-destroy",
                "summary": "Status löschen",
                "description": "Löscht den Status und hängt jede Idee, die ihn trug, auf den ersten verbleibenden Status des Portals um. Verlangt die Verwaltungsberechtigung.",
                "tags": [
                    "flowsaas.vocabulary"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Status gelöscht; betroffene Ideen wurden umgehängt."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/portals/{uuid}/tags": {
            "get": {
                "operationId": "flowsaas.flowsaas-portals-tags-index",
                "summary": "Schlagwörter eines Portals auflisten",
                "description": "Alle Schlagwörter des Portals in ihrer eigenen Reihenfolge, auch die zurückgezogenen.",
                "tags": [
                    "flowsaas.vocabulary"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "b2d4e6f8-1a3c-4e5f-8907-abcdef012345",
                                            "name": "Bug 🐞",
                                            "is_active": true,
                                            "sort_order": 2
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowsaas.flowsaas-portals-tags-store",
                "summary": "Schlagwort anlegen",
                "description": "Hängt ein Schlagwort an das Ende der Liste des Portals.",
                "tags": [
                    "flowsaas.vocabulary"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "b2d4e6f8-1a3c-4e5f-8907-abcdef012345",
                                        "name": "Dokumentation",
                                        "is_active": true
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Anzeigename des Schlagworts."
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Erläuterung für die Portalseite."
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "Ob das Schlagwort angeboten wird. Standard true."
                                    },
                                    "sort_order": {
                                        "type": "integer",
                                        "description": "Position in der Liste. Ohne Angabe ans Ende."
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/portals/{uuid}/tags/reorder": {
            "post": {
                "operationId": "flowsaas.flowsaas-portals-tags-reorder",
                "summary": "Schlagwörter umsortieren",
                "description": "Setzt die Reihenfolge der Schlagwörter des Portals auf die gesendete Liste. UUIDs anderer Portale desselben Teams werden übergangen.",
                "tags": [
                    "flowsaas.vocabulary"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "b2d4e6f8-1a3c-4e5f-8907-abcdef012345",
                                            "name": "Dokumentation",
                                            "sort_order": 1
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "tag_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Die Schlagwort-UUIDs in der gewünschten Reihenfolge."
                                    }
                                },
                                "required": [
                                    "tag_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/tags/{uuid}": {
            "put": {
                "operationId": "flowsaas.flowsaas-tags-update",
                "summary": "Schlagwort ändern",
                "description": "Ändert Name, Erläuterung, Position oder ob das Schlagwort noch angeboten wird. Ein zurückgezogenes Schlagwort bleibt an jeder Idee, die es trägt.",
                "tags": [
                    "flowsaas.vocabulary"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "b2d4e6f8-1a3c-4e5f-8907-abcdef012345",
                                        "is_active": false
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Anzeigename."
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Erläuterung."
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "Ob das Schlagwort angeboten wird."
                                    },
                                    "sort_order": {
                                        "type": "integer",
                                        "description": "Position in der Liste."
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowsaas.flowsaas-tags-destroy",
                "summary": "Schlagwort löschen",
                "description": "Löscht das Schlagwort; die Zuordnung verschwindet damit an jeder Idee, die es trug. Verlangt die Verwaltungsberechtigung.",
                "tags": [
                    "flowsaas.vocabulary"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Schlagwort gelöscht."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/posts": {
            "get": {
                "operationId": "flowsaas.flowsaas-posts-index",
                "summary": "Ideen auflisten",
                "description": "Die Ideen aller Portale des Teams. Zusammengeführte Ideen bleiben außen vor, sofern include_merged nicht gesetzt ist.",
                "tags": [
                    "flowsaas.posts"
                ],
                "parameters": [
                    {
                        "name": "portal_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Auf ein Portal einschränken.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "status_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Nur Ideen in diesem Status.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "tag_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Nur Ideen mit diesem Schlagwort.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "moderation_status",
                        "in": "query",
                        "required": false,
                        "description": "pending, approved, rejected oder spam.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Sucht in Titel und Text der Idee.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "is_private",
                        "in": "query",
                        "required": false,
                        "description": "Nur verborgene beziehungsweise nur sichtbare Ideen.",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "is_on_roadmap",
                        "in": "query",
                        "required": false,
                        "description": "Nur Ideen auf der Roadmap.",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "include_merged",
                        "in": "query",
                        "required": false,
                        "description": "Zusammengeführte Ideen mit aufnehmen.",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "required": false,
                        "description": "newest, oldest, votes oder comments. Standard newest.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Einträge pro Seite, 1 bis 200, Standard 50.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Seitenzahl, Standard 1.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "c1b5a0d2-9e33-4f10-8a77-6b2c4d1e9f08",
                                            "portal_uuid": "9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f",
                                            "title": "Dunkelmodus",
                                            "status_name": "Backlog",
                                            "moderation_status": "approved",
                                            "is_public": true,
                                            "votes_count": 42,
                                            "comments_count": 3,
                                            "author_name": "Sascha",
                                            "author_kind": "user"
                                        }
                                    ],
                                    "meta": {
                                        "current_page": 1,
                                        "per_page": 50,
                                        "total": 1,
                                        "last_page": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowsaas.flowsaas-posts-store",
                "summary": "Idee anlegen",
                "description": "Legt eine Idee im genannten Portal an, zugeschrieben an den Benutzer des API-Schlüssels und sofort freigegeben. Ohne Statusangabe landet sie im ersten Status des Portals, ohne Schlagwörter erhält sie das erste angebotene.",
                "tags": [
                    "flowsaas.posts"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "c1b5a0d2-9e33-4f10-8a77-6b2c4d1e9f08",
                                        "title": "Dunkelmodus",
                                        "moderation_status": "approved",
                                        "author_kind": "user"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "portal_uuid": {
                                        "type": "string",
                                        "description": "Das Portal, in dem die Idee entsteht."
                                    },
                                    "title": {
                                        "type": "string",
                                        "description": "Titel, mindestens drei Zeichen."
                                    },
                                    "body": {
                                        "type": "string",
                                        "description": "Beschreibung der Idee."
                                    },
                                    "status_uuid": {
                                        "type": "string",
                                        "description": "Status des Portals. Ein Status eines anderen Portals wird übergangen."
                                    },
                                    "tag_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Schlagwörter des Portals. Die Grenze tag_limit des Portals gilt."
                                    },
                                    "is_private": {
                                        "type": "boolean",
                                        "description": "Die Idee vor Besuchern verbergen."
                                    },
                                    "is_on_roadmap": {
                                        "type": "boolean",
                                        "description": "Zugleich einen Roadmap-Eintrag anlegen."
                                    }
                                },
                                "required": [
                                    "portal_uuid",
                                    "title"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/posts/{uuid}": {
            "get": {
                "operationId": "flowsaas.flowsaas-posts-show",
                "summary": "Idee abrufen",
                "description": "Eine Idee mit ihren Schlagwörtern und ihrem vollständigen Statusverlauf.",
                "tags": [
                    "flowsaas.posts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "c1b5a0d2-9e33-4f10-8a77-6b2c4d1e9f08",
                                        "title": "Dunkelmodus",
                                        "tags": [],
                                        "status_history": [
                                            {
                                                "old_status": "Feedback",
                                                "new_status": "Backlog",
                                                "changed_by_name": "Sascha"
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowsaas.flowsaas-posts-update",
                "summary": "Idee ändern",
                "description": "Ändert die gesendeten Felder. Der Status gehört nicht dazu, er hat einen eigenen Endpunkt. Eine leere Liste tag_uuids nimmt alle Schlagwörter ab.",
                "tags": [
                    "flowsaas.posts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "c1b5a0d2-9e33-4f10-8a77-6b2c4d1e9f08",
                                        "title": "Dunkelmodus, bitte",
                                        "tags": []
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "description": "Titel."
                                    },
                                    "body": {
                                        "type": "string",
                                        "description": "Beschreibung."
                                    },
                                    "is_private": {
                                        "type": "boolean",
                                        "description": "Sichtbarkeit für Besucher."
                                    },
                                    "is_pinned": {
                                        "type": "boolean",
                                        "description": "Die Idee oben anheften. Wird nur gespeichert; das Portal nutzt das Feld derzeit nicht."
                                    },
                                    "is_archived": {
                                        "type": "boolean",
                                        "description": "Die Idee archivieren. Wird nur gespeichert; das Portal nutzt das Feld derzeit nicht."
                                    },
                                    "tag_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Die Schlagwörter, die danach gelten sollen."
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowsaas.flowsaas-posts-destroy",
                "summary": "Idee löschen",
                "description": "Löscht die Idee mit ihren Stimmen, Kommentaren und ihrem Verlauf. Verlangt die Verwaltungsberechtigung.",
                "tags": [
                    "flowsaas.posts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Idee gelöscht."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/posts/{uuid}/status": {
            "put": {
                "operationId": "flowsaas.flowsaas-posts-status-update",
                "summary": "Status einer Idee ändern",
                "description": "Setzt die Idee auf einen anderen Status ihres eigenen Portals. Schreibt einen Verlaufseintrag, löst die Portal-Webhooks aus und benachrichtigt alle Unterstützer. Ein Status eines anderen Portals antwortet mit HTTP 422 und error status_not_in_portal.",
                "tags": [
                    "flowsaas.posts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "c1b5a0d2-9e33-4f10-8a77-6b2c4d1e9f08",
                                        "status_uuid": "3a7c2f11-8b4e-4d62-9a05-1c6e8f0b2d43",
                                        "status_name": "In Arbeit"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "status_uuid": {
                                        "type": "string",
                                        "description": "Der neue Status, aus dem Portal der Idee."
                                    },
                                    "comment": {
                                        "type": "string",
                                        "description": "Begründung, die im Verlauf festgehalten wird."
                                    }
                                },
                                "required": [
                                    "status_uuid"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/posts/{uuid}/approve": {
            "post": {
                "operationId": "flowsaas.flowsaas-posts-approve",
                "summary": "Idee freigeben",
                "description": "Gibt eine wartende Idee für das Portal frei und benachrichtigt die verfassende Person. Verlangt die Verwaltungsberechtigung.",
                "tags": [
                    "flowsaas.posts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "c1b5a0d2-9e33-4f10-8a77-6b2c4d1e9f08",
                                        "moderation_status": "approved"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/posts/{uuid}/reject": {
            "post": {
                "operationId": "flowsaas.flowsaas-posts-reject",
                "summary": "Idee ablehnen",
                "description": "Lehnt eine Idee ab und benachrichtigt die verfassende Person. Die Begründung wird an der Idee gespeichert; die Benachrichtigung selbst enthält einen festen Standardsatz, nicht die Begründung. Verlangt die Verwaltungsberechtigung.",
                "tags": [
                    "flowsaas.posts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "c1b5a0d2-9e33-4f10-8a77-6b2c4d1e9f08",
                                        "moderation_status": "rejected",
                                        "rejection_reason": "Doppelt vorhanden."
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "reason": {
                                        "type": "string",
                                        "description": "Begründung der Ablehnung."
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/posts/{uuid}/spam": {
            "post": {
                "operationId": "flowsaas.flowsaas-posts-spam",
                "summary": "Idee als Spam markieren",
                "description": "Markiert eine Idee als Spam. Die verfassende Person erhält, sofern ihre E-Mail-Adresse bestätigt ist, einen kurzen Hinweis, dass ihr Beitrag markiert wurde. Verlangt die Verwaltungsberechtigung.",
                "tags": [
                    "flowsaas.posts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "c1b5a0d2-9e33-4f10-8a77-6b2c4d1e9f08",
                                        "moderation_status": "spam"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/posts/{uuid}/vote": {
            "post": {
                "operationId": "flowsaas.flowsaas-posts-vote-store",
                "summary": "Für eine Idee stimmen",
                "description": "Gibt eine Stimme im Namen des Benutzers des API-Schlüssels ab. Eine zweite Stimme derselben Person ist kein Fehler: added ist dann false und die Zahl bleibt unverändert.",
                "tags": [
                    "flowsaas.posts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "added": true,
                                        "votes_count": 43
                                    },
                                    "message": "Stimme abgegeben."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowsaas.flowsaas-posts-vote-destroy",
                "summary": "Stimme zurückziehen",
                "description": "Nimmt die Stimme des Benutzers des API-Schlüssels zurück. Lag keine vor, ist removed false.",
                "tags": [
                    "flowsaas.posts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "removed": true,
                                        "votes_count": 42
                                    },
                                    "message": "Stimme zurückgezogen."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/posts/{uuid}/toggle-private": {
            "post": {
                "operationId": "flowsaas.flowsaas-posts-toggle-private",
                "summary": "Idee verbergen oder wieder zeigen",
                "description": "Kehrt die Sichtbarkeit für Portalbesucher um und meldet die Änderung an die Portal-Webhooks.",
                "tags": [
                    "flowsaas.posts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "c1b5a0d2-9e33-4f10-8a77-6b2c4d1e9f08",
                                        "is_private": true,
                                        "is_public": false
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/posts/{uuid}/merge": {
            "post": {
                "operationId": "flowsaas.flowsaas-posts-merge",
                "summary": "Idee als Duplikat zusammenführen",
                "description": "Führt die Idee aus dem Pfad in die genannte Ziel-Idee desselben Portals über. Stimmen und öffentliche Kommentare wandern mit, interne Notizen bleiben beim Duplikat. Die Antwort zeigt die Ziel-Idee.",
                "tags": [
                    "flowsaas.posts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "d3e5f7a9-0b2c-4d6e-8f01-234567890abc",
                                        "votes_count": 45
                                    },
                                    "message": "Als Duplikat zusammengeführt."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "master_post_uuid": {
                                        "type": "string",
                                        "description": "Die Idee, die bestehen bleibt. Muss zum selben Portal gehören und eine andere sein."
                                    }
                                },
                                "required": [
                                    "master_post_uuid"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/posts/{uuid}/promote-to-roadmap": {
            "post": {
                "operationId": "flowsaas.flowsaas-posts-promote-to-roadmap",
                "summary": "Idee auf die Roadmap heben",
                "description": "Legt einen Roadmap-Eintrag für die Idee an und markiert sie entsprechend. Steht sie bereits auf der Roadmap, antwortet die Route mit HTTP 422 und error already_on_roadmap.",
                "tags": [
                    "flowsaas.posts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "5f1e7b90-2c44-4a19-9f3d-7c8b1a2e6d05",
                                        "post_uuid": "c1b5a0d2-9e33-4f10-8a77-6b2c4d1e9f08",
                                        "title": "Dunkelmodus",
                                        "sort_order": 0
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/posts/{uuid}/similar": {
            "get": {
                "operationId": "flowsaas.flowsaas-posts-similar",
                "summary": "Ähnliche Ideen abrufen",
                "description": "Bis zu zehn freigegebene, nicht abgeschlossene Ideen desselben Portals mit ähnlichem Wortlaut, die stimmstärksten zuerst. Die Idee selbst ist nicht dabei. Dieselbe Suche, die das Portal beim Schreiben anbietet.",
                "tags": [
                    "flowsaas.posts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "d3e5f7a9-0b2c-4d6e-8f01-234567890abc",
                                            "title": "Dunkelmodus wäre schön",
                                            "votes_count": 12
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/posts/{uuid}/comments": {
            "get": {
                "operationId": "flowsaas.flowsaas-posts-comments-index",
                "summary": "Kommentare einer Idee auflisten",
                "description": "Alle Kommentare der Idee, älteste zuerst, einschließlich der internen Notizen und der wartenden Beiträge.",
                "tags": [
                    "flowsaas.comments"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "moderation_status",
                        "in": "query",
                        "required": false,
                        "description": "pending, approved, rejected oder spam.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "is_internal",
                        "in": "query",
                        "required": false,
                        "description": "Nur interne Notizen beziehungsweise nur öffentliche Kommentare.",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Einträge pro Seite, 1 bis 200, Standard 50.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Seitenzahl, Standard 1.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "7a9c1e35-4d68-4b02-9e7a-3f5c1d8b0e24",
                                            "post_uuid": "c1b5a0d2-9e33-4f10-8a77-6b2c4d1e9f08",
                                            "body": "Danke für den Hinweis.",
                                            "is_internal": false,
                                            "moderation_status": "approved",
                                            "author_kind": "user"
                                        }
                                    ],
                                    "meta": {
                                        "current_page": 1,
                                        "per_page": 50,
                                        "total": 1,
                                        "last_page": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowsaas.flowsaas-posts-comments-store",
                "summary": "Kommentar schreiben",
                "description": "Schreibt einen Kommentar im Namen des Benutzers des API-Schlüssels. Er gilt sofort als freigegeben. Ein Bezugskommentar muss zu derselben Idee gehören, sonst antwortet die Route mit HTTP 422 und error parent_not_in_post.",
                "tags": [
                    "flowsaas.comments"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "7a9c1e35-4d68-4b02-9e7a-3f5c1d8b0e24",
                                        "body": "Danke für den Hinweis.",
                                        "is_internal": false,
                                        "moderation_status": "approved"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "body": {
                                        "type": "string",
                                        "description": "Der Text des Kommentars, höchstens 2000 Zeichen."
                                    },
                                    "is_internal": {
                                        "type": "boolean",
                                        "description": "true macht daraus eine Teamnotiz. Standard false, also öffentlich sichtbar."
                                    },
                                    "parent_comment_uuid": {
                                        "type": "string",
                                        "description": "Der Kommentar, auf den geantwortet wird. Muss zu dieser Idee gehören."
                                    }
                                },
                                "required": [
                                    "body"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/comments/{uuid}/reply": {
            "post": {
                "operationId": "flowsaas.flowsaas-comments-reply",
                "summary": "Auf einen Kommentar antworten",
                "description": "Antwortet auf den Kommentar im Pfad. Die Idee ergibt sich aus diesem Kommentar, eine Antwort kann daher nie in einem fremden Strang landen.",
                "tags": [
                    "flowsaas.comments"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "8b0d2f46-5e79-4c13-8f0b-4a6d2e9c1f35",
                                        "parent_comment_uuid": "7a9c1e35-4d68-4b02-9e7a-3f5c1d8b0e24",
                                        "body": "Wir melden uns."
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "body": {
                                        "type": "string",
                                        "description": "Der Text der Antwort, höchstens 2000 Zeichen."
                                    },
                                    "is_internal": {
                                        "type": "boolean",
                                        "description": "true macht daraus eine Teamnotiz."
                                    }
                                },
                                "required": [
                                    "body"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/comments/{uuid}/approve": {
            "post": {
                "operationId": "flowsaas.flowsaas-comments-approve",
                "summary": "Kommentar freigeben",
                "description": "Gibt einen wartenden Kommentar für das Portal frei und benachrichtigt die verfassende Person. Verlangt die Verwaltungsberechtigung.",
                "tags": [
                    "flowsaas.comments"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "7a9c1e35-4d68-4b02-9e7a-3f5c1d8b0e24",
                                        "moderation_status": "approved"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/comments/{uuid}/reject": {
            "post": {
                "operationId": "flowsaas.flowsaas-comments-reject",
                "summary": "Kommentar ablehnen",
                "description": "Lehnt einen Kommentar ab und benachrichtigt die verfassende Person. Verlangt die Verwaltungsberechtigung.",
                "tags": [
                    "flowsaas.comments"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "7a9c1e35-4d68-4b02-9e7a-3f5c1d8b0e24",
                                        "moderation_status": "rejected"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/comments/{uuid}/spam": {
            "post": {
                "operationId": "flowsaas.flowsaas-comments-spam",
                "summary": "Kommentar als Spam markieren",
                "description": "Markiert einen Kommentar als Spam, ohne jemanden zu benachrichtigen. Verlangt die Verwaltungsberechtigung.",
                "tags": [
                    "flowsaas.comments"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "7a9c1e35-4d68-4b02-9e7a-3f5c1d8b0e24",
                                        "moderation_status": "spam"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/comments/{uuid}/moderation": {
            "put": {
                "operationId": "flowsaas.flowsaas-comments-moderation-update",
                "summary": "Moderationszustand eines Kommentars setzen",
                "description": "Setzt den Zustand ausdrücklich. Anders als die drei Kurzwege erreicht dieser Endpunkt auch pending und stellt einen Kommentar damit zurück in die Warteschlange. Verlangt die Verwaltungsberechtigung.",
                "tags": [
                    "flowsaas.comments"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "7a9c1e35-4d68-4b02-9e7a-3f5c1d8b0e24",
                                        "moderation_status": "pending"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "moderation_status": {
                                        "type": "string",
                                        "description": "pending, approved, rejected oder spam."
                                    }
                                },
                                "required": [
                                    "moderation_status"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/roadmap-items": {
            "get": {
                "operationId": "flowsaas.flowsaas-roadmap-items-index",
                "summary": "Roadmap-Einträge auflisten",
                "description": "Die Roadmap-Einträge aller Portale des Teams in ihrer veröffentlichten Reihenfolge.",
                "tags": [
                    "flowsaas.roadmap"
                ],
                "parameters": [
                    {
                        "name": "portal_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Auf ein Portal einschränken.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "status_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Nur Einträge in dieser Spalte.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Einträge pro Seite, 1 bis 200, Standard 50.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Seitenzahl, Standard 1.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "5f1e7b90-2c44-4a19-9f3d-7c8b1a2e6d05",
                                            "portal_uuid": "9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f",
                                            "post_uuid": "c1b5a0d2-9e33-4f10-8a77-6b2c4d1e9f08",
                                            "title": "Dunkelmodus",
                                            "status_name": "In Arbeit",
                                            "votes_count": 42,
                                            "sort_order": 0
                                        }
                                    ],
                                    "meta": {
                                        "current_page": 1,
                                        "per_page": 50,
                                        "total": 1,
                                        "last_page": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/roadmap-items/{uuid}": {
            "get": {
                "operationId": "flowsaas.flowsaas-roadmap-items-show",
                "summary": "Roadmap-Eintrag abrufen",
                "description": "Ein Roadmap-Eintrag mit Titel, Spalte und Stimmenzahl der Idee dahinter.",
                "tags": [
                    "flowsaas.roadmap"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "5f1e7b90-2c44-4a19-9f3d-7c8b1a2e6d05",
                                        "title": "Dunkelmodus",
                                        "status_name": "In Arbeit",
                                        "votes_count": 42
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowsaas.flowsaas-roadmap-items-update",
                "summary": "Position eines Roadmap-Eintrags ändern",
                "description": "Ändert allein die Position innerhalb der bestehenden Spalte. Für einen Spaltenwechsel gibt es den Endpunkt move.",
                "tags": [
                    "flowsaas.roadmap"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "5f1e7b90-2c44-4a19-9f3d-7c8b1a2e6d05",
                                        "sort_order": 4
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "sort_order": {
                                        "type": "integer",
                                        "description": "Neue Position, ab 0."
                                    }
                                },
                                "required": [
                                    "sort_order"
                                ]
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowsaas.flowsaas-roadmap-items-destroy",
                "summary": "Roadmap-Eintrag entfernen",
                "description": "Nimmt den Eintrag von der Roadmap. Die Idee bleibt mit Stimmen und Kommentaren bestehen und verliert nur ihre Roadmap-Markierung. Verlangt die Verwaltungsberechtigung.",
                "tags": [
                    "flowsaas.roadmap"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Roadmap-Eintrag entfernt."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/roadmap-items/{uuid}/move": {
            "post": {
                "operationId": "flowsaas.flowsaas-roadmap-items-move",
                "summary": "Roadmap-Eintrag verschieben",
                "description": "Verschiebt den Eintrag in eine andere Spalte und an eine Position darin. Das ist ein Statuswechsel der Idee: er schreibt Verlauf, löst die Webhooks aus und benachrichtigt die Unterstützer. Die übrigen Einträge der Zielspalte werden neu durchnummeriert.",
                "tags": [
                    "flowsaas.roadmap"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "5f1e7b90-2c44-4a19-9f3d-7c8b1a2e6d05",
                                        "status_name": "In Arbeit",
                                        "sort_order": 0
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "status_uuid": {
                                        "type": "string",
                                        "description": "Die Zielspalte, ein Status desselben Portals."
                                    },
                                    "sort_order": {
                                        "type": "integer",
                                        "description": "Position in der Zielspalte, ab 0."
                                    }
                                },
                                "required": [
                                    "status_uuid",
                                    "sort_order"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/roadmap-items/{uuid}/vote": {
            "post": {
                "operationId": "flowsaas.flowsaas-roadmap-items-vote",
                "summary": "Für einen Roadmap-Eintrag stimmen",
                "description": "Die Stimme landet auf der Idee hinter dem Eintrag, denn dort führt die Roadmap ihre Zahlen. Eine zweite Stimme derselben Person ist kein Fehler.",
                "tags": [
                    "flowsaas.roadmap"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "added": true,
                                        "votes_count": 43
                                    },
                                    "message": "Stimme abgegeben."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/portals/{uuid}/webhooks": {
            "get": {
                "operationId": "flowsaas.flowsaas-portals-webhooks-index",
                "summary": "Webhooks eines Portals auflisten",
                "description": "Alle Webhooks des Portals, neueste zuerst, jeweils ohne Schlüssel.",
                "tags": [
                    "flowsaas.webhooks"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "e4f6a8b0-2c4d-4e6f-8091-a2b3c4d5e6f7",
                                            "url": "https://example.com/hooks/flowsaas",
                                            "events": [
                                                "post.created"
                                            ],
                                            "is_active": true,
                                            "last_triggered_at": "2026-09-20T15:02:00+02:00"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowsaas.flowsaas-portals-webhooks-store",
                "summary": "Webhook anlegen",
                "description": "Registriert einen Webhook auf dem Portal. Die Antwort enthält einmalig den Schlüssel für die Signaturprüfung. Verlangt die Verwaltungsberechtigung.",
                "tags": [
                    "flowsaas.webhooks"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "e4f6a8b0-2c4d-4e6f-8091-a2b3c4d5e6f7",
                                        "url": "https://example.com/hooks/flowsaas",
                                        "events": [
                                            "post.created"
                                        ],
                                        "is_active": true,
                                        "secret": "Hn3k9QxT2bVr7LpZ4wYs8CmA1dFgJ6e0"
                                    },
                                    "message": "Der Schlüssel wird nur dieses eine Mal angezeigt. Bitte sicher aufbewahren."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "url": {
                                        "type": "string",
                                        "description": "Die Zieladresse der Zustellung."
                                    },
                                    "events": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Mindestens eines aus post.created, post.status_changed, post.updated, comment.created, vote.created."
                                    },
                                    "secret": {
                                        "type": "string",
                                        "description": "Eigener Schlüssel, mindestens 16 Zeichen. Ohne Angabe wird einer erzeugt."
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "Ob sofort zugestellt wird. Standard true."
                                    }
                                },
                                "required": [
                                    "url",
                                    "events"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/webhooks/{uuid}": {
            "get": {
                "operationId": "flowsaas.flowsaas-webhooks-show",
                "summary": "Webhook abrufen",
                "description": "Ein Webhook mit Zieladresse, abonnierten Ereignissen und Zeitpunkt der letzten erfolgreichen Zustellung. Der Schlüssel ist nicht dabei.",
                "tags": [
                    "flowsaas.webhooks"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "e4f6a8b0-2c4d-4e6f-8091-a2b3c4d5e6f7",
                                        "url": "https://example.com/hooks/flowsaas",
                                        "events": [
                                            "post.created"
                                        ],
                                        "is_active": true
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowsaas.flowsaas-webhooks-update",
                "summary": "Webhook ändern",
                "description": "Ändert die gesendeten Felder. Ohne secret bleibt der hinterlegte Schlüssel unverändert, damit ein Adresswechsel nicht die Signaturprüfung beim Empfänger bricht. Verlangt die Verwaltungsberechtigung.",
                "tags": [
                    "flowsaas.webhooks"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "e4f6a8b0-2c4d-4e6f-8091-a2b3c4d5e6f7",
                                        "url": "https://example.com/hooks/neu",
                                        "is_active": false
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "url": {
                                        "type": "string",
                                        "description": "Neue Zieladresse."
                                    },
                                    "events": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Die Ereignisse, die danach gelten sollen."
                                    },
                                    "secret": {
                                        "type": "string",
                                        "description": "Neuer Schlüssel, mindestens 16 Zeichen. Wird nicht zurückgegeben."
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "Zustellung ein- oder ausschalten."
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowsaas.flowsaas-webhooks-destroy",
                "summary": "Webhook löschen",
                "description": "Löscht den Webhook samt seinem Zustellungsprotokoll. Verlangt die Verwaltungsberechtigung.",
                "tags": [
                    "flowsaas.webhooks"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Webhook gelöscht."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/webhooks/{uuid}/test": {
            "post": {
                "operationId": "flowsaas.flowsaas-webhooks-test",
                "summary": "Testzustellung senden",
                "description": "Sendet eine signierte Testnachricht an die hinterlegte Adresse und meldet das Ergebnis zurück. Ein Empfänger, der mit einem Fehler antwortet, ist ein erfolgreicher Aufruf mit erfolglosem Ergebnis: delivered ist dann false. Verlangt die Verwaltungsberechtigung.",
                "tags": [
                    "flowsaas.webhooks"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "delivered": true,
                                        "http_status": 200,
                                        "response_body": "ok"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/webhooks/{uuid}/logs": {
            "get": {
                "operationId": "flowsaas.flowsaas-webhooks-logs",
                "summary": "Zustellungsprotokoll abrufen",
                "description": "Die Zustellversuche des Webhooks, neueste zuerst, jeweils mit der gesendeten Nutzlast und der Antwort des Empfängers.",
                "tags": [
                    "flowsaas.webhooks"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "event_type",
                        "in": "query",
                        "required": false,
                        "description": "Auf ein Ereignis einschränken, etwa post.created.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "succeeded",
                        "in": "query",
                        "required": false,
                        "description": "Nur erfolgreiche beziehungsweise nur erfolglose Zustellungen.",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Einträge pro Seite, 1 bis 200, Standard 50.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Seitenzahl, Standard 1.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "9c1e3f57-6a8b-4d2e-9f01-3b5d7c9e1a24",
                                            "event_reference": "1f2e3d4c-5b6a-4790-8123-456789abcdef",
                                            "event_type": "post.created",
                                            "http_status": 200,
                                            "succeeded_at": "2026-09-20T15:02:00+02:00"
                                        }
                                    ],
                                    "meta": {
                                        "current_page": 1,
                                        "per_page": 50,
                                        "total": 1,
                                        "last_page": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/subscribers": {
            "get": {
                "operationId": "flowsend.subscribers-list",
                "summary": "Subscriber auflisten",
                "description": "Ruft eine paginierte Liste aller Subscriber ab.",
                "tags": [
                    "flowsend.subscribers"
                ],
                "parameters": [
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "Filter: subscribed, unsubscribed, bounced, complained, pending",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "source",
                        "in": "query",
                        "required": false,
                        "description": "Filter: manual, import, api, form, crm_sync",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "email",
                        "in": "query",
                        "required": false,
                        "description": "Exakter Filter nach normalisierter E-Mail-Adresse",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Suchbegriff (E-Mail, Name, Telefon)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "lists[]",
                        "in": "query",
                        "required": false,
                        "description": "Array von Listen-UUIDs",
                        "schema": {
                            "type": "array",
                            "items": []
                        }
                    },
                    {
                        "name": "tags[]",
                        "in": "query",
                        "required": false,
                        "description": "Array von Tag-UUIDs",
                        "schema": {
                            "type": "array",
                            "items": []
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Anzahl pro Seite (1-200, Standard: 50)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "550e8400-...",
                                        "email": "max@example.com",
                                        "firstname": "Max",
                                        "lastname": "Mustermann",
                                        "full_name": "Max Mustermann",
                                        "status": "subscribed",
                                        "source": "api",
                                        "lists": [
                                            {
                                                "uuid": "...",
                                                "title": "Newsletter"
                                            }
                                        ],
                                        "tags": [
                                            {
                                                "uuid": "...",
                                                "title": "VIP-Kunde"
                                            }
                                        ],
                                        "created_at": "2024-01-15T10:30:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowsend.subscribers-create",
                "summary": "Subscriber erstellen",
                "description": "Erstellt einen neuen Subscriber.",
                "tags": [
                    "flowsend.subscribers"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "email": {
                                        "type": "string",
                                        "description": "E-Mail-Adresse des Subscribers"
                                    },
                                    "prefix": {
                                        "type": "string",
                                        "description": "Anrede (z.B. Herr, Frau)"
                                    },
                                    "firstname": {
                                        "type": "string",
                                        "description": "Vorname"
                                    },
                                    "lastname": {
                                        "type": "string",
                                        "description": "Nachname"
                                    },
                                    "phone": {
                                        "type": "string",
                                        "description": "Telefonnummer"
                                    },
                                    "status": {
                                        "type": "string",
                                        "description": "Status (Standard: subscribed)"
                                    },
                                    "lists": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Liste von Listen-UUIDs"
                                    },
                                    "tags": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Liste von Tag-UUIDs"
                                    },
                                    "meta": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Meta-Daten als Array von {key, value}-Objekten"
                                    }
                                },
                                "required": [
                                    "email"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/subscribers/by-client/{client_uuid}": {
            "get": {
                "operationId": "flowsend.subscribers-preview-client",
                "summary": "CRM-Kundenempfänger prüfen",
                "description": "Benötigt FlowSend- und FlowCRM-Zugriff. Prüft dieselbe Kundenzuordnung wie PUT, ohne Änderungen zu speichern. Liefert bestehende UUID, Tags und Listen auch bei einem zulässigen Adresswechsel. Bei einer geplanten Neuanlage ist uuid null. Geschützte Adresswechsel und Zuordnungskonflikte liefern 409; fehlende, gelöschte oder anonymisierte Kunden 404.",
                "tags": [
                    "flowsend.subscribers"
                ],
                "parameters": [
                    {
                        "name": "client_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowsend.subscribers-upsert-client",
                "summary": "CRM-Kundenempfänger abgleichen",
                "description": "Benötigt FlowSend- und FlowCRM-Zugriff. Löst die aktuelle Hauptadresse eines CRM-Kunden desselben Teams auf. Wiederholungen liefern denselben Empfänger: 201 bei Anlage, 200 bei Wiederverwendung. Unklare Zuordnungen oder geschützte Adresswechsel liefern 409; fehlende, gelöschte oder anonymisierte Kunden 404. Listen, Tags und bestehende Newsletter-Status werden nicht zurückgesetzt. Der Request benötigt keinen Body.",
                "tags": [
                    "flowsend.subscribers"
                ],
                "parameters": [
                    {
                        "name": "client_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/subscribers/{uuid}": {
            "get": {
                "operationId": "flowsend.subscribers-show",
                "summary": "Subscriber abrufen",
                "description": "Ruft Details eines einzelnen Subscribers ab.",
                "tags": [
                    "flowsend.subscribers"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowsend.subscribers-update",
                "summary": "Subscriber aktualisieren",
                "description": "Aktualisiert einen bestehenden Subscriber.",
                "tags": [
                    "flowsend.subscribers"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "email": {
                                        "type": "string",
                                        "description": "E-Mail-Adresse"
                                    },
                                    "firstname": {
                                        "type": "string",
                                        "description": "Vorname"
                                    },
                                    "lastname": {
                                        "type": "string",
                                        "description": "Nachname"
                                    },
                                    "status": {
                                        "type": "string",
                                        "description": "Status (subscribed, unsubscribed)"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowsend.subscribers-delete",
                "summary": "Subscriber löschen",
                "description": "Löscht einen Subscriber unwiderruflich.",
                "tags": [
                    "flowsend.subscribers"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/subscribers/{uuid}/lists": {
            "put": {
                "operationId": "flowsend.subscribers-sync-lists",
                "summary": "Subscriber-Listen synchronisieren",
                "description": "Ersetzt alle Listen-Zuordnungen des Subscribers (vollständige Synchronisation).",
                "tags": [
                    "flowsend.subscribers"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "list_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Liste von Listen-UUIDs (ersetzt bestehende Zuordnungen)"
                                    }
                                },
                                "required": [
                                    "list_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/subscribers/{uuid}/resend-double-opt-in": {
            "post": {
                "operationId": "flowsend.subscribers-resend-double-opt-in",
                "summary": "Double-Opt-in erneut senden",
                "description": "Schickt die Bestätigungsmail des Double-Opt-in-Verfahrens erneut und erzeugt dabei einen frischen Bestätigungslink. Nur für Empfänger sinnvoll, die noch nicht bestätigt haben; ein bereits bestätigter Empfänger führt zu 422. Ob ein Empfänger auf seine Bestätigung wartet, steht im Feld double_opt_in.awaiting_confirmation der Empfängerantwort. Der Request benötigt keinen Body.",
                "tags": [
                    "flowsend.subscribers"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/subscribers/{uuid}/tags": {
            "put": {
                "operationId": "flowsend.subscribers-sync-tags",
                "summary": "Subscriber-Tags synchronisieren",
                "description": "Ersetzt alle Tag-Zuordnungen des Subscribers (vollständige Synchronisation).",
                "tags": [
                    "flowsend.subscribers"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "tag_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Liste von Tag-UUIDs (ersetzt bestehende Zuordnungen)"
                                    }
                                },
                                "required": [
                                    "tag_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/subscribers/bulk/add-to-lists": {
            "post": {
                "operationId": "flowsend.bulk-add-to-lists",
                "summary": "Subscriber zu Listen hinzufügen",
                "description": "Fügt mehrere Subscriber gleichzeitig zu mehreren Listen hinzu. Das gilt unabhängig vom Status, auch für unsubscribed, bounced und complained: der Status bleibt unverändert, und Kampagnen erreichen weiterhin nur subscribed. affected_count nennt alle gefundenen Subscriber.",
                "tags": [
                    "flowsend.subscribers-bulk"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "subscriber_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "UUIDs der Subscriber"
                                    },
                                    "list_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "UUIDs der Ziel-Listen"
                                    }
                                },
                                "required": [
                                    "subscriber_uuids",
                                    "list_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/subscribers/bulk/add-tags": {
            "post": {
                "operationId": "flowsend.bulk-add-tags",
                "summary": "Tags zu Subscribern hinzufügen",
                "description": "Weist mehreren Subscribern gleichzeitig mehrere Tags zu. Das gilt unabhängig vom Status, auch für unsubscribed, bounced und complained: der Status bleibt unverändert, und Kampagnen erreichen weiterhin nur subscribed. affected_count nennt alle gefundenen Subscriber.",
                "tags": [
                    "flowsend.subscribers-bulk"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "subscriber_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "UUIDs der Subscriber"
                                    },
                                    "tag_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "UUIDs der Ziel-Tags"
                                    }
                                },
                                "required": [
                                    "subscriber_uuids",
                                    "tag_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/subscribers/bulk/remove-from-lists": {
            "post": {
                "operationId": "flowsend.bulk-remove-from-lists",
                "summary": "Subscriber aus Listen entfernen",
                "description": "Entfernt mehrere Subscriber gleichzeitig aus mehreren Listen.",
                "tags": [
                    "flowsend.subscribers-bulk"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "subscriber_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "UUIDs der Subscriber"
                                    },
                                    "list_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "UUIDs der Listen"
                                    }
                                },
                                "required": [
                                    "subscriber_uuids",
                                    "list_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/subscribers/bulk/remove-tags": {
            "post": {
                "operationId": "flowsend.bulk-remove-tags",
                "summary": "Tags von Subscribern entfernen",
                "description": "Entfernt mehrere Tags gleichzeitig von mehreren Subscribern.",
                "tags": [
                    "flowsend.subscribers-bulk"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "subscriber_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "UUIDs der Subscriber"
                                    },
                                    "tag_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "UUIDs der Tags"
                                    }
                                },
                                "required": [
                                    "subscriber_uuids",
                                    "tag_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/subscribers/bulk/delete": {
            "post": {
                "operationId": "flowsend.bulk-delete",
                "summary": "Subscriber bulk-löschen",
                "description": "Löscht mehrere Subscriber gleichzeitig. Diese Aktion ist unwiderruflich.",
                "tags": [
                    "flowsend.subscribers-bulk"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "subscriber_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "UUIDs der zu löschenden Subscriber"
                                    }
                                },
                                "required": [
                                    "subscriber_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/subscribers/bulk/status": {
            "post": {
                "operationId": "flowsend.bulk-status",
                "summary": "Status mehrerer Subscriber ändern",
                "description": "Setzt den Status mehrerer Subscriber auf einmal. Zulässig sind nur subscribed und pending. Subscriber, die bereits unsubscribed, bounced oder complained sind, bleiben unverändert: diese Zustände entstehen durch die Entscheidung der Empfängerin oder durch den Versanddienst und werden nie überschrieben. Die Antwort nennt selected_count, affected_count und skipped_count.",
                "tags": [
                    "flowsend.subscribers-bulk"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "subscriber_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "UUIDs der zu ändernden Subscriber (1 bis 500)"
                                    },
                                    "status": {
                                        "type": "string",
                                        "description": "Neuer Status: subscribed oder pending"
                                    }
                                },
                                "required": [
                                    "subscriber_uuids",
                                    "status"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/lists": {
            "get": {
                "operationId": "flowsend.lists-list",
                "summary": "Listen abrufen",
                "description": "Ruft alle Listen ab, inklusive Subscriber-Anzahl.",
                "tags": [
                    "flowsend.lists"
                ],
                "parameters": [
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Einträge pro Seite (1 bis 500, Standard 500). Die Antwort enthält zusätzlich einen <code>meta</code>-Block mit <code>current_page</code>, <code>per_page</code>, <code>total</code> und <code>last_page</code>.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Seitennummer, beginnend bei 1",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowsend.lists-create",
                "summary": "Liste erstellen",
                "description": "Erstellt eine neue Liste.",
                "tags": [
                    "flowsend.lists"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "description": "Name der Liste"
                                    },
                                    "slug": {
                                        "type": "string",
                                        "description": "URL-Slug (optional, wird automatisch generiert)"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Beschreibung der Liste"
                                    }
                                },
                                "required": [
                                    "title"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/lists/{uuid}": {
            "get": {
                "operationId": "flowsend.lists-show",
                "summary": "Listen-Details abrufen",
                "description": "Ruft Details einer bestimmten Liste ab.",
                "tags": [
                    "flowsend.lists"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowsend.lists-update",
                "summary": "Liste aktualisieren",
                "description": "Aktualisiert eine bestehende Liste.",
                "tags": [
                    "flowsend.lists"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "description": "Name der Liste"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Beschreibung"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowsend.lists-delete",
                "summary": "Liste löschen",
                "description": "Löscht eine Liste. Subscriber in dieser Liste werden nicht gelöscht.",
                "tags": [
                    "flowsend.lists"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/lists/{uuid}/subscribers": {
            "get": {
                "operationId": "flowsend.lists-subscribers",
                "summary": "Abonnenten einer Liste",
                "description": "Listet die Abonnenten der Liste seitenweise auf. Die Antwort enthält einen meta-Block mit den Seitenangaben.",
                "tags": [
                    "flowsend.lists"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Einträge pro Seite (1 bis 200, Standard 50)",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Seitennummer, beginnend bei 1",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowsend.lists-add-subscribers",
                "summary": "Abonnenten zur Liste hinzufügen",
                "description": "Fügt vorhandene Abonnenten der Liste hinzu. Bereits enthaltene Abonnenten bleiben unverändert, unbekannte oder teamfremde UUIDs werden übergangen.",
                "tags": [
                    "flowsend.lists"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "subscriber_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "UUIDs der hinzuzufügenden Abonnenten"
                                    }
                                },
                                "required": [
                                    "subscriber_uuids"
                                ]
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowsend.lists-remove-subscribers",
                "summary": "Abonnenten aus der Liste entfernen",
                "description": "Löst die Zugehörigkeit der angegebenen Abonnenten zu dieser Liste. Die Abonnenten selbst, ihr Status und ihre übrigen Listen und Tags bleiben unverändert: aus einer Liste entfernt zu werden ist nicht dasselbe wie eine Abmeldung. Unbekannte oder teamfremde UUIDs werden übergangen, removed_count nennt die tatsächlich gelösten Zuordnungen.",
                "tags": [
                    "flowsend.lists"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "subscriber_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "UUIDs der zu entfernenden Abonnenten (1 bis 500)"
                                    }
                                },
                                "required": [
                                    "subscriber_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/tags": {
            "get": {
                "operationId": "flowsend.tags-list",
                "summary": "Tags abrufen",
                "description": "Ruft alle Tags ab, inklusive Subscriber-Anzahl.",
                "tags": [
                    "flowsend.tags"
                ],
                "parameters": [
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Einträge pro Seite (1 bis 500, Standard 500). Die Antwort enthält zusätzlich einen <code>meta</code>-Block mit <code>current_page</code>, <code>per_page</code>, <code>total</code> und <code>last_page</code>.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Seitennummer, beginnend bei 1",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowsend.tags-create",
                "summary": "Tag erstellen",
                "description": "Erstellt einen neuen Tag.",
                "tags": [
                    "flowsend.tags"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "description": "Name des Tags"
                                    },
                                    "slug": {
                                        "type": "string",
                                        "description": "URL-Slug (optional, wird automatisch generiert)"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Beschreibung des Tags"
                                    }
                                },
                                "required": [
                                    "title"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/tags/{uuid}": {
            "get": {
                "operationId": "flowsend.tags-show",
                "summary": "Tag-Details abrufen",
                "description": "Ruft Details eines bestimmten Tags ab.",
                "tags": [
                    "flowsend.tags"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowsend.tags-update",
                "summary": "Tag aktualisieren",
                "description": "Aktualisiert einen bestehenden Tag.",
                "tags": [
                    "flowsend.tags"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "description": "Name des Tags"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Beschreibung"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowsend.tags-delete",
                "summary": "Tag löschen",
                "description": "Löscht einen Tag. Subscriber mit diesem Tag verlieren die Zuordnung.",
                "tags": [
                    "flowsend.tags"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/tags/{uuid}/subscribers": {
            "get": {
                "operationId": "flowsend.tags-subscribers",
                "summary": "Abonnenten eines Tags",
                "description": "Listet die Abonnenten mit diesem Tag seitenweise auf. Die Antwort enthält einen meta-Block mit den Seitenangaben.",
                "tags": [
                    "flowsend.tags"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Einträge pro Seite (1 bis 200, Standard 50)",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Seitennummer, beginnend bei 1",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/campaigns": {
            "get": {
                "operationId": "flowsend.campaigns-list",
                "summary": "Kampagnen abrufen",
                "description": "Ruft die Kampagnen des Teams seitenweise ab, neueste zuerst. Die Antwort enthält einen meta-Block mit den Seitenangaben.",
                "tags": [
                    "flowsend.campaigns"
                ],
                "parameters": [
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "Filter: draft, scheduled, sending, sent, cancelled, failed",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Suchbegriff in Name und Betreff",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Einträge pro Seite (1 bis 200, Standard 25)",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Seitennummer, beginnend bei 1",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowsend.campaigns-create",
                "summary": "Kampagne anlegen",
                "description": "Legt eine Kampagne als Entwurf an. Der Inhalt ist ein Templatical-Dokument in content_json; es wird gegen das Schema geprüft und bereinigt, bevor etwas gespeichert wird. content_html erzeugt FlowSend selbst und nimmt es nicht entgegen. Mit template_uuid startet der Entwurf aus einer sichtbaren Vorlage; ausdrücklich mitgeschickter Inhalt hat dabei Vorrang. Einzelne Blöcke änderst du danach mit POST /campaigns/{uuid}/content/operations.",
                "tags": [
                    "flowsend.campaigns"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Interner Name der Kampagne"
                                    },
                                    "subject": {
                                        "type": "string",
                                        "description": "Betreffzeile"
                                    },
                                    "preview_text": {
                                        "type": "string",
                                        "description": "Vorschautext im Posteingang. Wird als Preheader in den Inhalt übernommen (settings.preheaderText) und folgt dessen Änderungen."
                                    },
                                    "from_name": {
                                        "type": "string",
                                        "description": "Absendername"
                                    },
                                    "from_email": {
                                        "type": "string",
                                        "description": "Absenderadresse; muss zur verifizierten Absenderdomäne passen"
                                    },
                                    "editor_type": {
                                        "type": "string",
                                        "description": "Nur noch visual; andere Werte liefern 422"
                                    },
                                    "content_json": {
                                        "type": "object",
                                        "description": "Dokument im Templatical-Format {\"blocks\": [...], \"settings\": {...}}, als Objekt oder JSON-Zeichenkette. Wird gegen das Templatical-Schema geprüft; das alte Builder-Format (root/childrenIds) liefert 422 legacy_content_format."
                                    },
                                    "template_uuid": {
                                        "type": "string",
                                        "description": "UUID einer eigenen oder System-Vorlage, aus der der Inhalt übernommen wird"
                                    },
                                    "list_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "UUIDs der Empfängerlisten"
                                    },
                                    "include_tag_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "UUIDs der Tags, die eingeschlossen werden"
                                    },
                                    "exclude_tag_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "UUIDs der Tags, die ausgeschlossen werden"
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/campaigns/{uuid}": {
            "get": {
                "operationId": "flowsend.campaigns-show",
                "summary": "Kampagne abrufen",
                "description": "Liefert die Kampagne samt Inhalt, Empfängerauswahl, Statistik und der Liste blockers. Ein leeres blockers bedeutet, dass die Kampagne versandbereit ist; current_recipients nennt die aktuelle Reichweite. content.content_json ist immer ein Templatical-Dokument (Objekt), content.revision der aktuelle Stand, content.content_html die daraus erzeugte Vorschau.",
                "tags": [
                    "flowsend.campaigns"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowsend.campaigns-update",
                "summary": "Kampagne ändern",
                "description": "Ändert einen Entwurf. Nur Kampagnen in den Zuständen draft, scheduled und failed sind änderbar; alles andere ist Versandgeschichte und liefert 422. Ausgelassene Felder behalten ihren Wert, ein leeres list_uuids löscht die Listenauswahl. Ein mitgeschicktes content_json ersetzt das ganze Dokument; der bisherige Stand wird als Version gesichert und offene Editoren laden neu. Für einzelne Blöcke ist POST /campaigns/{uuid}/content/operations der bessere Weg.",
                "tags": [
                    "flowsend.campaigns"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Interner Name"
                                    },
                                    "subject": {
                                        "type": "string",
                                        "description": "Betreffzeile"
                                    },
                                    "preview_text": {
                                        "type": "string",
                                        "description": "Vorschautext im Posteingang. Wird als Preheader in den Inhalt übernommen (settings.preheaderText) und folgt dessen Änderungen."
                                    },
                                    "from_name": {
                                        "type": "string",
                                        "description": "Absendername"
                                    },
                                    "from_email": {
                                        "type": "string",
                                        "description": "Absenderadresse"
                                    },
                                    "editor_type": {
                                        "type": "string",
                                        "description": "Nur noch visual; andere Werte liefern 422"
                                    },
                                    "content_json": {
                                        "type": "object",
                                        "description": "Dokument im Templatical-Format {\"blocks\": [...], \"settings\": {...}}, als Objekt oder JSON-Zeichenkette. Wird gegen das Templatical-Schema geprüft; das alte Builder-Format (root/childrenIds) liefert 422 legacy_content_format."
                                    },
                                    "list_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Ersetzt die Listenauswahl"
                                    },
                                    "include_tag_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Ersetzt die eingeschlossenen Tags"
                                    },
                                    "exclude_tag_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Ersetzt die ausgeschlossenen Tags"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowsend.campaigns-delete",
                "summary": "Kampagne löschen",
                "description": "Löscht eine Kampagne. Nur Entwürfe und abgebrochene Kampagnen dürfen gelöscht werden; eine versendete Kampagne ist Versandgeschichte und liefert 422.",
                "tags": [
                    "flowsend.campaigns"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/campaigns/{uuid}/duplicate": {
            "post": {
                "operationId": "flowsend.campaigns-duplicate",
                "summary": "Kampagne duplizieren",
                "description": "Legt eine Kopie mit Inhalt und Empfängerauswahl als neuen Entwurf an. Versandzeitpunkt, Zählerstände und Versandhistorie werden nicht kopiert. Der Request benötigt keinen Body.",
                "tags": [
                    "flowsend.campaigns"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/campaigns/{uuid}/send-test": {
            "post": {
                "operationId": "flowsend.campaigns-send-test",
                "summary": "Testmail versenden",
                "description": "Versendet die Kampagne an bis zu fünf Testadressen. Die Empfängerauswahl wird dabei übergangen und die Zählerstände der Kampagne bleiben unberührt. Die Antwort nennt je Adresse ein eigenes Ergebnis, weil der Versanddienst eine annehmen und eine andere ablehnen kann; scheitert mindestens eine, ist die Antwort 422.",
                "tags": [
                    "flowsend.campaigns"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "emails": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Ein bis fünf Testadressen"
                                    },
                                    "subscriber_uuid": {
                                        "type": "string",
                                        "description": "UUID eines echten Empfängers, mit dessen Daten die Platzhalter gefüllt werden"
                                    }
                                },
                                "required": [
                                    "emails"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/campaigns/{uuid}/send": {
            "post": {
                "operationId": "flowsend.campaigns-send",
                "summary": "Kampagne sofort versenden",
                "description": "Stellt die Kampagne sofort in den Versand. Ist sie nicht versandbereit, antwortet der Endpunkt mit 422 und einer Liste blockers, die jeden Grund einzeln benennt, etwa fehlender Betreff, fehlender Inhalt, fehlende Liste oder ein überschrittenes Monatslimit. Der Request benötigt keinen Body.",
                "tags": [
                    "flowsend.campaigns"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/campaigns/{uuid}/schedule": {
            "post": {
                "operationId": "flowsend.campaigns-schedule",
                "summary": "Kampagne planen",
                "description": "Plant den Versand auf einen Zeitpunkt in der Zukunft. Dieselbe Versandbereitschaft wie beim sofortigen Versand wird geprüft und bei einem Hindernis mit 422 und blockers beantwortet.",
                "tags": [
                    "flowsend.campaigns"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "scheduled_at": {
                                        "type": "string",
                                        "description": "Versandzeitpunkt als Datum mit Uhrzeit, muss in der Zukunft liegen"
                                    }
                                },
                                "required": [
                                    "scheduled_at"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/campaigns/{uuid}/cancel": {
            "post": {
                "operationId": "flowsend.campaigns-cancel",
                "summary": "Versand abbrechen",
                "description": "Bricht eine geplante oder laufende Kampagne ab. Eine Kampagne, die weder geplant noch im Versand ist, liefert 422. Bereits zugestellte Mails lassen sich nicht zurückholen. Der Request benötigt keinen Body.",
                "tags": [
                    "flowsend.campaigns"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/campaigns/{uuid}/recipients": {
            "get": {
                "operationId": "flowsend.campaigns-recipients",
                "summary": "Empfänger der Kampagne",
                "description": "Liefert die Empfänger, die die Kampagne mit der aktuellen Auswahl erreichen würde, seitenweise. Es ist dieselbe Abfrage, die auch der Versand benutzt, deshalb können Vorschau und Versand nicht auseinanderlaufen. Die Gesamtzahl steht im meta-Block als recipient_count.",
                "tags": [
                    "flowsend.campaigns"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Einträge pro Seite (1 bis 200, Standard 50)",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Seitennummer, beginnend bei 1",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/campaigns/{uuid}/stats": {
            "get": {
                "operationId": "flowsend.campaigns-stats",
                "summary": "Statistik der Kampagne",
                "description": "Liefert Zustellzahlen, Öffnungen, Klicks, Abmeldungen und Bounces sowie die aktuelle Reichweite und die Liste blockers.",
                "tags": [
                    "flowsend.campaigns"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/campaigns/{uuid}/events": {
            "get": {
                "operationId": "flowsend.campaigns-events",
                "summary": "Versandereignisse der Kampagne",
                "description": "Listet die einzelnen Zustellereignisse seitenweise auf, neueste zuerst. Jedes Ereignis nennt seinen Typ, den Zeitpunkt und die UUID des betroffenen Empfängers.",
                "tags": [
                    "flowsend.campaigns"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "type",
                        "in": "query",
                        "required": false,
                        "description": "Filter: delivered, opened, clicked, unsubscribed, bounced, complained, rejected, processed",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Einträge pro Seite (1 bis 200, Standard 50)",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Seitennummer, beginnend bei 1",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/campaigns/{uuid}/content": {
            "get": {
                "operationId": "flowsend.campaigns-content",
                "summary": "Kampagne: Inhalt blockweise lesen",
                "description": "Liefert das Templatical-Dokument mit revision, einer Übersicht der Einstellungen und blocks: jeder Block in Lesereihenfolge mit block_id, Typ, Platz (parent mit sectionId und column) und seinen Inhaltsfeldern unter den Templatical-Namen. Ein Altdokument wird dabei im Speicher umgewandelt. Der Pflicht-Fußbereich mit Impressum und Abmeldelink ist kein Block.",
                "tags": [
                    "flowsend.campaigns"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/campaigns/{uuid}/content/operations": {
            "post": {
                "operationId": "flowsend.campaigns-content-operations",
                "summary": "Kampagne: Inhalt mit Operationen ändern",
                "description": "Wendet einen Stapel Templatical-Operationen an: alles oder nichts, geprüft gegen das Schema, bereinigt und mit neuer revision gespeichert. Der bisherige Stand wird als Version gesichert, offene Editoren zeigen die Änderung sofort. Eine Ablehnung nennt die Operation (opIndex ab 0) und den Grund: 409 bei unbekanntem Block, fehlendem Anker, veralteter expected_revision oder einem Block, den gerade jemand im Editor bearbeitet; 422 bei einer ungültigen Operation. Die Antwort enthält die neue revision, die neu angelegten Blöcke (created) und die Blockübersicht. Nur Kampagnen in den Zuständen draft, scheduled und failed; über MCP nur Entwürfe.",
                "tags": [
                    "flowsend.campaigns"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "operations": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Templatical-Operationen, angewendet in Reihenfolge und alles oder nichts: <code>{\"op\": \"updateBlock\", \"blockId\": \"b1\", \"set\": {\"content\": \"&lt;p&gt;Hallo&lt;/p&gt;\"}}</code>, <code>{\"op\": \"addBlock\", \"block\": {\"type\": \"paragraph\", \"content\": \"&lt;p&gt;Neu&lt;/p&gt;\"}, \"parent\": null, \"after\": \"b1\"}</code>, <code>{\"op\": \"moveBlock\", \"blockId\": \"b2\", \"parent\": {\"sectionId\": \"s1\", \"column\": 0}, \"after\": null}</code>, <code>{\"op\": \"deleteBlock\", \"blockId\": \"b2\"}</code>, <code>{\"op\": \"updateSettings\", \"set\": {\"preheaderText\": \"…\"}}</code>, <code>{\"op\": \"setContent\", \"content\": {…}}</code> (nur mit expected_revision). Höchstens 80 je Aufruf. Ohne id vergibt FlowSend eine."
                                    },
                                    "expected_revision": {
                                        "type": "integer",
                                        "description": "Stand, auf dem die Operationen geplant wurden; weicht der aktuelle ab, kommt 409 stale_revision. Pflicht für setContent."
                                    }
                                },
                                "required": [
                                    "operations"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/templates": {
            "get": {
                "operationId": "flowsend.templates-list",
                "summary": "Vorlagen abrufen",
                "description": "Listet die eigenen Vorlagen und die geteilten Systemvorlagen seitenweise auf.",
                "tags": [
                    "flowsend.templates"
                ],
                "parameters": [
                    {
                        "name": "scope",
                        "in": "query",
                        "required": false,
                        "description": "all (Standard), own oder system",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "category",
                        "in": "query",
                        "required": false,
                        "description": "Filter: newsletter, welcome, announcement, promo, custom",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "editor_type",
                        "in": "query",
                        "required": false,
                        "description": "Filter: visual (noch nicht umgestellte Altbestände tragen richtext oder html)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "is_active",
                        "in": "query",
                        "required": false,
                        "description": "Filter nach aktiven oder deaktivierten Vorlagen",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Suchbegriff in Name und Beschreibung",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Einträge pro Seite (1 bis 200, Standard 25)",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Seitennummer, beginnend bei 1",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowsend.templates-create",
                "summary": "Vorlage anlegen",
                "description": "Legt eine eigene Vorlage an. Der Inhalt ist ein Templatical-Dokument in content_json, das gegen das Schema geprüft und bereinigt wird; das alte Builder-Format liefert 422. content_html ist die erzeugte Vorschau und nur lesbar. HTML-Exporte anderer Anbieter importierst du in FlowSend über „HTML importieren“.",
                "tags": [
                    "flowsend.templates"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name der Vorlage"
                                    },
                                    "category": {
                                        "type": "string",
                                        "description": "newsletter, welcome, announcement, promo oder custom (Standard)"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Beschreibung"
                                    },
                                    "editor_type": {
                                        "type": "string",
                                        "description": "Nur noch visual; andere Werte liefern 422"
                                    },
                                    "content_json": {
                                        "type": "object",
                                        "description": "Dokument im Templatical-Format {\"blocks\": [...], \"settings\": {...}}, als Objekt oder JSON-Zeichenkette. Wird gegen das Templatical-Schema geprüft; das alte Builder-Format (root/childrenIds) liefert 422 legacy_content_format."
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "Ob die Vorlage in der Auswahl erscheint (Standard: true)"
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/templates/{uuid}": {
            "get": {
                "operationId": "flowsend.templates-show",
                "summary": "Vorlage abrufen",
                "description": "Liefert eine eigene oder geteilte Systemvorlage samt ihrem gespeicherten Inhalt. Das Feld editable sagt, ob die Vorlage geändert werden darf.",
                "tags": [
                    "flowsend.templates"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowsend.templates-update",
                "summary": "Vorlage ändern",
                "description": "Ändert eine eigene Vorlage. Eine Systemvorlage gehört allen Teams und liefert 422; dupliziere sie zuerst. Ein mitgeschicktes content_json (Templatical) ersetzt das ganze Dokument; vorher wird der bisherige Stand als Version gesichert.",
                "tags": [
                    "flowsend.templates"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name der Vorlage"
                                    },
                                    "category": {
                                        "type": "string",
                                        "description": "newsletter, welcome, announcement, promo oder custom"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Beschreibung"
                                    },
                                    "editor_type": {
                                        "type": "string",
                                        "description": "Nur noch visual; andere Werte liefern 422"
                                    },
                                    "content_json": {
                                        "type": "object",
                                        "description": "Dokument im Templatical-Format {\"blocks\": [...], \"settings\": {...}}, als Objekt oder JSON-Zeichenkette. Wird gegen das Templatical-Schema geprüft; das alte Builder-Format (root/childrenIds) liefert 422 legacy_content_format."
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "Ob die Vorlage in der Auswahl erscheint"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowsend.templates-delete",
                "summary": "Vorlage löschen",
                "description": "Löscht eine eigene Vorlage. Systemvorlagen sind über diesen Weg nicht erreichbar und liefern 404.",
                "tags": [
                    "flowsend.templates"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/templates/{uuid}/duplicate": {
            "post": {
                "operationId": "flowsend.templates-duplicate",
                "summary": "Vorlage duplizieren",
                "description": "Erzeugt aus einer eigenen oder geteilten Systemvorlage eine eigene Kopie, die sich frei ändern lässt. Das Vorschaubild der Kopie entsteht im Hintergrund. Der Request benötigt keinen Body.",
                "tags": [
                    "flowsend.templates"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/templates/{uuid}/content": {
            "get": {
                "operationId": "flowsend.templates-content",
                "summary": "Vorlage: Inhalt blockweise lesen",
                "description": "Liefert das Templatical-Dokument mit revision, einer Übersicht der Einstellungen und blocks: jeder Block in Lesereihenfolge mit block_id, Typ, Platz (parent mit sectionId und column) und seinen Inhaltsfeldern unter den Templatical-Namen. Ein Altdokument wird dabei im Speicher umgewandelt. Der Pflicht-Fußbereich mit Impressum und Abmeldelink ist kein Block.",
                "tags": [
                    "flowsend.templates"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/templates/{uuid}/content/operations": {
            "post": {
                "operationId": "flowsend.templates-content-operations",
                "summary": "Vorlage: Inhalt mit Operationen ändern",
                "description": "Wendet einen Stapel Templatical-Operationen an: alles oder nichts, geprüft gegen das Schema, bereinigt und mit neuer revision gespeichert. Der bisherige Stand wird als Version gesichert, offene Editoren zeigen die Änderung sofort. Eine Ablehnung nennt die Operation (opIndex ab 0) und den Grund: 409 bei unbekanntem Block, fehlendem Anker, veralteter expected_revision oder einem Block, den gerade jemand im Editor bearbeitet; 422 bei einer ungültigen Operation. Die Antwort enthält die neue revision, die neu angelegten Blöcke (created) und die Blockübersicht. Systemvorlagen liefern 422; dupliziere sie zuerst.",
                "tags": [
                    "flowsend.templates"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "operations": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Templatical-Operationen, angewendet in Reihenfolge und alles oder nichts: <code>{\"op\": \"updateBlock\", \"blockId\": \"b1\", \"set\": {\"content\": \"&lt;p&gt;Hallo&lt;/p&gt;\"}}</code>, <code>{\"op\": \"addBlock\", \"block\": {\"type\": \"paragraph\", \"content\": \"&lt;p&gt;Neu&lt;/p&gt;\"}, \"parent\": null, \"after\": \"b1\"}</code>, <code>{\"op\": \"moveBlock\", \"blockId\": \"b2\", \"parent\": {\"sectionId\": \"s1\", \"column\": 0}, \"after\": null}</code>, <code>{\"op\": \"deleteBlock\", \"blockId\": \"b2\"}</code>, <code>{\"op\": \"updateSettings\", \"set\": {\"preheaderText\": \"…\"}}</code>, <code>{\"op\": \"setContent\", \"content\": {…}}</code> (nur mit expected_revision). Höchstens 80 je Aufruf. Ohne id vergibt FlowSend eine."
                                    },
                                    "expected_revision": {
                                        "type": "integer",
                                        "description": "Stand, auf dem die Operationen geplant wurden; weicht der aktuelle ab, kommt 409 stale_revision. Pflicht für setContent."
                                    }
                                },
                                "required": [
                                    "operations"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/sender-domains": {
            "get": {
                "operationId": "flowsend.sender-domains-list",
                "summary": "Absenderdomäne auflisten",
                "description": "Liefert die konfigurierte Absenderdomäne als Liste mit null oder einem Eintrag, ohne den Versanddienst abzufragen.",
                "tags": [
                    "flowsend.sender-domains"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowsend.sender-domains-create",
                "summary": "Absenderdomäne hinzufügen",
                "description": "Meldet eine Absenderdomäne beim Versanddienst an und liefert die zu veröffentlichenden DNS-Einträge zurück. Ist bereits eine Domäne konfiguriert, antwortet der Endpunkt mit 422.",
                "tags": [
                    "flowsend.sender-domains"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "domain": {
                                        "type": "string",
                                        "description": "Die Domäne, etwa beispiel.de"
                                    }
                                },
                                "required": [
                                    "domain"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/sender-domains/current": {
            "get": {
                "operationId": "flowsend.sender-domains-show",
                "summary": "Absenderdomäne abrufen",
                "description": "Liefert die Domäne samt DNS-Einträgen und fragt dabei den Versanddienst nach dem aktuellen Prüfstand. Ist der Dienst nicht erreichbar, kommt der gespeicherte Stand mit reachable: false zurück.",
                "tags": [
                    "flowsend.sender-domains"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowsend.sender-domains-delete",
                "summary": "Absenderdomäne entfernen",
                "description": "Entfernt die Absenderdomäne. Der lokale Stand wird in jedem Fall gelöscht; ob der Versanddienst die Domäne ebenfalls freigegeben hat, steht im Feld provider_removed. Ist es false, muss die Domäne beim Dienst von Hand entfernt werden, bevor sie erneut hinzugefügt werden kann.",
                "tags": [
                    "flowsend.sender-domains"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/sender-domains/current/verify": {
            "post": {
                "operationId": "flowsend.sender-domains-verify",
                "summary": "Absenderdomäne prüfen",
                "description": "Fordert den Versanddienst auf, die veröffentlichten DNS-Einträge erneut zu prüfen. Der Request benötigt keinen Body.",
                "tags": [
                    "flowsend.sender-domains"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/context": {
            "get": {
                "operationId": "flowsend.context",
                "summary": "Kontext abrufen",
                "description": "Liefert in einem Aufruf alles, was vor einem Schreibzugriff bekannt sein muss: die Feldverträge je Datensatztyp, die zulässigen Empfänger- und Kampagnenstatus, die geschützten Einwilligungszustände, die Vorlagenkategorien, den Double-Opt-in-Zustand, die Absenderdomäne und das Monatslimit.",
                "tags": [
                    "flowsend.insights"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/limit": {
            "get": {
                "operationId": "flowsend.limit",
                "summary": "Monatslimit abrufen",
                "description": "Liefert das monatliche Versandkontingent: limit, bereits verbrauchte sent, verbleibende remaining, das Kennzeichen reached und die Auslastung in Prozent.",
                "tags": [
                    "flowsend.insights"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/reports/overview": {
            "get": {
                "operationId": "flowsend.reports-overview",
                "summary": "Übersicht",
                "description": "Zählt Empfänger je Status, Listen, Tags und Kampagnen je Zustand und nennt das Monatslimit.",
                "tags": [
                    "flowsend.insights"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/reports/audience": {
            "get": {
                "operationId": "flowsend.reports-audience",
                "summary": "Reichweite schätzen",
                "description": "Zählt, wie viele Empfänger eine Auswahl aus Listen und Tags tatsächlich erreicht. Es ist dieselbe Abfrage, die auch der Versand benutzt: abgemeldete, unzustellbare und noch nicht bestätigte Empfänger zählen nicht mit. Ohne Auswahl ergibt sich die Zahl aller angemeldeten Empfänger.",
                "tags": [
                    "flowsend.insights"
                ],
                "parameters": [
                    {
                        "name": "list_uuids[]",
                        "in": "query",
                        "required": false,
                        "description": "UUIDs der Empfängerlisten",
                        "schema": {
                            "type": "array",
                            "items": []
                        }
                    },
                    {
                        "name": "include_tag_uuids[]",
                        "in": "query",
                        "required": false,
                        "description": "UUIDs der einzuschließenden Tags",
                        "schema": {
                            "type": "array",
                            "items": []
                        }
                    },
                    {
                        "name": "exclude_tag_uuids[]",
                        "in": "query",
                        "required": false,
                        "description": "UUIDs der auszuschließenden Tags",
                        "schema": {
                            "type": "array",
                            "items": []
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/context": {
            "get": {
                "operationId": "flowsupport.flowsupport-context",
                "summary": "Postfächer, Zustände und Grenzen abrufen",
                "description": "Liefert alle erreichbaren Postfächer mit der eigenen Rechtestufe, den Fähigkeiten ihres Kanals, dem Verbindungszustand und den zuweisbaren Teammitgliedern je Postfach, dazu die vier Zustände einer Unterhaltung, die beiden vergebbaren Freigabestufen sowie die Grenzen für Dateianhänge.",
                "tags": [
                    "flowsupport.context"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "inboxes": [
                                            {
                                                "uuid": "9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f",
                                                "name": "Support",
                                                "channel": "whatsapp",
                                                "status": "ready",
                                                "capabilities": {
                                                    "text": true,
                                                    "files": true,
                                                    "new_conversation": true,
                                                    "groups": true,
                                                    "mentions": true,
                                                    "label_sync": true,
                                                    "quote_reply": false,
                                                    "reactions": false,
                                                    "edit_message": false,
                                                    "delete_message": false,
                                                    "recipient_kind": "phone",
                                                    "max_text_length": 5000,
                                                    "max_files": 5,
                                                    "max_file_kilobytes": 25600
                                                },
                                                "connection": {
                                                    "status": "ready",
                                                    "last_heartbeat_at": "2026-10-08T09:14:32+02:00",
                                                    "heartbeat_age_seconds": 21,
                                                    "stale": false,
                                                    "delivers_now": true
                                                },
                                                "level": "owner",
                                                "may_send": true,
                                                "may_manage": true,
                                                "may_share": true,
                                                "new_chat_blocked": false,
                                                "assignable_users": [
                                                    {
                                                        "user_uuid": "3f8b1c6e-2d44-4a9b-8e77-5c1a0b9d3e22",
                                                        "name": "Anna Berger"
                                                    }
                                                ]
                                            }
                                        ],
                                        "conversation_statuses": [
                                            "open",
                                            "in_progress",
                                            "waiting",
                                            "done"
                                        ],
                                        "share_levels": [
                                            "read",
                                            "reply"
                                        ],
                                        "attachment_limits": {
                                            "max_files": 5,
                                            "max_kilobytes": 25600,
                                            "mime_types": [
                                                "image/jpeg",
                                                "application/pdf"
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/inboxes": {
            "get": {
                "operationId": "flowsupport.flowsupport-inboxes-index",
                "summary": "Postfächer auflisten",
                "description": "Alle Postfächer, die dieser Schlüssel erreicht, mit der eigenen Rechtestufe, den Fähigkeiten des Kanals, dem Verbindungszustand und den Angaben, ob gesendet, freigegeben und verwaltet werden darf.",
                "tags": [
                    "flowsupport.inboxes"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f",
                                            "name": "Support",
                                            "channel": "whatsapp",
                                            "visibility": "private",
                                            "status": "ready",
                                            "own_number": "4915100000000",
                                            "owner_uuid": "3f8b1c6e-2d44-4a9b-8e77-5c1a0b9d3e22",
                                            "owner_name": "Anna Berger",
                                            "outbound_wait_hours": 4,
                                            "max_new_chats_per_hour": 10,
                                            "max_messages_per_hour": 100,
                                            "capabilities": {
                                                "text": true,
                                                "files": true,
                                                "new_conversation": true,
                                                "groups": true,
                                                "mentions": true,
                                                "label_sync": true,
                                                "quote_reply": false,
                                                "reactions": false,
                                                "edit_message": false,
                                                "delete_message": false,
                                                "recipient_kind": "phone",
                                                "max_text_length": 5000,
                                                "max_files": 5,
                                                "max_file_kilobytes": 25600
                                            },
                                            "connection": {
                                                "status": "ready",
                                                "last_heartbeat_at": "2026-10-08T09:14:32+02:00",
                                                "heartbeat_age_seconds": 21,
                                                "stale": false,
                                                "delivers_now": true
                                            },
                                            "level": "owner",
                                            "may_send": true,
                                            "may_manage": true,
                                            "may_share": true,
                                            "new_chat_blocked": false
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/inboxes/{uuid}": {
            "get": {
                "operationId": "flowsupport.flowsupport-inboxes-show",
                "summary": "Ein Postfach abrufen",
                "description": "Ein einzelnes Postfach mit der eigenen Rechtestufe und zusätzlich den Teammitgliedern, die in diesem Postfach zuständig sein können. Ein Postfach ohne Rechtestufe antwortet mit HTTP 404.",
                "tags": [
                    "flowsupport.inboxes"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f",
                                        "name": "Support",
                                        "status": "ready",
                                        "outbound_wait_hours": 4,
                                        "max_new_chats_per_hour": 10,
                                        "max_messages_per_hour": 100,
                                        "capabilities": {
                                            "text": true,
                                            "files": true,
                                            "new_conversation": true,
                                            "groups": true,
                                            "mentions": true,
                                            "label_sync": true,
                                            "quote_reply": false,
                                            "reactions": false,
                                            "edit_message": false,
                                            "delete_message": false,
                                            "recipient_kind": "phone",
                                            "max_text_length": 5000,
                                            "max_files": 5,
                                            "max_file_kilobytes": 25600
                                        },
                                        "connection": {
                                            "status": "ready",
                                            "last_heartbeat_at": "2026-10-08T09:14:32+02:00",
                                            "heartbeat_age_seconds": 21,
                                            "stale": false,
                                            "delivers_now": true
                                        },
                                        "level": "owner",
                                        "may_send": true,
                                        "assignable_users": [
                                            {
                                                "user_uuid": "3f8b1c6e-2d44-4a9b-8e77-5c1a0b9d3e22",
                                                "name": "Anna Berger"
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "patch": {
                "operationId": "flowsupport.flowsupport-inboxes-update",
                "summary": "Ein Postfach umbenennen",
                "description": "Ändert den Namen des Postfachs und die Adresse, die es als eigene anzeigt. Beide Felder werden zusammen gesendet: fehlt die eigene Adresse, wird sie geleert. Verlangt das Recht, Postfächer zu verwalten, auch vom Eigentümer des Postfachs; ohne dieses Recht antwortet die Route mit HTTP 403.",
                "tags": [
                    "flowsupport.inboxes"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f",
                                        "name": "Kundenservice",
                                        "own_number": "4915100000000",
                                        "status": "ready",
                                        "level": "owner"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Der Name, höchstens 255 Zeichen."
                                    },
                                    "own_address": {
                                        "type": "string",
                                        "description": "Die eigene Adresse des Postfachs, bei WhatsApp die Rufnummer, höchstens 20 Zeichen. Fehlt das Feld oder ist es leer, wird die Adresse geleert. own_number wird als gleichbedeutender Name angenommen."
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/inboxes/{uuid}/pacing": {
            "put": {
                "operationId": "flowsupport.flowsupport-inboxes-pacing",
                "summary": "Den Sendetakt eines Postfachs setzen",
                "description": "Setzt die Wartefrist und die beiden Stundengrenzen. Die Grenzen lehnen nichts ab, sie bestimmen, wie schnell die Warteschlange an den Kanal übergeben wird. Alle drei Werte werden zusammen gesendet. Darf der Eigentümer des Postfachs und wer Postfächer verwalten darf. Wird das Postfach gerade verwendet, antwortet die Route mit HTTP 503 und dem Fehlercode inbox_busy; der Aufruf kann dann wiederholt werden.",
                "tags": [
                    "flowsupport.inboxes"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f",
                                        "name": "Support",
                                        "outbound_wait_hours": 24,
                                        "max_new_chats_per_hour": 20,
                                        "max_messages_per_hour": 200,
                                        "level": "owner"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "outbound_wait_hours": {
                                        "type": "integer",
                                        "description": "Wie viele Stunden eine Sendung auf den Kanal wartet, bevor sie verfällt. 1 bis 168."
                                    },
                                    "max_new_chats_per_hour": {
                                        "type": "integer",
                                        "description": "Wie viele neue Unterhaltungen das Postfach je Stunde beginnt. 1 bis 1000."
                                    },
                                    "max_messages_per_hour": {
                                        "type": "integer",
                                        "description": "Wie viele Nachrichten das Postfach je Stunde übergibt. 1 bis 1000."
                                    }
                                },
                                "required": [
                                    "outbound_wait_hours",
                                    "max_new_chats_per_hour",
                                    "max_messages_per_hour"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/inboxes/{uuid}/label-sync": {
            "get": {
                "operationId": "flowsupport.flowsupport-inbox-label-sync-show",
                "summary": "Den Label-Abgleich eines Postfachs abrufen",
                "description": "Der Stand des Abgleichs der Labels mit dem Kanal: ob er eingeschaltet ist, ob das Konto ihn unterstützt und der Bestand vollständig eingelesen wurde, sowie die Zahl der ausstehenden, fehlgeschlagenen und widersprüchlichen Übertragungen. Verlangt dasselbe Recht wie das Ändern.",
                "tags": [
                    "flowsupport.inboxes"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "enabled": false,
                                        "supported": true,
                                        "initialized": true,
                                        "resync_requested": false,
                                        "pending": 0,
                                        "failed": 0,
                                        "conflicts": 0
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowsupport.flowsupport-inbox-label-sync-update",
                "summary": "Den Label-Abgleich ein- oder ausschalten",
                "description": "Schaltet den Abgleich der Labels mit dem Kanal ein oder aus. Das erste Einschalten führt die Labels des Postfachs mit denen auf dem Gerät zusammen und verlangt deshalb device_verified. Einschalten geht erst, wenn supported und initialized wahr sind, und nur mit höchstens 20 Labels. Ausschalten verwirft ausstehende Übertragungen. Darf der Eigentümer des Postfachs und wer Postfächer verwalten darf.",
                "tags": [
                    "flowsupport.inboxes"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "enabled": true,
                                        "supported": true,
                                        "initialized": true,
                                        "resync_requested": false,
                                        "pending": 4,
                                        "failed": 0,
                                        "conflicts": 0
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "enabled": {
                                        "type": "boolean",
                                        "description": "true schaltet den Abgleich ein, false aus."
                                    },
                                    "device_verified": {
                                        "type": "boolean",
                                        "description": "Bestätigt, dass der Abgleich am Gerät mit dem echten Konto geprüft wurde. Pflicht beim ersten Einschalten, sonst ohne Bedeutung."
                                    }
                                },
                                "required": [
                                    "enabled"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/inboxes/{uuid}/shares": {
            "get": {
                "operationId": "flowsupport.flowsupport-inbox-shares-index",
                "summary": "Freigaben eines Postfachs auflisten",
                "description": "Die vergebenen Rechtestufen eines Postfachs. Das Lesen dieser Liste verlangt dasselbe Recht wie das Ändern: wer nicht freigeben darf, erfährt auch nicht, wer sonst noch Zugriff hat. Der Eigentümer erscheint hier nicht, seine Stufe folgt aus dem Postfach selbst.",
                "tags": [
                    "flowsupport.inboxes"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "user_uuid": "3f8b1c6e-2d44-4a9b-8e77-5c1a0b9d3e22",
                                            "name": "Anna Berger",
                                            "email": "anna@example.com",
                                            "level": "reply",
                                            "granted_by_uuid": "7a2c0e19-55bb-4c31-9f80-2d6e4f1a8c33",
                                            "created_at": "2026-09-12T08:14:00+02:00"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowsupport.flowsupport-inbox-shares-store",
                "summary": "Ein Postfach freigeben",
                "description": "Gibt das Postfach einem Teammitglied auf einer Stufe frei. Eine zweite Freigabe an dieselbe Person ändert die Stufe, statt eine zweite Zeile anzulegen, und antwortet in beiden Fällen mit HTTP 201.",
                "tags": [
                    "flowsupport.inboxes"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "user_uuid": "3f8b1c6e-2d44-4a9b-8e77-5c1a0b9d3e22",
                                        "name": "Anna Berger",
                                        "level": "reply",
                                        "created_at": "2026-09-12T08:14:00+02:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "user_uuid": {
                                        "type": "string",
                                        "description": "UUID des Teammitglieds. Eine Person außerhalb des Teams führt zu einem Validierungsfehler."
                                    },
                                    "level": {
                                        "type": "string",
                                        "description": "read oder reply. owner ist nicht vergebbar."
                                    }
                                },
                                "required": [
                                    "user_uuid",
                                    "level"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/inboxes/{uuid}/shares/{userUuid}": {
            "delete": {
                "operationId": "flowsupport.flowsupport-inbox-shares-destroy",
                "summary": "Eine Freigabe entziehen",
                "description": "Nimmt einem Teammitglied den Zugriff auf das Postfach. Eine Freigabe zu entziehen, die es nicht gibt, ist kein Fehler.",
                "tags": [
                    "flowsupport.inboxes"
                ],
                "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": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Freigabe entzogen."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/inboxes/{uuid}/suspend": {
            "post": {
                "operationId": "flowsupport.flowsupport-inboxes-suspend",
                "summary": "Ein Postfach stilllegen",
                "description": "Beendet Empfang und Sicht auf das Postfach. Nachrichten, Anhänge und Medien bleiben unverändert erhalten; entzogen wird die Sicht, nicht die Daten.",
                "tags": [
                    "flowsupport.inboxes"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Postfach stillgelegt."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/inboxes/{uuid}/request-deletion": {
            "post": {
                "operationId": "flowsupport.flowsupport-inboxes-request-deletion",
                "summary": "Ein Postfach zur Löschung vormerken",
                "description": "Merkt das Postfach mit allen Nachrichten und Medien zur Löschung vor. Dieser Schritt lässt sich über die API nicht zurücknehmen.",
                "tags": [
                    "flowsupport.inboxes"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Postfach zur Löschung vorgemerkt."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/conversations": {
            "get": {
                "operationId": "flowsupport.flowsupport-conversations-index",
                "summary": "Unterhaltungen auflisten",
                "description": "Die Unterhaltungen aller erreichbaren Postfächer, neueste Aktivität zuerst. Ohne Filter umfasst die Liste jedes Postfach, das dieser Schlüssel sieht.",
                "tags": [
                    "flowsupport.conversations"
                ],
                "parameters": [
                    {
                        "name": "inbox_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Auf ein Postfach einschränken.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "open, in_progress, waiting oder done.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "assigned_user_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Nur Unterhaltungen dieses Teammitglieds.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "label_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Nur Unterhaltungen mit diesem Label.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Sucht im Namen der Unterhaltung sowie in Name und Rufnummer der Gegenstelle.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "unread",
                        "in": "query",
                        "required": false,
                        "description": "Nur Unterhaltungen mit ungelesenen eingehenden Nachrichten.",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Einträge pro Seite, 1 bis 200, Standard 50.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Seitenzahl, Standard 1.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "c1b5a0d2-9e33-4f10-8a77-6b2c4d1e9f08",
                                            "name": "Frau Müller",
                                            "inbox_uuid": "9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f",
                                            "inbox_name": "Support",
                                            "external_thread": "4915112345678@c.us",
                                            "is_group": false,
                                            "status": "open",
                                            "assigned_user_uuid": null,
                                            "linked_client_uuid": null,
                                            "labels": [],
                                            "unread_messages": 2,
                                            "last_message_at": "2026-09-20T15:02:00+02:00"
                                        }
                                    ],
                                    "meta": {
                                        "current_page": 1,
                                        "per_page": 50,
                                        "total": 1,
                                        "last_page": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowsupport.flowsupport-conversations-store",
                "summary": "Eine Unterhaltung mit einer Rufnummer beginnen",
                "description": "Öffnet eine Unterhaltung mit einer Rufnummer, die uns nicht geschrieben hat. Drei Ausgänge: HTTP 200 mit der bereits bestehenden Unterhaltung, HTTP 201 mit der neu geöffneten Unterhaltung, oder HTTP 202 mit einem Prüfvorgang, wenn die Rufnummer erst vom Listener bei WhatsApp geprüft werden muss. Ist das Postfach nicht verbunden, sein Stundenlimit für neue Chats ausgeschöpft oder WhatsApps eigenes Kontingent erreicht, wird nichts abgelehnt: die Unterhaltung wird sofort angelegt und mit HTTP 202 samt `queued: true` und `estimated_start_at` zurückgegeben, Prüfung und Versand warten in der Warteschlange des Postfachs. Eine unlesbare, nicht erreichbare oder mehrdeutige Rufnummer antwortet mit HTTP 422.",
                "tags": [
                    "flowsupport.conversations"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "a4f7c2b8-1d09-4e66-b3a1-7c5f2e0d9b44",
                                        "status": "pending",
                                        "number": "+4915112345678",
                                        "open": true,
                                        "conversation_uuid": null
                                    },
                                    "message": "Die Rufnummer wird geprüft. Den Stand liefert der Abruf des Vorgangs."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "inbox_uuid": {
                                        "type": "string",
                                        "description": "Das Postfach, aus dem geschrieben wird. Verlangt die Berechtigung zum Senden."
                                    },
                                    "phone": {
                                        "type": "string",
                                        "description": "Die Rufnummer, wie sie getippt wurde. Die Plattform liest sie selbst in die internationale Form."
                                    },
                                    "name": {
                                        "type": "string",
                                        "description": "Anzeigename der Gegenstelle, falls bekannt."
                                    },
                                    "contact_uuid": {
                                        "type": "string",
                                        "description": "CRM-Kontakt, mit dem die Gegenstelle verknüpft wird."
                                    }
                                },
                                "required": [
                                    "inbox_uuid",
                                    "phone"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/conversations/{uuid}": {
            "get": {
                "operationId": "flowsupport.flowsupport-conversations-show",
                "summary": "Eine Unterhaltung abrufen",
                "description": "Eine Unterhaltung mit ihren Gegenstellen, Labels, CRM-Verknüpfungen, der Zahl ungelesener Nachrichten und den Rechten dieses Schlüssels an ihr.",
                "tags": [
                    "flowsupport.conversations"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "c1b5a0d2-9e33-4f10-8a77-6b2c4d1e9f08",
                                        "name": "Frau Müller",
                                        "status": "open",
                                        "unread_messages": 2,
                                        "participants": [
                                            {
                                                "uuid": "5d0a7e13-88f2-4c9b-a610-3e7b1d4c6f20",
                                                "name": "Frau Müller",
                                                "number": "+4915112345678",
                                                "external_address": "4915112345678@c.us",
                                                "linked_contact_uuid": null
                                            }
                                        ],
                                        "permissions": {
                                            "may_change_status": true,
                                            "may_assign": true,
                                            "may_link": true,
                                            "may_write_labels": true
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/conversations/{uuid}/status": {
            "put": {
                "operationId": "flowsupport.flowsupport-conversations-status",
                "summary": "Den Zustand einer Unterhaltung ändern",
                "description": "Setzt den Bearbeitungszustand. Eine abgeschlossene Unterhaltung wird von einer neuen eingehenden Nachricht automatisch wieder geöffnet.",
                "tags": [
                    "flowsupport.conversations"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "c1b5a0d2-9e33-4f10-8a77-6b2c4d1e9f08",
                                        "status": "done"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "status": {
                                        "type": "string",
                                        "description": "open, in_progress, waiting oder done."
                                    }
                                },
                                "required": [
                                    "status"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/conversations/{uuid}/assignee": {
            "put": {
                "operationId": "flowsupport.flowsupport-conversations-assignee",
                "summary": "Die Zuständigkeit setzen oder aufheben",
                "description": "Übergibt die Unterhaltung an ein Teammitglied oder hebt die Zuständigkeit auf. Ein Mitglied ohne Zugriff auf dieses Postfach wird mit HTTP 422 abgelehnt, statt stillschweigend eingetragen zu werden.",
                "tags": [
                    "flowsupport.conversations"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "c1b5a0d2-9e33-4f10-8a77-6b2c4d1e9f08",
                                        "assigned_user_uuid": "3f8b1c6e-2d44-4a9b-8e77-5c1a0b9d3e22",
                                        "assigned_user_name": "Anna Berger"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "assigned_user_uuid": {
                                        "type": "string",
                                        "description": "UUID des Teammitglieds, oder null zum Aufheben. Das Feld muss vorhanden sein."
                                    }
                                },
                                "required": [
                                    "assigned_user_uuid"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/conversations/{uuid}/labels": {
            "put": {
                "operationId": "flowsupport.flowsupport-conversations-labels",
                "summary": "Die Labels einer Unterhaltung setzen",
                "description": "Die übergebene Liste ist der gewünschte Endzustand, kein Umschalter: Fehlendes wird gesetzt, nicht Genanntes entfernt. Dieselbe Anfrage zweimal zu senden ändert deshalb nichts. Ein Label, das nicht zu diesem Postfach gehört, wird mit HTTP 422 abgelehnt.",
                "tags": [
                    "flowsupport.conversations"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "c1b5a0d2-9e33-4f10-8a77-6b2c4d1e9f08",
                                        "labels": [
                                            {
                                                "uuid": "e9b3f7a1-40cd-4b52-9d18-6a0c2f5e7b33",
                                                "name": "Dringend",
                                                "color": 3
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "label_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Liste der Label-UUIDs, höchstens 50. Eine leere Liste entfernt alle Labels."
                                    }
                                },
                                "required": [
                                    "label_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/conversations/{uuid}/links": {
            "put": {
                "operationId": "flowsupport.flowsupport-conversations-links",
                "summary": "Die CRM-Verknüpfungen setzen",
                "description": "Verknüpft die Unterhaltung mit Kunde, Projekt, Kontakt oder Lead. Ein weggelassenes Feld bleibt unverändert, ein ausdrückliches null hebt die Verknüpfung auf. Ein Datensatz, den dieser Schlüssel nicht verknüpfen darf, wird mit HTTP 422 abgelehnt, statt stillschweigend nichts zu bewirken.",
                "tags": [
                    "flowsupport.conversations"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "c1b5a0d2-9e33-4f10-8a77-6b2c4d1e9f08",
                                        "linked_client_uuid": "b7d1e4f0-3a92-4c58-88b1-2f6d0a9c4e71",
                                        "linked_project_uuid": null,
                                        "linked_contact_uuid": null,
                                        "linked_lead_uuid": null
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "client_uuid": {
                                        "type": "string",
                                        "description": "CRM-Kunde, oder null zum Aufheben."
                                    },
                                    "project_uuid": {
                                        "type": "string",
                                        "description": "Projekt des verknüpften Kunden, oder null."
                                    },
                                    "contact_uuid": {
                                        "type": "string",
                                        "description": "CRM-Kontakt, oder null."
                                    },
                                    "lead_uuid": {
                                        "type": "string",
                                        "description": "Lead, oder null."
                                    },
                                    "prefer": {
                                        "type": "string",
                                        "description": "client oder lead. Entscheidet, welche Seite gewinnt, wenn beides gesetzt wird. Standard ist client."
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/conversations/{uuid}/read": {
            "post": {
                "operationId": "flowsupport.flowsupport-conversations-read",
                "summary": "Eine Unterhaltung als gelesen markieren",
                "description": "Setzt die Leseposition auf die neueste Nachricht. Die Antwort nennt die verbleibende Zahl ungelesener Nachrichten.",
                "tags": [
                    "flowsupport.conversations"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "unread_messages": 0
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/conversations/{uuid}/messages": {
            "get": {
                "operationId": "flowsupport.flowsupport-messages-index",
                "summary": "Den Verlauf einer Unterhaltung abrufen",
                "description": "Die Nachrichten einer Unterhaltung, neueste zuerst. Kanalinterne Protokollzeilen erscheinen nicht, genauso wenig wie in der Oberfläche. Jede Nachricht nennt ihren Kanal (channel: whatsapp oder email). E-Mails tragen zusätzlich subject, from, to und cc (Adressen als Objekte mit email und name), eigene E-Mails außerdem send_status. Bei WhatsApp-Nachrichten sind diese Felder null. Den HTML-Inhalt und den Quelltext einer E-Mail liefern die beiden Endpunkte /messages/{uuid}/html und /messages/{uuid}/raw.",
                "tags": [
                    "flowsupport.messages"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Einträge pro Seite, 1 bis 200, Standard 50.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Seitenzahl, Standard 1.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "2e8c1f04-77ab-4d39-9c52-0b4a6e3d15f7",
                                            "conversation_uuid": "c1b5a0d2-9e33-4f10-8a77-6b2c4d1e9f08",
                                            "from_me": false,
                                            "type": "chat",
                                            "body": "Guten Tag, ist meine Rechnung angekommen?",
                                            "revoked": false,
                                            "sender_uuid": "5d0a7e13-88f2-4c9b-a610-3e7b1d4c6f20",
                                            "sender_name": "Frau Müller",
                                            "attachments": [],
                                            "sent_at": "2026-09-20T15:02:00+02:00",
                                            "channel": "whatsapp",
                                            "subject": null,
                                            "from": null,
                                            "to": null,
                                            "cc": null,
                                            "send_status": null
                                        },
                                        {
                                            "uuid": "6a1f9d27-3c84-4e5b-b2a0-9d7e4c1f8b63",
                                            "conversation_uuid": "e4c2a7f1-5b98-4d03-8e16-2f9a0c7b3d54",
                                            "from_me": false,
                                            "type": "email",
                                            "body": "Hallo, wann kommt die Rechnung?",
                                            "revoked": false,
                                            "sender_uuid": "7b3e1c90-4d26-4a8f-9e51-0c6d2b8a4f17",
                                            "sender_name": "Klara Kundin",
                                            "attachments": [],
                                            "sent_at": "2026-09-20T14:40:00+02:00",
                                            "channel": "email",
                                            "subject": "Frage zur Rechnung",
                                            "from": {
                                                "email": "kundin@kunde.example",
                                                "name": "Klara Kundin"
                                            },
                                            "to": [
                                                {
                                                    "email": "support@firma.example",
                                                    "name": null
                                                }
                                            ],
                                            "cc": [],
                                            "send_status": null
                                        }
                                    ],
                                    "meta": {
                                        "current_page": 1,
                                        "per_page": 50,
                                        "total": 2,
                                        "last_page": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowsupport.flowsupport-messages-store",
                "summary": "Eine Antwort senden",
                "description": "WhatsApp: legt eine Antwort in die Zustellwarteschlange und antwortet mit HTTP 202. Text und Dateien werden zu je einem eigenen Eintrag. E-Mail: übergibt die Antwort sofort an den Versand des E-Mail-Kontos und antwortet mit HTTP 202 und der eigenen Nachricht ({\"success\": true, \"data\": {\"channel\": \"email\", \"message_uuid\": \"...\", \"subject\": \"Re: Frage zur Rechnung\", \"send_status\": \"queued\", \"message\": {...}}}); message hat die Form eines Eintrags aus dem Verlauf. Ohne Empfänger in to geht eine Antwort an Reply-To, sonst an den Absender der neuesten Nachricht. „Allen antworten“ ergänzt die übrigen Empfänger aus An und Cc, eigene Adressen fallen immer heraus. Fehlt reply_all, gilt die Vorgabe des Postfachs. Ohne subject entsteht der Betreff aus der Unterhaltung („Re:“ bzw. „Fwd:“). Ist für das Konto kein Versand eingerichtet, antwortet der Aufruf mit HTTP 422 und dem Code sending_not_configured. Dateien kommen als multipart/form-data oder als UUIDs vorab hochgeladener Dateien; eine Adresse, die der Aufrufer wählt, wird nie abgerufen.",
                "tags": [
                    "flowsupport.messages"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "submission_uuid": "8b4d2c70-19ae-4f63-b0d5-7c3e1a9f6042",
                                        "items": [
                                            {
                                                "uuid": "f0a6d329-5b17-41e8-9c2d-8e4b7a0f3512",
                                                "kind": "text",
                                                "position": 0,
                                                "status": "pending",
                                                "status_label": "In der Warteschlange",
                                                "body": "Guten Tag, wir kümmern uns darum.",
                                                "attachment": null,
                                                "expires_at": "2026-09-20T19:02:00+02:00"
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "body": {
                                        "type": "string",
                                        "description": "WhatsApp: der Text, höchstens 5000 Zeichen, Pflicht, wenn keine Datei mitgeschickt wird. E-Mail: gleichbedeutend mit text."
                                    },
                                    "html": {
                                        "type": "string",
                                        "description": "Nur E-Mail: der Inhalt als HTML, höchstens 200.000 Zeichen. Wird vor dem Versand bereinigt (keine Skripte, keine aktiven Inhalte). Nicht zusammen mit text oder body. Eines von html, text oder body ist Pflicht, außer bei Dateien oder einer Weiterleitung."
                                    },
                                    "text": {
                                        "type": "string",
                                        "description": "Nur E-Mail: der Inhalt als reiner Text, höchstens 100.000 Zeichen. Zeilenumbrüche bleiben erhalten."
                                    },
                                    "subject": {
                                        "type": "string",
                                        "description": "Nur E-Mail: eigener Betreff, höchstens 998 Zeichen, Zeilenumbrüche werden zu Leerzeichen. Ohne Angabe gilt der abgeleitete Betreff."
                                    },
                                    "to": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Nur E-Mail: zusätzliche Empfänger einer Antwort bzw. die Empfänger einer Weiterleitung (dann Pflicht). Höchstens 50 gültige Adressen."
                                    },
                                    "cc": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Nur E-Mail: Empfänger in Kopie, höchstens 50 gültige Adressen."
                                    },
                                    "bcc": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Nur E-Mail: Empfänger in Blindkopie, höchstens 50 gültige Adressen."
                                    },
                                    "reply_all": {
                                        "type": "boolean",
                                        "description": "Nur E-Mail: allen antworten. Ohne Angabe gilt die Vorgabe des Postfachs. Nicht zusammen mit forward_of."
                                    },
                                    "forward_of": {
                                        "type": "string",
                                        "description": "Nur E-Mail: UUID einer Nachricht derselben Unterhaltung, die weitergeleitet wird, samt ihrer Anhänge. Eine Nachricht einer anderen Unterhaltung wird mit HTTP 422 abgelehnt."
                                    },
                                    "attachments": {
                                        "type": "array",
                                        "items": {
                                            "type": "string",
                                            "format": "binary"
                                        },
                                        "description": "WhatsApp: bis zu fünf Dateien, E-Mail: bis zu zehn. Je höchstens 25 MB, nur die im Überblick genannten Dateitypen."
                                    },
                                    "upload_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "UUIDs vorab hochgeladener Dateien dieses Postfachs, in der Reihenfolge des Versands. Zusammen mit attachments höchstens fünf (WhatsApp) bzw. zehn (E-Mail)."
                                    },
                                    "request_id": {
                                        "type": "string",
                                        "description": "UUID zur Wiederholungssicherheit. Dieselbe Anfrage mit demselben Wert liefert die ursprüngliche Einreichung zurück, statt ein zweites Mal zu senden."
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/conversations/{uuid}/messages/{outboundUuid}/retry": {
            "post": {
                "operationId": "flowsupport.flowsupport-messages-retry",
                "summary": "Eine Zustellung erneut versuchen",
                "description": "Stellt einen fehlgeschlagenen oder abgelaufenen Eintrag zurück in die Warteschlange. Ein Eintrag in einem anderen Zustand wird mit HTTP 409 abgelehnt.",
                "tags": [
                    "flowsupport.messages"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "outboundUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Erneuter Zustellversuch angestoßen.",
                                    "data": {
                                        "uuid": "f0a6d329-5b17-41e8-9c2d-8e4b7a0f3512",
                                        "status": "pending"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/conversations/{uuid}/messages/{outboundUuid}/cancel": {
            "post": {
                "operationId": "flowsupport.flowsupport-messages-cancel",
                "summary": "Eine Zustellung abbrechen",
                "description": "Bricht einen noch nicht abgeschickten Eintrag ab. Ein bereits zugestellter Eintrag wird mit HTTP 409 abgelehnt.",
                "tags": [
                    "flowsupport.messages"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "outboundUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Ausgehende Nachricht abgebrochen.",
                                    "data": {
                                        "uuid": "f0a6d329-5b17-41e8-9c2d-8e4b7a0f3512",
                                        "status": "cancelled"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/messages/search": {
            "get": {
                "operationId": "flowsupport.flowsupport-messages-search",
                "summary": "Nachrichten durchsuchen",
                "description": "Volltextsuche über die Nachrichtentexte aller erreichbaren Postfächer. Suchbegriffe unter drei Zeichen stehen nicht im Index und liefern nichts. Ist der Index nicht verfügbar, meldet die Antwort available: false statt eines Fehlers.",
                "tags": [
                    "flowsupport.messages"
                ],
                "parameters": [
                    {
                        "name": "q",
                        "in": "query",
                        "required": true,
                        "description": "Der Suchbegriff.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Treffer pro Seite, 1 bis 200, Standard 50.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Seitenzahl, Standard 1.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "available": true,
                                    "data": [
                                        {
                                            "uuid": "2e8c1f04-77ab-4d39-9c52-0b4a6e3d15f7",
                                            "conversation_uuid": "c1b5a0d2-9e33-4f10-8a77-6b2c4d1e9f08",
                                            "body": "Die Rechnung liegt bei.",
                                            "sent_at": "2026-09-20T15:02:00+02:00"
                                        }
                                    ],
                                    "meta": {
                                        "current_page": 1,
                                        "per_page": 50,
                                        "has_more": false
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/messages/{uuid}/attachments/{attachmentUuid}/download": {
            "get": {
                "operationId": "flowsupport.flowsupport-messages-attachment-download",
                "summary": "Einen Anhang abrufen",
                "description": "Liefert eine zeitlich begrenzte Adresse für die Datei eines Anhangs, gültig für 15 Minuten. Der Anhang einer widerrufenen Nachricht antwortet mit HTTP 404.",
                "tags": [
                    "flowsupport.messages"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "attachmentUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "variant",
                        "in": "query",
                        "required": false,
                        "description": "original, thumb oder playback. Standard ist original; fehlt die gewünschte Fassung, wird das Original geliefert.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "url": "https://media.example.com/9d2f4c1a/attachments/bild.jpg?signature=...",
                                        "expires_in": 900,
                                        "mime_type": "image/jpeg",
                                        "filename": "bild.jpg"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/messages/{uuid}/html": {
            "get": {
                "operationId": "flowsupport.flowsupport-messages-html",
                "summary": "Den HTML-Inhalt einer E-Mail abrufen",
                "description": "Liefert den bereinigten HTML-Inhalt einer E-Mail als eigenständiges Dokument (Content-Type: text/html; charset=utf-8). Eine strenge Content-Security-Policy verhindert Skripte, Formulare, das Einbetten in fremde Seiten und jedes Nachladen, auch von externen Bildern. Ist der HTML-Inhalt zu groß für die Ablage, enthält das Dokument den Volltext. Eine WhatsApp-Nachricht antwortet mit HTTP 404.",
                "tags": [
                    "flowsupport.messages"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/octet-stream": {
                                "schema": {
                                    "type": "string",
                                    "format": "binary"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/messages/{uuid}/raw": {
            "get": {
                "operationId": "flowsupport.flowsupport-messages-raw",
                "summary": "Den Quelltext einer E-Mail herunterladen",
                "description": "Lädt die Originalnachricht im Format RFC 822 herunter (Content-Type: message/rfc822, Dateiname .eml). Bei einer eigenen E-Mail ist das bis zum Abgleich mit dem Ordner „Gesendet“ die Fassung, die versendet wurde. Eine WhatsApp-Nachricht oder eine Nachricht ohne gespeicherten Quelltext antwortet mit HTTP 404.",
                "tags": [
                    "flowsupport.messages"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/octet-stream": {
                                "schema": {
                                    "type": "string",
                                    "format": "binary"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/inboxes/{uuid}/uploads": {
            "post": {
                "operationId": "flowsupport.flowsupport-uploads-store",
                "summary": "Eine Datei vorab hochladen",
                "description": "Nimmt eine Datei als multipart/form-data entgegen und hält sie 60 Minuten für dieses Postfach bereit. Die zurückgegebene uuid wird beim Senden oder an einer Notiz unter upload_uuids genannt. Verlangt mindestens die Stufe reply. Es gelten die Grenzen des Versands: höchstens 25 MB und die im Überblick genannten Dateitypen. Dieselbe Datei erneut hochgeladen liefert denselben Eintrag.",
                "tags": [
                    "flowsupport.messages"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "3f9a1c52-6d0e-4b87-a2f4-1c7e9b5d0a36",
                                        "inbox_uuid": "9d2f4c1a-6b3e-4a17-8f0d-2c5b7e9a1f34",
                                        "filename": "angebot.pdf",
                                        "mime_type": "application/pdf",
                                        "size": 184223,
                                        "expired": false,
                                        "expires_at": "2026-09-20T16:02:00+02:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "file": {
                                        "type": "string",
                                        "format": "binary",
                                        "description": "Die Datei."
                                    }
                                },
                                "required": [
                                    "file"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/inboxes/{uuid}/uploads/inline": {
            "post": {
                "operationId": "flowsupport.flowsupport-uploads-store-inline",
                "summary": "Eine kleine Datei als Base64 vorab hochladen",
                "description": "Wie der Upload als multipart, aber mit dem Inhalt als Base64 in einem JSON-Rumpf. Gedacht für Aufrufer ohne multipart. Der Dateityp wird am Inhalt erkannt, nicht am Namen. Die Größe ist auf rund 2,8 MB begrenzt; größere Dateien nimmt der Upload als multipart.",
                "tags": [
                    "flowsupport.messages"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "3f9a1c52-6d0e-4b87-a2f4-1c7e9b5d0a36",
                                        "inbox_uuid": "9d2f4c1a-6b3e-4a17-8f0d-2c5b7e9a1f34",
                                        "filename": "foto.jpg",
                                        "mime_type": "image/jpeg",
                                        "size": 48211,
                                        "expired": false,
                                        "expires_at": "2026-09-20T16:02:00+02:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "filename": {
                                        "type": "string",
                                        "description": "Der Dateiname, wie ihn der Empfänger sehen soll, höchstens 180 Zeichen."
                                    },
                                    "content_base64": {
                                        "type": "string",
                                        "description": "Der Dateiinhalt als Standard-Base64. Ein data:-Präfix und Leerraum sind erlaubt."
                                    }
                                },
                                "required": [
                                    "filename",
                                    "content_base64"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/uploads/{uuid}": {
            "get": {
                "operationId": "flowsupport.flowsupport-uploads-show",
                "summary": "Eine vorab hochgeladene Datei ansehen",
                "description": "Name, Typ, Größe und Ablauf einer vorab hochgeladenen Datei. Nur wer sie hochgeladen hat, sieht sie; alle anderen erhalten HTTP 404.",
                "tags": [
                    "flowsupport.messages"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "3f9a1c52-6d0e-4b87-a2f4-1c7e9b5d0a36",
                                        "filename": "angebot.pdf",
                                        "mime_type": "application/pdf",
                                        "size": 184223,
                                        "expired": false,
                                        "expires_at": "2026-09-20T16:02:00+02:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowsupport.flowsupport-uploads-destroy",
                "summary": "Eine vorab hochgeladene Datei verwerfen",
                "description": "Entfernt eine vorab hochgeladene Datei sofort, statt ihren Ablauf abzuwarten. Bereits eingereihte Sendungen und geschriebene Notizen bleiben davon unberührt.",
                "tags": [
                    "flowsupport.messages"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Datei verworfen."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/number-lookups/{uuid}": {
            "get": {
                "operationId": "flowsupport.flowsupport-number-lookups-show",
                "summary": "Den Stand einer Rufnummernprüfung abrufen",
                "description": "Der Stand eines Prüfvorgangs, den das Beginnen einer Unterhaltung mit HTTP 202 angelegt hat. Solange open true ist, arbeitet der Listener noch daran. Sobald eine Unterhaltung entstanden ist, nennt conversation_uuid sie.",
                "tags": [
                    "flowsupport.messages"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "a4f7c2b8-1d09-4e66-b3a1-7c5f2e0d9b44",
                                        "status": "resolved",
                                        "number": "+4915112345678",
                                        "open": false,
                                        "conversation_uuid": "c1b5a0d2-9e33-4f10-8a77-6b2c4d1e9f08",
                                        "error_code": null
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/conversations/{uuid}/notes": {
            "get": {
                "operationId": "flowsupport.flowsupport-notes-index",
                "summary": "Notizen einer Unterhaltung auflisten",
                "description": "Die internen Notizen einer Unterhaltung, neueste zuerst.",
                "tags": [
                    "flowsupport.notes"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Einträge pro Seite, 1 bis 200, Standard 50.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Seitenzahl, Standard 1.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "6c2f9b81-3e07-4a5d-9210-8f4b7c0e2d63",
                                            "conversation_uuid": "c1b5a0d2-9e33-4f10-8a77-6b2c4d1e9f08",
                                            "note": "Kundin ruft morgen zurück.",
                                            "author_uuid": "3f8b1c6e-2d44-4a9b-8e77-5c1a0b9d3e22",
                                            "author_name": "Anna Berger",
                                            "attachments": [],
                                            "edited_at": null,
                                            "created_at": "2026-09-20T15:10:00+02:00"
                                        }
                                    ],
                                    "meta": {
                                        "current_page": 1,
                                        "per_page": 50,
                                        "total": 1,
                                        "last_page": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowsupport.flowsupport-notes-store",
                "summary": "Eine Notiz schreiben",
                "description": "Legt eine interne Notiz an, mit Text, Dateien oder beidem. Verlangt mindestens die Stufe reply auf dem Postfach. Dateien werden vorab hochgeladen und hier über ihre UUIDs genannt. Konnte eine Datei nicht gespeichert werden, steht das unter warnings.",
                "tags": [
                    "flowsupport.notes"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "6c2f9b81-3e07-4a5d-9210-8f4b7c0e2d63",
                                        "note": "Kundin ruft morgen zurück.",
                                        "author_name": "Anna Berger",
                                        "created_at": "2026-09-20T15:10:00+02:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "note": {
                                        "type": "string",
                                        "description": "Der Text, höchstens 5000 Zeichen. Pflicht, wenn keine Datei genannt wird."
                                    },
                                    "upload_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "UUIDs vorab hochgeladener Dateien dieses Postfachs, höchstens fünf. Videos sind an Notizen nicht erlaubt."
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/conversations/{uuid}/notes/{noteUuid}": {
            "patch": {
                "operationId": "flowsupport.flowsupport-notes-update",
                "summary": "Eine Notiz ändern",
                "description": "Schreibt eine Notiz um. Nur die Person, die sie verfasst hat, darf das; jeder andere erhält HTTP 403.",
                "tags": [
                    "flowsupport.notes"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "noteUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "6c2f9b81-3e07-4a5d-9210-8f4b7c0e2d63",
                                        "note": "Kundin ruft übermorgen zurück.",
                                        "edited_at": "2026-09-20T16:00:00+02:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "note": {
                                        "type": "string",
                                        "description": "Der neue Text, höchstens 5000 Zeichen."
                                    }
                                },
                                "required": [
                                    "note"
                                ]
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowsupport.flowsupport-notes-destroy",
                "summary": "Eine Notiz entfernen",
                "description": "Entfernt eine Notiz. Die verfassende Person darf das, der Eigentümer des Postfachs ebenfalls.",
                "tags": [
                    "flowsupport.notes"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "noteUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Notiz entfernt."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/labels": {
            "get": {
                "operationId": "flowsupport.flowsupport-labels-index",
                "summary": "Labels auflisten",
                "description": "Die Labels aller erreichbaren Postfächer, alphabetisch.",
                "tags": [
                    "flowsupport.catalogs"
                ],
                "parameters": [
                    {
                        "name": "inbox_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Auf ein Postfach einschränken.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "e9b3f7a1-40cd-4b52-9d18-6a0c2f5e7b33",
                                            "name": "Dringend",
                                            "color": 3,
                                            "inbox_uuid": "9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowsupport.flowsupport-labels-store",
                "summary": "Ein Label anlegen",
                "description": "Legt ein Label in einem Postfach an. Verlangt mindestens die Stufe reply. Ist die Synchronisierung mit WhatsApp aktiv, gilt die Obergrenze von 20 Labels je Postfach.",
                "tags": [
                    "flowsupport.catalogs"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "e9b3f7a1-40cd-4b52-9d18-6a0c2f5e7b33",
                                        "name": "Dringend",
                                        "color": 3
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "inbox_uuid": {
                                        "type": "string",
                                        "description": "Das Postfach, zu dem das Label gehört."
                                    },
                                    "name": {
                                        "type": "string",
                                        "description": "Der Name, höchstens 100 Zeichen."
                                    },
                                    "color": {
                                        "type": "integer",
                                        "description": "Die Farbe aus der Palette des Kanals, 0 bis 19."
                                    }
                                },
                                "required": [
                                    "inbox_uuid",
                                    "name",
                                    "color"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/labels/{uuid}": {
            "patch": {
                "operationId": "flowsupport.flowsupport-labels-update",
                "summary": "Ein Label umbenennen oder umfärben",
                "description": "Ändert Name und Farbe. Das Postfach eines Labels ist nicht änderbar.",
                "tags": [
                    "flowsupport.catalogs"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "e9b3f7a1-40cd-4b52-9d18-6a0c2f5e7b33",
                                        "name": "Eilig",
                                        "color": 5
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Der Name, höchstens 100 Zeichen."
                                    },
                                    "color": {
                                        "type": "integer",
                                        "description": "Die Farbe, 0 bis 19."
                                    }
                                },
                                "required": [
                                    "name",
                                    "color"
                                ]
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowsupport.flowsupport-labels-destroy",
                "summary": "Ein Label löschen",
                "description": "Löscht das Label und entfernt es von allen Unterhaltungen des Postfachs.",
                "tags": [
                    "flowsupport.catalogs"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Label gelöscht."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/templates": {
            "get": {
                "operationId": "flowsupport.flowsupport-templates-index",
                "summary": "Antwortvorlagen auflisten",
                "description": "Die sichtbaren Textbausteine, am häufigsten benutzte zuerst. may_edit sagt, ob dieser Schlüssel die Vorlage auch ändern darf.",
                "tags": [
                    "flowsupport.catalogs"
                ],
                "parameters": [
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Einträge pro Seite, 1 bis 200, Standard 50.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Seitenzahl, Standard 1.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "1a7e5c93-6b20-4d18-8f45-9c0d3e7a2b61",
                                            "name": "Begrüßung",
                                            "content": "Guten Tag, wie können wir helfen?",
                                            "is_private": false,
                                            "inbox_uuid": null,
                                            "usage_count": 12,
                                            "author_name": "Anna Berger",
                                            "may_edit": true
                                        }
                                    ],
                                    "meta": {
                                        "current_page": 1,
                                        "per_page": 50,
                                        "total": 1,
                                        "last_page": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowsupport.flowsupport-templates-store",
                "summary": "Eine Antwortvorlage anlegen",
                "description": "Legt einen Textbaustein an. Ohne inbox_uuid gilt er teamweit. Wird er an ein Postfach gebunden, verlangt das mindestens die Stufe reply auf genau diesem Postfach.",
                "tags": [
                    "flowsupport.catalogs"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "1a7e5c93-6b20-4d18-8f45-9c0d3e7a2b61",
                                        "name": "Begrüßung",
                                        "content": "Guten Tag, wie können wir helfen?",
                                        "is_private": false,
                                        "may_edit": true
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Der Name, höchstens 120 Zeichen."
                                    },
                                    "content": {
                                        "type": "string",
                                        "description": "Der Text, höchstens 5000 Zeichen."
                                    },
                                    "is_private": {
                                        "type": "boolean",
                                        "description": "true hält die Vorlage bei ihrer Verfasserin. Standard ist false."
                                    },
                                    "inbox_uuid": {
                                        "type": "string",
                                        "description": "Bindet die Vorlage an ein Postfach."
                                    }
                                },
                                "required": [
                                    "name",
                                    "content"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/templates/{uuid}": {
            "patch": {
                "operationId": "flowsupport.flowsupport-templates-update",
                "summary": "Eine Antwortvorlage ändern",
                "description": "Schreibt Name, Text und Sichtbarkeit zusammen. Ändern darf sie die Person, die sie verfasst hat, und der Inhaber des Teams. Das Postfach einer Vorlage ist nicht änderbar.",
                "tags": [
                    "flowsupport.catalogs"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "1a7e5c93-6b20-4d18-8f45-9c0d3e7a2b61",
                                        "name": "Begrüßung kurz",
                                        "content": "Guten Tag.",
                                        "may_edit": true
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Der Name, höchstens 120 Zeichen."
                                    },
                                    "content": {
                                        "type": "string",
                                        "description": "Der Text, höchstens 5000 Zeichen."
                                    },
                                    "is_private": {
                                        "type": "boolean",
                                        "description": "Sichtbarkeit. Ohne Angabe bleibt der bisherige Wert."
                                    }
                                },
                                "required": [
                                    "name",
                                    "content"
                                ]
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowsupport.flowsupport-templates-destroy",
                "summary": "Eine Antwortvorlage löschen",
                "description": "Löscht den Textbaustein. Es gelten dieselben Rechte wie beim Ändern.",
                "tags": [
                    "flowsupport.catalogs"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Vorlage gelöscht."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/reports/open": {
            "get": {
                "operationId": "flowsupport.flowsupport-reports-open",
                "summary": "Offene Unterhaltungen",
                "description": "Was noch auf eine Antwort wartet: die Zahl der offenen Unterhaltungen, davon die unzugewiesenen, und die zwanzig zuletzt aktiven als Liste.",
                "tags": [
                    "flowsupport.reports"
                ],
                "parameters": [
                    {
                        "name": "inbox_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Auf ein Postfach einschränken.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "open": 7,
                                        "unassigned": 3,
                                        "conversations": [
                                            {
                                                "uuid": "c1b5a0d2-9e33-4f10-8a77-6b2c4d1e9f08",
                                                "name": "Frau Müller",
                                                "status": "open",
                                                "last_message_at": "2026-09-20T15:02:00+02:00"
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/reports/assignments": {
            "get": {
                "operationId": "flowsupport.flowsupport-reports-assignments",
                "summary": "Zuständigkeiten",
                "description": "Wer wie viele offene Unterhaltungen trägt, und wie viele davon auf den eigenen Schlüssel entfallen. Die Zeile mit user_uuid null sammelt die unzugewiesenen.",
                "tags": [
                    "flowsupport.reports"
                ],
                "parameters": [
                    {
                        "name": "inbox_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Auf ein Postfach einschränken.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "mine": 2,
                                        "assignments": [
                                            {
                                                "user_uuid": "3f8b1c6e-2d44-4a9b-8e77-5c1a0b9d3e22",
                                                "name": "Anna Berger",
                                                "open": 2
                                            },
                                            {
                                                "user_uuid": null,
                                                "name": null,
                                                "open": 3
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/reports/outbound": {
            "get": {
                "operationId": "flowsupport.flowsupport-reports-outbound",
                "summary": "Zustellwarteschlange",
                "description": "Die Zahl der Einträge je Zustellzustand, damit eine noch nicht zugestellte Antwort sichtbar ist, bevor eine weitere geschrieben wird. Nachrichtentexte gehören nicht dazu.",
                "tags": [
                    "flowsupport.reports"
                ],
                "parameters": [
                    {
                        "name": "inbox_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Auf ein Postfach einschränken.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "queue": {
                                            "pending": 2,
                                            "failed": 1
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos": {
            "get": {
                "operationId": "flowtasks.todos-list",
                "summary": "Todos auflisten",
                "description": "Ruft die Todos Ihres Teams cursor-paginiert ab. Ohne board_id werden nur Ihre eigenen persönlichen Todos zurückgegeben; mit board_id werden die Todos des Boards (optional weiter auf list_id eingegrenzt) zurückgegeben.",
                "tags": [
                    "flowtasks.todos"
                ],
                "parameters": [
                    {
                        "name": "type",
                        "in": "query",
                        "required": false,
                        "description": "Filter innerhalb der Ergebnismenge nach Typ: assigned (mir zugewiesen), completed (erledigt) oder created (von mir erstellt)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "completed",
                        "in": "query",
                        "required": false,
                        "description": "Filter nach Status: true oder false",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "priority",
                        "in": "query",
                        "required": false,
                        "description": "Filter nach Priorität: low, medium, high",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "board_id",
                        "in": "query",
                        "required": false,
                        "description": "Board-UUID; grenzt die Ergebnisse auf Todos dieses Boards ein (erfordert Board-Zugriff)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "list_id",
                        "in": "query",
                        "required": false,
                        "description": "Listen-UUID; nur in Kombination mit board_id, grenzt weiter auf eine Liste ein",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "required": false,
                        "description": "Cursor aus dem meta-Objekt der vorherigen Antwort für die nächste/vorherige Seite",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Ergebnisse pro Seite, 1-100 (Default 50)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "550e8400-e29b-41d4-a716-446655440000",
                                            "title": "Feature implementieren",
                                            "priority": "high",
                                            "completed": false,
                                            "list": {
                                                "uuid": "f0e1d2c3-...",
                                                "name": "In Progress"
                                            }
                                        }
                                    ],
                                    "meta": {
                                        "next_cursor": "eyJpZCI6MTIzfQ==",
                                        "prev_cursor": null,
                                        "has_more": true,
                                        "per_page": 50
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowtasks.todos-create",
                "summary": "Todo erstellen",
                "description": "Erstellt ein neues Todo. Kann persönlich (ohne list_id/board_id) oder in einem Board erstellt werden. Mit recurring_interval entsteht eine Serie, also ein Todo, das sich nach jedem Erledigen selbst auf den nächsten Termin setzt. Eine Serie erfordert ein due_date, sonst antwortet der Endpoint mit HTTP 422.",
                "tags": [
                    "flowtasks.todos"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "550e8400-e29b-41d4-a716-446655440000",
                                        "title": "Feature implementieren",
                                        "priority": "high",
                                        "completed": false,
                                        "list": {
                                            "uuid": "f0e1d2c3-...",
                                            "name": "In Progress"
                                        },
                                        "created_at": "2024-01-01T10:00:00Z"
                                    },
                                    "message": "Todo created successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "description": "Titel des Todos (max. 255 Zeichen)"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Beschreibung (max. 65.535 Zeichen)"
                                    },
                                    "due_date": {
                                        "type": "string",
                                        "description": "Fälligkeitsdatum (ISO 8601)"
                                    },
                                    "priority": {
                                        "type": "string",
                                        "description": "Priorität: low, medium, high"
                                    },
                                    "list_id": {
                                        "type": "string",
                                        "description": "UUID der Ziel-Liste"
                                    },
                                    "board_id": {
                                        "type": "string",
                                        "description": "UUID des Ziel-Boards (ohne list_id wird die erste Liste des Boards verwendet)"
                                    },
                                    "recurring_interval": {
                                        "type": "string",
                                        "description": "Wiederholungsintervall: daily, every_2_days, weekly, every_2_weeks, monthly, every_2_months, quarterly, half_yearly, yearly. Erfordert due_date"
                                    },
                                    "assigned_to": {
                                        "type": "string",
                                        "description": "UUID des zugewiesenen Benutzers (wird ignoriert, wenn assigned_to_ids gesetzt ist)"
                                    },
                                    "assigned_to_ids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Array von Benutzer-UUIDs für Mehrfach-Zuweisung; hat Vorrang vor assigned_to"
                                    },
                                    "card_settings": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Card-Darstellung; erlaubte Keys: color (max. 32 Zeichen), labels (max. 50 Strings)"
                                    }
                                },
                                "required": [
                                    "title"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/todos/search": {
            "get": {
                "operationId": "flowtasks.todos-search",
                "summary": "Todos suchen",
                "description": "Durchsucht Titel und Beschreibung aller Todos, auf die Sie Zugriff haben (eigene persönliche Todos plus Todos aus Boards mit Ihrem Zugriff).",
                "tags": [
                    "flowtasks.todos"
                ],
                "parameters": [
                    {
                        "name": "search",
                        "in": "query",
                        "required": true,
                        "description": "Suchbegriff (1-100 Zeichen). Zeichen wie % und _ werden literal gesucht, nicht als Platzhalter",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "required": false,
                        "description": "Cursor aus dem meta-Objekt der vorherigen Antwort für die nächste/vorherige Seite",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Ergebnisse pro Seite, 1-100 (Default 50)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "550e8400-e29b-41d4-a716-446655440000",
                                            "title": "Feature implementieren",
                                            "priority": "high",
                                            "completed": false
                                        }
                                    ],
                                    "meta": {
                                        "next_cursor": "eyJpZCI6MTIzfQ==",
                                        "prev_cursor": null,
                                        "has_more": true,
                                        "per_page": 50
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/context": {
            "get": {
                "operationId": "flowtasks.todos-context",
                "summary": "Modul-Kontext abrufen",
                "description": "Liefert die schreibbaren Felder je Datensatzart mit ihren Regeln, die erlaubten Prioritäten, die Intervalle für Serienaufgaben, die Label-Farben und die Board-Rollen. Damit muss ein Client keine Maximallängen und Wertelisten fest verdrahten. Zusätzlich steht unter rights.manage_labels, ob der Schlüssel Labels verwalten darf.",
                "tags": [
                    "flowtasks.todos"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "fields": {
                                            "todo": {
                                                "title": "required|string|max:255",
                                                "priority": "nullable|in:low,medium,high"
                                            }
                                        },
                                        "priorities": [
                                            "low",
                                            "medium",
                                            "high"
                                        ],
                                        "recurring_intervals": [
                                            "daily",
                                            "weekly",
                                            "monthly"
                                        ],
                                        "label_colors": [
                                            "zinc",
                                            "red",
                                            "blue"
                                        ],
                                        "board_roles": [
                                            "owner",
                                            "admin",
                                            "member"
                                        ],
                                        "rights": {
                                            "manage_labels": true
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/{todoUuid}": {
            "get": {
                "operationId": "flowtasks.todos-show",
                "summary": "Todo abrufen",
                "description": "Ruft ein einzelnes Todo mit all seinen Details ab (inkl. Kommentare, Checklisten und Labels).",
                "tags": [
                    "flowtasks.todos"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "550e8400-e29b-41d4-a716-446655440000",
                                        "title": "Feature implementieren",
                                        "description": null,
                                        "priority": "high",
                                        "completed": false,
                                        "list": {
                                            "uuid": "f0e1d2c3-...",
                                            "name": "In Progress"
                                        },
                                        "comments": [],
                                        "created_at": "2024-01-01T10:00:00Z"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowtasks.todos-update",
                "summary": "Todo aktualisieren",
                "description": "Aktualisiert ein bestehendes Todo. Alle Felder sind optional, nur gesendete Felder werden geändert. list_id:null ist nicht zulässig; zum expliziten Lösen vom Board dient der Detach-Endpoint. Validierungsfehler liefern HTTP 422 mit message und errors. Bei einer Serie (Todo mit recurring_interval) erledigt completed:true nur die aktuelle Wiederholung: Das Todo bleibt offen, sein due_date rückt um ein Intervall vor, und die erledigte Wiederholung wird als eigenes, erledigtes Todo abgelegt. data ist immer das adressierte Todo, bei einer Serie also weiterhin mit completed:false und dem neuen due_date. Die erledigte Wiederholung steht daneben im Antwortfeld completed_occurrence; in allen anderen Fällen ist es null. Wieder öffnen (completed:false) wirkt auf einfache Todos und auf erledigte Wiederholungen, die Serie selbst ist nie erledigt. Das due_date einer Serie lässt sich nicht direkt ändern (HTTP 422). Ein wiederholter Aufruf würde auch die nächste Wiederholung erledigen: Wer expected_due_date mitsendet, erhält stattdessen HTTP 409 mit dem aktuellen Termin in current_due_date, sobald die Serie bereits weitergerückt ist.",
                "tags": [
                    "flowtasks.todos"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "550e8400-e29b-41d4-a716-446655440000",
                                        "title": "Feature implementieren (aktualisiert)",
                                        "priority": "high",
                                        "completed": true,
                                        "recurring_interval": null
                                    },
                                    "completed_occurrence": null,
                                    "message": "Todo updated successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "description": "Titel (falls gesendet: required, max. 255 Zeichen)"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Beschreibung (max. 65.535 Zeichen)"
                                    },
                                    "due_date": {
                                        "type": "string",
                                        "description": "Fälligkeitsdatum"
                                    },
                                    "priority": {
                                        "type": "string",
                                        "description": "Priorität: low, medium, high"
                                    },
                                    "list_id": {
                                        "type": "string",
                                        "description": "UUID der neuen Ziel-Liste (verschiebt das Todo)"
                                    },
                                    "assigned_to": {
                                        "type": "string",
                                        "description": "UUID des zugewiesenen Benutzers (wird ignoriert, wenn assigned_to_ids gesendet ist)"
                                    },
                                    "assigned_to_ids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Array von Benutzer-UUIDs; ersetzt die komplette Zuweisungsliste"
                                    },
                                    "completed": {
                                        "type": "boolean",
                                        "description": "true erledigt das Todo, false öffnet es wieder. Bei einer Serie erledigt true nur die aktuelle Wiederholung"
                                    },
                                    "recurring_interval": {
                                        "type": "string",
                                        "description": "Wiederholungsintervall: daily, every_2_days, weekly, every_2_weeks, monthly, every_2_months, quarterly, half_yearly, yearly. Erfordert ein due_date; null beendet die Serie"
                                    },
                                    "expected_due_date": {
                                        "type": "string",
                                        "description": "Nur beim Erledigen einer Serie: der Termin (JJJJ-MM-TT), den der Aufrufer gerade sieht. Weicht er vom aktuellen due_date ab, antwortet der Endpoint mit HTTP 409 und erledigt nichts"
                                    },
                                    "card_settings": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Card-Darstellung; erlaubte Keys: color (max. 32 Zeichen), labels (max. 50 Strings)"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowtasks.todos-delete",
                "summary": "Todo löschen",
                "description": "Löscht ein Todo unwiderruflich.",
                "tags": [
                    "flowtasks.todos"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Todo deleted successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/{todoUuid}/duplicate": {
            "post": {
                "operationId": "flowtasks.todos-duplicate",
                "summary": "Todo duplizieren",
                "description": "Erstellt eine Kopie eines Todos. Checklisten, Labels und Zuweisungen werden standardmäßig mitkopiert; über die Body-Parameter abschaltbar.",
                "tags": [
                    "flowtasks.todos"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
                                        "title": "Feature implementieren",
                                        "priority": "high",
                                        "completed": false
                                    },
                                    "message": "Todo duplicated successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "include_checklists": {
                                        "type": "boolean",
                                        "description": "Checklisten mitkopieren (Default true)"
                                    },
                                    "include_labels": {
                                        "type": "boolean",
                                        "description": "Labels mitkopieren (Default true)"
                                    },
                                    "include_assignments": {
                                        "type": "boolean",
                                        "description": "Zugewiesene Benutzer mitkopieren (Default true)"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/{todoUuid}/move": {
            "put": {
                "operationId": "flowtasks.todos-move",
                "summary": "Todo verschieben",
                "description": "Verschiebt ein Todo in eine andere Board-Liste, mit position an einen Index unter den offenen Todos (lückenlos neu nummeriert). Erfordert Zugriff auf das Board der Ziel-Liste. sort_order und position zusammen ergeben HTTP 422, position für ein erledigtes Todo ebenfalls.",
                "tags": [
                    "flowtasks.todos"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "550e8400-e29b-41d4-a716-446655440000",
                                        "title": "Feature implementieren",
                                        "list": {
                                            "uuid": "1a2b3c4d-...",
                                            "name": "Done"
                                        }
                                    },
                                    "message": "Todo moved successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "list_uuid": {
                                        "type": "string",
                                        "description": "UUID der Ziel-Liste"
                                    },
                                    "position": {
                                        "type": "integer",
                                        "description": "Index unter den offenen Todos der Ziel-Liste ab 0 (0 = oben), gezählt ohne das verschobene Todo. Ein Index hinter dem Ende hängt an. Quell- und Ziel-Liste werden lückenlos ab 1 neu nummeriert. Nur für offene Todos, nicht zusammen mit sort_order."
                                    },
                                    "sort_order": {
                                        "type": "integer",
                                        "description": "Roher Sortierwert in der Ziel-Liste; Todos ab diesem Wert rücken um eins nach (bisheriges Verhalten, sonst automatisch ans Ende gesetzt). Nicht zusammen mit position."
                                    }
                                },
                                "required": [
                                    "list_uuid"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/todos/{todoUuid}/detach": {
            "post": {
                "operationId": "flowtasks.todos-detach",
                "summary": "Todo vom Board lösen",
                "description": "Löst ein Board-Todo explizit und mit Audit-Log vom Board und überführt es in die persönliche Todo-Liste des Board-Owners. Nur der aktuelle Board-Owner darf diese Aktion ausführen; sichtbare Ressourcen mit unzureichender Rolle liefern HTTP 403, nicht zugängliche Ressourcen HTTP 404.",
                "tags": [
                    "flowtasks.todos"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "550e8400-e29b-41d4-a716-446655440000",
                                        "title": "Feature implementieren",
                                        "list": null
                                    },
                                    "message": "Todo detached from board successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/boards": {
            "get": {
                "operationId": "flowtasks.boards-list",
                "summary": "Boards auflisten",
                "description": "Ruft die Boards ab, auf die der authentifizierte Benutzer Zugriff hat (nicht alle Boards des Teams), inklusive verschachtelter Listen. Cursor-paginiert.",
                "tags": [
                    "flowtasks.boards"
                ],
                "parameters": [
                    {
                        "name": "cursor",
                        "in": "query",
                        "required": false,
                        "description": "Cursor aus dem meta-Objekt der vorherigen Antwort für die nächste/vorherige Seite",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Ergebnisse pro Seite, 1-100 (Default 50)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "a1b2c3d4-...",
                                            "name": "Projekt Alpha",
                                            "description": null,
                                            "background_settings": {
                                                "color": "#0ea5e9"
                                            },
                                            "is_archived": false,
                                            "sort_order": 1,
                                            "lists": [
                                                {
                                                    "uuid": "f0e1d2c3-...",
                                                    "name": "Backlog"
                                                },
                                                {
                                                    "uuid": "1a2b3c4d-...",
                                                    "name": "In Progress"
                                                }
                                            ],
                                            "created_at": "2024-01-01T10:00:00Z"
                                        }
                                    ],
                                    "meta": {
                                        "next_cursor": "eyJpZCI6MTIzfQ==",
                                        "prev_cursor": null,
                                        "has_more": false,
                                        "per_page": 50
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowtasks.boards-create",
                "summary": "Board erstellen",
                "description": "Erstellt ein neues Board. Der erstellende Benutzer wird automatisch als Owner eingetragen.",
                "tags": [
                    "flowtasks.boards"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "a1b2c3d4-...",
                                        "name": "Projekt Alpha",
                                        "description": null,
                                        "background_settings": [],
                                        "is_archived": false,
                                        "sort_order": 1,
                                        "users_with_access": [
                                            {
                                                "uuid": "9c858901-8a57-4791-81fe-4c455b099bc9",
                                                "name": "Maria Beispiel"
                                            }
                                        ],
                                        "created_at": "2024-01-01T10:00:00Z"
                                    },
                                    "message": "Board created successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name des Boards (max. 255 Zeichen)"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Beschreibung (max. 65.535 Zeichen)"
                                    },
                                    "background_settings": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Hintergrund/Darstellung; erlaubte Keys: color (max. 32 Zeichen), image (max. 2.048 Zeichen)"
                                    },
                                    "project_id": {
                                        "type": "string",
                                        "description": "UUID eines FlowCRM-Projekts, mit dem das Board verknüpft werden soll"
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/todos/boards/{uuid}": {
            "get": {
                "operationId": "flowtasks.boards-show",
                "summary": "Board abrufen",
                "description": "Ruft ein einzelnes Board mit dem vollständigen Baum ab: Listen -> Todos -> zugewiesene Benutzer + Labels, inklusive Statistiken (total_todos, completed_todos, progress_percentage) und der Liste der Benutzer mit Zugriff.",
                "tags": [
                    "flowtasks.boards"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "a1b2c3d4-...",
                                        "name": "Projekt Alpha",
                                        "description": null,
                                        "background_settings": {
                                            "color": "#0ea5e9"
                                        },
                                        "is_archived": false,
                                        "sort_order": 1,
                                        "total_todos": 12,
                                        "completed_todos": 5,
                                        "progress_percentage": 42,
                                        "lists": [
                                            {
                                                "uuid": "f0e1d2c3-...",
                                                "name": "Backlog",
                                                "todos": []
                                            }
                                        ],
                                        "users_with_access": [
                                            {
                                                "uuid": "9c858901-8a57-4791-81fe-4c455b099bc9",
                                                "name": "Maria Beispiel",
                                                "email": "maria@example.com"
                                            }
                                        ],
                                        "created_at": "2024-01-01T10:00:00Z"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowtasks.boards-update",
                "summary": "Board aktualisieren",
                "description": "Aktualisiert Name, Beschreibung oder Hintergrund-Einstellungen eines Boards. Alle Felder sind optional, nur gesendete Felder werden geändert.",
                "tags": [
                    "flowtasks.boards"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "a1b2c3d4-...",
                                        "name": "Projekt Alpha (aktualisiert)",
                                        "description": "Neue Beschreibung",
                                        "is_archived": false
                                    },
                                    "message": "Board updated successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name (falls gesendet: required, max. 255 Zeichen)"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Beschreibung (max. 65.535 Zeichen)"
                                    },
                                    "background_settings": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Hintergrund/Darstellung; erlaubte Keys: color (max. 32 Zeichen), image (max. 2.048 Zeichen)"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowtasks.boards-delete",
                "summary": "Board löschen",
                "description": "Löscht ein Board unwiderruflich, kaskadierend über Listen, Todos, Zugriffsrechte und externe Freigaben. Owner-exklusiv: nur der Owner des Boards darf löschen; Admin und Member erhalten HTTP 403 (\"You do not have permission to perform this action on this board.\").",
                "tags": [
                    "flowtasks.boards"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Board deleted successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/boards/{uuid}/archive": {
            "put": {
                "operationId": "flowtasks.boards-archive",
                "summary": "Board archivieren/entarchivieren",
                "description": "Schaltet den Archiv-Status eines Boards um (archiviert -> aktiv oder umgekehrt). Erfordert lediglich Board-Zugriff, kein Rollen-Gate.",
                "tags": [
                    "flowtasks.boards"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "a1b2c3d4-...",
                                        "name": "Projekt Alpha",
                                        "is_archived": true
                                    },
                                    "message": "Board archived successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/boards/{uuid}/users": {
            "get": {
                "operationId": "flowtasks.boards-users-list",
                "summary": "Board-Mitglieder auflisten",
                "description": "Ruft alle Benutzer mit Zugriff auf ein Board ab.",
                "tags": [
                    "flowtasks.boards"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "9c858901-8a57-4791-81fe-4c455b099bc9",
                                            "name": "Maria Beispiel",
                                            "email": "maria@example.com"
                                        }
                                    ],
                                    "count": 1
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowtasks.boards-users-grant",
                "summary": "Board-Zugriff gewähren",
                "description": "Gewährt einem Team-Mitglied Zugriff auf ein Board. Neue oder wiederhergestellte Grants liefern HTTP 201; ein bereits aktiver, idempotenter Grant liefert HTTP 200. Neue Grants erhalten immer die Rolle Member; Rollenänderungen erfolgen ausschließlich über den role-Endpoint. Nur Owner oder Admin dürfen Zugriff gewähren; Member erhalten HTTP 403.",
                "tags": [
                    "flowtasks.boards"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "User access granted successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "user_uuid": {
                                        "type": "string",
                                        "description": "UUID des Team-Mitglieds, dem Zugriff gewährt werden soll"
                                    }
                                },
                                "required": [
                                    "user_uuid"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/todos/boards/{uuid}/users/{userUuid}": {
            "delete": {
                "operationId": "flowtasks.boards-users-revoke",
                "summary": "Board-Zugriff entziehen",
                "description": "Entzieht einem Benutzer den Zugriff auf ein Board. Nur Owner oder Admin dürfen den Zugriff eines ANDEREN Mitglieds entziehen (sonst HTTP 403 \"You do not have permission to perform this action on this board.\"); jedes Mitglied darf jedoch seinen EIGENEN Zugriff entziehen (Selbst-Entfernung). Ausnahme: der Owner kann sich nicht selbst entfernen und muss die Ownership zuerst übertragen (HTTP 403 \"The board Owner cannot remove their own access. Transfer ownership first.\"); ebenso kann der Owner niemals über diesen Endpoint durch andere entfernt werden.",
                "tags": [
                    "flowtasks.boards"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "userUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "User access revoked successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/boards/{uuid}/users/{userUuid}/role": {
            "put": {
                "operationId": "flowtasks.boards-users-update-role",
                "summary": "Board-Rolle ändern / Ownership übertragen",
                "description": "Owner-exklusive Aktion: nur der Owner des Boards darf Rollen ändern oder die Ownership übertragen - Admin und Member erhalten HTTP 403 (\"You do not have permission to perform this action on this board.\"). role=admin oder role=member ändert die Rolle des Zielbenutzers (\"User role updated successfully.\"). role=owner überträgt die Ownership atomar: der Zielbenutzer wird Owner, der bisherige Owner wird automatisch zu Admin herabgestuft (\"Board ownership transferred successfully.\"). Fehlerfälle: HTTP 404 wenn Board oder Zielbenutzer nicht gefunden werden, HTTP 422 wenn der Zielbenutzer keinen aktiven Board-Zugriff hat, HTTP 422 wenn der Owner versucht sich selbst die Ownership zu übertragen (\"You are already the Owner of this board.\"), HTTP 422 wenn versucht wird den Owner direkt via role=admin/member herabzustufen (stattdessen role=owner auf einen anderen Zielbenutzer nutzen, um die Ownership zu übertragen), sowie HTTP 409 wenn die Ownership-Übertragung durch eine gleichzeitige Änderung der Berechtigungen des aufrufenden Owners blockiert wurde (\"Ownership changed concurrently. Please retry.\" - Retry empfohlen).",
                "tags": [
                    "flowtasks.boards"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "userUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "User role updated successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "role": {
                                        "type": "string",
                                        "description": "Neue Rolle: admin, member oder owner (owner löst eine Ownership-Übertragung aus)"
                                    }
                                },
                                "required": [
                                    "role"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/todos/boards/{uuid}/lists": {
            "post": {
                "operationId": "flowtasks.lists-create",
                "summary": "Liste erstellen",
                "description": "Erstellt eine neue Liste in einem Board. Erfordert Board-Zugriff.",
                "tags": [
                    "flowtasks.lists"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "f0e1d2c3-...",
                                        "name": "Backlog",
                                        "sort_order": 1,
                                        "list_settings": [],
                                        "is_archived": false
                                    },
                                    "message": "List created successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name der Liste (max. 255 Zeichen)"
                                    },
                                    "list_settings": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Listen-Darstellung; erlaubte Keys: color (max. 32 Zeichen), label (max. 255 Zeichen)"
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                }
            },
            "get": {
                "operationId": "flowtasks.lists-index",
                "summary": "Listen eines Boards auflisten",
                "description": "Ruft die Listen eines Boards seitenweise ab, jeweils mit der Anzahl ihrer Todos. Anders als der Board-Baum liefert diese Route nur die Spalten und bleibt damit auch bei tausenden Karten nutzbar.",
                "tags": [
                    "flowtasks.lists"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "archived",
                        "in": "query",
                        "required": false,
                        "description": "Grenzt auf archivierte (true) oder aktive (false) Listen ein",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Seitenzahl, ab 1",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Einträge pro Seite, 1-200 (Standard 50)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "f0e1d2c3-...",
                                            "board_uuid": "a1b2c3d4-...",
                                            "name": "Backlog",
                                            "sort_order": 1,
                                            "is_archived": false,
                                            "todos_count": 12
                                        }
                                    ],
                                    "meta": {
                                        "current_page": 1,
                                        "per_page": 50,
                                        "total": 3,
                                        "last_page": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/boards/{uuid}/lists/{listUuid}": {
            "get": {
                "operationId": "flowtasks.lists-show",
                "summary": "Liste abrufen",
                "description": "Ruft eine einzelne Liste mit ihren Todos (inklusive zugewiesener Benutzer und Labels) ab. Dies ist der reale Endpoint zum Abrufen einer einzelnen Liste - es existiert kein Endpoint zum Auflisten aller Listen eines Boards separat vom Board selbst (dafür GET /todos/boards/{uuid}, das Board inklusive aller Listen liefert).",
                "tags": [
                    "flowtasks.lists"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "listUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "f0e1d2c3-...",
                                        "name": "Backlog",
                                        "sort_order": 1,
                                        "list_settings": [],
                                        "is_archived": false,
                                        "todos": [
                                            {
                                                "uuid": "550e8400-e29b-41d4-a716-446655440000",
                                                "title": "Feature implementieren",
                                                "priority": "high",
                                                "completed": false
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowtasks.lists-update",
                "summary": "Liste aktualisieren",
                "description": "Aktualisiert Name oder list_settings einer Liste. Alle Felder sind optional, nur gesendete Felder werden geändert.",
                "tags": [
                    "flowtasks.lists"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "listUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "f0e1d2c3-...",
                                        "name": "Backlog (umbenannt)",
                                        "sort_order": 1,
                                        "is_archived": false
                                    },
                                    "message": "List updated successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name (falls gesendet: required, max. 255 Zeichen)"
                                    },
                                    "list_settings": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Listen-Darstellung; erlaubte Keys: color (max. 32 Zeichen), label (max. 255 Zeichen)"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowtasks.lists-delete",
                "summary": "Liste löschen",
                "description": "Löscht eine Liste unwiderruflich; kaskadiert auf alle Todos der Liste.",
                "tags": [
                    "flowtasks.lists"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "listUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "List deleted successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/lists/{listUuid}/todos/reorder": {
            "put": {
                "operationId": "flowtasks.lists-todos-reorder",
                "summary": "Todos einer Liste neu anordnen",
                "description": "Ordnet die Todos einer Liste anhand der übergebenen UUID-Reihenfolge neu an. Das Array muss jedes Todo der Liste genau einmal enthalten; fehlende oder fremde UUIDs liefern HTTP 422 mit skipped und verändern keine Sortierung.",
                "tags": [
                    "flowtasks.lists"
                ],
                "parameters": [
                    {
                        "name": "listUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Todos reordered successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "todo_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Array aller Todo-UUIDs der Liste in der gewünschten Reihenfolge"
                                    }
                                },
                                "required": [
                                    "todo_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/todos/boards/{uuid}/lists/reorder": {
            "put": {
                "operationId": "flowtasks.lists-reorder",
                "summary": "Listen neu anordnen",
                "description": "Ordnet alle Listen eines Boards atomar und kollisionsfrei anhand der übergebenen UUID-Reihenfolge neu an. Das Array muss jede Board-Liste genau einmal enthalten; fehlende oder fremde UUIDs liefern HTTP 422 mit skipped und verändern keine Sortierung.",
                "tags": [
                    "flowtasks.lists"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Lists reordered successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "list_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Array aller Listen-UUIDs des Boards in der gewünschten Reihenfolge"
                                    }
                                },
                                "required": [
                                    "list_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/todos/boards/{uuid}/lists/{listUuid}/archive": {
            "put": {
                "operationId": "flowtasks.lists-archive",
                "summary": "Liste archivieren/entarchivieren",
                "description": "Schaltet den Archiv-Status einer Liste um (archiviert -> aktiv oder umgekehrt).",
                "tags": [
                    "flowtasks.lists"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "listUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "f0e1d2c3-...",
                                        "name": "Backlog",
                                        "is_archived": true
                                    },
                                    "message": "List archived successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/{todoUuid}/assignments": {
            "get": {
                "operationId": "flowtasks.todos-assignments-list",
                "summary": "Zuweisungen auflisten",
                "description": "Ruft alle Benutzer ab, die einem Todo aktuell zugewiesen sind.",
                "tags": [
                    "flowtasks.assignments"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "9c858901-8a57-4791-81fe-4c455b099bc9",
                                            "name": "Maria Beispiel",
                                            "email": "maria@example.com"
                                        }
                                    ],
                                    "count": 1
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowtasks.todos-assignments-add",
                "summary": "Benutzer zuweisen",
                "description": "Weist einem Todo einen weiteren Benutzer zu (additiv, bestehende Zuweisungen bleiben erhalten). Der Benutzer muss Mitglied des Teams sein.",
                "tags": [
                    "flowtasks.assignments"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "User assigned successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "user_uuid": {
                                        "type": "string",
                                        "description": "UUID des zuzuweisenden Team-Mitglieds"
                                    }
                                },
                                "required": [
                                    "user_uuid"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/todos/{todoUuid}/assignments/{userUuid}": {
            "delete": {
                "operationId": "flowtasks.todos-assignments-remove",
                "summary": "Zuweisung entfernen",
                "description": "Entfernt die Zuweisung eines Benutzers von einem Todo.",
                "tags": [
                    "flowtasks.assignments"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "userUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "User assignment removed successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/{todoUuid}/comments": {
            "get": {
                "operationId": "flowtasks.todos-comments-list",
                "summary": "Kommentare auflisten",
                "description": "Ruft alle Kommentare eines Todos ab, chronologisch aufsteigend sortiert.",
                "tags": [
                    "flowtasks.comments"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                                            "comment": "Bitte bis Freitag erledigen.",
                                            "user": {
                                                "uuid": "9c858901-8a57-4791-81fe-4c455b099bc9",
                                                "name": "Maria Beispiel"
                                            },
                                            "created_at": "2024-01-01T10:00:00Z"
                                        }
                                    ],
                                    "count": 1
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowtasks.todos-comments-create",
                "summary": "Kommentar hinzufügen",
                "description": "Fügt einem Todo einen neuen Kommentar hinzu.",
                "tags": [
                    "flowtasks.comments"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                                        "comment": "Bitte bis Freitag erledigen.",
                                        "created_at": "2024-01-01T10:00:00Z"
                                    },
                                    "message": "Comment added successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "comment": {
                                        "type": "string",
                                        "description": "Kommentartext (max. 1000 Zeichen)"
                                    }
                                },
                                "required": [
                                    "comment"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/todos/{todoUuid}/comments/{commentUuid}": {
            "put": {
                "operationId": "flowtasks.todos-comments-update",
                "summary": "Kommentar bearbeiten",
                "description": "Bearbeitet einen Kommentar. Nur der ursprüngliche Autor darf seinen eigenen Kommentar bearbeiten - andernfalls antwortet die API mit HTTP 403 \"You can only edit your own comments.\"",
                "tags": [
                    "flowtasks.comments"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "commentUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                                        "comment": "Bitte bis Montag erledigen.",
                                        "created_at": "2024-01-01T10:00:00Z"
                                    },
                                    "message": "Comment updated successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "comment": {
                                        "type": "string",
                                        "description": "Neuer Kommentartext (max. 1000 Zeichen)"
                                    }
                                },
                                "required": [
                                    "comment"
                                ]
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowtasks.todos-comments-delete",
                "summary": "Kommentar löschen",
                "description": "Löscht einen Kommentar unwiderruflich. Nur der ursprüngliche Autor darf seinen eigenen Kommentar löschen - andernfalls antwortet die API mit HTTP 403 \"You can only delete your own comments.\"",
                "tags": [
                    "flowtasks.comments"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "commentUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Comment deleted successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/labels": {
            "get": {
                "operationId": "flowtasks.labels-list",
                "summary": "Labels auflisten",
                "description": "Ruft alle Labels des Teams cursor-paginiert ab, sortiert nach sort_order.",
                "tags": [
                    "flowtasks.labels"
                ],
                "parameters": [
                    {
                        "name": "cursor",
                        "in": "query",
                        "required": false,
                        "description": "Cursor aus dem meta-Objekt der vorherigen Antwort für die nächste/vorherige Seite",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Ergebnisse pro Seite, 1-100 (Default 50)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "b2c3d4e5-...",
                                            "name": "Dringend",
                                            "color": "red",
                                            "sort_order": 1
                                        }
                                    ],
                                    "meta": {
                                        "next_cursor": "eyJpZCI6MTIzfQ==",
                                        "prev_cursor": null,
                                        "has_more": false,
                                        "per_page": 50
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowtasks.labels-create",
                "summary": "Label erstellen",
                "description": "Erstellt ein neues, team-weites Label.",
                "tags": [
                    "flowtasks.labels"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "b2c3d4e5-...",
                                        "name": "Dringend",
                                        "color": "red",
                                        "sort_order": 5
                                    },
                                    "message": "Label created successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name des Labels (max. 255 Zeichen)"
                                    },
                                    "color": {
                                        "type": "string",
                                        "description": "Farbe des Labels. Erlaubte Werte: zinc, red, orange, amber, yellow, lime, green, emerald, teal, cyan, sky, blue, indigo, violet, purple, fuchsia, pink, rose."
                                    }
                                },
                                "required": [
                                    "name",
                                    "color"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/todos/labels/{labelUuid}": {
            "get": {
                "operationId": "flowtasks.labels-show",
                "summary": "Label abrufen",
                "description": "Ruft ein einzelnes Label des Teams ab, inklusive der Anzahl der Todos, die es tragen.",
                "tags": [
                    "flowtasks.labels"
                ],
                "parameters": [
                    {
                        "name": "labelUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "b2c3d4e5-...",
                                        "name": "Dringend",
                                        "color": "red",
                                        "sort_order": 5,
                                        "todos_count": 7
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowtasks.labels-update",
                "summary": "Label aktualisieren",
                "description": "Aktualisiert Name oder Farbe eines Labels. Alle Felder sind optional, nur gesendete Felder werden geändert.",
                "tags": [
                    "flowtasks.labels"
                ],
                "parameters": [
                    {
                        "name": "labelUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "b2c3d4e5-...",
                                        "name": "Dringend (aktualisiert)",
                                        "color": "orange",
                                        "sort_order": 5
                                    },
                                    "message": "Label updated successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name (falls gesendet: required, max. 255 Zeichen)"
                                    },
                                    "color": {
                                        "type": "string",
                                        "description": "Farbe (falls gesendet: required). Erlaubte Werte: zinc, red, orange, amber, yellow, lime, green, emerald, teal, cyan, sky, blue, indigo, violet, purple, fuchsia, pink, rose."
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowtasks.labels-delete",
                "summary": "Label löschen",
                "description": "Löscht ein Label (Soft-Delete). Ein Model-Boot-Event hängt das Label vorher von allen Todos ab.",
                "tags": [
                    "flowtasks.labels"
                ],
                "parameters": [
                    {
                        "name": "labelUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Label deleted successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/{todoUuid}/labels": {
            "get": {
                "operationId": "flowtasks.todos-labels-list",
                "summary": "Labels eines Todos auflisten",
                "description": "Ruft alle Labels ab, die an ein bestimmtes Todo angehängt sind.",
                "tags": [
                    "flowtasks.labels"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "b2c3d4e5-...",
                                            "name": "Dringend",
                                            "color": "red",
                                            "sort_order": 1
                                        }
                                    ],
                                    "count": 1
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowtasks.todos-labels-attach",
                "summary": "Labels an Todo anhängen",
                "description": "Hängt ein oder mehrere Labels additiv an ein Todo an und liefert bei Erfolg HTTP 201. Wenn sich eine UUID nicht auf ein Team-Label auflösen lässt, antwortet der Endpoint mit HTTP 422 und skipped; es werden dann keine Labels angehängt.",
                "tags": [
                    "flowtasks.labels"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "b2c3d4e5-...",
                                            "name": "Dringend",
                                            "color": "red",
                                            "sort_order": 1
                                        }
                                    ],
                                    "message": "Labels attached successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "label_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Array von Label-UUIDs (mindestens 1 Eintrag)"
                                    }
                                },
                                "required": [
                                    "label_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/todos/{todoUuid}/labels/{labelUuid}": {
            "delete": {
                "operationId": "flowtasks.todos-labels-detach",
                "summary": "Label von Todo entfernen",
                "description": "Entfernt ein einzelnes Label von einem Todo (das Label selbst bleibt für das Team bestehen).",
                "tags": [
                    "flowtasks.labels"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "labelUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Label removed from todo."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/{todoUuid}/checklists": {
            "get": {
                "operationId": "flowtasks.checklists-list",
                "summary": "Checklisten auflisten",
                "description": "Ruft alle Checklisten eines Todos inklusive ihrer Items und Fortschritt (progress_percentage, total_items_count, completed_items_count) ab.",
                "tags": [
                    "flowtasks.checklists"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "c3d4e5f6-...",
                                            "name": "Vorbereitung",
                                            "sort_order": 1,
                                            "progress_percentage": 50,
                                            "total_items_count": 2,
                                            "completed_items_count": 1,
                                            "items": [
                                                {
                                                    "uuid": "d4e5f6a7-...",
                                                    "content": "Kickoff-Meeting planen",
                                                    "completed": false,
                                                    "sort_order": 1,
                                                    "assignedUser": null
                                                }
                                            ]
                                        }
                                    ],
                                    "count": 1
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowtasks.checklists-create",
                "summary": "Checkliste erstellen",
                "description": "Erstellt eine neue Checkliste auf einem Todo.",
                "tags": [
                    "flowtasks.checklists"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "c3d4e5f6-...",
                                        "name": "Vorbereitung",
                                        "sort_order": 1,
                                        "progress_percentage": 0,
                                        "total_items_count": 0,
                                        "completed_items_count": 0,
                                        "items": []
                                    },
                                    "message": "Checklist created successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name der Checkliste (max. 255 Zeichen)"
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/todos/{todoUuid}/checklists/{checklistUuid}": {
            "get": {
                "operationId": "flowtasks.checklists-show",
                "summary": "Checkliste abrufen",
                "description": "Ruft eine einzelne Checkliste eines Todos mit allen Zeilen und dem Fortschritt ab.",
                "tags": [
                    "flowtasks.checklists"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "checklistUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "c3d4e5f6-...",
                                        "todo_uuid": "550e8400-...",
                                        "name": "Vorbereitung",
                                        "sort_order": 1,
                                        "total_items_count": 2,
                                        "completed_items_count": 1,
                                        "progress_percentage": 50,
                                        "items": [
                                            {
                                                "uuid": "d4e5f6a7-...",
                                                "content": "Kickoff planen",
                                                "completed": false,
                                                "assigned_to_uuid": null
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowtasks.checklists-update",
                "summary": "Checkliste aktualisieren",
                "description": "Aktualisiert Name oder sort_order einer Checkliste. Alle Felder sind optional, nur gesendete Felder werden geändert.",
                "tags": [
                    "flowtasks.checklists"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "checklistUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "c3d4e5f6-...",
                                        "name": "Vorbereitung (aktualisiert)",
                                        "sort_order": 2,
                                        "progress_percentage": 50
                                    },
                                    "message": "Checklist updated successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name (falls gesendet: required, max. 255 Zeichen)"
                                    },
                                    "sort_order": {
                                        "type": "integer",
                                        "description": "Expliziter Sortier-Index"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowtasks.checklists-delete",
                "summary": "Checkliste löschen",
                "description": "Löscht eine Checkliste unwiderruflich, inklusive aller ihrer Items.",
                "tags": [
                    "flowtasks.checklists"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "checklistUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Checklist deleted successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/{todoUuid}/checklists/reorder": {
            "put": {
                "operationId": "flowtasks.checklists-reorder",
                "summary": "Checklisten neu anordnen",
                "description": "Ordnet die Checklisten eines Todos anhand der übergebenen UUID-Reihenfolge neu an. Das Array muss jede Checkliste des Todos genau einmal enthalten; fehlende oder fremde UUIDs liefern HTTP 422 mit skipped und verändern keine Sortierung.",
                "tags": [
                    "flowtasks.checklists"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Checklists reordered successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "checklist_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Array aller Checklisten-UUIDs des Todos in der gewünschten Reihenfolge"
                                    }
                                },
                                "required": [
                                    "checklist_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/todos/{todoUuid}/checklists/{checklistUuid}/items": {
            "get": {
                "operationId": "flowtasks.checklists-items-list",
                "summary": "Checklisten-Items auflisten",
                "description": "Ruft die Zeilen einer Checkliste seitenweise ab, optional nur die erledigten oder nur die offenen.",
                "tags": [
                    "flowtasks.checklists"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "checklistUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "completed",
                        "in": "query",
                        "required": false,
                        "description": "Grenzt auf erledigte (true) oder offene (false) Zeilen ein",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Seitenzahl, ab 1",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Einträge pro Seite, 1-200 (Standard 50)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "d4e5f6a7-...",
                                            "checklist_uuid": "c3d4e5f6-...",
                                            "content": "Kickoff planen",
                                            "completed": false,
                                            "assigned_to_uuid": null,
                                            "sort_order": 1
                                        }
                                    ],
                                    "meta": {
                                        "current_page": 1,
                                        "per_page": 50,
                                        "total": 2,
                                        "last_page": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowtasks.checklists-items-create",
                "summary": "Checklisten-Item erstellen",
                "description": "Fügt einer Checkliste ein neues Item hinzu. Wird assigned_to gesendet, muss die UUID einem Team-Mitglied entsprechen - andernfalls antwortet die API mit HTTP 404 \"Assigned user not found or not a team member.\"",
                "tags": [
                    "flowtasks.checklists"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "checklistUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "d4e5f6a7-...",
                                        "content": "Kickoff-Meeting planen",
                                        "completed": false,
                                        "sort_order": 1,
                                        "assignedUser": {
                                            "uuid": "9c858901-8a57-4791-81fe-4c455b099bc9",
                                            "name": "Maria Beispiel",
                                            "email": "maria@example.com"
                                        }
                                    },
                                    "message": "Checklist item created successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "content": {
                                        "type": "string",
                                        "description": "Text des Items (max. 500 Zeichen)"
                                    },
                                    "assigned_to": {
                                        "type": "string",
                                        "description": "UUID des zugewiesenen Team-Mitglieds"
                                    }
                                },
                                "required": [
                                    "content"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/todos/checklists/{checklistUuid}/items/reorder": {
            "put": {
                "operationId": "flowtasks.checklists-items-reorder",
                "summary": "Checklisten-Items neu anordnen",
                "description": "Ordnet die Zeilen einer Checkliste anhand der übergebenen UUID-Reihenfolge neu an. Das Array muss jede Zeile der Checkliste genau einmal enthalten; fehlende oder fremde UUIDs liefern HTTP 422 mit skipped und verändern keine Sortierung.",
                "tags": [
                    "flowtasks.checklists"
                ],
                "parameters": [
                    {
                        "name": "checklistUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Checklist items reordered successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "item_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Array aller Item-UUIDs der Checkliste in der gewünschten Reihenfolge"
                                    }
                                },
                                "required": [
                                    "item_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/todos/{todoUuid}/checklists/{checklistUuid}/items/{itemUuid}": {
            "put": {
                "operationId": "flowtasks.checklists-items-update",
                "summary": "Checklisten-Item aktualisieren",
                "description": "Aktualisiert Text oder Zuweisung eines Checklisten-Items. Alle Felder sind optional, nur gesendete Felder werden geändert; assigned_to=null entfernt eine bestehende Zuweisung.",
                "tags": [
                    "flowtasks.checklists"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "checklistUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "itemUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "d4e5f6a7-...",
                                        "content": "Kickoff-Meeting vorbereiten",
                                        "completed": false,
                                        "sort_order": 1,
                                        "assignedUser": null
                                    },
                                    "message": "Checklist item updated successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "content": {
                                        "type": "string",
                                        "description": "Text (falls gesendet: required, max. 500 Zeichen)"
                                    },
                                    "assigned_to": {
                                        "type": "string",
                                        "description": "UUID des zugewiesenen Team-Mitglieds, oder null um die Zuweisung zu entfernen"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowtasks.checklists-items-delete",
                "summary": "Checklisten-Item löschen",
                "description": "Löscht ein Checklisten-Item unwiderruflich.",
                "tags": [
                    "flowtasks.checklists"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "checklistUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "itemUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Checklist item deleted successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/{todoUuid}/checklists/{checklistUuid}/items/{itemUuid}/toggle": {
            "put": {
                "operationId": "flowtasks.checklists-items-toggle",
                "summary": "Checklisten-Item umschalten",
                "description": "Schaltet den Erledigt-Status eines Checklisten-Items um (nicht erledigt -> erledigt oder umgekehrt). Die Message unterscheidet sich je nach neuem Status: \"Checklist item marked complete.\" bzw. \"Checklist item marked incomplete.\"",
                "tags": [
                    "flowtasks.checklists"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "checklistUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "itemUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "d4e5f6a7-...",
                                        "content": "Kickoff-Meeting planen",
                                        "completed": true,
                                        "sort_order": 1,
                                        "assignedUser": null
                                    },
                                    "message": "Checklist item marked complete."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/boards/{uuid}/access": {
            "get": {
                "operationId": "flowtasks.boards-access-show",
                "summary": "Zugriffe eines Boards abrufen",
                "description": "Liefert die Mitglieder des Boards mit ihren Rollen, die eigene Rolle, den Zustand der externen Freigabe und, für Konten mit Administrationsrechten, die eingeladenen Gäste samt Freigabe-Adresse.",
                "tags": [
                    "flowtasks.sharing"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "board_uuid": "a1b2c3d4-...",
                                        "is_shared": true,
                                        "can_manage_access": true,
                                        "own_role": "owner",
                                        "members": [
                                            {
                                                "user_uuid": "e5f6a7b8-...",
                                                "name": "Anna",
                                                "role": "owner"
                                            }
                                        ],
                                        "share_url": "https://app.example.com/share/board/…",
                                        "external_invites": [
                                            {
                                                "uuid": "9f8e7d6c-...",
                                                "name": "Gast",
                                                "email": "gast@example.com"
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/boards/{uuid}/sharing/enable": {
            "post": {
                "operationId": "flowtasks.boards-sharing-enable",
                "summary": "Externe Freigabe aktivieren",
                "description": "Schaltet die externe Freigabe des Boards ein und erzeugt dabei eine Freigabe-Adresse. Ein bereits freigegebenes Board behält seine Adresse.",
                "tags": [
                    "flowtasks.sharing"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "board_uuid": "a1b2c3d4-...",
                                        "is_shared": true,
                                        "share_url": "https://app.example.com/share/board/…"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/boards/{uuid}/sharing/disable": {
            "post": {
                "operationId": "flowtasks.boards-sharing-disable",
                "summary": "Externe Freigabe deaktivieren",
                "description": "Schaltet die externe Freigabe ab und verwirft die Freigabe-Adresse. Bereits eingeladene Gäste erreichen das Board danach nicht mehr.",
                "tags": [
                    "flowtasks.sharing"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "board_uuid": "a1b2c3d4-...",
                                        "is_shared": false,
                                        "share_url": null
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/boards/{uuid}/sharing/rotate": {
            "post": {
                "operationId": "flowtasks.boards-sharing-rotate",
                "summary": "Freigabe-Adresse erneuern",
                "description": "Ersetzt die Freigabe-Adresse durch eine neue. Jede zuvor verteilte Adresse wird damit ungültig; die Gäste bleiben eingetragen und erhalten über eine neue Einladung wieder Zugang.",
                "tags": [
                    "flowtasks.sharing"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "board_uuid": "a1b2c3d4-...",
                                        "is_shared": true,
                                        "share_url": "https://app.example.com/share/board/…"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/boards/{uuid}/external-invites": {
            "post": {
                "operationId": "flowtasks.boards-external-invite",
                "summary": "Gast einladen",
                "description": "Lädt eine Person ohne Konto zum Board ein und schickt ihr eine Einladung mit einem zeitlich begrenzten Zugangslink. Ist die externe Freigabe noch nicht aktiv, wird sie dabei eingeschaltet, weil die Einladung sonst ins Leere liefe.",
                "tags": [
                    "flowtasks.sharing"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "9f8e7d6c-...",
                                        "name": "Gast",
                                        "email": "gast@example.com"
                                    },
                                    "message": "Invitation sent successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "email": {
                                        "type": "string",
                                        "description": "Mailadresse des Gastes"
                                    },
                                    "name": {
                                        "type": "string",
                                        "description": "Anzeigename des Gastes (max. 255 Zeichen)"
                                    }
                                },
                                "required": [
                                    "email",
                                    "name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/todos/boards/{uuid}/external-invites/{inviteUuid}": {
            "delete": {
                "operationId": "flowtasks.boards-external-invite-revoke",
                "summary": "Gästezugang entziehen",
                "description": "Entzieht einem Gast den Zugang zu diesem Board. Die Freigabe-Adresse des Boards bleibt unverändert.",
                "tags": [
                    "flowtasks.sharing"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "inviteUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "External access revoked successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/boards/{uuid}/transfer-ownership": {
            "post": {
                "operationId": "flowtasks.boards-transfer-ownership",
                "summary": "Eigentum übertragen",
                "description": "Übergibt das Board an ein anderes Mitglied; der bisherige Eigentümer wird Administrator. Die Zielperson muss bereits Zugriff auf das Board haben, sonst antwortet die Schnittstelle mit HTTP 422.",
                "tags": [
                    "flowtasks.sharing"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Board ownership transferred successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "user_uuid": {
                                        "type": "string",
                                        "description": "UUID des neuen Eigentümers; muss ein Mitglied des Teams und des Boards sein"
                                    }
                                },
                                "required": [
                                    "user_uuid"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/todos/{todoUuid}/files": {
            "get": {
                "operationId": "flowtasks.todos-files-list",
                "summary": "Dateien eines Todos auflisten",
                "description": "Ruft die Anhänge eines Todos seitenweise ab, neueste zuerst. Anhänge, die ein Gast über ein freigegebenes Board hochgeladen hat, sind an uploaded_by_external erkennbar.",
                "tags": [
                    "flowtasks.files"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Seitenzahl, ab 1",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Einträge pro Seite, 1-200 (Standard 50)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "7a6b5c4d-...",
                                            "todo_uuid": "550e8400-...",
                                            "name": "Angebot.pdf",
                                            "mime_type": "application/pdf",
                                            "size": 182344,
                                            "kind": "document",
                                            "uploaded_by_name": "Anna",
                                            "uploaded_by_external": false
                                        }
                                    ],
                                    "meta": {
                                        "current_page": 1,
                                        "per_page": 50,
                                        "total": 1,
                                        "last_page": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowtasks.todos-files-upload",
                "summary": "Datei an ein Todo anhängen",
                "description": "Hängt eine hochgeladene Datei an ein Todo. Der Aufruf erfolgt als multipart/form-data mit dem Feld file.",
                "tags": [
                    "flowtasks.files"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "7a6b5c4d-...",
                                        "name": "Angebot.pdf",
                                        "mime_type": "application/pdf",
                                        "size": 182344,
                                        "kind": "document"
                                    },
                                    "message": "File attached successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "file": {
                                        "type": "string",
                                        "format": "binary",
                                        "description": "Die hochzuladende Datei, höchstens 50 MB, in einem der erlaubten Formate"
                                    }
                                },
                                "required": [
                                    "file"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/todos/{todoUuid}/files/{fileUuid}/download": {
            "get": {
                "operationId": "flowtasks.todos-files-download",
                "summary": "Datei herunterladen",
                "description": "Liefert die Datei selbst als Download aus. Die Antwort ist kein JSON, sondern der Dateiinhalt mit passendem Inhaltstyp. Fehlt die gespeicherte Datei, antwortet die Schnittstelle mit HTTP 404 und dem Fehler file_missing.",
                "tags": [
                    "flowtasks.files"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "fileUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/octet-stream": {
                                "schema": {
                                    "type": "string",
                                    "format": "binary"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/{todoUuid}/files/{fileUuid}/text": {
            "get": {
                "operationId": "flowtasks.todos-files-text",
                "summary": "Text einer Datei lesen",
                "description": "Liest den Text einer angehängten Datei über dieselbe Extraktion, die auch für Chat-Anhänge greift. Formate ohne Leseverfahren antworten mit extraction_available=false statt mit einem Fehler. Lange Texte werden in Abschnitten von 20.000 Zeichen geliefert; next_offset nennt die Fortsetzung.",
                "tags": [
                    "flowtasks.files"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "fileUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "offset",
                        "in": "query",
                        "required": false,
                        "description": "Zeichenversatz für die Fortsetzung eines langen Textes (Standard 0)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "7a6b5c4d-...",
                                        "name": "Angebot.pdf",
                                        "extraction_available": true,
                                        "text": "Angebot Nr. 4711 …",
                                        "next_offset": null
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/timer/status": {
            "get": {
                "operationId": "flowtime.timer-status",
                "summary": "Timer-Status abrufen",
                "description": "Ruft den aktuellen Timer-Status ab. Zeigt an, ob ein Timer läuft und wie lange. Läuft kein Timer, ist \"is_tracking\" false und \"timer\" null. \"timer.source\" nennt die Herkunft (api, app, app_offline, geofence oder null für Web). Das Feld \"timer.entry_type\" (work|break) und \"timer.state\" (working|on_break) zeigen im Modus \"Einfache Zeiterfassung\" an, ob gerade gearbeitet oder pausiert wird.",
                "tags": [
                    "flowtime.timer"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "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": "Musterfirma GmbH"
                                            },
                                            "starts_at": "2024-01-15T09:00:00+00:00",
                                            "elapsed_seconds": 3600,
                                            "elapsed_formatted": "01:00:00",
                                            "source": "app"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/timer/start": {
            "post": {
                "operationId": "flowtime.timer-start",
                "summary": "Timer starten",
                "description": "Startet einen neuen Timer. Läuft bereits ein Timer, wird dieser NICHT ersetzt: Die API antwortet mit HTTP 409 und liefert im Feld \"data.active_timer_uuid\" die UUID des bereits laufenden Timers zurück. Stoppen oder Abbrechen Sie den aktiven Timer zuerst, bevor Sie einen neuen starten. Breaking Change: Das frühere numerische Feld \"project_id\" wird nicht mehr akzeptiert (Validierungsfehler); das Projekt wird ausschließlich über \"project_uuid\" angegeben. Im Modus \"Einfache Zeiterfassung\" sind \"description\" und \"project_uuid\" nicht erlaubt (HTTP 422), denn der Start entspricht dem Einstempeln.",
                "tags": [
                    "flowtime.timer"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "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": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "description": {
                                        "type": "string",
                                        "description": "Beschreibung der Tätigkeit (max. 500 Zeichen). Im Modus \"Einfache Zeiterfassung\" nicht erlaubt."
                                    },
                                    "project_uuid": {
                                        "type": "string",
                                        "description": "UUID des zugehörigen Projekts (teamgebunden). Im Modus \"Einfache Zeiterfassung\" nicht erlaubt."
                                    },
                                    "occurred_at": {
                                        "type": "string",
                                        "description": "Zeitpunkt der Stempelung, ISO 8601 mit Offset (z. B. 2026-11-22T08:15:00+01:00), für offline oder per Standort erfasste Stempel. Höchstens 30 Sekunden in der Zukunft, höchstens 24 Stunden zurück, nicht vor dem Beginn des offenen Eintrags und ohne offenen Eintrag nicht vor dem Ende des letzten (HTTP 422, code occurred_at_out_of_range). Standard: Serverzeit."
                                    },
                                    "client_request_id": {
                                        "type": "string",
                                        "description": "UUID als Idempotenz-Schlüssel je Benutzer. Eine Wiederholung liefert das erste Ergebnis mit \"replayed\": true, ohne erneut zu stempeln. Derselbe Schlüssel für eine andere Aktion: HTTP 409, code client_request_conflict."
                                    },
                                    "source": {
                                        "type": "string",
                                        "description": "Herkunft: api, app, app_offline oder geofence. Standard api für API-Keys, app für App-Tokens. app_offline und geofence erscheinen im Web als Hinweis am Eintrag."
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/timer/stop": {
            "post": {
                "operationId": "flowtime.timer-stop",
                "summary": "Timer stoppen",
                "description": "Stoppt den aktuell laufenden Timer und speichert den Zeiteintrag. Im Projekt-Modus müssen Projekt und Beschreibung gesetzt sein (HTTP 400). Im Modus \"Einfache Zeiterfassung\" (Ausstempeln) entfallen beide Anforderungen; das gilt auch für eine laufende Pause, die dadurch beendet wird (Gehen aus der Pause). Wie bei Start und Update sind \"description\"/\"project_uuid\" dort nicht erlaubt (HTTP 422). HTTP 409, wenn sich der Status zwischenzeitlich geändert hat (z. B. parallel gestartete Pause).",
                "tags": [
                    "flowtime.timer"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "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": "Musterfirma 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": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "description": {
                                        "type": "string",
                                        "description": "Beschreibung (nur Projekt-Modus)."
                                    },
                                    "project_uuid": {
                                        "type": "string",
                                        "description": "UUID des Projekts (nur Projekt-Modus, teamgebunden)."
                                    },
                                    "occurred_at": {
                                        "type": "string",
                                        "description": "Zeitpunkt der Stempelung, ISO 8601 mit Offset (z. B. 2026-11-22T08:15:00+01:00), für offline oder per Standort erfasste Stempel. Höchstens 30 Sekunden in der Zukunft, höchstens 24 Stunden zurück, nicht vor dem Beginn des offenen Eintrags und ohne offenen Eintrag nicht vor dem Ende des letzten (HTTP 422, code occurred_at_out_of_range). Standard: Serverzeit."
                                    },
                                    "client_request_id": {
                                        "type": "string",
                                        "description": "UUID als Idempotenz-Schlüssel je Benutzer. Eine Wiederholung liefert das erste Ergebnis mit \"replayed\": true, ohne erneut zu stempeln. Derselbe Schlüssel für eine andere Aktion: HTTP 409, code client_request_conflict."
                                    },
                                    "source": {
                                        "type": "string",
                                        "description": "Herkunft: api, app, app_offline oder geofence. Standard api für API-Keys, app für App-Tokens. app_offline und geofence erscheinen im Web als Hinweis am Eintrag."
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/timer": {
            "put": {
                "operationId": "flowtime.timer-update",
                "summary": "Laufenden Timer aktualisieren",
                "description": "Aktualisiert den aktuell laufenden Timer (Beschreibung oder Projekt ändern). Breaking Change: Das frühere numerische Feld \"project_id\" wird nicht mehr akzeptiert; das Projekt wird ausschließlich über \"project_uuid\" angegeben. Im Modus \"Einfache Zeiterfassung\" (und bei laufender Pause) sind \"description\"/\"project_uuid\" nicht erlaubt (HTTP 422), nur \"starts_at\" bleibt änderbar.",
                "tags": [
                    "flowtime.timer"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "description": {
                                        "type": "string",
                                        "description": "Neue Beschreibung"
                                    },
                                    "project_uuid": {
                                        "type": "string",
                                        "description": "UUID des neuen Projekts (teamgebunden)"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowtime.timer-cancel",
                "summary": "Timer abbrechen",
                "description": "Bricht den aktuell laufenden Timer ab, ohne die Zeit zu speichern. Eine laufende Pause kann nicht abgebrochen werden (HTTP 409). Sie muss beendet werden (\"Pause beenden\") oder es wird ausgestempelt.",
                "tags": [
                    "flowtime.timer"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/timer/break/start": {
            "post": {
                "operationId": "flowtime.timer-break-start",
                "summary": "Pause starten",
                "description": "Nur im Modus \"Einfache Zeiterfassung\" (sonst HTTP 409). Schließt den laufenden Arbeits-Eintrag und öffnet atomar einen Pausen-Eintrag (entry_type=break). Pausen zählen nie als Arbeitszeit. HTTP 404 ohne laufenden Timer, HTTP 409 wenn bereits pausiert.",
                "tags": [
                    "flowtime.timer"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "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": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "occurred_at": {
                                        "type": "string",
                                        "description": "Zeitpunkt der Stempelung, ISO 8601 mit Offset (z. B. 2026-11-22T08:15:00+01:00), für offline oder per Standort erfasste Stempel. Höchstens 30 Sekunden in der Zukunft, höchstens 24 Stunden zurück, nicht vor dem Beginn des offenen Eintrags und ohne offenen Eintrag nicht vor dem Ende des letzten (HTTP 422, code occurred_at_out_of_range). Standard: Serverzeit."
                                    },
                                    "client_request_id": {
                                        "type": "string",
                                        "description": "UUID als Idempotenz-Schlüssel je Benutzer. Eine Wiederholung liefert das erste Ergebnis mit \"replayed\": true, ohne erneut zu stempeln. Derselbe Schlüssel für eine andere Aktion: HTTP 409, code client_request_conflict."
                                    },
                                    "source": {
                                        "type": "string",
                                        "description": "Herkunft: api, app, app_offline oder geofence. Standard api für API-Keys, app für App-Tokens. app_offline und geofence erscheinen im Web als Hinweis am Eintrag."
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/timer/break/stop": {
            "post": {
                "operationId": "flowtime.timer-break-stop",
                "summary": "Pause beenden",
                "description": "Nur im Modus \"Einfache Zeiterfassung\" (sonst HTTP 409). Schließt den laufenden Pausen-Eintrag und öffnet atomar einen neuen Arbeits-Eintrag. HTTP 404 ohne laufenden Timer, HTTP 409 wenn nicht pausiert.",
                "tags": [
                    "flowtime.timer"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "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": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "occurred_at": {
                                        "type": "string",
                                        "description": "Zeitpunkt der Stempelung, ISO 8601 mit Offset (z. B. 2026-11-22T08:15:00+01:00), für offline oder per Standort erfasste Stempel. Höchstens 30 Sekunden in der Zukunft, höchstens 24 Stunden zurück, nicht vor dem Beginn des offenen Eintrags und ohne offenen Eintrag nicht vor dem Ende des letzten (HTTP 422, code occurred_at_out_of_range). Standard: Serverzeit."
                                    },
                                    "client_request_id": {
                                        "type": "string",
                                        "description": "UUID als Idempotenz-Schlüssel je Benutzer. Eine Wiederholung liefert das erste Ergebnis mit \"replayed\": true, ohne erneut zu stempeln. Derselbe Schlüssel für eine andere Aktion: HTTP 409, code client_request_conflict."
                                    },
                                    "source": {
                                        "type": "string",
                                        "description": "Herkunft: api, app, app_offline oder geofence. Standard api für API-Keys, app für App-Tokens. app_offline und geofence erscheinen im Web als Hinweis am Eintrag."
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/entries": {
            "get": {
                "operationId": "flowtime.entries-list",
                "summary": "Zeiteinträge auflisten",
                "description": "Ruft alle Zeiteinträge mit optionalen Filtern ab. Jeder Eintrag trägt \"source\" (null für Web und FlowAI, sonst api, app, app_offline oder geofence).",
                "tags": [
                    "flowtime.entries"
                ],
                "parameters": [
                    {
                        "name": "start_date",
                        "in": "query",
                        "required": false,
                        "description": "Startdatum (YYYY-MM-DD)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "end_date",
                        "in": "query",
                        "required": false,
                        "description": "Enddatum (YYYY-MM-DD)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "project_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Filter nach Projekt-UUID",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "user_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Die eigene UUID ist für jedes FlowTime-Mitglied erlaubt und grenzt auf die eigenen Einträge ein. Nur für Teaminhaber (oder Mitglieder mit FlowTime-Vollzugriff): Einträge eines bestimmten Nutzers (UUID) filtern. Mitglieder mit dem Sub-Recht \"berichte\" sehen team-weite Einträge, ohne dieses Recht nur die eigenen.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "entry_type",
                        "in": "query",
                        "required": false,
                        "description": "Filter nach Eintragstyp: \"work\" oder \"break\" (Modus \"Einfache Zeiterfassung\")",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "description": "Maximale Anzahl der Einträge (1-500, Standard: 50)",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "offset",
                        "in": "query",
                        "required": false,
                        "description": "Offset für Pagination",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowtime.entries-create",
                "summary": "Zeiteintrag erstellen",
                "description": "Erstellt einen manuellen Zeiteintrag (ohne Timer). Start- und Endzeitpunkt sind Pflicht; die Dauer wird serverseitig aus der Differenz berechnet. Breaking Change: Das frühere numerische Feld \"project_id\" wird nicht mehr akzeptiert; das Projekt wird ausschließlich über \"project_uuid\" angegeben. Im Modus \"Einfache Zeiterfassung\" gilt ein anderer Vertrag: \"description\" und \"project_uuid\" sind dort NICHT erlaubt, stattdessen kann optional \"entry_type\" (work|break, Standard: work) gesetzt werden. Validierungsfehler dieses Endpunkts (auch die Modus-Verbote) antworten mit HTTP 400 und {\"success\": false, \"errors\": {...}}.",
                "tags": [
                    "flowtime.entries"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "description": {
                                        "type": "string",
                                        "description": "Bedingt: Pflicht im Projekt-Modus (max. 500 Zeichen); im Modus \"Einfache Zeiterfassung\" nicht erlaubt (HTTP 400)."
                                    },
                                    "project_uuid": {
                                        "type": "string",
                                        "description": "Bedingt: Pflicht im Projekt-Modus (Projekt-UUID, muss zum Team gehören); im Modus \"Einfache Zeiterfassung\" nicht erlaubt (HTTP 400)."
                                    },
                                    "starts_at": {
                                        "type": "string",
                                        "description": "Startzeitpunkt (ISO 8601)"
                                    },
                                    "ends_at": {
                                        "type": "string",
                                        "description": "Endzeitpunkt (ISO 8601), muss nach starts_at liegen"
                                    },
                                    "entry_type": {
                                        "type": "string",
                                        "description": "Nur im Modus \"Einfache Zeiterfassung\": \"work\" oder \"break\" (Standard: work). Im Projekt-Modus nicht erlaubt (HTTP 400)."
                                    }
                                },
                                "required": [
                                    "starts_at",
                                    "ends_at"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/entries/{uuid}": {
            "get": {
                "operationId": "flowtime.entries-show",
                "summary": "Zeiteintrag abrufen",
                "description": "Ruft einen einzelnen Zeiteintrag mit allen Details ab, einschließlich \"source\" (Herkunft wie bei der Liste).",
                "tags": [
                    "flowtime.entries"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowtime.entries-update",
                "summary": "Zeiteintrag aktualisieren",
                "description": "Aktualisiert einen bestehenden Zeiteintrag. Breaking Change: Das frühere numerische Feld \"project_id\" wird nicht mehr akzeptiert; das Projekt wird ausschließlich über \"project_uuid\" angegeben. Feldvalidierung antwortet mit HTTP 400. Stempeluhr-Einträge (Pausen, Einträge im Modus \"Einfache Zeiterfassung\" sowie abgeschlossene Anwesenheitseinträge ohne Projekt und Beschreibung) akzeptieren weder \"description\" noch \"project_uuid\" (HTTP 422), nur Start- und Endzeit sind änderbar; \"entry_type\" ist unveränderlich. Ein laufender Eintrag (Timer oder Pause) kann hier nicht bearbeitet werden (HTTP 409), dafür PUT /flowtime/timer verwenden.",
                "tags": [
                    "flowtime.entries"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "description": {
                                        "type": "string",
                                        "description": "Beschreibung"
                                    },
                                    "project_uuid": {
                                        "type": "string",
                                        "description": "Projekt-UUID (teamgebunden)"
                                    },
                                    "starts_at": {
                                        "type": "string",
                                        "description": "Startzeitpunkt (ISO 8601)"
                                    },
                                    "ends_at": {
                                        "type": "string",
                                        "description": "Endzeitpunkt (ISO 8601)"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowtime.entries-delete",
                "summary": "Zeiteintrag löschen",
                "description": "Löscht einen Zeiteintrag unwiderruflich. Ein laufender Eintrag (Timer oder Pause) kann hier nicht gelöscht werden (HTTP 409), dafür die Timer-Endpunkte (Stoppen/Abbrechen) verwenden.",
                "tags": [
                    "flowtime.entries"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/projects": {
            "get": {
                "operationId": "flowtime.projects-list",
                "summary": "Projekte auflisten",
                "description": "Listet die aktiven Projekte des Teams auf, auf die der Benutzer buchen darf. Inhaber sehen alle aktiven Projekte. Mitglieder sehen öffentliche Projekte und solche, für die sie freigeschaltet sind, versteckte nie. Inhaber und Mitglieder mit dem FlowTime-Unterrecht „Projekte“ erhalten das volle Objekt (is_public, is_billable, billable_rate, currency; Inhaber zusätzlich budget). Mitglieder ohne dieses Unterrecht erhalten dieselbe buchbare Liste nur mit uuid, name, client_name und color_code, damit sie einen Projekt-Timer beenden können (POST /flowtime/timer/stop). Projekt-Details (GET /flowtime/projects/{uuid}) bleiben dem Unterrecht vorbehalten, Anlegen und Bearbeiten wie bisher dem Inhaber (sonst HTTP 403).",
                "tags": [
                    "flowtime.projects"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f",
                                            "name": "Website Redesign",
                                            "client_name": "Musterfirma GmbH",
                                            "color_code": "#3B82F6",
                                            "is_public": true,
                                            "is_billable": false,
                                            "billable_rate": null,
                                            "currency": "EUR"
                                        }
                                    ],
                                    "count": 1
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowtime.projects-create",
                "summary": "Projekt anlegen",
                "description": "Erstellt ein neues Projekt (nur Teaminhaber oder Mitglieder mit FlowTime-Vollzugriff; alle anderen erhalten 403). Breaking Change: Der Kunde wird über client_uuid übergeben; das frühere numerische Feld client_id wird nicht mehr akzeptiert (Validierungsfehler). Nur im Projektmodus verfügbar; im Modus \"Einfache Zeiterfassung\" antwortet der Endpunkt mit HTTP 409 und dem Fehlercode mode_mismatch.",
                "tags": [
                    "flowtime.projects"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Projektname (max. 255 Zeichen)"
                                    },
                                    "client_uuid": {
                                        "type": "string",
                                        "description": "UUID des CRM-Kunden, der zum Team gehören muss"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Projektbeschreibung"
                                    },
                                    "color_code": {
                                        "type": "string",
                                        "description": "Hex-Farbe (z.B. #10B981, Standard: #3B82F6)"
                                    },
                                    "is_public": {
                                        "type": "boolean",
                                        "description": "Für alle Teammitglieder sichtbar (Standard: true)"
                                    },
                                    "is_billable": {
                                        "type": "boolean",
                                        "description": "Projekt ist abrechenbar (Standard: false)"
                                    },
                                    "billable_rate": {
                                        "type": "number",
                                        "description": "Stundensatz für die Abrechnung; Pflicht, wenn is_billable true ist (sonst Validierungsfehler mit HTTP 400), ohne Angabe Standard 0"
                                    },
                                    "currency": {
                                        "type": "string",
                                        "description": "Währungscode nach ISO 4217 (3 Zeichen, Standard: Team-Währung)"
                                    }
                                },
                                "required": [
                                    "name",
                                    "client_uuid"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/projects/{uuid}": {
            "get": {
                "operationId": "flowtime.projects-show",
                "summary": "Projekt-Details abrufen",
                "description": "Ruft Details eines einzelnen Projekts ab, inklusive Zeitstatistiken. Das Projekt wird über seine UUID adressiert; numerische IDs werden nicht mehr akzeptiert (HTTP 404).",
                "tags": [
                    "flowtime.projects"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowtime.projects-update",
                "summary": "Projekt aktualisieren",
                "description": "Aktualisiert ein bestehendes Projekt (nur Teaminhaber oder Mitglieder mit FlowTime-Vollzugriff; alle anderen erhalten 403). Das Projekt wird über seine UUID adressiert; numerische IDs werden nicht mehr akzeptiert (HTTP 404). Nur im Projektmodus verfügbar; im Modus \"Einfache Zeiterfassung\" antwortet der Endpunkt mit HTTP 409 und dem Fehlercode mode_mismatch.",
                "tags": [
                    "flowtime.projects"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Projektname (max. 255 Zeichen)"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Projektbeschreibung"
                                    },
                                    "status": {
                                        "type": "string",
                                        "description": "Projektstatus: active oder archived"
                                    },
                                    "color_code": {
                                        "type": "string",
                                        "description": "Hex-Farbe (z.B. #10B981)"
                                    },
                                    "is_public": {
                                        "type": "boolean",
                                        "description": "Für alle Teammitglieder sichtbar"
                                    },
                                    "is_hidden": {
                                        "type": "boolean",
                                        "description": "Projekt in Listen ausblenden"
                                    },
                                    "is_billable": {
                                        "type": "boolean",
                                        "description": "Projekt ist abrechenbar"
                                    },
                                    "billable_rate": {
                                        "type": "number",
                                        "description": "Stundensatz für die Abrechnung; null wird als 0 gespeichert"
                                    },
                                    "currency": {
                                        "type": "string",
                                        "description": "Währungscode nach ISO 4217 (3 Zeichen)"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowtime.projects-delete",
                "summary": "Projekt löschen",
                "description": "Entfernt ein Projekt aus FlowTime (nur Teaminhaber oder Mitglieder mit FlowTime-Vollzugriff; alle anderen erhalten 403). Wie in der Weboberfläche muss das Projekt zuvor archiviert sein, sonst antwortet die Schnittstelle mit HTTP 409 und dem Fehler project_not_archived. Ein Projekt, auf das noch Zeiteinträge gebucht sind, bleibt erhalten und antwortet mit HTTP 409 und dem Fehler project_has_entries, damit gebuchte Stunden ihr Projekt nie verlieren. Gelöscht wird nur die FlowTime-Seite des Projekts; der Kundenprojekt-Datensatz in FlowCRM bleibt unberührt.",
                "tags": [
                    "flowtime.projects"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Project deleted successfully"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/projects/{uuid}/permissions": {
            "put": {
                "operationId": "flowtime.projects-permissions",
                "summary": "Projekt-Berechtigungen setzen",
                "description": "Legt fest, welche Teammitglieder Zugriff auf ein privates Projekt haben (nur Teaminhaber oder Mitglieder mit FlowTime-Vollzugriff; alle anderen erhalten 403). Die übergebene Liste ersetzt die bestehenden Berechtigungen vollständig. Nur Nutzer, die zum Team gehören, werden übernommen. Nur im Projektmodus verfügbar; im Modus \"Einfache Zeiterfassung\" antwortet der Endpunkt mit HTTP 409 und dem Fehlercode mode_mismatch.",
                "tags": [
                    "flowtime.projects"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "user_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Liste der Nutzer-UUIDs, die Zugriff erhalten sollen",
                                        "properties": {
                                            "*": {
                                                "type": "string",
                                                "description": "Einzelne Nutzer-UUID (gültiges UUID-Format)"
                                            }
                                        }
                                    }
                                },
                                "required": [
                                    "user_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/context": {
            "get": {
                "operationId": "flowtime.flowtime-context",
                "summary": "Modul-Kontext abrufen",
                "description": "Liefert das Arbeitszeitmodell des Teams, die eigenen Sub-Rechte, die Arbeitszeitvorgaben und den Zustand der Stempeluhr. Ein Client braucht das vor dem ersten Schreibzugriff: im Modus \"Einfache Zeiterfassung\" trägt ein Eintrag weder Projekt noch Beschreibung, und die Schicht-Endpunkte stehen nur bereit, wenn das Team die Schichtplanung eingeschaltet hat. Der Zustand der Stempeluhr ist einer von clocked_out, clocked_in, on_break oder inactive. Ist der Überstunden-Schalter des Teams aus, fehlen in working_hours die Sollstunden weekly_hours und daily_hours.",
                "tags": [
                    "flowtime.reports"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "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": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/search": {
            "get": {
                "operationId": "flowtime.flowtime-search",
                "summary": "Datensätze durchsuchen",
                "description": "Durchsucht die FlowTime-Datensätze einer Art. Die Sichtbarkeit folgt den Rechten des Schlüssels: ohne Berichtsrechte erscheinen nur die eigenen Zeiteinträge, Projekte nur mit dem Sub-Recht projekte, Kunden nur für den Teaminhaber. Eine Art, die der Schlüssel nicht erreicht, antwortet mit HTTP 403 und dem Fehler record_type_not_available.",
                "tags": [
                    "flowtime.reports"
                ],
                "parameters": [
                    {
                        "name": "type",
                        "in": "query",
                        "required": true,
                        "description": "Art des Datensatzes: entry, project, client, member, shift_plan, shift_type oder shift_template",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "q",
                        "in": "query",
                        "required": false,
                        "description": "Suchbegriff; trifft den Namen des Datensatzes, bei Mitgliedern zusätzlich die Mailadresse",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "from",
                        "in": "query",
                        "required": false,
                        "description": "Nur für type=entry: frühestes Startdatum (YYYY-MM-DD)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "required": false,
                        "description": "Nur für type=entry: spätestes Startdatum (YYYY-MM-DD)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "user_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Nur für type=entry: grenzt auf die Einträge einer Person ein; fremde Personen erfordern das Sub-Recht teamberichte",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Seitenzahl, ab 1",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Einträge pro Seite, 1-200 (Standard 50)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "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": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/reports/{report}": {
            "get": {
                "operationId": "flowtime.reports-detailed",
                "summary": "Detailbericht abrufen",
                "description": "Liefert einen der vier Berichte. Der Pfadabschnitt report ist detailed, team, overtime oder logs. detailed gibt die abgeschlossenen Arbeitseinträge eines Zeitraums seitenweise zurück (Standard ist der laufende Monat) und akzeptiert from, to und user_uuid. team liefert je Teammitglied die Monatsauswertung und akzeptiert year und month. overtime gibt den Überstundensaldo der laufenden Woche zurück, standardmäßig den eigenen; eine fremde user_uuid ist dem Teaminhaber vorbehalten. Ist der Überstunden-Schalter des Teams aus, fehlt bei overtime der Schlüssel data, und im team-Bericht fehlen target_hours und overtime_reduction_hours; werden für die Person keine Überstunden erfasst, sind diese Werte null. logs gibt die Protokollzeilen des Moduls seitenweise zurück.",
                "tags": [
                    "flowtime.reports"
                ],
                "parameters": [
                    {
                        "name": "report",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "from",
                        "in": "query",
                        "required": false,
                        "description": "Nur detailed: Beginn des Zeitraums (YYYY-MM-DD), Standard Monatsbeginn",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "required": false,
                        "description": "Nur detailed: Ende des Zeitraums (YYYY-MM-DD), Standard heute",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "year",
                        "in": "query",
                        "required": false,
                        "description": "Nur team: Jahr der Auswertung, Standard laufendes Jahr",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "month",
                        "in": "query",
                        "required": false,
                        "description": "Nur team: Monat der Auswertung (1-12), Standard laufender Monat",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "user_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Für detailed und overtime: die Person, deren Zahlen gemeint sind",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Für detailed und logs: Seitenzahl, ab 1",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Für detailed und logs: Einträge pro Seite, 1-200 (Standard 50)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "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": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/stats/today": {
            "get": {
                "operationId": "flowtime.stats-today",
                "summary": "Tagesauswertung",
                "description": "Aggregierte Auswertung der heute erfassten Zeiten des Benutzers, einschließlich Pausen und Aufschlüsselung nach Projekt (data.by_project, adressiert über project_uuid).",
                "tags": [
                    "flowtime.statistics"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "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": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/stats/week": {
            "get": {
                "operationId": "flowtime.stats-week",
                "summary": "Wochenauswertung",
                "description": "Aggregierte Auswertung der laufenden Woche mit täglicher Aufschlüsselung und Projekt-Anteilen.",
                "tags": [
                    "flowtime.statistics"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "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": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/working-hours/status": {
            "get": {
                "operationId": "flowtime.working-hours-status",
                "summary": "Arbeitszeit-Status abrufen",
                "description": "Ruft die aktuelle Arbeitszeit-Bilanz des angemeldeten Nutzers ab (Tages-, Wochen- und Monatsbilanz sowie Überstunden-Saldo). Der Saldo in \"overtime_balance\" wird bei jedem Aufruf aus den erfassten Zeiten, dem Soll und den Korrekturen berechnet und nicht aus einem gespeicherten Wert gelesen. Ein Team mit ausgeschalteter Überstundenerfassung und ebenso ein Mitglied, für das keine Überstunden erfasst werden, erhält nur \"configured\" (false) und \"message\"; Einstellungen, Soll- und Saldofelder erscheinen dann gar nicht und sind nicht null. Dieselbe Form gilt, wenn keine Arbeitszeiten konfiguriert sind. Die Einstellungen können trotzdem weiterhin geschrieben werden.",
                "tags": [
                    "flowtime.working-hours"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "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": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/working-hours/settings": {
            "put": {
                "operationId": "flowtime.working-hours-settings",
                "summary": "Arbeitszeit-Einstellungen ändern",
                "description": "Veraltet, an seine Stelle tritt PUT /members/{user_uuid}. Ändert die Arbeitszeit-Einstellungen eines Teammitglieds (nur Teaminhaber oder Mitglieder mit FlowTime-Vollzugriff; alle anderen erhalten 403). Das Zielmitglied wird über \"user_uuid\" im Body identifiziert. Nur übergebene Felder werden aktualisiert. Der Endpoint schreibt über dieselbe Logik wie der Mitglieder-Endpoint und antwortet deshalb in dessen Form; nicht mehr unterstützte Felder werden hier stillschweigend ignoriert. Jede Antwort trägt die Kopfzeilen \"Deprecation: true\" und \"Sunset\".",
                "tags": [
                    "flowtime.working-hours"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "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": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "user_uuid": {
                                        "type": "string",
                                        "description": "UUID des Zielmitglieds"
                                    },
                                    "weekly_hours": {
                                        "type": "number",
                                        "description": "Wochenstunden (0-168)"
                                    },
                                    "working_days": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Arbeitstage als Zahlen 1-7 (Mo-So), mindestens ein Tag, jeder Tag höchstens einmal"
                                    },
                                    "daily_hours": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Sollstunden pro Tag (0-24)"
                                    },
                                    "track_overtime": {
                                        "type": "boolean",
                                        "description": "Überstunden erfassen; bei Angabe true oder false, nicht null"
                                    }
                                },
                                "required": [
                                    "user_uuid"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/working-hours/overtime/adjust": {
            "post": {
                "operationId": "flowtime.working-hours-overtime-adjust",
                "summary": "Überstunden-Saldo anpassen",
                "description": "Passt den Überstunden-Saldo eines Teammitglieds an (nur Teaminhaber oder Mitglieder mit FlowTime-Vollzugriff; alle anderen erhalten 403). Mit \"mode\" wird der Wert entweder addiert (add, Standard) oder absolut gesetzt (set). Der resultierende Saldo wird serverseitig auf die zulässigen Grenzen begrenzt.",
                "tags": [
                    "flowtime.working-hours"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "user_uuid": {
                                        "type": "string",
                                        "description": "UUID des Zielmitglieds"
                                    },
                                    "minutes": {
                                        "type": "integer",
                                        "description": "Anzahl Minuten (bei mode=add Delta, bei mode=set Zielwert)"
                                    },
                                    "mode": {
                                        "type": "string",
                                        "description": "add (addieren, Standard) oder set (absolut setzen)"
                                    },
                                    "reason": {
                                        "type": "string",
                                        "description": "Begründung für den Audit-Trail (max. 500 Zeichen)"
                                    }
                                },
                                "required": [
                                    "user_uuid",
                                    "minutes"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/working-hours/history": {
            "get": {
                "operationId": "flowtime.working-hours-history",
                "summary": "Arbeitszeit-Verlauf abrufen",
                "description": "Ruft den tagesweisen Arbeitszeit-Verlauf ab. Standardmäßig die aktuelle Woche des angemeldeten Nutzers. Teaminhaber und Mitglieder mit FlowTime-Vollzugriff können über \"user_uuid\" den Verlauf eines anderen Mitglieds abrufen. Der Zeitraum ist auf maximal 31 Tage begrenzt. \"summary\" fasst Soll und Ist der angefragten Tage zusammen; \"overtime_balance\" ist davon getrennt der laufende Überstunden-Saldo zum heutigen Tag, bei jedem Aufruf berechnet. Ein Team mit ausgeschalteter Überstundenerfassung und ebenso ein Mitglied, für das keine Überstunden erfasst werden, erhält nur \"configured\" (false) und eine leere Tagesliste; maßgeblich ist das abgefragte Mitglied. Zeitraum, Zusammenfassung und Saldo erscheinen dann gar nicht und sind nicht null. Die Einstellungen können trotzdem weiterhin geschrieben werden.",
                "tags": [
                    "flowtime.working-hours"
                ],
                "parameters": [
                    {
                        "name": "start_date",
                        "in": "query",
                        "required": false,
                        "description": "Startdatum (YYYY-MM-DD, Standard: Wochenanfang)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "end_date",
                        "in": "query",
                        "required": false,
                        "description": "Enddatum (YYYY-MM-DD, muss >= start_date sein)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "user_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Nur für Teaminhaber (oder Mitglieder mit FlowTime-Vollzugriff): Verlauf eines bestimmten Nutzers",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "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": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/members": {
            "get": {
                "operationId": "flowtime.members-index",
                "summary": "Mitglieder auflisten",
                "description": "Listet alle Mitglieder des Teams mit Arbeitszeit, Vergütung, Urlaubskontingent und Überstundensaldo (nur Teaminhaber oder Mitglieder mit FlowTime-Vollzugriff; alle anderen erhalten 403). Die Vergütung ist die zum Stichtag gültige Zeile der Vergütungshistorie; ist für ein Mitglied keine Zeile hinterlegt, stehen alle Werte des Blocks als null in der Antwort, nie als 0. Der Urlaubsblock gilt für das Jahr des Stichtags, der Überstundenblock ist der Saldo bis zum Stichtag. Kann FlowTime einen Wert nicht berechnen, etwa für ein Mitglied ohne FlowTime-Zugang, steht er als null im Block. Werden für ein Mitglied keine Überstunden erfasst (track_overtime false), sind alle Werte seines Überstundenblocks null. Hat das Team die Überstunden ausgeschaltet, fehlen in jedem Eintrag die Felder data.*.overtime, data.*.working_time.weekly_hours und data.*.working_time.daily_hours vollständig; Arbeitstage, track_overtime, Vergütung und Urlaub bleiben.",
                "tags": [
                    "flowtime.members"
                ],
                "parameters": [
                    {
                        "name": "date",
                        "in": "query",
                        "required": false,
                        "description": "Stichtag (YYYY-MM-DD), Standard: heute",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Einträge pro Seite (1-200, Standard 50)",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Seite (ab 1)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "user_uuid": "44ad890b-f7f3-4154-8b38-83261195e475",
                                            "name": "Max Mustermann",
                                            "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": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/members/{user_uuid}": {
            "put": {
                "operationId": "flowtime.members-update",
                "summary": "Mitglied bearbeiten",
                "description": "Ändert die Arbeitszeit und die Vergütung eines Teammitglieds (nur Teaminhaber oder Mitglieder mit FlowTime-Vollzugriff; alle anderen erhalten 403). Das Mitglied wird über die UUID im Pfad adressiert. Nur übergebene Felder werden aktualisiert; Tagesstunden bleiben nur für ausgewählte Arbeitstage erhalten. Eine Vergütungsänderung wird mit Gültigkeitsdatum in der Vergütungshistorie festgehalten; eine zweite Änderung am selben Tag ersetzt die Zeile dieses Tages, statt eine weitere anzulegen. Die Antwort enthält den heute gültigen Vergütungsblock. Validierungsfehler werden mit HTTP 422 beantwortet.",
                "tags": [
                    "flowtime.members"
                ],
                "parameters": [
                    {
                        "name": "user_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "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": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "weekly_hours": {
                                        "type": "number",
                                        "description": "Wochenstunden (0-168)"
                                    },
                                    "working_days": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Arbeitstage als Zahlen 1-7 (Mo-So), mindestens ein Tag, jeder Tag höchstens einmal"
                                    },
                                    "daily_hours": {
                                        "type": "object",
                                        "description": "Sollstunden pro Arbeitstag (0-24), Schlüssel ist der Wochentag 1-7"
                                    },
                                    "track_overtime": {
                                        "type": "boolean",
                                        "description": "Überstunden erfassen; bei Angabe true oder false, nicht null"
                                    },
                                    "compensation_type": {
                                        "type": "string",
                                        "description": "Vergütungsart: hourly (Stundensatz) oder monthly (Monatsgehalt); bei Angabe nicht null"
                                    },
                                    "hourly_rate": {
                                        "type": "number",
                                        "description": "Stundensatz (0 bis 999999.99). Bei der Vergütungsart hourly erforderlich, sofern kein Stundensatz gespeichert ist; bei monthly wird er nicht gespeichert"
                                    },
                                    "monthly_salary": {
                                        "type": "number",
                                        "description": "Monatsgehalt (0 bis 999999.99). Bei der Vergütungsart monthly erforderlich, sofern kein Monatsgehalt gespeichert ist; bei hourly wird es nicht gespeichert"
                                    },
                                    "currency": {
                                        "type": "string",
                                        "description": "Währung als dreistelliger Code, zum Beispiel EUR; ohne Angabe bleibt die bisherige Währung"
                                    },
                                    "valid_from": {
                                        "type": "string",
                                        "format": "date",
                                        "description": "Gültig ab (YYYY-MM-DD), Standard: heute. Das Datum darf nicht in der Zukunft liegen, höchstens 118 Monate vor dem laufenden Monat (ab dessen Monatsersten) und nicht vor dem Beginn der letzten Zeile der Vergütungshistorie mit einem anderen Betrag; jede dieser Grenzen wird mit HTTP 422 abgewiesen. Ein Datum gleich diesem Beginn ersetzt die Zeile. Spätere Zeilen ohne Betrag (etwa die Zeile ab dem Eintrittstag) oder mit genau der neuen Vergütung werden ersetzt."
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/holidays": {
            "get": {
                "operationId": "flowtime.holidays-index",
                "summary": "Feiertage abrufen",
                "description": "Gibt die gesetzlichen Feiertage in Deutschland für ein Jahr zurück, aufsteigend nach Datum. Es handelt sich um Stammdaten, die für alle Teams identisch sind; abrufen kann sie jedes Mitglied mit FlowTime-Zugriff. Mit state erhalten Sie die bundesweiten Feiertage und die des angegebenen Bundeslands.",
                "tags": [
                    "flowtime.members"
                ],
                "parameters": [
                    {
                        "name": "year",
                        "in": "query",
                        "required": false,
                        "description": "Jahr (1990-2100), Standard: laufendes Jahr",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "state",
                        "in": "query",
                        "required": false,
                        "description": "Bundesland als Kürzel (BW, BY, BE, BB, HB, HH, HE, MV, NI, NW, RP, SL, SN, ST, SH, TH). DE liefert nur die bundesweiten Feiertage; ein anderes Kürzel wird mit HTTP 422 abgewiesen. Ohne Angabe werden alle Feiertage des Jahres geliefert.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "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": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/absences": {
            "get": {
                "operationId": "flowtime.absences-index",
                "summary": "Abwesenheiten auflisten",
                "description": "Listet Abwesenheiten des Teams, absteigend nach erstem Tag. Mitglieder erhalten nur ihre eigenen Einträge. Ein Zeitraum aus from und to liefert jede Abwesenheit, die mindestens einen Tag darin hat.",
                "tags": [
                    "flowtime.absences"
                ],
                "parameters": [
                    {
                        "name": "from",
                        "in": "query",
                        "required": false,
                        "description": "Beginn des Zeitraums (YYYY-MM-DD)",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "required": false,
                        "description": "Ende des Zeitraums (YYYY-MM-DD), nicht vor from",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "type",
                        "in": "query",
                        "required": false,
                        "description": "vacation, sick, overtime_reduction oder business_trip",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "requested, approved, rejected oder cancelled",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "user_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Nur Abwesenheiten dieses Mitglieds (Teaminhaber; Mitglieder nur mit der eigenen UUID)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Einträge pro Seite (1-200, Standard 50)",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Seite (ab 1)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "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": "Max Mustermann",
                                            "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": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowtime.absences-store",
                "summary": "Abwesenheit anlegen",
                "description": "Legt eine Abwesenheit an. Ohne user_uuid ist es ein eigener Antrag oder eine eigene Meldung, mit user_uuid trägt der Teaminhaber die Abwesenheit für ein Mitglied ein. Der Status wird von FlowTime gesetzt; status und Entscheidungsfelder dürfen nicht mitgeschickt werden. warnings enthält Hinweise für den Teaminhaber (zum Beispiel eine Überschneidung), die das Speichern nicht verhindern. Für ein Mitglied ohne FlowTime-Zugang lässt sich keine Abwesenheit anlegen, auch nicht durch den Teaminhaber (HTTP 422, Fehler am Feld user_uuid). Antwort HTTP 201.",
                "tags": [
                    "flowtime.absences"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "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": "Max Mustermann",
                                        "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": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "user_uuid": {
                                        "type": "string",
                                        "description": "Mitglied des Teams (nur Teaminhaber); ohne Angabe gilt die Abwesenheit für Sie selbst"
                                    },
                                    "type": {
                                        "type": "string",
                                        "description": "vacation, sick, overtime_reduction oder business_trip"
                                    },
                                    "starts_on": {
                                        "type": "string",
                                        "format": "date",
                                        "description": "Erster Tag (YYYY-MM-DD)"
                                    },
                                    "ends_on": {
                                        "type": "string",
                                        "format": "date",
                                        "description": "Letzter Tag (YYYY-MM-DD), nicht vor starts_on; Pflicht außer bei overtime_reduction (ein einzelner Tag)"
                                    },
                                    "half_day_start": {
                                        "type": "string",
                                        "description": "Halber Tag am ersten Tag: none, am oder pm (Standard none)"
                                    },
                                    "half_day_end": {
                                        "type": "string",
                                        "description": "Halber Tag am letzten Tag: none, am oder pm (Standard none)"
                                    },
                                    "hours": {
                                        "type": "number",
                                        "description": "Stunden, nur und dann Pflicht bei overtime_reduction (größer 0, höchstens 24, in Viertelstunden)"
                                    },
                                    "note": {
                                        "type": "string",
                                        "description": "Notiz (max. 500 Zeichen)"
                                    }
                                },
                                "required": [
                                    "type",
                                    "starts_on"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/absences/balance": {
            "get": {
                "operationId": "flowtime.absences-balance",
                "summary": "Urlaubs- und Überstundensaldo abrufen",
                "description": "Gibt das Urlaubskontingent eines Jahres und den aktuellen Überstundensaldo eines Mitglieds zurück, so wie FlowTime sie berechnet. Ein Mitglied kann nur die eigenen Zahlen abrufen; eine fremde user_uuid liefert 403. Fremde Zahlen sehen nur der Teaminhaber und Mitglieder mit FlowTime-Vollzugriff, das Recht auf Teamberichte reicht dafür nicht. Ein Mitglied eines fremden Teams liefert 404. Der Urlaubsblock gilt für das angefragte Jahr, der Überstundenblock ist der laufende Saldo bis heute. Hat das Team die Überstunden ausgeschaltet, fehlt der Block data.overtime vollständig in der Antwort; der Urlaubsblock bleibt. Kann FlowTime einen Wert nicht berechnen, steht er als null im Block. Werden für das Mitglied keine Überstunden erfasst, sind alle Werte des Überstundenblocks null; für ein Mitglied ohne FlowTime-Zugang gilt das für beide Blöcke, genau wie in GET /members. entitlement und remaining sind null, solange für das Mitglied kein Urlaubsanspruch hinterlegt ist.",
                "tags": [
                    "flowtime.absences"
                ],
                "parameters": [
                    {
                        "name": "user_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Mitglied des Teams; ohne Angabe gelten die eigenen Zahlen (fremde Mitglieder nur für Teaminhaber und Mitglieder mit FlowTime-Vollzugriff)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "year",
                        "in": "query",
                        "required": false,
                        "description": "Jahr des Urlaubskontingents (2000-2100, Standard: laufendes Jahr)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "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": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/absences/{uuid}": {
            "get": {
                "operationId": "flowtime.absences-show",
                "summary": "Abwesenheit abrufen",
                "description": "Gibt eine Abwesenheit zurück. Mitglieder erhalten nur eigene Abwesenheiten; jede andere UUID liefert 404.",
                "tags": [
                    "flowtime.absences"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "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": "Max Mustermann",
                                        "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": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowtime.absences-update",
                "summary": "Abwesenheit ändern",
                "description": "Ändert eine Abwesenheit (nur Teaminhaber oder Mitglieder mit FlowTime-Vollzugriff; alle anderen erhalten 403). Nur übergebene Felder werden geändert. Der Status, die Entscheidungsfelder und das Mitglied lassen sich hier nicht ändern.",
                "tags": [
                    "flowtime.absences"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "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": "Max Mustermann",
                                        "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": "Fehlerantwort",
                        "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 oder business_trip"
                                    },
                                    "starts_on": {
                                        "type": "string",
                                        "format": "date",
                                        "description": "Erster Tag (YYYY-MM-DD)"
                                    },
                                    "ends_on": {
                                        "type": "string",
                                        "format": "date",
                                        "description": "Letzter Tag (YYYY-MM-DD)"
                                    },
                                    "half_day_start": {
                                        "type": "string",
                                        "description": "none, am oder pm"
                                    },
                                    "half_day_end": {
                                        "type": "string",
                                        "description": "none, am oder pm"
                                    },
                                    "hours": {
                                        "type": "number",
                                        "description": "Stunden bei overtime_reduction (größer 0, höchstens 24, in Viertelstunden); bei Angabe nicht null, ohne Angabe unverändert"
                                    },
                                    "note": {
                                        "type": "string",
                                        "description": "Notiz (max. 500 Zeichen)"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowtime.absences-destroy",
                "summary": "Abwesenheit löschen",
                "description": "Löscht eine Abwesenheit (nur Teaminhaber oder Mitglieder mit FlowTime-Vollzugriff; alle anderen erhalten 403). Die Abwesenheit wird archiviert, ihre Entscheidung bleibt nachvollziehbar. Eine bereits gelöschte Abwesenheit liefert 404.",
                "tags": [
                    "flowtime.absences"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Absence deleted successfully"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/absences/{uuid}/approve": {
            "post": {
                "operationId": "flowtime.absences-approve",
                "summary": "Abwesenheit genehmigen",
                "description": "Genehmigt einen offenen Antrag (nur Teaminhaber oder Mitglieder mit FlowTime-Vollzugriff; alle anderen erhalten 403). Genehmigt werden kann nur ein Antrag im Status requested; ein bereits entschiedener Antrag liefert 409 und behält seine erste Entscheidung. Gehört die antragstellende Person nicht mehr zum Team oder hat sie keinen FlowTime-Zugang mehr, wird nicht genehmigt (HTTP 422, Fehler am Feld user_uuid); ablehnen lässt sich ein solcher Antrag weiterhin. Das Mitglied erhält eine Benachrichtigung.",
                "tags": [
                    "flowtime.absences"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "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": "Max Mustermann",
                                        "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": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "decision_note": {
                                        "type": "string",
                                        "description": "Anmerkung zur Entscheidung (max. 500 Zeichen)"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/absences/{uuid}/reject": {
            "post": {
                "operationId": "flowtime.absences-reject",
                "summary": "Abwesenheit ablehnen",
                "description": "Lehnt einen offenen Antrag ab (nur Teaminhaber oder Mitglieder mit FlowTime-Vollzugriff; alle anderen erhalten 403). Eine Ablehnung braucht eine Begründung, die das Mitglied in seiner Benachrichtigung liest; fehlt sie in der Anfrage des Teaminhabers oder eines Mitglieds mit FlowTime-Vollzugriff, antwortet die API mit HTTP 422. Ein bereits entschiedener Antrag liefert 409.",
                "tags": [
                    "flowtime.absences"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "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": "Max Mustermann",
                                        "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": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "decision_note": {
                                        "type": "string",
                                        "description": "Begründung der Ablehnung (max. 500 Zeichen)"
                                    }
                                },
                                "required": [
                                    "decision_note"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/absences/{uuid}/cancel": {
            "post": {
                "operationId": "flowtime.absences-cancel",
                "summary": "Abwesenheit zurückziehen",
                "description": "Zieht eine eigene Abwesenheit zurück. Das ist kein Recht des Teaminhabers: Zurückziehen kann nur, wer die Abwesenheit beantragt hat, und zwar einen offenen Antrag ebenso wie eine genehmigte Abwesenheit, spätestens am Tag vor ihrem Beginn. Der Teaminhaber entfernt die Abwesenheit eines Mitglieds stattdessen über DELETE; ruft er diesen Endpunkt für ein anderes Mitglied auf, erhält er 403. Ist das Zurückziehen nicht mehr möglich, antwortet die API mit HTTP 409. Eine Begründung wird nicht mitgeschickt.",
                "tags": [
                    "flowtime.absences"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "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": "Max Mustermann",
                                        "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": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/team/status": {
            "get": {
                "operationId": "flowtime.team-status",
                "summary": "Team-Status abrufen",
                "description": "Wer ist gerade eingestempelt, in Pause oder ausgestempelt. Für den Teaminhaber, Mitglieder mit FlowTime-Vollzugriff und Mitglieder mit dem Sub-Recht teamberichte; alle anderen erhalten HTTP 403 mit code team_status_denied. Es zählen nur Einträge dieses Teams. since ist der Beginn des offenen Eintrags, ausgestempelt das Ende des letzten Eintrags (oder null).",
                "tags": [
                    "flowtime.app"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "user": {
                                                "uuid": "44ad890b-f7f3-4154-8b38-83261195e475",
                                                "name": "Max Mustermann",
                                                "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": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/me/location": {
            "get": {
                "operationId": "flowtime.me-location-show",
                "summary": "Eigenen Arbeitsort abrufen",
                "description": "Der eigene Arbeitsort für den Standort-Hinweis der FlowTime-App im aktuellen Team. data ist null, solange keiner gesetzt ist. address ist die Adresse, die im Web eingegeben wurde, und null, wenn der Ort in der App festgelegt wurde.",
                "tags": [
                    "flowtime.app"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "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": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowtime.me-location-update",
                "summary": "Eigenen Arbeitsort setzen",
                "description": "Legt den eigenen Arbeitsort an oder ersetzt ihn (eine Zeile je Benutzer und Team). address ist optional. Wird es weggelassen und ändern sich die Koordinaten, wird eine im Web gespeicherte Adresse geleert, weil sie nicht mehr zum Ort passt.",
                "tags": [
                    "flowtime.app"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "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": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "label": {
                                        "type": "string",
                                        "description": "Bezeichnung (max. 100 Zeichen)"
                                    },
                                    "address": {
                                        "type": "string",
                                        "description": "Adresse des Arbeitsorts (max. 255 Zeichen, optional, null erlaubt). Wird nur gespeichert, nicht ausgewertet."
                                    },
                                    "latitude": {
                                        "type": "number",
                                        "description": "Breitengrad (-90 bis 90)"
                                    },
                                    "longitude": {
                                        "type": "number",
                                        "description": "Längengrad (-180 bis 180)"
                                    },
                                    "radius_m": {
                                        "type": "integer",
                                        "description": "Radius in Metern (50 bis 1000)"
                                    },
                                    "mode": {
                                        "type": "string",
                                        "description": "reminder (Erinnerung) oder auto (automatisch stempeln)"
                                    },
                                    "enabled": {
                                        "type": "boolean",
                                        "description": "Aktiv"
                                    }
                                },
                                "required": [
                                    "label",
                                    "latitude",
                                    "longitude",
                                    "radius_m",
                                    "mode",
                                    "enabled"
                                ]
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowtime.me-location-destroy",
                "summary": "Eigenen Arbeitsort entfernen",
                "description": "Entfernt den eigenen Arbeitsort. Antwortet immer mit HTTP 204 ohne Inhalt.",
                "tags": [
                    "flowtime.app"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/types": {
            "get": {
                "operationId": "flowtime.shifts-types-index",
                "summary": "Schichttypen auflisten",
                "description": "Listet alle Schichttypen des Teams auf.",
                "tags": [
                    "flowtime.shifts"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowtime.shifts-types-store",
                "summary": "Schichttyp anlegen",
                "description": "Erstellt einen neuen Schichttyp (erfordert Sub-Recht \"schichtplanung\", Teaminhaber oder FlowTime-Vollzugriff).",
                "tags": [
                    "flowtime.shifts"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name des Schichttyps (max. 255 Zeichen)"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Beschreibung"
                                    },
                                    "color": {
                                        "type": "string",
                                        "description": "Hex-Farbe (max. 7 Zeichen)"
                                    },
                                    "icon": {
                                        "type": "string",
                                        "description": "Icon-Kennung (max. 50 Zeichen)"
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "Schichttyp aktiv"
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/types/{uuid}": {
            "get": {
                "operationId": "flowtime.shifts-types-show",
                "summary": "Schichttyp abrufen",
                "description": "Ruft einen einzelnen Schichttyp ab, inklusive der Anzahl seiner Vorlagen und Schichten.",
                "tags": [
                    "flowtime.shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "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": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowtime.shifts-types-update",
                "summary": "Schichttyp aktualisieren",
                "description": "Aktualisiert einen Schichttyp (erfordert Sub-Recht \"schichtplanung\", Teaminhaber oder FlowTime-Vollzugriff). Adressierung ausschließlich per UUID.",
                "tags": [
                    "flowtime.shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name des Schichttyps (max. 255 Zeichen)"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Beschreibung"
                                    },
                                    "color": {
                                        "type": "string",
                                        "description": "Hex-Farbe im Format #RRGGBB"
                                    },
                                    "icon": {
                                        "type": "string",
                                        "description": "Icon-Kennung (max. 50 Zeichen)"
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "Schichttyp aktiv"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowtime.shifts-types-destroy",
                "summary": "Schichttyp löschen",
                "description": "Löscht einen Schichttyp (erfordert Sub-Recht \"schichtplanung\", Teaminhaber oder FlowTime-Vollzugriff). Adressierung ausschließlich per UUID.",
                "tags": [
                    "flowtime.shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/templates": {
            "get": {
                "operationId": "flowtime.shifts-templates-index",
                "summary": "Schichtvorlagen auflisten",
                "description": "Listet alle Schichtvorlagen des Teams auf.",
                "tags": [
                    "flowtime.shifts"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowtime.shifts-templates-store",
                "summary": "Schichtvorlage anlegen",
                "description": "Erstellt eine neue Schichtvorlage (erfordert Sub-Recht \"schichtplanung\", Teaminhaber oder FlowTime-Vollzugriff). Breaking Change: Das frühere numerische Feld \"shift_type_id\" wird nicht mehr akzeptiert; der Schichttyp wird ausschließlich über \"shift_type_uuid\" angegeben.",
                "tags": [
                    "flowtime.shifts"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name der Schichtvorlage (max. 255 Zeichen)"
                                    },
                                    "shift_type_uuid": {
                                        "type": "string",
                                        "description": "UUID des Schichttyps (teamgebunden)"
                                    },
                                    "start_time": {
                                        "type": "string",
                                        "description": "Startzeit (HH:MM)"
                                    },
                                    "end_time": {
                                        "type": "string",
                                        "description": "Endzeit (HH:MM)"
                                    },
                                    "min_staff": {
                                        "type": "integer",
                                        "description": "Minimale Besetzung"
                                    },
                                    "max_staff": {
                                        "type": "integer",
                                        "description": "Maximale Besetzung (>= min_staff)"
                                    },
                                    "default_days": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Standard-Wochentage (1-7)"
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "Schichtvorlage aktiv"
                                    }
                                },
                                "required": [
                                    "name",
                                    "shift_type_uuid",
                                    "start_time",
                                    "end_time"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/templates/{uuid}": {
            "get": {
                "operationId": "flowtime.shifts-templates-show",
                "summary": "Schichtvorlage abrufen",
                "description": "Ruft eine einzelne Schichtvorlage samt ihrem Schichttyp ab.",
                "tags": [
                    "flowtime.shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "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": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowtime.shifts-templates-update",
                "summary": "Schichtvorlage aktualisieren",
                "description": "Aktualisiert eine Schichtvorlage (erfordert Sub-Recht \"schichtplanung\", Teaminhaber oder FlowTime-Vollzugriff). Adressierung ausschließlich per UUID. Breaking Change: Das frühere numerische Feld \"shift_type_id\" wird nicht mehr akzeptiert; der Schichttyp wird ausschließlich über \"shift_type_uuid\" angegeben.",
                "tags": [
                    "flowtime.shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name der Schichtvorlage (max. 255 Zeichen)"
                                    },
                                    "shift_type_uuid": {
                                        "type": "string",
                                        "description": "UUID des Schichttyps (teamgebunden)"
                                    },
                                    "start_time": {
                                        "type": "string",
                                        "description": "Startzeit (HH:MM)"
                                    },
                                    "end_time": {
                                        "type": "string",
                                        "description": "Endzeit (HH:MM)"
                                    },
                                    "min_staff": {
                                        "type": "integer",
                                        "description": "Minimale Besetzung"
                                    },
                                    "max_staff": {
                                        "type": "integer",
                                        "description": "Maximale Besetzung (>= min_staff)"
                                    },
                                    "default_days": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Standard-Wochentage (1-7)"
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "Schichtvorlage aktiv"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowtime.shifts-templates-destroy",
                "summary": "Schichtvorlage löschen",
                "description": "Löscht eine Schichtvorlage (erfordert Sub-Recht \"schichtplanung\", Teaminhaber oder FlowTime-Vollzugriff). Adressierung ausschließlich per UUID.",
                "tags": [
                    "flowtime.shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/plans": {
            "get": {
                "operationId": "flowtime.shifts-plans-index",
                "summary": "Schichtpläne auflisten",
                "description": "Listet die Schichtpläne des Teams auf.",
                "tags": [
                    "flowtime.shifts"
                ],
                "parameters": [
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "Filtert nach Status (draft, published oder archived)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "start_date",
                        "in": "query",
                        "required": false,
                        "description": "Filtert Pläne ab diesem Datum",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "end_date",
                        "in": "query",
                        "required": false,
                        "description": "Filtert Pläne bis zu diesem Datum (muss >= start_date sein)",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowtime.shifts-plans-store",
                "summary": "Schichtplan anlegen",
                "description": "Erstellt einen neuen Schichtplan für eine Woche (erfordert Sub-Recht \"schichtplanung\", Teaminhaber oder FlowTime-Vollzugriff). Breaking Change: Das frühere numerische Feld \"shift_type_ids\" wird nicht mehr akzeptiert; die Schichttypen werden ausschließlich über \"shift_type_uuids\" angegeben.",
                "tags": [
                    "flowtime.shifts"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "week_start": {
                                        "type": "string",
                                        "description": "Wochenanfang (Datum)"
                                    },
                                    "name": {
                                        "type": "string",
                                        "description": "Name des Plans (max. 255 Zeichen)"
                                    },
                                    "create_from_templates": {
                                        "type": "boolean",
                                        "description": "Plan aus Vorlagen erzeugen"
                                    },
                                    "shift_type_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "UUIDs der zu berücksichtigenden Schichttypen (teamgebunden)",
                                        "properties": {
                                            "*": {
                                                "type": "string",
                                                "description": "Einzelne Schichttyp-UUID"
                                            }
                                        }
                                    }
                                },
                                "required": [
                                    "week_start"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/plans/{uuid}": {
            "get": {
                "operationId": "flowtime.shifts-plans-show",
                "summary": "Schichtplan-Details abrufen",
                "description": "Ruft einen einzelnen Schichtplan mit seinen Schichten ab. Adressierung ausschließlich per UUID.",
                "tags": [
                    "flowtime.shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowtime.shifts-plans-update",
                "summary": "Schichtplan ändern",
                "description": "Ändert Name und Notiz eines Schichtplans (erfordert Sub-Recht \"schichtplanung\", Teaminhaber oder FlowTime-Vollzugriff). Nur Entwürfe sind änderbar; ein veröffentlichter oder archivierter Plan antwortet mit HTTP 409 und dem Fehler plan_not_editable. Die Planwoche selbst ist unveränderlich, weil die Schichten an ihren Tagen hängen; für eine andere Woche gibt es die Kopieren-Aktion. Der Status ändert sich ausschließlich über publish und archive.",
                "tags": [
                    "flowtime.shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "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": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Neuer Name des Plans (max. 255 Zeichen)"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Notiz zum Plan; null leert sie"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowtime.shifts-plans-destroy",
                "summary": "Schichtplan löschen",
                "description": "Löscht einen Schichtplan samt seinen Schichten und deren Zuweisungen (erfordert Sub-Recht \"schichtplanung\", Teaminhaber oder FlowTime-Vollzugriff). Nur Entwürfe sind löschbar: ein veröffentlichter Plan ist der Dienstplan, nach dem das Team arbeitet, ein archivierter die Aufzeichnung einer vergangenen Woche. Beide antworten mit HTTP 409 und dem Fehler plan_not_editable und werden stattdessen archiviert.",
                "tags": [
                    "flowtime.shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Shift plan deleted successfully"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/plans/{uuid}/shifts": {
            "get": {
                "operationId": "flowtime.shifts-plans-shifts",
                "summary": "Schichten eines Plans auflisten",
                "description": "Ruft die Schichten eines Plans seitenweise ab, optional auf einen Tag oder einen Schichttyp eingegrenzt. Die Plan-Detailansicht liefert dagegen die ganze Woche in einer Antwort.",
                "tags": [
                    "flowtime.shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "date",
                        "in": "query",
                        "required": false,
                        "description": "Grenzt auf einen Tag ein (YYYY-MM-DD)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "shift_type_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Grenzt auf einen Schichttyp des Teams ein",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Seitenzahl, ab 1",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Einträge pro Seite, 1-200 (Standard 50)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "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": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/plans/{uuid}/publish": {
            "post": {
                "operationId": "flowtime.shifts-plans-publish",
                "summary": "Schichtplan veröffentlichen",
                "description": "Veröffentlicht einen Schichtplan (erfordert Sub-Recht \"schichtplanung\", Teaminhaber oder FlowTime-Vollzugriff).",
                "tags": [
                    "flowtime.shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/plans/{uuid}/archive": {
            "post": {
                "operationId": "flowtime.shifts-plans-archive",
                "summary": "Schichtplan archivieren",
                "description": "Archiviert einen Schichtplan (erfordert Sub-Recht \"schichtplanung\", Teaminhaber oder FlowTime-Vollzugriff).",
                "tags": [
                    "flowtime.shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/plans/{uuid}/copy": {
            "post": {
                "operationId": "flowtime.shifts-plans-copy",
                "summary": "Schichtplan kopieren",
                "description": "Kopiert einen Schichtplan in eine andere Woche (erfordert Sub-Recht \"schichtplanung\", Teaminhaber oder FlowTime-Vollzugriff).",
                "tags": [
                    "flowtime.shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "target_week_start": {
                                        "type": "string",
                                        "description": "Ziel-Wochenstartdatum"
                                    }
                                },
                                "required": [
                                    "target_week_start"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts": {
            "post": {
                "operationId": "flowtime.shifts-store",
                "summary": "Schicht anlegen",
                "description": "Erstellt eine einzelne Schicht innerhalb eines Plans (erfordert Sub-Recht \"schichtplanung\", Teaminhaber oder FlowTime-Vollzugriff). Breaking Change: Die früheren numerischen Felder \"shift_plan_id\" und \"shift_type_id\" werden nicht mehr akzeptiert; Plan und Typ werden ausschließlich über \"shift_plan_uuid\" und \"shift_type_uuid\" angegeben.",
                "tags": [
                    "flowtime.shifts"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "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 des Schichtplans (teamgebunden)"
                                    },
                                    "shift_type_uuid": {
                                        "type": "string",
                                        "description": "UUID des Schichttyps (teamgebunden)"
                                    },
                                    "date": {
                                        "type": "string",
                                        "description": "Datum der Schicht"
                                    },
                                    "start_time": {
                                        "type": "string",
                                        "description": "Startzeit (HH:MM)"
                                    },
                                    "end_time": {
                                        "type": "string",
                                        "description": "Endzeit (HH:MM)"
                                    },
                                    "min_staff": {
                                        "type": "integer",
                                        "description": "Minimale Besetzung"
                                    },
                                    "max_staff": {
                                        "type": "integer",
                                        "description": "Maximale Besetzung (>= min_staff)"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Notizen zur Schicht"
                                    }
                                },
                                "required": [
                                    "shift_plan_uuid",
                                    "shift_type_uuid",
                                    "date",
                                    "start_time",
                                    "end_time"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/{uuid}": {
            "get": {
                "operationId": "flowtime.shifts-show",
                "summary": "Schicht abrufen",
                "description": "Ruft eine einzelne Schicht mit ihren Zuweisungen und ihrem Besetzungsstand ab. Das Feld editable wiederholt die Regel der Planungsoberfläche: nur Schichten in einem Entwurf sind änderbar.",
                "tags": [
                    "flowtime.shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "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": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowtime.shifts-update",
                "summary": "Schicht ändern",
                "description": "Ändert eine Schicht (erfordert Sub-Recht \"schichtplanung\", Teaminhaber oder FlowTime-Vollzugriff). Nur Schichten in einem Entwurf sind änderbar, sonst HTTP 409 mit dem Fehler plan_not_editable. Das Datum muss in der Planwoche liegen, sonst HTTP 422 mit date_outside_plan_week. Eine Schicht bleibt in ihrem Plan; für eine andere Woche wird sie im Zielplan neu angelegt. Die Dauer berechnet die Schnittstelle selbst und berücksichtigt dabei Nachtschichten über Mitternacht.",
                "tags": [
                    "flowtime.shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "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": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "shift_type_uuid": {
                                        "type": "string",
                                        "description": "Anderer Schichttyp des Teams"
                                    },
                                    "date": {
                                        "type": "string",
                                        "description": "Neues Datum (YYYY-MM-DD), muss in der Planwoche liegen"
                                    },
                                    "start_time": {
                                        "type": "string",
                                        "description": "Beginn im Format HH:MM"
                                    },
                                    "end_time": {
                                        "type": "string",
                                        "description": "Ende im Format HH:MM"
                                    },
                                    "min_staff": {
                                        "type": "integer",
                                        "description": "Mindestbesetzung, mindestens 1"
                                    },
                                    "max_staff": {
                                        "type": "integer",
                                        "description": "Maximalbesetzung; darf die Mindestbesetzung nicht unterschreiten, null hebt die Obergrenze auf"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Notiz zur Schicht"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowtime.shifts-destroy",
                "summary": "Schicht löschen",
                "description": "Löscht eine Schicht (erfordert Sub-Recht \"schichtplanung\", Teaminhaber oder FlowTime-Vollzugriff). Adressierung ausschließlich per UUID.",
                "tags": [
                    "flowtime.shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/{uuid}/assign": {
            "post": {
                "operationId": "flowtime.shifts-assign",
                "summary": "Nutzer einer Schicht zuweisen",
                "description": "Weist einer Schicht einen Nutzer zu (erfordert Sub-Recht \"schichtplanung\", Teaminhaber oder FlowTime-Vollzugriff).",
                "tags": [
                    "flowtime.shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "user_uuid": {
                                        "type": "string",
                                        "description": "UUID des zuzuweisenden Nutzers"
                                    },
                                    "check_conflicts": {
                                        "type": "boolean",
                                        "description": "Zeitliche Konflikte prüfen"
                                    }
                                },
                                "required": [
                                    "user_uuid"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/{uuid}/assign/{userUuid}": {
            "delete": {
                "operationId": "flowtime.shifts-unassign",
                "summary": "Zuweisung entfernen",
                "description": "Entfernt die Zuweisung eines Nutzers von einer Schicht (erfordert Sub-Recht \"schichtplanung\", Teaminhaber oder FlowTime-Vollzugriff).",
                "tags": [
                    "flowtime.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": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/{uuid}/available-users": {
            "get": {
                "operationId": "flowtime.shifts-available-users",
                "summary": "Verfügbare Nutzer für Schicht",
                "description": "Listet Nutzer, die für eine Schicht zugewiesen werden können (erfordert Sub-Recht \"schichtplanung\", Teaminhaber oder FlowTime-Vollzugriff).",
                "tags": [
                    "flowtime.shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/assignments/{uuid}/confirm": {
            "post": {
                "operationId": "flowtime.shifts-assignments-confirm",
                "summary": "Zuweisung bestätigen",
                "description": "Bestätigt eine eigene Schicht-Zuweisung. Steht jedem Mitglied für die eigenen Zuweisungen offen.",
                "tags": [
                    "flowtime.shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/assignments/{uuid}/decline": {
            "post": {
                "operationId": "flowtime.shifts-assignments-decline",
                "summary": "Zuweisung ablehnen",
                "description": "Lehnt eine eigene Schicht-Zuweisung ab. Steht jedem Mitglied für die eigenen Zuweisungen offen.",
                "tags": [
                    "flowtime.shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "reason": {
                                        "type": "string",
                                        "description": "Begründung für die Ablehnung"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/my-shifts": {
            "get": {
                "operationId": "flowtime.shifts-my-shifts",
                "summary": "Eigene Schichten abrufen",
                "description": "Ruft die eigenen Schichten des angemeldeten Nutzers ab.",
                "tags": [
                    "flowtime.shifts"
                ],
                "parameters": [
                    {
                        "name": "start_date",
                        "in": "query",
                        "required": false,
                        "description": "Filtert Schichten ab diesem Datum",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "end_date",
                        "in": "query",
                        "required": false,
                        "description": "Filtert Schichten bis zu diesem Datum (muss >= start_date sein)",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/current": {
            "get": {
                "operationId": "flowtime.shifts-current",
                "summary": "Aktuelle Schicht-Übersicht",
                "description": "Ruft die aktuelle Schicht-Übersicht ab.",
                "tags": [
                    "flowtime.shifts"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/preferences": {
            "get": {
                "operationId": "flowtime.shifts-preferences-index",
                "summary": "Eigene Verfügbarkeits-Präferenzen",
                "description": "Ruft die eigenen Verfügbarkeits-Präferenzen des angemeldeten Nutzers ab.",
                "tags": [
                    "flowtime.shifts"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/preferences/{dayOfWeek}": {
            "put": {
                "operationId": "flowtime.shifts-preferences-update",
                "summary": "Verfügbarkeits-Präferenz setzen",
                "description": "Setzt die eigene Verfügbarkeits-Präferenz für einen Wochentag (1-7). Steht jedem Mitglied für die eigenen Präferenzen offen.",
                "tags": [
                    "flowtime.shifts"
                ],
                "parameters": [
                    {
                        "name": "dayOfWeek",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "availability": {
                                        "type": "string",
                                        "description": "Verfügbarkeit: available, preferred, unavailable oder if_needed"
                                    },
                                    "available_from": {
                                        "type": "string",
                                        "description": "Verfügbar ab (HH:MM)"
                                    },
                                    "available_until": {
                                        "type": "string",
                                        "description": "Verfügbar bis (HH:MM)"
                                    },
                                    "preferred_shift_types": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Bevorzugte Schichttypen als UUIDs (teamgebunden)"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Notizen (max. 500 Zeichen)"
                                    }
                                },
                                "required": [
                                    "availability"
                                ]
                            }
                        }
                    }
                }
            }
        }
    },
    "components": {
        "securitySchemes": {
            "bearerAuth": {
                "type": "http",
                "scheme": "bearer",
                "description": "API-Schlüssel (pk_… oder at_…) als Authorization: Bearer <Schlüssel>. Andere Übergabewege werden mit 401 abgelehnt."
            }
        },
        "schemas": {
            "Error": {
                "type": "object",
                "properties": {
                    "success": {
                        "type": "boolean"
                    },
                    "error": {
                        "type": "string"
                    },
                    "message": {
                        "type": "string"
                    },
                    "errors": {
                        "type": "object"
                    }
                }
            }
        }
    }
}