{
    "openapi": "3.1.0",
    "info": {
        "title": "FlowSuite API",
        "version": "v1",
        "description": "Every module of the FlowSuite API in one document. Paths apply to https://api.flowsuite.one; the FlowAI chat API names its own address."
    },
    "servers": [
        {
            "url": "https://api.flowsuite.one",
            "description": "FlowSuite API"
        }
    ],
    "security": [
        {
            "bearerAuth": []
        }
    ],
    "tags": [
        {
            "name": "team-management.team",
            "description": "Team Management API: Team and modules"
        },
        {
            "name": "team-management.members",
            "description": "Team Management API: Members"
        },
        {
            "name": "team-management.invitations",
            "description": "Team Management API: Invitations and seats"
        },
        {
            "name": "flowaccounting.invoices",
            "description": "FlowAccounting API: Invoices"
        },
        {
            "name": "flowaccounting.items",
            "description": "FlowAccounting API: Invoice line items"
        },
        {
            "name": "flowaccounting.transactions",
            "description": "FlowAccounting API: Transactions"
        },
        {
            "name": "flowaccounting.products",
            "description": "FlowAccounting API: Products"
        },
        {
            "name": "flowaccounting.tax-rates",
            "description": "FlowAccounting API: Tax rates"
        },
        {
            "name": "flowaccounting.recurring",
            "description": "FlowAccounting API: Recurring invoices"
        },
        {
            "name": "flowaccounting.installment-plans",
            "description": "FlowAccounting API: Installment plans"
        },
        {
            "name": "flowaccounting.billable-items",
            "description": "FlowAccounting API: Billable items"
        },
        {
            "name": "flowaccounting.quotes",
            "description": "FlowAccounting API: Quotes"
        },
        {
            "name": "flowaccounting.quote-items",
            "description": "FlowAccounting API: Quote line items"
        },
        {
            "name": "flowaccounting.credit-notes",
            "description": "FlowAccounting API: Credit notes"
        },
        {
            "name": "flowaccounting.expenses",
            "description": "FlowAccounting API: Expenses"
        },
        {
            "name": "flowaccounting.suppliers",
            "description": "FlowAccounting API: Suppliers"
        },
        {
            "name": "flowaccounting.expense-categories",
            "description": "FlowAccounting API: Expense categories"
        },
        {
            "name": "flowaccounting.income-categories",
            "description": "FlowAccounting API: Income categories"
        },
        {
            "name": "flowaccounting.reports",
            "description": "FlowAccounting API: Reports and context"
        },
        {
            "name": "flowaccounting.tax-profile",
            "description": "FlowAccounting API: Tax profile and features"
        },
        {
            "name": "flowai.models",
            "description": "FlowAI API: Models"
        },
        {
            "name": "flowai.chat",
            "description": "FlowAI API: Chat"
        },
        {
            "name": "flowai.files",
            "description": "FlowAI API: Files"
        },
        {
            "name": "flowai.webhooks",
            "description": "FlowAI API: Webhooks"
        },
        {
            "name": "flowcall.context",
            "description": "FlowCall API: Overview"
        },
        {
            "name": "flowcall.projects",
            "description": "FlowCall API: Projects"
        },
        {
            "name": "flowcall.guideline",
            "description": "FlowCall API: Call guide and form"
        },
        {
            "name": "flowcall.imports",
            "description": "FlowCall API: Imports"
        },
        {
            "name": "flowcall.exports",
            "description": "FlowCall API: Exports"
        },
        {
            "name": "flowcall.leads",
            "description": "FlowCall API: Leads"
        },
        {
            "name": "flowcall.comments",
            "description": "FlowCall API: Comments"
        },
        {
            "name": "flowcall.follow-ups",
            "description": "FlowCall API: Follow-ups"
        },
        {
            "name": "flowcall.calls",
            "description": "FlowCall API: Calls"
        },
        {
            "name": "flowcall.emails",
            "description": "FlowCall API: Emails"
        },
        {
            "name": "flowcall.team",
            "description": "FlowCall API: Team and roles"
        },
        {
            "name": "flowcall.call-history",
            "description": "FlowCall API: Call log"
        },
        {
            "name": "flowcall.reports",
            "description": "FlowCall API: Reports"
        },
        {
            "name": "flowcontacts.endpoints",
            "description": "FlowContacts API: API reference"
        },
        {
            "name": "flowcrm.customers",
            "description": "FlowCRM API: Customer management"
        },
        {
            "name": "flowcrm.timeline",
            "description": "FlowCRM API: Timeline management"
        },
        {
            "name": "flowcrm.contacts",
            "description": "FlowCRM API: Contact management"
        },
        {
            "name": "flowcrm.projects",
            "description": "FlowCRM API: Project management"
        },
        {
            "name": "flowcrm.project-timeline",
            "description": "FlowCRM API: Project timeline"
        },
        {
            "name": "flowcrm.record-extras",
            "description": "FlowCRM API: To-dos, metadata and files"
        },
        {
            "name": "flowcrm.tags",
            "description": "FlowCRM API: Tags"
        },
        {
            "name": "flowcrm.leads",
            "description": "FlowCRM API: Lead management"
        },
        {
            "name": "flowcrm.lead-relations",
            "description": "FlowCRM API: Lead relations"
        },
        {
            "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 conversion"
        },
        {
            "name": "flowcrm.lead-reports",
            "description": "FlowCRM API: Lead reports"
        },
        {
            "name": "flowcrm.lead-boards",
            "description": "FlowCRM API: Lead boards"
        },
        {
            "name": "flowcrm.flowdoc",
            "description": "FlowCRM API: FlowDocs"
        },
        {
            "name": "flowdrive.context",
            "description": "FlowDrive API: Overview"
        },
        {
            "name": "flowdrive.entries-read",
            "description": "FlowDrive API: Reading entries"
        },
        {
            "name": "flowdrive.entries-write",
            "description": "FlowDrive API: Creating and changing entries"
        },
        {
            "name": "flowdrive.entries-trash",
            "description": "FlowDrive API: Trash"
        },
        {
            "name": "flowdrive.versions-favorites",
            "description": "FlowDrive API: Versions, favorites and recently used"
        },
        {
            "name": "flowdrive.share-links",
            "description": "FlowDrive API: Share links"
        },
        {
            "name": "flowdrive.personal-shares",
            "description": "FlowDrive API: Personal shares"
        },
        {
            "name": "flowdrive.flowai-documents",
            "description": "FlowDrive API: FlowAI documents"
        },
        {
            "name": "flowdrive.shared-drives",
            "description": "FlowDrive API: Shared drives"
        },
        {
            "name": "flowdrive.reports",
            "description": "FlowDrive API: Reports"
        },
        {
            "name": "flowevents.context",
            "description": "FlowEvents API: Overview"
        },
        {
            "name": "flowevents.reports",
            "description": "FlowEvents API: Reports"
        },
        {
            "name": "flowevents.events",
            "description": "FlowEvents API: Events"
        },
        {
            "name": "flowevents.sessions",
            "description": "FlowEvents API: Sessions"
        },
        {
            "name": "flowevents.participants",
            "description": "FlowEvents API: Participants"
        },
        {
            "name": "flowevents.attendance",
            "description": "FlowEvents API: Attendance"
        },
        {
            "name": "flowevents.event-rooms",
            "description": "FlowEvents API: Room assignment"
        },
        {
            "name": "flowevents.venues",
            "description": "FlowEvents API: Conference venues and rooms"
        },
        {
            "name": "flowevents.mailings",
            "description": "FlowEvents API: Signatures and feedback"
        },
        {
            "name": "flowevents.feedback-forms",
            "description": "FlowEvents API: Feedback forms"
        },
        {
            "name": "flowevents.exports",
            "description": "FlowEvents API: Exports"
        },
        {
            "name": "flowleads.forms",
            "description": "FlowLeads form API: Forms"
        },
        {
            "name": "flowsaas.context",
            "description": "FlowSaaS API: Overview and reports"
        },
        {
            "name": "flowsaas.portals",
            "description": "FlowSaaS API: Portals"
        },
        {
            "name": "flowsaas.vocabulary",
            "description": "FlowSaaS API: Statuses and tags"
        },
        {
            "name": "flowsaas.posts",
            "description": "FlowSaaS API: Ideas"
        },
        {
            "name": "flowsaas.comments",
            "description": "FlowSaaS API: Comments"
        },
        {
            "name": "flowsaas.roadmap",
            "description": "FlowSaaS API: Roadmap"
        },
        {
            "name": "flowsaas.webhooks",
            "description": "FlowSaaS API: Webhooks"
        },
        {
            "name": "flowsend.subscribers",
            "description": "FlowSend API: Subscribers"
        },
        {
            "name": "flowsend.subscribers-bulk",
            "description": "FlowSend API: Bulk operations"
        },
        {
            "name": "flowsend.lists",
            "description": "FlowSend API: Lists"
        },
        {
            "name": "flowsend.tags",
            "description": "FlowSend API: Tags"
        },
        {
            "name": "flowsend.campaigns",
            "description": "FlowSend API: Campaigns"
        },
        {
            "name": "flowsend.templates",
            "description": "FlowSend API: Templates"
        },
        {
            "name": "flowsend.sender-domains",
            "description": "FlowSend API: Sender domain"
        },
        {
            "name": "flowsend.insights",
            "description": "FlowSend API: Context and reports"
        },
        {
            "name": "flowsupport.context",
            "description": "FlowSupport API: Overview"
        },
        {
            "name": "flowsupport.inboxes",
            "description": "FlowSupport API: Inboxes"
        },
        {
            "name": "flowsupport.conversations",
            "description": "FlowSupport API: Conversations"
        },
        {
            "name": "flowsupport.messages",
            "description": "FlowSupport API: Messages"
        },
        {
            "name": "flowsupport.notes",
            "description": "FlowSupport API: Internal notes"
        },
        {
            "name": "flowsupport.catalogs",
            "description": "FlowSupport API: Labels and templates"
        },
        {
            "name": "flowsupport.reports",
            "description": "FlowSupport API: Reports"
        },
        {
            "name": "flowtasks.todos",
            "description": "FlowTasks API: Managing to-dos"
        },
        {
            "name": "flowtasks.boards",
            "description": "FlowTasks API: Boards"
        },
        {
            "name": "flowtasks.lists",
            "description": "FlowTasks API: Lists"
        },
        {
            "name": "flowtasks.assignments",
            "description": "FlowTasks API: Assignments"
        },
        {
            "name": "flowtasks.comments",
            "description": "FlowTasks API: Comments"
        },
        {
            "name": "flowtasks.labels",
            "description": "FlowTasks API: Labels"
        },
        {
            "name": "flowtasks.checklists",
            "description": "FlowTasks API: Checklists"
        },
        {
            "name": "flowtasks.sharing",
            "description": "FlowTasks API: Board sharing and ownership"
        },
        {
            "name": "flowtasks.files",
            "description": "FlowTasks API: Files"
        },
        {
            "name": "flowtime.timer",
            "description": "FlowTime API: Timer control"
        },
        {
            "name": "flowtime.entries",
            "description": "FlowTime API: Time entries"
        },
        {
            "name": "flowtime.projects",
            "description": "FlowTime API: Projects"
        },
        {
            "name": "flowtime.reports",
            "description": "FlowTime API: Context, reports and search"
        },
        {
            "name": "flowtime.statistics",
            "description": "FlowTime API: Statistics"
        },
        {
            "name": "flowtime.working-hours",
            "description": "FlowTime API: Working hours"
        },
        {
            "name": "flowtime.members",
            "description": "FlowTime API: Members"
        },
        {
            "name": "flowtime.absences",
            "description": "FlowTime API: Absences"
        },
        {
            "name": "flowtime.app",
            "description": "FlowTime API: Team status and work location"
        },
        {
            "name": "flowtime.shifts",
            "description": "FlowTime API: Shift planning"
        }
    ],
    "paths": {
        "/team": {
            "get": {
                "operationId": "team-management.team-show",
                "summary": "Get your own team",
                "description": "Returns the team's UUID and name, the owner's UUID, the effective package, the trial state and the short codes of the active modules. During a running trial the package given is the trial's package, not the booked one; the trial block shows this.",
                "tags": [
                    "team-management.team"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f",
                                        "name": "Example Company 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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/team/modules": {
            "get": {
                "operationId": "team-management.team-modules",
                "summary": "Get the module catalogue with your own rights",
                "description": "Returns every module with its short code, long code and display name, plus whether the package includes it, whether the team has switched it on, whether it is therefore usable and whether the calling key itself may access it. own_sub_access lists your own sub-rights in the module. For modules outside the packages, such as hosting or team management, package_granted is null.",
                "tags": [
                    "team-management.team"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/team/members": {
            "get": {
                "operationId": "team-management.team-members-index",
                "summary": "List members",
                "description": "Returns the members of your own team with UUID, name, email address, derived role, free-text title, the module rights as booleans per short code, the stored sub-rights per module and the full access scopes. The module rights take into account that the owner holds every module on offer, even without the flag set.",
                "tags": [
                    "team-management.members"
                ],
                "parameters": [
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Items per page, 1 to 200, default 50.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, default 1.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/team/members/{userUuid}": {
            "get": {
                "operationId": "team-management.team-members-show",
                "summary": "Get a single member",
                "description": "Returns a single member in the same form as the list. It is addressed by the person's UUID. A UUID that belongs to nobody and one from another team both respond with HTTP 404.",
                "tags": [
                    "team-management.members"
                ],
                "parameters": [
                    {
                        "name": "userUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/team/invitations": {
            "get": {
                "operationId": "team-management.team-invitations",
                "summary": "List open invitations",
                "description": "Returns the invitations that still bind an address to this team, with UUID, address, free-text title, state, expiry time and creation time. Expired and already accepted invitations do not appear.",
                "tags": [
                    "team-management.invitations"
                ],
                "parameters": [
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Items per page, 1 to 200, default 50.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, default 1.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/team/licenses": {
            "get": {
                "operationId": "team-management.team-licenses",
                "summary": "Get seats",
                "description": "Returns the team's seat situation: purchased seats, occupied seats, open invitations, whether another invitation is possible and, for an enterprise contract, its member limit. state is active_subscription, trialing or no_subscription. The information comes from the same check that decides on another invitation in the web interface.",
                "tags": [
                    "team-management.invitations"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/invoices": {
            "get": {
                "operationId": "flowaccounting.invoices-list",
                "summary": "List invoices",
                "description": "Retrieves a paginated list of all invoices of the team (sorted by invoice date, newest first).",
                "tags": [
                    "flowaccounting.invoices"
                ],
                "parameters": [
                    {
                        "name": "include",
                        "in": "query",
                        "required": false,
                        "description": "With items, the invoice line items including name and description are embedded",
                        "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 by customer UUID (cmm_clients). Breaking change: the former filters client_id and contact_id are rejected with 422 instead of being silently ignored",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Search term (invoice number, recipient name, company)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "from",
                        "in": "query",
                        "required": false,
                        "description": "Invoice date from (YYYY-MM-DD)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "required": false,
                        "description": "Invoice date to (YYYY-MM-DD)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Items per page (1-200, default: 15)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Doe GmbH",
                                            "total": 1190,
                                            "allowed_transitions": [
                                                "paid",
                                                "cancelled"
                                            ]
                                        }
                                    ],
                                    "meta": {
                                        "current_page": 1,
                                        "per_page": 15,
                                        "total": 42
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowaccounting.invoices-create",
                "summary": "Create invoice",
                "description": "Creates a new invoice. The invoice number is assigned automatically from the team's number series, but only when the invoice is issued (status change to sent, sending by email or send on creation): a draft has invoice_number: null, and a deleted draft uses up no number. If you need the number, read it from the response after issuing or with GET. For importing old invoices it can be set with invoice_number. An invoice with a given number gets the payment method bank_transfer if payment_method is missing; the customer's default payment method is not used then. The full order of a takeover is described in the section \"Taking over documents from another system\". If the number series collides with existing documents when issuing, the issuing endpoint responds with 409 and error_code: document_number_conflict. Line items can either be passed directly on creation via items or added afterwards with the line item endpoint; both ways are valid. Without send the invoice is created with status draft. With send it is sent by email right after creation and moves to status sent. In that case the response also contains the field sent, and if sending failed, also send_error_code and send_message. The invoice is still created with 201. If billing_operation_key is passed and the invoice for it already exists, the API returns the existing state and applies neither items nor send a second time, so a repeated call never sends twice. Breaking change: the former numeric fields client_id, contact_id and items.*.product_id are no longer accepted (validation error); customer, contact and product are given only with client_uuid, contact_uuid and items.*.product_uuid. § 19 notice: if the confirmed tax profile says the team is a small business in Germany (Kleinunternehmer under Section 19 UStG) and the amount still open on the invoice would, once paid, exceed this year's revenue limit (or the limit is already exceeded), the response also contains the field notices: a list with code small_business_limit, level would_exceed or already_exceeded, context invoice, year, the amounts in euros (limit_eur, known_turnover_eur, amount_eur, turnover_after_eur), complete (false if payments are unresolved), blocking (always false) and message. The notice never blocks and never changes the tax profile; without a notice the field is absent.",
                "tags": [
                    "flowaccounting.invoices"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "550e8400-e29b-41d4-a716-446655440000",
                                        "invoice_number": null,
                                        "status": "draft"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "recipient_name": {
                                        "type": "string",
                                        "description": "Name of the invoice recipient"
                                    },
                                    "invoice_date": {
                                        "type": "string",
                                        "description": "Invoice date (YYYY-MM-DD)"
                                    },
                                    "due_date": {
                                        "type": "string",
                                        "description": "Due date (>= invoice_date). If empty: invoice_date + the team's payment term (default 14 days)"
                                    },
                                    "currency_code": {
                                        "type": "string",
                                        "description": "ISO 4217 currency code (3 characters, e.g. EUR)"
                                    },
                                    "client_uuid": {
                                        "type": "string",
                                        "description": "Optional: customer UUID (cmm_clients, team-bound)"
                                    },
                                    "contact_uuid": {
                                        "type": "string",
                                        "description": "Optional: contact UUID (team-bound)"
                                    },
                                    "invoice_number": {
                                        "type": "string",
                                        "description": "Optional: your own invoice number, meant only for importing old invoices. Normally leave it out so the number series assigns the number. AI assistants and agents only set the field if the user explicitly insists on their own number. At most 40 characters from the letters A to Z, digits, space, dot, underscore and hyphen, starting and ending with a letter or digit. Must be unique within the team, also against deleted drafts and cancelled invoices. If the number lies within the current number series, it must be below the next counter value; to do this, first set the next invoice number in the FlowAccounting settings above the highest import number. The counter stays unchanged. After creation the number can no longer be changed"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Visible note on the invoice"
                                    },
                                    "payment_method": {
                                        "type": "string",
                                        "description": "Payment method: bank_transfer | sepa | stripe | paypal | cash | other. Without a value, the customer's default payment method from FlowCRM applies (not set = bank transfer); credit card or SEPA are therefore only used if they are stored as the default there or given here explicitly. Exception: with a given invoice_number, bank_transfer always applies without a value, so that an imported old invoice is not charged to a payment method stored for the customer; an explicitly given payment method applies even then. stripe, sepa and paypal require a saved Stripe payment method of the matching type for the customer (otherwise 422)."
                                    },
                                    "stripe_pm_id": {
                                        "type": "string",
                                        "description": "Optional: a specific Stripe payment method (pm_...) of the customer. Without a value, for stripe, sepa and paypal it is filled in from the customer's default payment method."
                                    },
                                    "tax_treatment": {
                                        "type": "string",
                                        "description": "Tax treatment of this invoice: standard | reverse_charge | reverse_charge_domestic | intra_community_supply | export | non_taxable_abroad | tax_exempt. Without a value, manual invoices use the customer's tax treatment from FlowCRM. With every value except standard, the invoice shows no VAT and carries the matching mandatory note: line items with a tax_rate above 0 or with unit_price_gross are rejected with 422. Only for source manual. reverse_charge_domestic (domestic reverse charge under Section 13b UStG) and tax_exempt (exempt under Section 4 UStG) only exist under German law: a team that is not subject to German law according to its tax profile cannot set them anew (422), a value already stored stays allowed."
                                    },
                                    "tax_exemption_basis": {
                                        "type": "string",
                                        "description": "Legal basis of the exemption for tax_exempt, e.g. \"§ 4 Nr. 14\" (max. 40 characters). Appears in the note \"Steuerfrei nach … UStG\"; without a value a general note on Section 4 UStG. Ignored for other tax treatments"
                                    },
                                    "property_retention_notice": {
                                        "type": "boolean",
                                        "description": "Service connected with a property for a private person: prints the note on the two-year retention obligation (Section 14b (1) sentence 5 UStG)"
                                    },
                                    "document_language": {
                                        "type": "string",
                                        "description": "Document language of the invoice: de | en | pt. Without a value, manual invoices use the customer's invoice language from FlowCRM, otherwise de"
                                    },
                                    "send": {
                                        "type": "boolean",
                                        "description": "Send the invoice by email right after creation. Without this flag it stays a draft"
                                    },
                                    "items": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Pass invoice line items directly, 1 to 200. For each line item <code>quantity</code> and <code>unit_price</code> are required, <code>name</code>, <code>description</code>, <code>tax_rate</code>, <code>unit</code>, <code>position</code>, <code>product_uuid</code>, <code>discount_percent</code> and <code>type</code> are optional. Without <code>position</code> the line items are numbered consecutively"
                                    }
                                },
                                "required": [
                                    "recipient_name",
                                    "invoice_date",
                                    "currency_code"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/invoices/{uuid}": {
            "get": {
                "operationId": "flowaccounting.invoices-show",
                "summary": "Get invoice details",
                "description": "Get invoice details, including line items, transactions as well as total_paid, remaining_amount and allowed_transitions. sent_date is the day the invoice was sent and is null for a draft. kind is invoice or cancellation (cancellation invoice). A cancellation invoice is a document of its own with its own number from the invoice series and negative amounts; cancels_invoice names the cancelled invoice (uuid, invoice_number, invoice_date). A cancelled invoice keeps its number and content, cancelled_by_invoice points to its cancellation invoice and cancelled_at gives the time. original_invoice_number is only set for cancellations from before cancellation invoices existed: back then the cancelled invoice itself got a new number, and the field names the number it was issued under. credit_notes lists the credit notes created for this invoice, ascending by credit note date, each with uuid, credit_note_number, status, credit_note_date, total and currency_code; the full credit note comes from the credit note endpoint. credit_notes only exists in this detail response, not in the list.",
                "tags": [
                    "flowaccounting.invoices"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowaccounting.invoices-update",
                "summary": "Update invoice",
                "description": "Update an invoice. Only possible with status draft or sent and source manual (otherwise 422). A draft accepts the same header fields as on creation. An issued invoice is locked in content (GoBD, the German bookkeeping rules): only internal_notes, payment_method and stripe_pm_id can still be changed, as in the web interface. If the request contains another field (e.g. client_uuid, recipient_*, invoice_date, due_date, service_date_*, currency_code, document_language, notes, greeting_text, closing_text, payment_reference), the endpoint responds with 422 and error_code invoice_locked, names the fields in locked_fields, the allowed ones in allowed_fields and the ways to correct in correction, and writes nothing, not even the allowed fields of the same request. This also applies to a draft while a payment is running or a payment link is open. Content corrections go through POST /invoices/{uuid}/correct (correct invoice), a credit note (POST /credit-notes) or a cancellation. Breaking change: client_id and contact_id are no longer accepted; only client_uuid and contact_uuid.",
                "tags": [
                    "flowaccounting.invoices"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": 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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "recipient_name": {
                                        "type": "string",
                                        "description": "Name of the invoice recipient. Only changeable in a draft"
                                    },
                                    "due_date": {
                                        "type": "string",
                                        "description": "Due date. Only changeable in a draft"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Visible note on the invoice. Only changeable in a draft"
                                    },
                                    "tax_exemption_basis": {
                                        "type": "string",
                                        "description": "Legal basis of the exemption for tax_exempt, e.g. \"§ 4 Nr. 14\" (max. 40 characters). Only changeable in a draft"
                                    },
                                    "property_retention_notice": {
                                        "type": "boolean",
                                        "description": "Note on the retention obligation for property-related services to private persons (Section 14b (1) sentence 5 UStG). Only changeable in a draft"
                                    },
                                    "document_language": {
                                        "type": "string",
                                        "description": "Document language of the invoice: de | en | pt. Only changeable in a draft"
                                    },
                                    "internal_notes": {
                                        "type": "string",
                                        "description": "Internal note, does not appear on the invoice. Still changeable after issuing"
                                    },
                                    "payment_method": {
                                        "type": "string",
                                        "description": "Payment method (bank_transfer | stripe | sepa | paypal | cash | other). Still changeable after issuing"
                                    },
                                    "stripe_pm_id": {
                                        "type": "string",
                                        "description": "Saved Stripe payment method of the customer (pm_…) matching the payment method. Still changeable after issuing"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowaccounting.invoices-delete",
                "summary": "Delete invoice",
                "description": "Delete an invoice. Only possible with status draft (otherwise 422). A draft without a number is deleted and uses up no number. If the draft already has a number (saved before 2026-11-22, taken over with a given invoice_number, or a correction draft), it is discarded: the number stays taken and is never assigned again, and the response names it in retained_invoice_number.",
                "tags": [
                    "flowaccounting.invoices"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Entwurf verworfen. Die Rechnungsnummer RE-2026-0041 bleibt belegt und wird nicht erneut vergeben.",
                                    "retained_invoice_number": "RE-2026-0041"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/invoices/{uuid}/status": {
            "post": {
                "operationId": "flowaccounting.invoices-status",
                "summary": "Set invoice status",
                "description": "Direct status change. This endpoint only allows the transitions to sent (send) and cancelled (cancel). For a transition that is not allowed: 422 with the field allowed_transitions. On the change to sent, an invoice without a number gets its invoice number from the number series, and today counts as the sent date; no email is sent. When an issued invoice changes to cancelled, a separate cancellation invoice (kind cancellation) with a new number and negative line items is created; the invoice itself keeps its number and content and points to it with cancelled_by_invoice. A draft is cancelled without a cancellation invoice. A cancellation invoice itself can't be cancelled, corrected or duplicated. For old invoices from another system, the actual sent date can be passed with sent_date. An invoice with a sent date before the day it was recorded counts as a taken-over old document: it is not dunned automatically and not charged automatically. Both still work by hand. § 19 notice: if the confirmed tax profile says the team is a small business in Germany (Kleinunternehmer under Section 19 UStG) and the amount still open on the invoice would, once paid, exceed this year's revenue limit (or the limit is already exceeded), the response also contains the field notices: a list with code small_business_limit, level would_exceed or already_exceeded, context invoice, year, the amounts in euros (limit_eur, known_turnover_eur, amount_eur, turnover_after_eur), complete (false if payments are unresolved), blocking (always false) and message. The notice never blocks and never changes the tax profile; without a notice the field is absent.",
                "tags": [
                    "flowaccounting.invoices"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "status": {
                                        "type": "string",
                                        "description": "Target status: sent or cancelled"
                                    },
                                    "sent_date": {
                                        "type": "string",
                                        "description": "Optional: actual sent date (YYYY-MM-DD), meant only for taking over old invoices from another system. Normally leave it out, then today applies. Only together with status sent, only on the change from draft and only for manual invoices (source manual), otherwise 422. No earlier than the invoice date, no later than today. If the date is before the day the invoice was recorded here, it counts as a taken-over old document and is not dunned or charged automatically"
                                    }
                                },
                                "required": [
                                    "status"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/invoices/{uuid}/send": {
            "post": {
                "operationId": "flowaccounting.invoices-send",
                "summary": "Send invoice by email",
                "description": "Sends the invoice by email to the stored recipient. A cancelled invoice is not sent again (422, error_code: not_sendable); its cancellation invoice (kind cancellation, UUID from cancelled_by_invoice) can be sent with this endpoint and keeps the status cancelled. On the first send, an invoice with status draft automatically changes to sent and gets its invoice number; if the number series collides, the endpoint responds with 409 and error_code: document_number_conflict, and the invoice stays a draft without a number. An invoice that has already been sent can be sent again; the status stays unchanged. The endpoint is limited to 10 requests per minute per API key; further requests get 429. Not sendable are cancelled invoices, invoices without a recipient email, and e-invoice formats with open validation errors. In addition, only invoices from the sources manual, hosting_checkout and hosting_renewal can be sent, because automatically billed sources already send their invoice email themselves. In all these cases the API responds with 422 and the field error_code, which can be not_sendable, no_recipient_email or einvoice_invalid. An unknown UUID results in 404. § 19 notice: if the confirmed tax profile says the team is a small business in Germany (Kleinunternehmer under Section 19 UStG) and the amount still open on the invoice would, once paid, exceed this year's revenue limit (or the limit is already exceeded), the response also contains the field notices: a list with code small_business_limit, level would_exceed or already_exceeded, context invoice, year, the amounts in euros (limit_eur, known_turnover_eur, amount_eur, turnover_after_eur), complete (false if payments are unresolved), blocking (always false) and message. The notice never blocks and never changes the tax profile; without a notice the field is absent.",
                "tags": [
                    "flowaccounting.invoices"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/invoices/{uuid}/pdf": {
            "get": {
                "operationId": "flowaccounting.invoices-pdf",
                "summary": "Download invoice as PDF",
                "description": "Downloads the invoice as a standard PDF (team setting einvoice_format=pdf). The response is a file download, not JSON. Issued invoices return the file saved at issuing byte for byte (headers X-FlowAccounting-Document-Source: frozen and X-FlowAccounting-Document-SHA256); drafts and invoices issued before freezing existed are generated with the current data (regenerated).",
                "tags": [
                    "flowaccounting.invoices"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/invoices/{uuid}/duplicate": {
            "post": {
                "operationId": "flowaccounting.invoices-duplicate",
                "summary": "Duplicate invoice",
                "description": "Duplicates the invoice including its line items as a new draft without an invoice number; the number is assigned on issuing. Response: 201 with the new invoice.",
                "tags": [
                    "flowaccounting.invoices"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/invoices/{uuid}/correct": {
            "post": {
                "operationId": "flowaccounting.invoices-correct",
                "summary": "Correct invoice",
                "description": "Cancels the sent invoice with a separate cancellation invoice and creates a correction draft with the same content. The correction carries the original's number with a correction suffix; the original keeps its number, is set to cancelled and points to the cancellation invoice and the correction. Possible with sent, overdue, past_due and partially_paid and only for manually managed invoices; otherwise 422. Response: 201 with the corrected invoice.",
                "tags": [
                    "flowaccounting.invoices"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "550e8400-e29b-41d4-a716-446655440000",
                                        "invoice_number": "RE-2026-0042-1",
                                        "status": "draft"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/invoices/{uuid}/dunning": {
            "post": {
                "operationId": "flowaccounting.invoices-dunning",
                "summary": "Send dunning notice",
                "description": "Orders a payment reminder or dunning notice. level must be exactly the next level due: a skipped or repeated level is rejected with 422 and dunning_level_not_due. Which level is due depends on the dunning intervals in the team settings and the levels already sent, so on the same rules as the automatic dunning run. Without recipient_emails the customer's recipients apply.",
                "tags": [
                    "flowaccounting.invoices"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "level": "reminder",
                                    "data": {
                                        "uuid": "550e8400-e29b-41d4-a716-446655440000",
                                        "status": "overdue"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "level": {
                                        "type": "string",
                                        "description": "Dunning level: reminder, dunning_1, dunning_2 or dunning_3"
                                    },
                                    "recipient_emails": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Different recipient addresses, at most 50"
                                    }
                                },
                                "required": [
                                    "level"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/invoices/{uuid}/mark-paid": {
            "post": {
                "operationId": "flowaccounting.invoices-mark-paid",
                "summary": "Mark invoice as paid",
                "description": "Marks the invoice as fully paid using a Stripe PaymentIntent ID. Idempotent: a repeated request with the same PaymentIntent ID returns the current state (200). Allowed starting statuses: sent, requires_action, past_due.",
                "tags": [
                    "flowaccounting.invoices"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "stripe_payment_intent_id": {
                                        "type": "string",
                                        "description": "Stripe PaymentIntent ID (pi_3Q...)"
                                    },
                                    "date_paid": {
                                        "type": "string",
                                        "description": "Payment date (YYYY-MM-DD), today at the latest (calendar day in Germany)"
                                    }
                                },
                                "required": [
                                    "stripe_payment_intent_id"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/invoices/{uuid}/record-payment-intent": {
            "post": {
                "operationId": "flowaccounting.invoices-record-payment-intent",
                "summary": "Store PaymentIntent",
                "description": "Stores a Stripe PaymentIntent ID on the invoice without setting the payment status to paid. For payments awaiting 3DS or past due.",
                "tags": [
                    "flowaccounting.invoices"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "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": "Charge invoice via Stripe",
                "description": "Starts the charge of the invoice through the stored Stripe payment method (card or SEPA direct debit). Requirement: the invoice has a customer and a Stripe-backed payment method, otherwise the endpoint responds with 422 and an error_code (no_client, wrong_payment_method). A draft is issued before the charge (invoice number, status sent, no email), because a payment never runs against an invoice without a number; if the number series collides, the endpoint responds with 409 and error_code: document_number_conflict, and the draft stays unchanged. A declined payment is not a request error: the response is 200 with charged: false. A repeated call never charges twice. If Stripe is temporarily unreachable, the endpoint responds with 503. The call is rate-limited per API key.",
                "tags": [
                    "flowaccounting.invoices"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/invoices/{uuid}/payment-status": {
            "get": {
                "operationId": "flowaccounting.invoices-payment-status",
                "summary": "Query payment status",
                "description": "Lightweight status query for polling after a charge, without line items and transactions. Returns uuid, status, payment_intent_status, last_charge_error and stripe_charge_id. SEPA direct debits are only finally confirmed after some days; the status then changes without any further call.",
                "tags": [
                    "flowaccounting.invoices"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/invoices/{uuid}/issue-check": {
            "get": {
                "operationId": "flowaccounting.invoices-issue-check",
                "summary": "Checklist before issuing",
                "description": "Checks an invoice before issuing for the mandatory details under Sections 14 and 14a of the German VAT Act (UStG): addresses of issuer and customer, tax number or VAT ID, line items, service date, reverse charge, Section 19 UStG, deadlines. Returns the findings. Read-only. findings is a list with code (e.g. seller.address, buyer.vat_id, tax.small_business_limit), severity (error, warning or info), message in the language of the key owner, legal_basis and target (where the finding is fixed: invoice, recipient, company, tax_profile). blocks_manual_issue says whether the web interface refuses issuing because of errors, requires_confirmation whether notes have to be confirmed there. Issuing through the API (POST /invoices/{uuid}/status, POST /invoices/{uuid}/send) is never blocked (blocks_api_issue is always false); the findings are saved with the invoice on issuing and are then available in issued_snapshot. Without a confirmed tax profile, the findings that depend on the VAT status (e.g. tax number, service date, reverse charge, deadlines) are only info. The mandatory details of every invoice still remain errors and block issuing in the web interface: address of the issuer, name and address of the customer, invoice date and line items with a quantity; the same goes for the e-invoice validation. The Section 19 warning (tax.small_business_limit) stays a warning; tax_profile names the state used (confirmed, vat_regime, governs). Teams that are not registered for VAT in Germany according to their tax profile get no German VAT findings. An unknown UUID results in 404.",
                "tags": [
                    "flowaccounting.invoices"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/invoices/{uuid}/einvoice": {
            "get": {
                "operationId": "flowaccounting.invoices-einvoice",
                "summary": "Download archived e-invoice",
                "description": "Returns the e-invoice archived on issuing byte for byte: for XRechnung the XML file (application/xml), for ZUGFeRD the PDF/A-3 with embedded XML (application/pdf). The response is a file download, not JSON; it is never regenerated. Headers: X-FlowAccounting-Einvoice-SHA256 (SHA-256 of the returned file), X-FlowAccounting-Einvoice-XML-SHA256 (SHA-256 of the invoice XML, for ZUGFeRD the embedded one), X-FlowAccounting-Einvoice-Uuid (archive entry). Without an archived e-invoice (draft, classic PDF, issued before archiving existed) the endpoint responds with 404 and error: einvoice_not_archived; if the file fails the hash check, with 409 and error: einvoice_integrity_failed. An unknown UUID or an invoice of another team results in 404.",
                "tags": [
                    "flowaccounting.invoices"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/octet-stream": {
                                "schema": {
                                    "type": "string",
                                    "format": "binary"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/invoices/{uuid}/einvoice/validation": {
            "get": {
                "operationId": "flowaccounting.invoices-einvoice-validation",
                "summary": "Validation report of the archived e-invoice",
                "description": "Returns the latest validation report of the invoice's archived e-invoice. Read-only. The validation ran on exactly the issued bytes when archiving (well-formedness, XSD, business rules according to EN 16931 and XRechnung, mandatory details under Section 14 (4) UStG). validation_status is valid, valid_with_warnings, business_rule_errors, mandatory_field_errors or format_error. report.messages is a list with code (e.g. BR-DE-2, FAC-PFLICHT-6), severity (error or warning), category (format, business_rule, mandatory_vat) and message. Without an archived e-invoice 404 with error: einvoice_not_archived; an unknown UUID or an invoice of another team results in 404.",
                "tags": [
                    "flowaccounting.invoices"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/invoices/{uuid}/items": {
            "get": {
                "operationId": "flowaccounting.items-list",
                "summary": "List line items",
                "description": "List all line items of an invoice.",
                "tags": [
                    "flowaccounting.items"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowaccounting.items-create",
                "summary": "Add line item",
                "description": "Adds a line item to the invoice. Breaking change: the former numeric field product_id is no longer accepted; the product is given only with product_uuid.",
                "tags": [
                    "flowaccounting.items"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "quantity": {
                                        "type": "number",
                                        "description": "Quantity (min 0.01)"
                                    },
                                    "unit_price": {
                                        "type": "number",
                                        "description": "Unit price (negative allowed for credit notes)"
                                    },
                                    "name": {
                                        "type": "string",
                                        "description": "Line item name (max 255)"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Description (max 1000)"
                                    },
                                    "tax_rate": {
                                        "type": "number",
                                        "description": "Tax rate in percent (0-100). Without a value 0 %"
                                    },
                                    "unit": {
                                        "type": "string",
                                        "description": "Unit (e.g. hrs)"
                                    },
                                    "product_uuid": {
                                        "type": "string",
                                        "description": "Product UUID (fac_products, team-bound)"
                                    }
                                },
                                "required": [
                                    "quantity",
                                    "unit_price"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/invoices/{uuid}/items/{itemUuid}": {
            "put": {
                "operationId": "flowaccounting.items-update",
                "summary": "Edit line item",
                "description": "Edit a line item. The line item is addressed by its UUID; numeric IDs are no longer accepted (HTTP 404). Only with 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": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "quantity": {
                                        "type": "number",
                                        "description": "Quantity"
                                    },
                                    "unit_price": {
                                        "type": "number",
                                        "description": "Unit price"
                                    },
                                    "name": {
                                        "type": "string",
                                        "description": "Line item name"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowaccounting.items-delete",
                "summary": "Delete line item",
                "description": "Delete a line item. The line item is addressed by its UUID. Only with 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": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/invoices/{uuid}/transactions": {
            "get": {
                "operationId": "flowaccounting.transactions-list",
                "summary": "List transactions of an invoice",
                "description": "List all transactions of an invoice (sorted by date, newest first).",
                "tags": [
                    "flowaccounting.transactions"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowaccounting.transactions-create",
                "summary": "Record transaction",
                "description": "Records a transaction. Only allowed if the invoice has the status sent, partially_paid or overdue. The transaction is booked in the invoice currency. If it settles the invoice, the invoice takes the transaction_date of this payment as its paid_date, also for payments recorded later. § 19 notice: only payments of type payment trigger it. If the confirmed tax profile says the team is a small business in Germany (Kleinunternehmer under Section 19 UStG) and this payment would exceed the revenue limit of its calendar year (or the limit is already exceeded), the response also contains the field notices: a list with code small_business_limit, level would_exceed or already_exceeded, context payment, year, the amounts in euros (limit_eur, known_turnover_eur, amount_eur, turnover_after_eur), complete (false if payments are unresolved), blocking (always false) and message. The notice never blocks and never changes the tax profile; without a notice the field is absent.",
                "tags": [
                    "flowaccounting.transactions"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "type": "string",
                                        "description": "Transaction type: payment | refund | credit"
                                    },
                                    "amount": {
                                        "type": "number",
                                        "description": "Amount (min 0.01)"
                                    },
                                    "transaction_date": {
                                        "type": "string",
                                        "description": "Transaction date (YYYY-MM-DD), today at the latest (calendar day in Germany)"
                                    },
                                    "payment_method": {
                                        "type": "string",
                                        "description": "Payment method: bank_transfer | sepa | stripe | paypal | cash | other"
                                    },
                                    "reference": {
                                        "type": "string",
                                        "description": "Reference (max 255)"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Note (max 1000)"
                                    }
                                },
                                "required": [
                                    "type",
                                    "amount",
                                    "transaction_date",
                                    "payment_method"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/invoices/{uuid}/transactions/{transactionUuid}": {
            "delete": {
                "operationId": "flowaccounting.transactions-delete",
                "summary": "Delete transaction",
                "description": "Delete a transaction. The transaction is addressed by its UUID; numeric IDs are no longer accepted (HTTP 404). Not possible for invoices with status draft or 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": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/transactions": {
            "get": {
                "operationId": "flowaccounting.transactions-all",
                "summary": "Team-wide transaction overview",
                "description": "Team-wide transaction overview across all invoices (paginated, 25 per page).",
                "tags": [
                    "flowaccounting.transactions"
                ],
                "parameters": [
                    {
                        "name": "from",
                        "in": "query",
                        "required": false,
                        "description": "Transaction date from (YYYY-MM-DD)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "required": false,
                        "description": "Transaction date to (YYYY-MM-DD)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Search term (note, reference, invoice number)",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/products": {
            "get": {
                "operationId": "flowaccounting.products-list",
                "summary": "List products",
                "description": "List products (paginated, sorted by frequency of use).",
                "tags": [
                    "flowaccounting.products"
                ],
                "parameters": [
                    {
                        "name": "type",
                        "in": "query",
                        "required": false,
                        "description": "Filter by source (e.g. manual)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Search term (title/description)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Items per page (1-200, default: 50)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowaccounting.products-create",
                "summary": "Create product",
                "description": "Create a new product.",
                "tags": [
                    "flowaccounting.products"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "description": "Product name (max 255)"
                                    },
                                    "unit_price": {
                                        "type": "number",
                                        "description": "Net unit price (min 0). Required if <code>unit_price_gross</code> is missing; not together with <code>unit_price_gross</code>"
                                    },
                                    "unit_price_gross": {
                                        "type": "number",
                                        "description": "Gross unit price incl. VAT (min 0), as an alternative to <code>unit_price</code>. Stored exactly; the net price is derived from it"
                                    },
                                    "tax_rate": {
                                        "type": "number",
                                        "description": "Tax rate (0-100)"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Description"
                                    },
                                    "unit": {
                                        "type": "string",
                                        "description": "Unit (max 50)"
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "Active (default: true)"
                                    }
                                },
                                "required": [
                                    "title",
                                    "unit_price",
                                    "tax_rate"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/products/{uuid}": {
            "get": {
                "operationId": "flowaccounting.products-show",
                "summary": "Get product",
                "description": "Retrieves a single product of your team by its uuid. Unknown entries or entries of another team result in 404.",
                "tags": [
                    "flowaccounting.products"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowaccounting.products-update",
                "summary": "Update product",
                "description": "Update a product.",
                "tags": [
                    "flowaccounting.products"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "description": "Product name"
                                    },
                                    "unit_price": {
                                        "type": "number",
                                        "description": "Net unit price, makes the product a net product"
                                    },
                                    "unit_price_gross": {
                                        "type": "number",
                                        "description": "Gross unit price incl. VAT, stored exactly; not together with <code>unit_price</code>"
                                    },
                                    "tax_rate": {
                                        "type": "number",
                                        "description": "Tax rate"
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "Active"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowaccounting.products-delete",
                "summary": "Delete product",
                "description": "Delete a product.",
                "tags": [
                    "flowaccounting.products"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/tax-rates": {
            "get": {
                "operationId": "flowaccounting.tax-rates-list",
                "summary": "List tax rates",
                "description": "Get all tax rates of the team (not paginated, sorted by sort_order).",
                "tags": [
                    "flowaccounting.tax-rates"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowaccounting.tax-rates-create",
                "summary": "Create tax rate",
                "description": "Create a new tax rate.",
                "tags": [
                    "flowaccounting.tax-rates"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name (max 255)"
                                    },
                                    "rate": {
                                        "type": "number",
                                        "description": "Tax rate in percent (0-100)"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Description"
                                    },
                                    "is_default": {
                                        "type": "boolean",
                                        "description": "Set as default"
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "Active"
                                    },
                                    "sort_order": {
                                        "type": "integer",
                                        "description": "Sort order (>= 0)"
                                    }
                                },
                                "required": [
                                    "name",
                                    "rate"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/tax-rates/{uuid}": {
            "get": {
                "operationId": "flowaccounting.tax-rates-show",
                "summary": "Get tax rate",
                "description": "Retrieves a single tax rate of your team by its uuid. Unknown entries or entries of another team result in 404.",
                "tags": [
                    "flowaccounting.tax-rates"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowaccounting.tax-rates-update",
                "summary": "Update tax rate",
                "description": "Update a tax rate.",
                "tags": [
                    "flowaccounting.tax-rates"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name"
                                    },
                                    "rate": {
                                        "type": "number",
                                        "description": "Tax rate"
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "Active"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowaccounting.tax-rates-delete",
                "summary": "Delete tax rate",
                "description": "Delete a tax rate. Not possible if it is used in invoice line items (422).",
                "tags": [
                    "flowaccounting.tax-rates"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/tax-rates/{uuid}/default": {
            "post": {
                "operationId": "flowaccounting.tax-rates-default",
                "summary": "Set as default",
                "description": "Sets this tax rate as the team default (all others lose the default flag).",
                "tags": [
                    "flowaccounting.tax-rates"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/recurring-invoices": {
            "get": {
                "operationId": "flowaccounting.recurring-list",
                "summary": "List",
                "description": "List recurring invoices (paginated, 25 per page).",
                "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 by customer UUID. Breaking change: the former filter client_id is rejected with 422 instead of being silently ignored",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowaccounting.recurring-create",
                "summary": "Create recurring invoice",
                "description": "Create a new recurring invoice. Breaking change: the former numeric field client_id is no longer accepted; the customer is given only with client_uuid.",
                "tags": [
                    "flowaccounting.recurring"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "tax_exemption_basis": {
                                        "type": "string",
                                        "description": "Legal basis of the exemption if the customer has the tax treatment tax_exempt, e.g. \"§ 4 Nr. 14\" (max. 40 characters). Taken over into the generated invoices and printed in the note"
                                    },
                                    "client_uuid": {
                                        "type": "string",
                                        "description": "Customer UUID (cmm_clients, team-bound)"
                                    },
                                    "interval_value": {
                                        "type": "integer",
                                        "description": "Interval value (>= 1)"
                                    },
                                    "interval_unit": {
                                        "type": "string",
                                        "description": "Interval unit: day | week | month | year"
                                    },
                                    "start_date": {
                                        "type": "string",
                                        "description": "Start date (YYYY-MM-DD)"
                                    },
                                    "template_items": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Line items of the template (min 1)"
                                    },
                                    "auto_send": {
                                        "type": "boolean",
                                        "description": "Send automatically"
                                    },
                                    "end_date": {
                                        "type": "string",
                                        "description": "End date (>= 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": "Get recurring invoice",
                "description": "Retrieves a single recurring invoice of your team by its uuid. Unknown entries or entries of another team result in 404.",
                "tags": [
                    "flowaccounting.recurring"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowaccounting.recurring-update",
                "summary": "Update",
                "description": "Update a recurring invoice.",
                "tags": [
                    "flowaccounting.recurring"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "tax_exemption_basis": {
                                        "type": "string",
                                        "description": "Legal basis of the exemption if the customer has the tax treatment tax_exempt, e.g. \"§ 4 Nr. 14\" (max. 40 characters). Taken over into the generated invoices and printed in the note"
                                    },
                                    "interval_value": {
                                        "type": "integer",
                                        "description": "Interval value"
                                    },
                                    "interval_unit": {
                                        "type": "string",
                                        "description": "Interval unit"
                                    },
                                    "auto_send": {
                                        "type": "boolean",
                                        "description": "Send automatically"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowaccounting.recurring-delete",
                "summary": "Delete",
                "description": "Delete a recurring invoice.",
                "tags": [
                    "flowaccounting.recurring"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/recurring-invoices/{uuid}/pause": {
            "post": {
                "operationId": "flowaccounting.recurring-pause",
                "summary": "Pause",
                "description": "Pauses the template (status paused): no new invoices are generated.",
                "tags": [
                    "flowaccounting.recurring"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/recurring-invoices/{uuid}/activate": {
            "post": {
                "operationId": "flowaccounting.recurring-activate",
                "summary": "Activate",
                "description": "Activates the template again (status active) and sets what the automatic run may do. auto_send, auto_charge and recipient_emails are the actual approval: without them only drafts are created. auto_send is on by default, auto_charge is off by default and requires a Stripe or SEPA payment method on the series (otherwise 422). Without recipient_emails the customer's recipients apply; if no address is stored there and the invoices should be sent, the API responds with 422.",
                "tags": [
                    "flowaccounting.recurring"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "auto_send": {
                                        "type": "boolean",
                                        "description": "Send generated invoices automatically (default: true)"
                                    },
                                    "auto_charge": {
                                        "type": "boolean",
                                        "description": "Charge generated invoices automatically (default: false, requires payment method stripe or sepa)"
                                    },
                                    "recipient_emails": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Recipient addresses for automatic sending, at most 50"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/recurring-invoices/{uuid}/generate": {
            "post": {
                "operationId": "flowaccounting.recurring-generate",
                "summary": "Generate next invoice",
                "description": "Generates the due invoice of the series right away, without waiting for the nightly run. If no invoice is due right now or the series' approval is no longer valid, the API responds with 422 and nothing_to_generate.",
                "tags": [
                    "flowaccounting.recurring"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "550e8400-e29b-41d4-a716-446655440000",
                                        "invoice_number": "RE-2026-0042",
                                        "status": "sent"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/installment-plans": {
            "get": {
                "operationId": "flowaccounting.installment-plans-list",
                "summary": "List",
                "description": "Installment plans of the team (paginated, 25 per page) with amounts, converted invoices and schedule.",
                "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 by customer UUID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowaccounting.installment-plans-create",
                "summary": "Convert invoices into an installment plan",
                "description": "Converts open, sent invoices (source manual or quote_accepted) of one customer into an installment plan. Unpaid invoices are cancelled, partly paid ones are settled for the open rest with a credit note. The open amount is then issued on each date as a numbered part invoice. Refused conversions respond with 422 and error=installment_plan_refused.",
                "tags": [
                    "flowaccounting.installment-plans"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "invoice_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "UUIDs of the invoices (team-bound, same customer and same currency)"
                                    },
                                    "start_date": {
                                        "type": "string",
                                        "description": "First installment on (YYYY-MM-DD)"
                                    },
                                    "schedule_mode": {
                                        "type": "string",
                                        "description": "Split: amount (fixed installment amount, smaller final installment) | count (number of equal installments) | end_date (until an end date)"
                                    },
                                    "installment_amount": {
                                        "type": "number",
                                        "description": "Amount per installment, required with schedule_mode=amount"
                                    },
                                    "installment_count": {
                                        "type": "integer",
                                        "description": "Number of installments (1 to 240), required with schedule_mode=count"
                                    },
                                    "end_date": {
                                        "type": "string",
                                        "description": "Last installment by (YYYY-MM-DD), required with schedule_mode=end_date"
                                    },
                                    "interval_unit": {
                                        "type": "string",
                                        "description": "month (default) | week"
                                    },
                                    "interval_value": {
                                        "type": "integer",
                                        "description": "Interval (1 to 12), e.g. 3 with month = quarterly"
                                    },
                                    "payment_method": {
                                        "type": "string",
                                        "description": "bank_transfer | stripe | sepa | paypal | cash | other (default: payment method of the invoice)"
                                    },
                                    "auto_charge": {
                                        "type": "boolean",
                                        "description": "Charge part invoices automatically on the day they are created (stripe/sepa only)"
                                    },
                                    "auto_send": {
                                        "type": "boolean",
                                        "description": "Number part invoices and send them automatically (default true; false = draft)"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Note on every part invoice and on the installment agreement"
                                    }
                                },
                                "required": [
                                    "invoice_uuids",
                                    "start_date",
                                    "schedule_mode"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/installment-plans/{uuid}": {
            "get": {
                "operationId": "flowaccounting.installment-plans-show",
                "summary": "Get installment plan",
                "description": "An installment plan with all installments and part invoices. public_url is the link to the public customer page (null as long as no link has been created or the link is revoked). Installments with kind=extra are extra payments the customer made there. Unknown entries or entries of another team result in 404.",
                "tags": [
                    "flowaccounting.installment-plans"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/installment-plans/{uuid}/invoices": {
            "post": {
                "operationId": "flowaccounting.installment-plans-add-invoice",
                "summary": "Add invoice",
                "description": "Adds another open invoice of the same customer. keep_rate extends the plan with the same installment, new_rate spreads the whole rest again with the given plan values, separate creates a second installment plan and returns it.",
                "tags": [
                    "flowaccounting.installment-plans"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "invoice_uuid": {
                                        "type": "string",
                                        "description": "UUID of the invoice (team-bound)"
                                    },
                                    "add_mode": {
                                        "type": "string",
                                        "description": "keep_rate | new_rate | separate"
                                    },
                                    "start_date": {
                                        "type": "string",
                                        "description": "First installment, required with add_mode=separate"
                                    },
                                    "schedule_mode": {
                                        "type": "string",
                                        "description": "Split: amount (fixed installment amount, smaller final installment) | count (number of equal installments) | end_date (until an end date)"
                                    },
                                    "installment_amount": {
                                        "type": "number",
                                        "description": "Amount per installment, required with schedule_mode=amount"
                                    },
                                    "installment_count": {
                                        "type": "integer",
                                        "description": "Number of installments (1 to 240), required with schedule_mode=count"
                                    },
                                    "end_date": {
                                        "type": "string",
                                        "description": "Last installment by (YYYY-MM-DD), required with schedule_mode=end_date"
                                    },
                                    "interval_unit": {
                                        "type": "string",
                                        "description": "month (default) | week"
                                    },
                                    "interval_value": {
                                        "type": "integer",
                                        "description": "Interval (1 to 12), e.g. 3 with month = quarterly"
                                    },
                                    "payment_method": {
                                        "type": "string",
                                        "description": "bank_transfer | stripe | sepa | paypal | cash | other (default: payment method of the invoice)"
                                    },
                                    "auto_charge": {
                                        "type": "boolean",
                                        "description": "Charge part invoices automatically on the day they are created (stripe/sepa only)"
                                    },
                                    "auto_send": {
                                        "type": "boolean",
                                        "description": "Number part invoices and send them automatically (default true; false = draft)"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Note on every part invoice and on the installment agreement"
                                    }
                                },
                                "required": [
                                    "invoice_uuid",
                                    "add_mode"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/installment-plans/{uuid}/reschedule": {
            "post": {
                "operationId": "flowaccounting.installment-plans-reschedule",
                "summary": "Recalculate installments",
                "description": "Spreads the rest not yet billed again. Part invoices already issued stay unchanged.",
                "tags": [
                    "flowaccounting.installment-plans"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "schedule_mode": {
                                        "type": "string",
                                        "description": "Split: amount (fixed installment amount, smaller final installment) | count (number of equal installments) | end_date (until an end date)"
                                    },
                                    "installment_amount": {
                                        "type": "number",
                                        "description": "Amount per installment, required with schedule_mode=amount"
                                    },
                                    "installment_count": {
                                        "type": "integer",
                                        "description": "Number of installments (1 to 240), required with schedule_mode=count"
                                    },
                                    "end_date": {
                                        "type": "string",
                                        "description": "Last installment by (YYYY-MM-DD), required with schedule_mode=end_date"
                                    },
                                    "interval_unit": {
                                        "type": "string",
                                        "description": "month (default) | week"
                                    },
                                    "interval_value": {
                                        "type": "integer",
                                        "description": "Interval (1 to 12), e.g. 3 with month = quarterly"
                                    },
                                    "start_date": {
                                        "type": "string",
                                        "description": "Next installment on (default: next open date)"
                                    }
                                },
                                "required": [
                                    "schedule_mode"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/installment-plans/{uuid}/installments": {
            "put": {
                "operationId": "flowaccounting.installment-plans-installments",
                "summary": "Set installments individually",
                "description": "Replaces all installments that are still open. The total must match the rest not yet billed exactly, otherwise 422.",
                "tags": [
                    "flowaccounting.installment-plans"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "installments": {
                                        "type": "array",
                                        "items": [],
                                        "description": "List of objects with date (YYYY-MM-DD, from today) and amount (from 0.01)"
                                    }
                                },
                                "required": [
                                    "installments"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/installment-plans/{uuid}/pause": {
            "post": {
                "operationId": "flowaccounting.installment-plans-pause",
                "summary": "Pause",
                "description": "Pauses an active installment plan. No part invoices are created until it is resumed.",
                "tags": [
                    "flowaccounting.installment-plans"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/installment-plans/{uuid}/resume": {
            "post": {
                "operationId": "flowaccounting.installment-plans-resume",
                "summary": "Resume",
                "description": "Resumes a paused installment plan. The open installments keep their amounts and start on the new date.",
                "tags": [
                    "flowaccounting.installment-plans"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "next_date": {
                                        "type": "string",
                                        "description": "Next installment on (YYYY-MM-DD, from today)"
                                    }
                                },
                                "required": [
                                    "next_date"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/installment-plans/{uuid}/cancel": {
            "post": {
                "operationId": "flowaccounting.installment-plans-cancel",
                "summary": "End",
                "description": "Ends the installment plan early. bill_rest issues the rest right away as the last part invoice, waive waives it without any further invoice.",
                "tags": [
                    "flowaccounting.installment-plans"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "mode": {
                                        "type": "string",
                                        "description": "bill_rest | waive"
                                    }
                                },
                                "required": [
                                    "mode"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/billable-items": {
            "get": {
                "operationId": "flowaccounting.billable-items-list",
                "summary": "List",
                "description": "List billable items (paginated, 25 per page).",
                "tags": [
                    "flowaccounting.billable-items"
                ],
                "parameters": [
                    {
                        "name": "open",
                        "in": "query",
                        "required": false,
                        "description": "true = open items only, false = billed items only",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "client_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Filter by customer UUID. Breaking change: the former filter client_id is rejected with 422 instead of being silently ignored",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowaccounting.billable-items-create",
                "summary": "Create item",
                "description": "Create a new billable item. Breaking change: the former numeric field client_id is no longer accepted; the customer is given only with client_uuid.",
                "tags": [
                    "flowaccounting.billable-items"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "tax_exemption_basis": {
                                        "type": "string",
                                        "description": "Legal basis of the exemption if the customer has the tax treatment tax_exempt, e.g. \"§ 4 Nr. 14\" (max. 40 characters). Taken over into the generated invoices and printed in the note"
                                    },
                                    "client_uuid": {
                                        "type": "string",
                                        "description": "Customer UUID (cmm_clients, team-bound)"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Description (max 255)"
                                    },
                                    "unit_price": {
                                        "type": "number",
                                        "description": "Unit price"
                                    },
                                    "quantity": {
                                        "type": "number",
                                        "description": "Quantity (min 0.01)"
                                    },
                                    "unit": {
                                        "type": "string",
                                        "description": "Unit (max 50)"
                                    },
                                    "tax_rate": {
                                        "type": "number",
                                        "description": "Tax rate"
                                    },
                                    "due_date": {
                                        "type": "string",
                                        "description": "Due date"
                                    },
                                    "auto_bill": {
                                        "type": "boolean",
                                        "description": "Bill automatically"
                                    }
                                },
                                "required": [
                                    "client_uuid",
                                    "description",
                                    "unit_price"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/billable-items/{uuid}": {
            "get": {
                "operationId": "flowaccounting.billable-items-show",
                "summary": "Get billable item",
                "description": "Retrieves a single billable item of your team by its uuid. Unknown entries or entries of another team result in 404.",
                "tags": [
                    "flowaccounting.billable-items"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowaccounting.billable-items-update",
                "summary": "Edit item",
                "description": "Edit. Only possible as long as the item has not been billed (422).",
                "tags": [
                    "flowaccounting.billable-items"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "tax_exemption_basis": {
                                        "type": "string",
                                        "description": "Legal basis of the exemption if the customer has the tax treatment tax_exempt, e.g. \"§ 4 Nr. 14\" (max. 40 characters). Taken over into the generated invoices and printed in the note"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Description"
                                    },
                                    "unit_price": {
                                        "type": "number",
                                        "description": "Unit price"
                                    },
                                    "quantity": {
                                        "type": "number",
                                        "description": "Quantity"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowaccounting.billable-items-delete",
                "summary": "Delete item",
                "description": "Delete. Only possible as long as it has not been billed (422).",
                "tags": [
                    "flowaccounting.billable-items"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/billable-items/consolidate": {
            "post": {
                "operationId": "flowaccounting.billable-items-consolidate",
                "summary": "Consolidate items",
                "description": "Combines several open items into invoices: one draft invoice is created per customer. Response: 201 with the invoices created.",
                "tags": [
                    "flowaccounting.billable-items"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "UUIDs of the items to consolidate (min 1, unique)"
                                    }
                                },
                                "required": [
                                    "uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/billable-items/{uuid}/generate": {
            "post": {
                "operationId": "flowaccounting.billable-items-generate",
                "summary": "Bill a single item",
                "description": "Bills exactly this item right away and returns the draft invoice. The due date is deliberately skipped, and nothing is sent. An item that has already been billed returns its existing invoice with 200 instead of a second one.",
                "tags": [
                    "flowaccounting.billable-items"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "550e8400-e29b-41d4-a716-446655440000",
                                        "status": "draft"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/quotes": {
            "get": {
                "operationId": "flowaccounting.quotes-list",
                "summary": "List quotes",
                "description": "Retrieves a paginated list of all quotes of the team, sorted by quote date, newest first.",
                "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 by customer UUID",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Search term (quote number, recipient name, company)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "from",
                        "in": "query",
                        "required": false,
                        "description": "Quote date from (YYYY-MM-DD)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "required": false,
                        "description": "Quote date to (YYYY-MM-DD)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Items per page (1-200, default: 25)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowaccounting.quotes-create",
                "summary": "Create quote",
                "description": "Creates a quote with status draft. The quote number is assigned automatically from the team's number series; for taking over existing quotes from another system it can be set with quote_number. Fields not given are filled in from the team settings and the customer data, such as currency, language, validity, greeting and closing text. The complete list of writable fields comes from GET /flowaccounting/context. The quote takes over the tax treatment from the customer in FlowCRM and returns it as tax_treatment (standard, reverse_charge, reverse_charge_domestic, intra_community_supply, export, non_taxable_abroad or tax_exempt). With every value except standard the quote shows no VAT: a given tax_rate is set to 0. The invoice created from an accepted quote takes over its tax treatment.",
                "tags": [
                    "flowaccounting.quotes"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "client_uuid": {
                                        "type": "string",
                                        "description": "Customer UUID (team-bound)"
                                    },
                                    "contact_uuid": {
                                        "type": "string",
                                        "description": "Contact UUID of the customer"
                                    },
                                    "quote_number": {
                                        "type": "string",
                                        "description": "Optional: your own quote number, meant only for taking over existing quotes from another system. Normally leave it out so the number series assigns the number on creation. AI assistants and agents only set the field if the user explicitly insists on their own number. At most 40 characters from the letters A to Z, digits, space, dot, underscore and hyphen, starting and ending with a letter or digit. Must be unique within the team, also against deleted drafts and withdrawn quotes. If the number lies within the current number series, it must be below the next counter value; to do this, first set the next quote number in the FlowAccounting settings above the highest import number. The counter stays unchanged. After creation the number can no longer be changed"
                                    },
                                    "quote_date": {
                                        "type": "string",
                                        "description": "Quote date (YYYY-MM-DD, default: today)"
                                    },
                                    "valid_until": {
                                        "type": "string",
                                        "description": "Valid until (YYYY-MM-DD, default: the team's validity period)"
                                    },
                                    "signature_type": {
                                        "type": "string",
                                        "description": "Acceptance type: button or canvas"
                                    },
                                    "currency_code": {
                                        "type": "string",
                                        "description": "EUR, USD, CHF or GBP"
                                    },
                                    "document_language": {
                                        "type": "string",
                                        "description": "de, en or pt"
                                    },
                                    "discount_percent": {
                                        "type": "number",
                                        "description": "Overall discount in percent"
                                    },
                                    "greeting_text": {
                                        "type": "string",
                                        "description": "Cover text above the line items"
                                    },
                                    "closing_text": {
                                        "type": "string",
                                        "description": "Closing text below the line items"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Visible note on the quote"
                                    },
                                    "tax_exemption_basis": {
                                        "type": "string",
                                        "description": "Legal basis of the exemption with the tax treatment tax_exempt, e.g. \"§ 4 Nr. 14\" (max. 40 characters), printed in the note on the document"
                                    },
                                    "internal_notes": {
                                        "type": "string",
                                        "description": "Internal note, not on the document"
                                    },
                                    "items": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Line items, 1 to 200. For each line item <code>name</code>, <code>quantity</code>, <code>unit_price</code> and <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> and <code>project_uuid</code>"
                                    },
                                    "recipient_name": {
                                        "type": "string",
                                        "description": "Different recipient name"
                                    },
                                    "recipient_company": {
                                        "type": "string",
                                        "description": "Different recipient company"
                                    },
                                    "recipient_email": {
                                        "type": "string",
                                        "description": "Different recipient address"
                                    }
                                },
                                "required": [
                                    "client_uuid",
                                    "items"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/quotes/{uuid}": {
            "get": {
                "operationId": "flowaccounting.quotes-show",
                "summary": "Get quote details",
                "description": "Quote details including line items, totals, available_actions and allowed_transitions.",
                "tags": [
                    "flowaccounting.quotes"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowaccounting.quotes-update",
                "summary": "Update quote",
                "description": "Changes a quote with status draft; otherwise 422. Only the fields sent are changed, all others stay as they are. If items is passed, the list replaces all line items. The quote number can't be changed: quote_number is rejected here with 422.",
                "tags": [
                    "flowaccounting.quotes"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "valid_until": {
                                        "type": "string",
                                        "description": "Valid until (YYYY-MM-DD)"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Visible note on the quote"
                                    },
                                    "tax_exemption_basis": {
                                        "type": "string",
                                        "description": "Legal basis of the exemption with the tax treatment tax_exempt, e.g. \"§ 4 Nr. 14\" (max. 40 characters), printed in the note on the document"
                                    },
                                    "items": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Replaces all line items"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowaccounting.quotes-delete",
                "summary": "Delete quote",
                "description": "Deletes a quote with status draft; otherwise 422.",
                "tags": [
                    "flowaccounting.quotes"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/quotes/{uuid}/send": {
            "post": {
                "operationId": "flowaccounting.quotes-send",
                "summary": "Send quote by email",
                "description": "Sends the quote and sets it to sent. Requires an Idempotency-Key header in UUID format; the same key never sends twice. Without recipient_emails the customer's recipients apply. If the sender domain is not verified, the API responds with 409 and sender_domain_not_verified.",
                "tags": [
                    "flowaccounting.quotes"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "sent": true,
                                    "data": {
                                        "uuid": "550e8400-e29b-41d4-a716-446655440000",
                                        "status": "sent"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "recipient_emails": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Different recipient addresses, at most 50"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/quotes/{uuid}/withdraw": {
            "post": {
                "operationId": "flowaccounting.quotes-withdraw",
                "summary": "Withdraw quote",
                "description": "Withdraws a sent quote. Only possible from status sent; otherwise 422.",
                "tags": [
                    "flowaccounting.quotes"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/quotes/{uuid}/accept": {
            "post": {
                "operationId": "flowaccounting.quotes-accept",
                "summary": "Record acceptance",
                "description": "Records that the customer accepted the quote, for example by phone or email. Only possible from status sent and only once; otherwise 422. This endpoint is not meant for acceptance through the customer's quote link, where the signature is recorded as well.",
                "tags": [
                    "flowaccounting.quotes"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "550e8400-e29b-41d4-a716-446655440000",
                                        "status": "accepted"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/quotes/{uuid}/convert": {
            "post": {
                "operationId": "flowaccounting.quotes-convert",
                "summary": "Convert to invoice",
                "description": "Creates a draft invoice from an accepted quote. Only possible with status accepted; otherwise 422 with quote_not_accepted. A second call returns the invoice already created with 200 instead of another one.",
                "tags": [
                    "flowaccounting.quotes"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "550e8400-e29b-41d4-a716-446655440000",
                                        "status": "draft"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/quotes/{uuid}/pdf": {
            "get": {
                "operationId": "flowaccounting.quotes-pdf",
                "summary": "Download quote PDF",
                "description": "Returns the quote as a PDF file (application/pdf), in the team's document layout and in the language recorded on the document.",
                "tags": [
                    "flowaccounting.quotes"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/octet-stream": {
                                "schema": {
                                    "type": "string",
                                    "format": "binary"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/quotes/{uuid}/items": {
            "get": {
                "operationId": "flowaccounting.quote-items-list",
                "summary": "List line items",
                "description": "Lists the line items of a quote, sorted by their order.",
                "tags": [
                    "flowaccounting.quote-items"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Items per page (1-200, default: 50)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowaccounting.quote-items-create",
                "summary": "Add line item",
                "description": "Adds a line item to the quote. Without position it is appended at the end. A project_uuid must belong to a project of the quote's customer; otherwise 422.",
                "tags": [
                    "flowaccounting.quote-items"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name of the line item"
                                    },
                                    "quantity": {
                                        "type": "number",
                                        "description": "Quantity"
                                    },
                                    "unit_price": {
                                        "type": "number",
                                        "description": "Net unit price"
                                    },
                                    "tax_rate": {
                                        "type": "number",
                                        "description": "Tax rate in percent"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Description text"
                                    },
                                    "unit": {
                                        "type": "string",
                                        "description": "Unit, such as hour or piece"
                                    },
                                    "discount_percent": {
                                        "type": "number",
                                        "description": "Line item discount in percent"
                                    },
                                    "type": {
                                        "type": "string",
                                        "description": "service, product or hours"
                                    },
                                    "position": {
                                        "type": "integer",
                                        "description": "Order"
                                    },
                                    "product_uuid": {
                                        "type": "string",
                                        "description": "Product UUID from the product catalogue"
                                    },
                                    "project_uuid": {
                                        "type": "string",
                                        "description": "Project UUID of the quote's customer"
                                    }
                                },
                                "required": [
                                    "name",
                                    "quantity",
                                    "unit_price",
                                    "tax_rate"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/quotes/{uuid}/items/{itemUuid}": {
            "put": {
                "operationId": "flowaccounting.quote-items-update",
                "summary": "Update line item",
                "description": "Changes a single line item. Only the fields sent are changed.",
                "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": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "quantity": {
                                        "type": "number",
                                        "description": "Quantity"
                                    },
                                    "unit_price": {
                                        "type": "number",
                                        "description": "Net unit price"
                                    },
                                    "tax_rate": {
                                        "type": "number",
                                        "description": "Tax rate in percent"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowaccounting.quote-items-delete",
                "summary": "Delete line item",
                "description": "Removes a line item from the quote and recalculates the totals.",
                "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": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/credit-notes": {
            "get": {
                "operationId": "flowaccounting.credit-notes-list",
                "summary": "List credit notes",
                "description": "Retrieves a paginated list of all credit notes of the team, sorted by credit note date, newest first.",
                "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 by customer UUID",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "from",
                        "in": "query",
                        "required": false,
                        "description": "Credit note date from (YYYY-MM-DD)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "required": false,
                        "description": "Credit note date to (YYYY-MM-DD)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Items per page (1-200, default: 25)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowaccounting.credit-notes-create",
                "summary": "Create credit note",
                "description": "Creates a credit note with status draft. With invoice_uuid it is linked to the invoice to be credited; that invoice must belong to the same customer and use the same currency. Credit note line items are free rows without a product or project link. A credit note for an invoice takes over its tax treatment, a free credit note the customer's; the response names it as tax_treatment. With every value except standard (e.g. reverse_charge, tax_exempt) the credit note shows no VAT: a given tax_rate is set to 0. The credit note only gets its number from the team's number series on issuing; for taking over existing credit notes from another system it can be set with credit_note_number.",
                "tags": [
                    "flowaccounting.credit-notes"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "550e8400-e29b-41d4-a716-446655440000",
                                        "status": "draft"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "client_uuid": {
                                        "type": "string",
                                        "description": "Customer UUID (team-bound)"
                                    },
                                    "invoice_uuid": {
                                        "type": "string",
                                        "description": "UUID of the invoice to be credited"
                                    },
                                    "contact_uuid": {
                                        "type": "string",
                                        "description": "Contact UUID of the customer"
                                    },
                                    "credit_note_number": {
                                        "type": "string",
                                        "description": "Optional: your own credit note number, meant only for taking over existing credit notes from another system. Normally leave it out so the number series assigns the number on issuing. AI assistants and agents only set the field if the user explicitly insists on their own number. At most 40 characters from the letters A to Z, digits, space, dot, underscore and hyphen, starting and ending with a letter or digit. Must be unique within the team, also against deleted drafts and cancelled credit notes. If the number lies within the current number series, it must be below the next counter value; to do this, first set the next credit note number in the FlowAccounting settings above the highest import number. The counter stays unchanged, also on issuing. After creation the number can no longer be changed"
                                    },
                                    "credit_note_date": {
                                        "type": "string",
                                        "description": "Credit note date (YYYY-MM-DD, default: today)"
                                    },
                                    "currency_code": {
                                        "type": "string",
                                        "description": "EUR, USD, CHF or GBP"
                                    },
                                    "document_language": {
                                        "type": "string",
                                        "description": "de, en or pt"
                                    },
                                    "einvoice_format": {
                                        "type": "string",
                                        "description": "pdf, zugferd or xrechnung"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Visible note on the credit note"
                                    },
                                    "tax_exemption_basis": {
                                        "type": "string",
                                        "description": "Legal basis of the exemption with the tax treatment tax_exempt, e.g. \"§ 4 Nr. 14\" (max. 40 characters), printed in the note on the document. A credit note for an invoice takes over the invoice's legal basis"
                                    },
                                    "items": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Line items, 1 to 200, with <code>name</code>, <code>quantity</code>, <code>unit_price</code> and <code>tax_rate</code>"
                                    }
                                },
                                "required": [
                                    "client_uuid",
                                    "items"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/credit-notes/{uuid}": {
            "get": {
                "operationId": "flowaccounting.credit-notes-show",
                "summary": "Get credit note details",
                "description": "Credit note details including line items, totals and available_actions.",
                "tags": [
                    "flowaccounting.credit-notes"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowaccounting.credit-notes-update",
                "summary": "Update credit note",
                "description": "Changes a credit note with status draft; otherwise 422. If items is passed, the list replaces all line items. The credit note number can't be changed: credit_note_number is rejected here with 422.",
                "tags": [
                    "flowaccounting.credit-notes"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "notes": {
                                        "type": "string",
                                        "description": "Visible note on the credit note"
                                    },
                                    "tax_exemption_basis": {
                                        "type": "string",
                                        "description": "Legal basis of the exemption with the tax treatment tax_exempt, e.g. \"§ 4 Nr. 14\" (max. 40 characters), printed in the note on the document. A credit note for an invoice takes over the invoice's legal basis"
                                    },
                                    "items": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Replaces all line items"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowaccounting.credit-notes-delete",
                "summary": "Delete credit note",
                "description": "Deletes a credit note with status draft; otherwise 422.",
                "tags": [
                    "flowaccounting.credit-notes"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/credit-notes/{uuid}/issue": {
            "post": {
                "operationId": "flowaccounting.credit-notes-issue",
                "summary": "Issue credit note",
                "description": "Issues the credit note and assigns its number, unless one was given on creation. If the underlying invoice was paid through Stripe, the refund is started. The field refund_status reports started, not_required or review_required. Only possible with status draft; otherwise 422. Also 422 if the linked invoice is still a draft (issue the invoice first), if it was cancelled, or if its tax treatment changed since the credit note was saved: then first save the credit note again with its line items via PUT.",
                "tags": [
                    "flowaccounting.credit-notes"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "refund_status": "not_required",
                                    "data": {
                                        "uuid": "550e8400-e29b-41d4-a716-446655440000",
                                        "status": "issued"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/credit-notes/{uuid}/settle": {
            "post": {
                "operationId": "flowaccounting.credit-notes-settle",
                "summary": "Apply credit note",
                "description": "Applies an issued credit note and books exactly one transaction of type credit for it. With mode offset the amount is booked to the linked invoice: it may exceed neither the credit note total nor the invoice's open amount, and invoice and credit note must use the same currency. If the booking covers the open amount, the invoice counts as paid (paid), otherwise as partially paid (partially_paid); a draft invoice or a cancelled invoice is rejected. With pool the amount goes to the customer's credit without reference to an invoice and is available there for later invoices. In both cases the credit note is fully settled afterwards (settled), even for a partial amount: the rest does not go to the credit and can't be applied later. Without amount the highest allowed amount is booked. transaction_date is meant for taking over historical documents and sets the booking date of the transaction. The response contains the credit note in data, the booked transaction in transaction and, with offset, the state of the invoice in invoice (uuid, invoice_number, status, paid_date, remaining_amount); with pool, invoice is null. The call is guarded by the status: a repetition books nothing and returns 422 with credit_note_already_settled, a draft or a cancelled credit note 422 with credit_note_not_issued. Further rejections with 422: credit_note_without_invoice, invoice_not_settleable, currency_mismatch, amount_exceeds_limit and transaction_date_out_of_range.",
                "tags": [
                    "flowaccounting.credit-notes"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "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": "Error response",
                        "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> (apply to the linked invoice) or <code>pool</code> (credit to the customer's credit balance)"
                                    },
                                    "amount": {
                                        "type": "number",
                                        "description": "Amount to book, at least 0.01. Default: the credit note total, with <code>offset</code> at most the invoice's open amount"
                                    },
                                    "transaction_date": {
                                        "type": "string",
                                        "description": "Booking date (YYYY-MM-DD, default: today). No earlier than the credit note date, no later than today"
                                    }
                                },
                                "required": [
                                    "mode"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/credit-notes/{uuid}/cancel": {
            "post": {
                "operationId": "flowaccounting.credit-notes-cancel",
                "summary": "Cancel credit note",
                "description": "Cancels a credit note with status draft or issued; the call has no body. Cancelling is final. The document and its number are kept: the credit note can still be retrieved, and its number is never freed again. This also applies to a draft created with a given credit_note_number; it keeps that number. A settled or already cancelled credit note returns 422 with action_not_available. Also 422, with credit_note_refund_started, if a Stripe refund was started for the linked invoice and has not failed: the money has then gone back to the customer, and the document for it must remain.",
                "tags": [
                    "flowaccounting.credit-notes"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "550e8400-e29b-41d4-a716-446655440000",
                                        "status": "cancelled"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/credit-notes/{uuid}/send": {
            "post": {
                "operationId": "flowaccounting.credit-notes-send",
                "summary": "Send credit note by email",
                "description": "Sends the issued credit note to exactly one address; several recipients are rejected with 422. Requires an Idempotency-Key header in UUID format. Without recipient_emails the customer's stored address applies.",
                "tags": [
                    "flowaccounting.credit-notes"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "recipient_emails": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Exactly one different recipient address"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/credit-notes/{uuid}/pdf": {
            "get": {
                "operationId": "flowaccounting.credit-notes-pdf",
                "summary": "Download credit note PDF",
                "description": "Returns the credit note as a PDF file (application/pdf) in the team's document layout. Issued credit notes return the file saved on issuing (header X-FlowAccounting-Document-Source: frozen), otherwise regenerated.",
                "tags": [
                    "flowaccounting.credit-notes"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/octet-stream": {
                                "schema": {
                                    "type": "string",
                                    "format": "binary"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/credit-notes/{uuid}/einvoice": {
            "get": {
                "operationId": "flowaccounting.credit-notes-einvoice",
                "summary": "Download archived e-invoice",
                "description": "Returns the e-invoice of the credit note archived on issuing byte for byte: for XRechnung the XML file (application/xml), for ZUGFeRD the PDF/A-3 with embedded XML (application/pdf). The response is a file download, not JSON; it is never regenerated. Headers: X-FlowAccounting-Einvoice-SHA256 (SHA-256 of the returned file), X-FlowAccounting-Einvoice-XML-SHA256 (SHA-256 of the invoice XML, for ZUGFeRD the embedded one), X-FlowAccounting-Einvoice-Uuid (archive entry). Without an archived e-invoice (draft, classic PDF, issued before archiving existed) the endpoint responds with 404 and error: einvoice_not_archived; if the file fails the hash check, with 409 and error: einvoice_integrity_failed. An unknown UUID or a credit note of another team results in 404.",
                "tags": [
                    "flowaccounting.credit-notes"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/octet-stream": {
                                "schema": {
                                    "type": "string",
                                    "format": "binary"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/credit-notes/{uuid}/einvoice/validation": {
            "get": {
                "operationId": "flowaccounting.credit-notes-einvoice-validation",
                "summary": "Validation report of the archived e-invoice",
                "description": "Returns the latest validation report of the credit note's archived e-invoice. Read-only. The validation ran on exactly the issued bytes when archiving (well-formedness, XSD, business rules according to EN 16931 and XRechnung, mandatory details under Section 14 (4) UStG). validation_status is valid, valid_with_warnings, business_rule_errors, mandatory_field_errors or format_error. report.messages is a list with code (e.g. BR-DE-2, FAC-PFLICHT-6), severity (error or warning), category (format, business_rule, mandatory_vat) and message. Without an archived e-invoice 404 with error: einvoice_not_archived; an unknown UUID or a credit note of another team results in 404.",
                "tags": [
                    "flowaccounting.credit-notes"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/expenses": {
            "get": {
                "operationId": "flowaccounting.expenses-list",
                "summary": "List expenses",
                "description": "Retrieves a paginated list of all expenses of the team, sorted by booking date, newest first.",
                "tags": [
                    "flowaccounting.expenses"
                ],
                "parameters": [
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "Filter: pending or booked",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "supplier_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Filter by supplier UUID",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "expense_category_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Filter by category UUID",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Search term (description, supplier invoice number)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "intake_status",
                        "in": "query",
                        "required": false,
                        "description": "Filter by intake status: needs_review returns the review queue (all open receipts before review), also received, processing, failed or reviewed",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "missing_receipt",
                        "in": "query",
                        "required": false,
                        "description": "Only receipts with input VAT but without an invoice file (task \"receipt missing\")",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "from",
                        "in": "query",
                        "required": false,
                        "description": "Booking date from (YYYY-MM-DD)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "required": false,
                        "description": "Booking date to (YYYY-MM-DD)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Items per page (1-200, default: 25)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowaccounting.expenses-create",
                "summary": "Record expense",
                "description": "Records an expense with status pending; it is booked in a separate step with POST /flowaccounting/expenses/{uuid}/book. Net, tax and gross amounts are calculated from gross_amount, tax_rate and vat_mode. A second expense with the same supplier invoice number from the same supplier (or the same number and the same VAT ID on the receipt) is rejected with 422, unless the call confirms with confirm_not_duplicate and a reason in duplicate_reason (at least 10 characters) that it is not a duplicate. The decision is stored on the expense with reason, time and the person who made it. A credit note with the opposite sign does not count as a duplicate.",
                "tags": [
                    "flowaccounting.expenses"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "550e8400-e29b-41d4-a716-446655440000",
                                        "status": "pending",
                                        "has_receipt": false
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "booking_date": {
                                        "type": "string",
                                        "description": "Booking date (YYYY-MM-DD)"
                                    },
                                    "gross_amount": {
                                        "type": "number",
                                        "description": "Gross amount"
                                    },
                                    "tax_rate": {
                                        "type": "number",
                                        "description": "Tax rate in percent (default: the team's tax rate)"
                                    },
                                    "vat_mode": {
                                        "type": "string",
                                        "description": "full, none or reverse_charge (default: full)"
                                    },
                                    "currency_code": {
                                        "type": "string",
                                        "description": "EUR, USD, CHF or GBP"
                                    },
                                    "supplier_uuid": {
                                        "type": "string",
                                        "description": "Supplier UUID"
                                    },
                                    "expense_category_uuid": {
                                        "type": "string",
                                        "description": "Category UUID"
                                    },
                                    "supplier_invoice_number": {
                                        "type": "string",
                                        "description": "Supplier's invoice number"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Short description"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Internal note"
                                    },
                                    "confirm_not_duplicate": {
                                        "type": "boolean",
                                        "description": "Confirms that a receipt with the same invoice number is not a duplicate (only with duplicate_reason)"
                                    },
                                    "duplicate_reason": {
                                        "type": "string",
                                        "description": "Reason for confirm_not_duplicate, 10 to 500 characters"
                                    }
                                },
                                "required": [
                                    "booking_date",
                                    "gross_amount"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/expenses/{uuid}": {
            "get": {
                "operationId": "flowaccounting.expenses-show",
                "summary": "Get expense details",
                "description": "Expense details including the calculated amounts as well as has_receipt and receipt_name. intake_status shows the way through the review queue (needs_review, failed, reviewed …), reviewed_at the time of the review, duplicate_decision a duplicate decision (not_duplicate) and missing_receipt whether input VAT is claimed but the invoice file is missing.",
                "tags": [
                    "flowaccounting.expenses"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowaccounting.expenses-update",
                "summary": "Update expense",
                "description": "Changes an expense with status pending. Expenses already booked stay unchanged and are rejected with 422. A changed supplier invoice number is checked for duplicates as on recording (confirm_not_duplicate, duplicate_reason).",
                "tags": [
                    "flowaccounting.expenses"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "gross_amount": {
                                        "type": "number",
                                        "description": "Gross amount"
                                    },
                                    "expense_category_uuid": {
                                        "type": "string",
                                        "description": "Category UUID"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Short description"
                                    },
                                    "confirm_not_duplicate": {
                                        "type": "boolean",
                                        "description": "Confirms that a receipt with the same invoice number is not a duplicate (only with duplicate_reason)"
                                    },
                                    "duplicate_reason": {
                                        "type": "string",
                                        "description": "Reason for confirm_not_duplicate, 10 to 500 characters"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowaccounting.expenses-delete",
                "summary": "Delete expense",
                "description": "Deletes an expense with status pending; otherwise 422.",
                "tags": [
                    "flowaccounting.expenses"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/expenses/{uuid}/receipt": {
            "post": {
                "operationId": "flowaccounting.expenses-receipt-upload",
                "summary": "Upload receipt",
                "description": "Attaches the receipt to the expense as multipart/form-data. PDF, JPEG and PNG up to 10 MB are allowed; the type is determined from the file content. An existing receipt is replaced once the new one is saved and is kept as an earlier version. A booked expense without a receipt file takes the missing invoice once (task \"receipt missing\"); if it already has a receipt, the API responds with 422 expense_booked, if the same file is already the receipt of another expense of the team with 422 receipt_duplicate, and for a file that is not a receipt with 422 invalid_receipt.",
                "tags": [
                    "flowaccounting.expenses"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "550e8400-e29b-41d4-a716-446655440000",
                                        "has_receipt": true,
                                        "receipt_name": "beleg.pdf"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "file": {
                                        "type": "string",
                                        "format": "binary",
                                        "description": "Receipt file (PDF, JPEG or PNG, at most 10 MB)"
                                    }
                                },
                                "required": [
                                    "file"
                                ]
                            }
                        }
                    }
                }
            },
            "get": {
                "operationId": "flowaccounting.expenses-receipt-download",
                "summary": "Download receipt",
                "description": "Returns the stored receipt file. Without a receipt the API responds with 404. The file is checked against its SHA-256 before delivery; if it is missing or no longer matches, the API responds with 409 receipt_integrity_failed. If the security check on intake found something (script, launch action, malicious code), the API responds with 409 receipt_flagged and the findings in security_flags, until the call passes acknowledge_security_findings=1.",
                "tags": [
                    "flowaccounting.expenses"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "acknowledge_security_findings",
                        "in": "query",
                        "required": false,
                        "description": "Confirms that a file with a security finding should be delivered anyway",
                        "schema": {
                            "type": "boolean"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/octet-stream": {
                                "schema": {
                                    "type": "string",
                                    "format": "binary"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/expenses/{uuid}/book": {
            "post": {
                "operationId": "flowaccounting.expenses-book",
                "summary": "Book expense",
                "description": "Books an expense with status pending: it changes to status booked and gets the payment date paid_date. Only a booked expense counts in the reports, in the period of its payment date. The order is: create the expense, upload the receipt, book. After booking, changing, deleting and replacing the receipt through the API are blocked (422). Booking can't be undone through the API; a booked expense is corrected in the web interface. The call is guarded by the status: a repetition books nothing and returns 422 with expense_booked.",
                "tags": [
                    "flowaccounting.expenses"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "550e8400-e29b-41d4-a716-446655440000",
                                        "status": "booked",
                                        "paid_date": "2026-03-14",
                                        "available_actions": []
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "paid_date": {
                                        "type": "string",
                                        "description": "Payment date (YYYY-MM-DD), today at the latest"
                                    }
                                },
                                "required": [
                                    "paid_date"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/expenses/{uuid}/review": {
            "post": {
                "operationId": "flowaccounting.expenses-review",
                "summary": "Mark receipt as reviewed",
                "description": "Marks an open expense from the review queue as reviewed (intake_status becomes reviewed, reviewed_at and the person who reviewed are saved). Booking still only happens with POST /flowaccounting/expenses/{uuid}/book. A gross amount and a receipt date are required, otherwise 422 review_incomplete. If an earlier receipt has the same supplier and the same invoice number (or the same number and VAT ID), the API responds with 422 duplicate_undecided until the call passes confirm_not_duplicate with duplicate_reason; without confirmation /book doesn't book such an expense either (422 duplicate_undecided). Expenses already booked: 422 expense_booked.",
                "tags": [
                    "flowaccounting.expenses"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "550e8400-e29b-41d4-a716-446655440000",
                                        "status": "pending",
                                        "intake_status": "reviewed",
                                        "reviewed_at": "2026-11-26T10:00:00+01:00",
                                        "duplicate_decision": null
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "confirm_not_duplicate": {
                                        "type": "boolean",
                                        "description": "Confirms that a receipt with the same invoice number is not a duplicate"
                                    },
                                    "duplicate_reason": {
                                        "type": "string",
                                        "description": "Reason for confirm_not_duplicate, 10 to 500 characters"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/suppliers": {
            "get": {
                "operationId": "flowaccounting.suppliers-list",
                "summary": "List suppliers",
                "description": "Retrieves a paginated list of all suppliers of the team, sorted alphabetically.",
                "tags": [
                    "flowaccounting.suppliers"
                ],
                "parameters": [
                    {
                        "name": "is_active",
                        "in": "query",
                        "required": false,
                        "description": "Filter: only active or only inactive suppliers",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Search term in the name",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Items per page (1-200, default: 25)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowaccounting.suppliers-create",
                "summary": "Create supplier",
                "description": "Creates a supplier.",
                "tags": [
                    "flowaccounting.suppliers"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name of the supplier"
                                    },
                                    "address": {
                                        "type": "string",
                                        "description": "Address"
                                    },
                                    "vat_id": {
                                        "type": "string",
                                        "description": "VAT identification number"
                                    },
                                    "tax_id": {
                                        "type": "string",
                                        "description": "Tax number"
                                    },
                                    "email": {
                                        "type": "string",
                                        "description": "Email address"
                                    },
                                    "phone": {
                                        "type": "string",
                                        "description": "Phone number"
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "Active (default: true)"
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/suppliers/{uuid}": {
            "get": {
                "operationId": "flowaccounting.suppliers-show",
                "summary": "Get supplier details",
                "description": "Get supplier details.",
                "tags": [
                    "flowaccounting.suppliers"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowaccounting.suppliers-update",
                "summary": "Update supplier",
                "description": "Changes a supplier. Only the fields sent are changed.",
                "tags": [
                    "flowaccounting.suppliers"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name of the supplier"
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "Active"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowaccounting.suppliers-delete",
                "summary": "Delete supplier",
                "description": "Deletes a supplier that has no expense booked against it yet. Otherwise the API responds with 422 and the hint to deactivate the supplier.",
                "tags": [
                    "flowaccounting.suppliers"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/expense-categories": {
            "get": {
                "operationId": "flowaccounting.expense-categories-list",
                "summary": "List expense categories",
                "description": "Retrieves a paginated list of all expense categories of the team, sorted alphabetically.",
                "tags": [
                    "flowaccounting.expense-categories"
                ],
                "parameters": [
                    {
                        "name": "is_active",
                        "in": "query",
                        "required": false,
                        "description": "Filter: only active or only inactive categories",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Search term in the name",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Items per page (1-200, default: 25)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowaccounting.expense-categories-create",
                "summary": "Create expense category",
                "description": "Creates an expense category. With parent_uuid it is placed below a parent category; a circular chain is rejected with 422.",
                "tags": [
                    "flowaccounting.expense-categories"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name of the category"
                                    },
                                    "number": {
                                        "type": "string",
                                        "description": "Account number"
                                    },
                                    "parent_uuid": {
                                        "type": "string",
                                        "description": "UUID of the parent category"
                                    },
                                    "euer_group": {
                                        "type": "string",
                                        "description": "Assignment in the EÜR, the German cash-basis profit statement"
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "Active (default: true)"
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/expense-categories/{uuid}": {
            "get": {
                "operationId": "flowaccounting.expense-categories-show",
                "summary": "Get expense category",
                "description": "Details of an expense category including parent_uuid.",
                "tags": [
                    "flowaccounting.expense-categories"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowaccounting.expense-categories-update",
                "summary": "Update expense category",
                "description": "Changes an expense category. Only the fields sent are changed.",
                "tags": [
                    "flowaccounting.expense-categories"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name of the category"
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "Active"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowaccounting.expense-categories-delete",
                "summary": "Delete expense category",
                "description": "Responds with 422: categories are deactivated, not deleted. The endpoint exists so that the reason is named instead of the call silently doing nothing.",
                "tags": [
                    "flowaccounting.expense-categories"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/income-categories": {
            "get": {
                "operationId": "flowaccounting.income-categories-list",
                "summary": "List income categories",
                "description": "Retrieves a paginated list of all income categories of the team, sorted alphabetically.",
                "tags": [
                    "flowaccounting.income-categories"
                ],
                "parameters": [
                    {
                        "name": "is_active",
                        "in": "query",
                        "required": false,
                        "description": "Filter: only active or only inactive categories",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "income_group",
                        "in": "query",
                        "required": false,
                        "description": "Filter: umsatz (revenue), kapital (capital), privat (private) or sonstige (other)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Search term in the name",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Items per page (1-200, default: 25)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowaccounting.income-categories-create",
                "summary": "Create income category",
                "description": "Creates an income category.",
                "tags": [
                    "flowaccounting.income-categories"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name of the category"
                                    },
                                    "number": {
                                        "type": "string",
                                        "description": "Account number"
                                    },
                                    "income_group": {
                                        "type": "string",
                                        "description": "umsatz (revenue), kapital (capital), privat (private) or sonstige (other)"
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "Active (default: true)"
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/income-categories/{uuid}": {
            "get": {
                "operationId": "flowaccounting.income-categories-show",
                "summary": "Get income category",
                "description": "Details of an income category.",
                "tags": [
                    "flowaccounting.income-categories"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowaccounting.income-categories-update",
                "summary": "Update income category",
                "description": "Changes an income category. Only the fields sent are changed.",
                "tags": [
                    "flowaccounting.income-categories"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name of the category"
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "Active"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowaccounting.income-categories-delete",
                "summary": "Delete income category",
                "description": "Responds with 422: categories are deactivated, not deleted.",
                "tags": [
                    "flowaccounting.income-categories"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/reports/{kind}": {
            "get": {
                "operationId": "flowaccounting.reports-show",
                "summary": "Get report",
                "description": "Returns a report for the given period. Possible values for kind: open_items (open items), revenue (invoiced revenue), revenue_per_client (revenue per customer), cash_flow (income and spending by payment date), euer (EÜR, the German cash-basis profit statement) and profit_loss (profit and loss). client_uuid is only allowed with open_items, revenue and revenue_per_client, otherwise 422. Drafts and cancelled invoices are left out of every report.",
                "tags": [
                    "flowaccounting.reports"
                ],
                "parameters": [
                    {
                        "name": "kind",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "from",
                        "in": "query",
                        "required": true,
                        "description": "Start of the period (YYYY-MM-DD)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "required": true,
                        "description": "End of the period (YYYY-MM-DD, not before from)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "client_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Limit to one customer",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page of the result list, 50 rows per page",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/context": {
            "get": {
                "operationId": "flowaccounting.context-show",
                "summary": "Get writing context",
                "description": "Returns the team's document defaults, the tax rates, the short form of the tax profile valid today (tax_profile), the features with allowed and reason (features) and, per record type, the complete list of writable fields. With it you can build a valid body for quotes, invoices, credit notes, expenses, suppliers and categories without guessing field names. Links appear under their public names, such as client_uuid instead of an internal number. In tax_profile, vat_regime and tax_residence_country are only filled with a confirmed profile, otherwise null; default_tax_rate is the default rate of new line items.",
                "tags": [
                    "flowaccounting.reports"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/tax-profile": {
            "get": {
                "operationId": "flowaccounting.tax-profile-show",
                "summary": "Get tax profile",
                "description": "Returns the version of the tax profile valid today or on the day given in date, with its derived values: charges_german_vat (documents may show German VAT), is_small_business (confirmed small business under Section 19 UStG), is_registered_in_germany, allows_reverse_charge_output, input_vat_deductible, vat_return_required (German advance VAT return for the period starting on that day), default_tax_rate (default rate of new line items in percent) and functional_currency (accounting currency). If the team has no version yet, exists is false and all derived values describe today's behaviour. Possible values: vat_regime standard, small_business or not_registered_de; vat_basis accrual (VAT on invoiced amounts) or cash (VAT on payments received); vat_filing_frequency monthly, quarterly or exempt.",
                "tags": [
                    "flowaccounting.tax-profile"
                ],
                "parameters": [
                    {
                        "name": "date",
                        "in": "query",
                        "required": false,
                        "description": "Reference date (YYYY-MM-DD), default: today",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/tax-profile/history": {
            "get": {
                "operationId": "flowaccounting.tax-profile-history",
                "summary": "Tax profile history",
                "description": "Returns all versions of the tax profile, oldest first, in the same form as GET /flowaccounting/tax-profile. valid_until is the last day of a version, null for the newest. Period-related derived values apply to the first day of each version.",
                "tags": [
                    "flowaccounting.tax-profile"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowaccounting/features": {
            "get": {
                "operationId": "flowaccounting.features-index",
                "summary": "Get features",
                "description": "Returns for every FlowAccounting feature whether it is in effect (allowed) and the individual levels: module_active (FlowAccounting active), applicable (fits the tax profile), entitled (included in the plan) and enabled (switched on by the team). reason names the first level that is not met: module_inactive, not_applicable, not_entitled, disabled, otherwise allowed.",
                "tags": [
                    "flowaccounting.tax-profile"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "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": "List models",
                "description": "Lists the model aliases available to the subscription-bound key. The cursor is always the public model alias.",
                "tags": [
                    "flowai.models"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "description": "Number of entries from 1 to 100, default 100",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "after",
                        "in": "query",
                        "required": false,
                        "description": "Alias from last_id of the previous page",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "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": "Retrieve a model",
                "description": "Returns a single entry of the model list with prices, capabilities, the FlowAI limits that actually apply and the shutdown date. The ID is the model alias; with a routing key it is the full provider ID including any slashes.",
                "tags": [
                    "flowai.models"
                ],
                "parameters": [
                    {
                        "name": "model_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "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": "Send a message",
                "description": "Sends a message to your FlowAI and returns the answer together with the conversation ID.",
                "tags": [
                    "flowai.chat"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "message": {
                                        "type": "string",
                                        "description": "The new message, 1 to 32,000 characters"
                                    },
                                    "conversation": {
                                        "type": "string",
                                        "format": "uuid",
                                        "description": "ID from a previous response; without it a new conversation starts"
                                    },
                                    "model": {
                                        "type": "string",
                                        "description": "Model alias from GET /models; defaults to flowai"
                                    },
                                    "stream": {
                                        "type": "boolean",
                                        "description": "true returns the answer as server-sent events; default 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": "Retrieve the latest answer of a conversation",
                "description": "Returns the latest turn of a conversation without starting a new one.",
                "tags": [
                    "flowai.chat"
                ],
                "parameters": [
                    {
                        "name": "conversation_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "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": "Upload a file",
                "description": "Stores a file for later FlowAI requests. Use multipart/form-data.",
                "tags": [
                    "flowai.files"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "file": {
                                        "type": "string",
                                        "format": "binary",
                                        "description": "File to upload"
                                    },
                                    "purpose": {
                                        "type": "string",
                                        "description": "user_data or vision"
                                    }
                                },
                                "required": [
                                    "file",
                                    "purpose"
                                ]
                            }
                        }
                    }
                }
            },
            "get": {
                "operationId": "flowai.files-list",
                "summary": "List files",
                "description": "Lists the workspace's files with a stable cursor.",
                "tags": [
                    "flowai.files"
                ],
                "parameters": [
                    {
                        "name": "purpose",
                        "in": "query",
                        "required": false,
                        "description": "Filter: user_data or vision",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "order",
                        "in": "query",
                        "required": false,
                        "description": "Sort order: asc or desc",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "description": "Number from 1 to 100",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "after",
                        "in": "query",
                        "required": false,
                        "description": "Public file ID from last_id",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "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": "Retrieve file metadata",
                "description": "Returns metadata, but not the file content.",
                "tags": [
                    "flowai.files"
                ],
                "parameters": [
                    {
                        "name": "file_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowai.files-delete",
                "summary": "Delete a file",
                "description": "Deletes the stored bytes and their metadata.",
                "tags": [
                    "flowai.files"
                ],
                "parameters": [
                    {
                        "name": "file_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "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": "Download file content",
                "description": "Returns the stored bytes as a download with the original media type.",
                "tags": [
                    "flowai.files"
                ],
                "parameters": [
                    {
                        "name": "file_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/octet-stream": {
                                "schema": {
                                    "type": "string",
                                    "format": "binary"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/flowai/v1/webhook_endpoints": {
            "servers": [
                {
                    "url": "https://creativeskyline.de",
                    "description": "FlowAI API"
                }
            ],
            "post": {
                "operationId": "flowai.webhooks-create",
                "summary": "Create a webhook",
                "description": "Registers an HTTPS target and returns the signing secret once.",
                "tags": [
                    "flowai.webhooks"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "url": {
                                        "type": "string",
                                        "description": "Publicly reachable HTTPS address, at most 2,048 characters"
                                    },
                                    "events": {
                                        "type": "array",
                                        "items": [],
                                        "description": "At least one supported event type"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Optional description, at most 255 characters"
                                    }
                                },
                                "required": [
                                    "url",
                                    "events"
                                ]
                            }
                        }
                    }
                }
            },
            "get": {
                "operationId": "flowai.webhooks-list",
                "summary": "List webhooks",
                "description": "Lists the workspace's webhook targets without secrets.",
                "tags": [
                    "flowai.webhooks"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "description": "Number from 1 to 100",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "after",
                        "in": "query",
                        "required": false,
                        "description": "UUID from last_id",
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "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": "Retrieve a webhook",
                "description": "Returns a webhook target without its signing secret.",
                "tags": [
                    "flowai.webhooks"
                ],
                "parameters": [
                    {
                        "name": "webhook_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "patch": {
                "operationId": "flowai.webhooks-update",
                "summary": "Update a webhook",
                "description": "Changes target, events, description or activation status.",
                "tags": [
                    "flowai.webhooks"
                ],
                "parameters": [
                    {
                        "name": "webhook_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "url": {
                                        "type": "string",
                                        "description": "New publicly reachable HTTPS address"
                                    },
                                    "events": {
                                        "type": "array",
                                        "items": [],
                                        "description": "New list of supported event types"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "New description or null"
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "Deactivates or reactivates the target"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowai.webhooks-delete",
                "summary": "Delete a webhook",
                "description": "Deletes the target and its delivery history.",
                "tags": [
                    "flowai.webhooks"
                ],
                "parameters": [
                    {
                        "name": "webhook_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "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": "List deliveries",
                "description": "Lists delivery attempts with status and error details.",
                "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 or exhausted",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "description": "Number from 1 to 100",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "after",
                        "in": "query",
                        "required": false,
                        "description": "UUID from last_id",
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "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": "Send a test delivery",
                "description": "Queues a synthetic delivery of type webhook.test. The result appears in the delivery history like any other delivery.",
                "tags": [
                    "flowai.webhooks"
                ],
                "parameters": [
                    {
                        "name": "webhook_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "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": "Rotate the secret",
                "description": "Creates a new signing secret and returns it once. The previous secret stays valid until the stated time. Requires a management key.",
                "tags": [
                    "flowai.webhooks"
                ],
                "parameters": [
                    {
                        "name": "webhook_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowcall/context": {
            "get": {
                "operationId": "flowcall.flowcall-context",
                "summary": "Get projects, rights and terms",
                "description": "Returns every reachable call project with your own rights in it, the ten permission names, the usual call outcomes and whether this key acts as owner. One call, so a program doesn't have to hard-code the terms of this API.",
                "tags": [
                    "flowcall.context"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowcall/projects": {
            "get": {
                "operationId": "flowcall.flowcall-projects-index",
                "summary": "List call projects",
                "description": "All call projects this key reaches, newest first.",
                "tags": [
                    "flowcall.projects"
                ],
                "parameters": [
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Entries per page, 1 to 200, default 25.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, default 1.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowcall.flowcall-projects-store",
                "summary": "Create a call project",
                "description": "Turns an existing client project into a call project, or creates both in one go. Exactly one of project_uuid and client_uuid is required. If the client project already has a call configuration, the call answers with HTTP 422 and the error already_exists. This permission is checked team-wide, because a project that doesn't exist yet can't have a permission row of its own.",
                "tags": [
                    "flowcall.projects"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "project_uuid": {
                                        "type": "string",
                                        "description": "An existing client project of the team. Required if client_uuid is missing."
                                    },
                                    "client_uuid": {
                                        "type": "string",
                                        "description": "A client of the team under which a new project is created. Required if project_uuid is missing."
                                    },
                                    "name": {
                                        "type": "string",
                                        "description": "Name of the new project, at most 255 characters. Required together with client_uuid."
                                    },
                                    "appointment_link": {
                                        "type": "string",
                                        "description": "Booking link for appointments, http or https, at most 2048 characters."
                                    },
                                    "call_again_after_attempts": {
                                        "type": "string",
                                        "description": "After how many unsuccessful attempts the lead is called again. Free text, at most 10 characters, default 3."
                                    },
                                    "email_service": {
                                        "type": "boolean",
                                        "description": "Switches on email sending for the project."
                                    },
                                    "sender_name": {
                                        "type": "string",
                                        "description": "Sender name, only stored when email sending is on."
                                    },
                                    "sender_email": {
                                        "type": "string",
                                        "description": "Sender address, only stored when email sending is on."
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowcall/projects/{uuid}": {
            "get": {
                "operationId": "flowcall.flowcall-projects-show",
                "summary": "Get a call project",
                "description": "A project with your own rights in it, the period, the agreed scope, the description and the overview figures. Unworked means a lead with no outcome row at all, which is something different from a lead with the outcome Offen.",
                "tags": [
                    "flowcall.projects"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowcall/projects/{uuid}/settings": {
            "put": {
                "operationId": "flowcall.flowcall-projects-settings",
                "summary": "Change a project's settings",
                "description": "Changes the call settings that are not credentials. A field that is left out stays unchanged. If email sending is switched off, the project loses its sender details, so it never keeps writing under a sender nobody remembers. Requires projekte_verwalten.",
                "tags": [
                    "flowcall.projects"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "appointment_link": {
                                        "type": "string",
                                        "description": "Booking link for appointments, http or https, at most 2048 characters, or null."
                                    },
                                    "call_again_after_attempts": {
                                        "type": "string",
                                        "description": "Free text, at most 10 characters, or null."
                                    },
                                    "email_service": {
                                        "type": "boolean",
                                        "description": "Switches email sending for the project on or off."
                                    },
                                    "sender_name": {
                                        "type": "string",
                                        "description": "Sender name, at most 255 characters, or null."
                                    },
                                    "sender_email": {
                                        "type": "string",
                                        "description": "Sender address, at most 255 characters, or null."
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowcall/projects/{uuid}/dates": {
            "put": {
                "operationId": "flowcall.flowcall-projects-dates",
                "summary": "Change period, scope and description",
                "description": "Sets the period, the agreed scope and the project description. The scope is free text, because it holds values such as 40 per month that a plain number would reject. Requires projekte_verwalten.",
                "tags": [
                    "flowcall.projects"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "start_date": "2026-09-01",
                                        "end_date": "2026-12-31",
                                        "hours": "40 pro Monat",
                                        "information": "Zielgruppe Handwerksbetriebe ab zehn Mitarbeitenden."
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "start_date": {
                                        "type": "string",
                                        "description": "Start in the format YYYY-MM-DD, or null."
                                    },
                                    "end_date": {
                                        "type": "string",
                                        "description": "End in the format YYYY-MM-DD, not before the start, or null."
                                    },
                                    "hours": {
                                        "type": "string",
                                        "description": "Agreed scope as free text, at most 255 characters, or null."
                                    },
                                    "information": {
                                        "type": "string",
                                        "description": "Description of the project, at most 200000 characters, or null."
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowcall/projects/{uuid}/status": {
            "put": {
                "operationId": "flowcall.flowcall-projects-status",
                "summary": "Switch a project on or off",
                "description": "Sets the status of the client project to active or inactive. The status reaches beyond FlowCall, because it belongs to the client project. Requires projekte_verwalten.",
                "tags": [
                    "flowcall.projects"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "8f1c4a72-3d95-4e06-b1a8-5c7e2d0f9b41",
                                        "name": "Herbstaktion Handwerk",
                                        "status": "inactive",
                                        "email_service": true,
                                        "form_fields": []
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "status": {
                                        "type": "string",
                                        "description": "active or inactive. Any other value is rejected."
                                    }
                                },
                                "required": [
                                    "status"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowcall/projects/{uuid}/leads/unworked": {
            "delete": {
                "operationId": "flowcall.flowcall-projects-leads-unworked",
                "summary": "Delete a project's unworked leads",
                "description": "Removes every lead of the project that nobody has touched. Unworked means: neither an outcome nor a comment. A lead that was called once is never included. Requires projekte_verwalten.",
                "tags": [
                    "flowcall.projects"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "deleted": 480
                                    },
                                    "message": "480 unbearbeitete Leads wurden gelöscht."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowcall/projects/{uuid}/guideline": {
            "get": {
                "operationId": "flowcall.flowcall-guideline-show",
                "summary": "Get the call guide",
                "description": "Returns the project's shared guide or your own version. Requires projekt_bearbeiten or 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 or user. Default is original.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowcall.flowcall-guideline-update",
                "summary": "Write the call guide",
                "description": "Writes the guide. The shared version requires projekt_bearbeiten, your own version projekt_telefonie.",
                "tags": [
                    "flowcall.guideline"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "d4a9b021-6e37-4c58-90f1-2b8c5e7d0a63",
                                        "type": "original",
                                        "content": "Guten Tag, mein Name ist ...",
                                        "updated_at": "2026-09-20T08:30:00+02:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "content": {
                                        "type": "string",
                                        "description": "The text, at most 200000 characters."
                                    },
                                    "type": {
                                        "type": "string",
                                        "description": "original or user. Default is original."
                                    }
                                },
                                "required": [
                                    "content"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowcall/projects/{uuid}/form": {
            "get": {
                "operationId": "flowcall.flowcall-form-show",
                "summary": "Get the project form",
                "description": "The fields filled in during a call. Requires projekt_bearbeiten or projekt_telefonie.",
                "tags": [
                    "flowcall.guideline"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "fields": [
                                            {
                                                "label": "Anzahl Mitarbeitende",
                                                "typ": "number",
                                                "placeholder": "z. B. 15"
                                            },
                                            {
                                                "label": "Interesse an",
                                                "typ": "select",
                                                "optionen": [
                                                    "Webseite",
                                                    "Wartung"
                                                ]
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowcall.flowcall-form-update",
                "summary": "Replace the project form",
                "description": "Replaces the field list in full. An empty list removes the form. Requires projekte_verwalten.",
                "tags": [
                    "flowcall.guideline"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "fields": [
                                            {
                                                "label": "Anzahl Mitarbeitende",
                                                "typ": "number",
                                                "placeholder": "z. B. 15"
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "fields": {
                                        "type": "array",
                                        "items": [],
                                        "description": "The complete field list. The field must be present but may be empty.",
                                        "properties": {
                                            "*.label": {
                                                "type": "string",
                                                "description": "Label of the field, at most 255 characters."
                                            },
                                            "*.typ": {
                                                "type": "string",
                                                "description": "text, textarea, select, checkbox, radio, date or number."
                                            },
                                            "*.placeholder": {
                                                "type": "string",
                                                "description": "Placeholder text, at most 255 characters."
                                            },
                                            "*.optionen": {
                                                "type": "array",
                                                "items": [],
                                                "description": "Choices for select, checkbox and radio, each at most 255 characters."
                                            }
                                        }
                                    }
                                },
                                "required": [
                                    "fields"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowcall/projects/{uuid}/imports": {
            "get": {
                "operationId": "flowcall.flowcall-imports-index",
                "summary": "List a project's imports",
                "description": "The uploaded lead lists of a project, newest first. The state is a short chain: uploaded means the file is there and nothing has happened, queued means the mapping is set and the work is waiting, processing means it is running, then finished or failed. Requires 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": "Entries per page, 1 to 200, default 25.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, default 1.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowcall.flowcall-imports-store",
                "summary": "Upload a lead list",
                "description": "Accepts a lead list as multipart/form-data and answers with HTTP 201. Without mapping, the response contains the file's column headings and the possible target fields, and the import waits. With mapping it starts immediately; an unusable mapping answers with HTTP 422 and the error invalid_mapping. Requires projekte_verwalten.",
                "tags": [
                    "flowcall.imports"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "file": {
                                        "type": "string",
                                        "format": "binary",
                                        "description": "The lead list as txt, csv, xls or xlsx, at most 50 MB."
                                    },
                                    "mapping": {
                                        "type": "object",
                                        "description": "Mapping from column heading to target field. After a colon, a value may carry the label of a value collection, for example emails:Allgemein. null means the column is skipped."
                                    },
                                    "url": {
                                        "type": "string",
                                        "description": "Explicitly rejected. A file is uploaded, not fetched from an address."
                                    }
                                },
                                "required": [
                                    "file"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowcall/projects/{uuid}/imports/{importUuid}/mapping": {
            "put": {
                "operationId": "flowcall.flowcall-imports-mapping",
                "summary": "Set an import's column mapping",
                "description": "Sets the column mapping of an uploaded list and hands the import over to the queue. Every column heading of the file belongs in the mapping, including the ones that map to nothing; they then carry the value null. An unusable mapping answers with HTTP 422 and the error invalid_mapping. Requires 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": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "mapping": {
                                        "type": "object",
                                        "description": "Mapping from column heading to target field, at least one entry. After a colon, a value may carry the label of a value collection, for example emails:Allgemein. null means the column is skipped."
                                    }
                                },
                                "required": [
                                    "mapping"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowcall/projects/{uuid}/imports/{importUuid}/retry": {
            "post": {
                "operationId": "flowcall.flowcall-imports-retry",
                "summary": "Restart an import",
                "description": "Restarts a failed import with the mapping it already has. An import in any other state answers with HTTP 409 and the error not_retryable. Requires 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": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowcall/projects/{uuid}/exports": {
            "get": {
                "operationId": "flowcall.flowcall-exports-index",
                "summary": "List a project's exports",
                "description": "A project's exports with their state and expiry. Requires 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": "Entries per page, 1 to 200, default 25.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, default 1.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowcall.flowcall-exports-store",
                "summary": "Start an export",
                "description": "Queues an export of the leads and answers with HTTP 202. Without recipient_email, the announcement goes to your own address. Requires projekt_leads_export.",
                "tags": [
                    "flowcall.exports"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "recipient_email": {
                                        "type": "string",
                                        "description": "Recipient of the announcement. Default is your own address."
                                    },
                                    "status": {
                                        "type": "string",
                                        "description": "Limits the export to one call outcome. The value all covers every lead and is the default."
                                    },
                                    "include_call_results": {
                                        "type": "boolean",
                                        "description": "Includes the call history in the file."
                                    },
                                    "max_call_results": {
                                        "type": "integer",
                                        "description": "How many history entries per lead, 1 to 100, default 5."
                                    },
                                    "include_comments": {
                                        "type": "boolean",
                                        "description": "Includes the comments in the file."
                                    },
                                    "max_comments": {
                                        "type": "integer",
                                        "description": "How many comments per lead, 1 to 100, default 5."
                                    },
                                    "highlight_rows": {
                                        "type": "boolean",
                                        "description": "Highlights the rows in colour according to their call outcome."
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowcall/projects/{uuid}/exports/{exportUuid}/download": {
            "get": {
                "operationId": "flowcall.flowcall-exports-download",
                "summary": "Download a finished export file",
                "description": "Returns the finished file as a download. An export that is still running, failed or expired answers with HTTP 409 and the error not_ready. If the file no longer exists, the call answers with HTTP 410 and the error file_missing. Requires 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": "Successful response",
                        "content": {
                            "application/octet-stream": {
                                "schema": {
                                    "type": "string",
                                    "format": "binary"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowcall/leads": {
            "get": {
                "operationId": "flowcall.flowcall-leads-index",
                "summary": "List leads",
                "description": "The leads of all reachable projects, newest first, filtered and paginated. Without project_uuid, the list covers every project this key sees.",
                "tags": [
                    "flowcall.leads"
                ],
                "parameters": [
                    {
                        "name": "project_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Limit to one call project.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "Only leads with this call outcome, for example Termin vereinbart.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "assigned_user_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Only leads assigned to this team member.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Searches company, contact person, first name, last name and city.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "follow_up_due",
                        "in": "query",
                        "required": false,
                        "description": "Only leads whose follow-up is due today or overdue.",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "locked",
                        "in": "query",
                        "required": false,
                        "description": "Only leads that are currently being worked on, or only the free ones.",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "untouched",
                        "in": "query",
                        "required": false,
                        "description": "Only leads with no outcome row at all.",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Entries per page, 1 to 200, default 25.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, default 1.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "f37a2d08-5b14-4e9c-8207-6d0a1f8c3b52",
                                            "project_uuid": "8f1c4a72-3d95-4e06-b1a8-5c7e2d0f9b41",
                                            "company": "Doe 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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowcall.flowcall-leads-store",
                "summary": "Create a lead",
                "description": "Creates a lead in a call project and answers with HTTP 201. The platform assigns the ID; a reference of your own belongs in extra. Requires projekt_lead_hinzufuegen.",
                "tags": [
                    "flowcall.leads"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "f37a2d08-5b14-4e9c-8207-6d0a1f8c3b52",
                                        "project_uuid": "8f1c4a72-3d95-4e06-b1a8-5c7e2d0f9b41",
                                        "company": "Doe 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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "project_uuid": {
                                        "type": "string",
                                        "description": "The call project, addressed by the UUID of the client project."
                                    },
                                    "company": {
                                        "type": "string",
                                        "description": "Company, at most 255 characters."
                                    },
                                    "contact_person": {
                                        "type": "string",
                                        "description": "Contact person, at most 255 characters."
                                    },
                                    "first_name": {
                                        "type": "string",
                                        "description": "First name, at most 255 characters."
                                    },
                                    "last_name": {
                                        "type": "string",
                                        "description": "Last name, at most 255 characters."
                                    },
                                    "address": {
                                        "type": "string",
                                        "description": "Full address as a single field, at most 1000 characters."
                                    },
                                    "street": {
                                        "type": "string",
                                        "description": "Street, at most 255 characters."
                                    },
                                    "house_number": {
                                        "type": "string",
                                        "description": "House number, at most 50 characters."
                                    },
                                    "postcode": {
                                        "type": "string",
                                        "description": "Postcode, at most 20 characters."
                                    },
                                    "city": {
                                        "type": "string",
                                        "description": "City, at most 255 characters."
                                    },
                                    "state": {
                                        "type": "string",
                                        "description": "State or region, at most 255 characters."
                                    },
                                    "country": {
                                        "type": "string",
                                        "description": "Country, at most 255 characters."
                                    },
                                    "phone_numbers": {
                                        "type": "array",
                                        "items": [],
                                        "description": "List of pairs with label and value. Plain text without a label is not accepted."
                                    },
                                    "emails": {
                                        "type": "array",
                                        "items": [],
                                        "description": "List of pairs with label and value."
                                    },
                                    "websites": {
                                        "type": "array",
                                        "items": [],
                                        "description": "List of pairs with label and value."
                                    },
                                    "extra": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Further details, freely structured. The right place for a reference of your own."
                                    },
                                    "form_data": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Answers of the project form, stored under the keys of the fields."
                                    },
                                    "project_id": {
                                        "type": "integer",
                                        "description": "Rejected. Use project_uuid instead."
                                    },
                                    "team_id": {
                                        "type": "integer",
                                        "description": "Rejected. The team follows from the API key."
                                    }
                                },
                                "required": [
                                    "project_uuid"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowcall/leads/{uuid}": {
            "get": {
                "operationId": "flowcall.flowcall-leads-show",
                "summary": "Get a lead",
                "description": "A lead with its current call outcome, the person responsible and everything attached to it. The sub-lists are limited: up to 50 calls, 50 comments and 50 emails, plus the follow-up. If you need the full history, use the dedicated lists. Requires projekt_alle_leads or projekt_telefonie.",
                "tags": [
                    "flowcall.leads"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "f37a2d08-5b14-4e9c-8207-6d0a1f8c3b52",
                                        "project_uuid": "8f1c4a72-3d95-4e06-b1a8-5c7e2d0f9b41",
                                        "company": "Doe 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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowcall.flowcall-leads-update",
                "summary": "Update a lead",
                "description": "Changes a lead's master data. A field that is left out stays unchanged. The change is recorded as a comment, just as in the interface; such comments carry the marker system in the comment list. The fields are the same as when creating. project_uuid, project_id and team_id are rejected. Requires projekt_bearbeiten or projekt_telefonie.",
                "tags": [
                    "flowcall.leads"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "f37a2d08-5b14-4e9c-8207-6d0a1f8c3b52",
                                        "project_uuid": "8f1c4a72-3d95-4e06-b1a8-5c7e2d0f9b41",
                                        "company": "Doe Bedachungen GmbH",
                                        "city": "Köln",
                                        "locked": false,
                                        "updated_at": "2026-09-20T10:11:00+02:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "company": {
                                        "type": "string",
                                        "description": "Company, at most 255 characters."
                                    },
                                    "contact_person": {
                                        "type": "string",
                                        "description": "Contact person, at most 255 characters."
                                    },
                                    "first_name": {
                                        "type": "string",
                                        "description": "First name, at most 255 characters."
                                    },
                                    "last_name": {
                                        "type": "string",
                                        "description": "Last name, at most 255 characters."
                                    },
                                    "address": {
                                        "type": "string",
                                        "description": "Full address as a single field, at most 1000 characters."
                                    },
                                    "street": {
                                        "type": "string",
                                        "description": "Street, at most 255 characters."
                                    },
                                    "house_number": {
                                        "type": "string",
                                        "description": "House number, at most 50 characters."
                                    },
                                    "postcode": {
                                        "type": "string",
                                        "description": "Postcode, at most 20 characters."
                                    },
                                    "city": {
                                        "type": "string",
                                        "description": "City, at most 255 characters."
                                    },
                                    "state": {
                                        "type": "string",
                                        "description": "State or region, at most 255 characters."
                                    },
                                    "country": {
                                        "type": "string",
                                        "description": "Country, at most 255 characters."
                                    },
                                    "phone_numbers": {
                                        "type": "array",
                                        "items": [],
                                        "description": "List of pairs with label and value."
                                    },
                                    "emails": {
                                        "type": "array",
                                        "items": [],
                                        "description": "List of pairs with label and value."
                                    },
                                    "websites": {
                                        "type": "array",
                                        "items": [],
                                        "description": "List of pairs with label and value."
                                    },
                                    "extra": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Further details, freely structured."
                                    },
                                    "form_data": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Answers of the project form."
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowcall.flowcall-leads-destroy",
                "summary": "Delete a lead",
                "description": "Removes the lead together with its calls, comments, follow-ups and emails. Requires projekte_verwalten.",
                "tags": [
                    "flowcall.leads"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Lead gelöscht."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowcall/leads/{uuid}/status": {
            "put": {
                "operationId": "flowcall.flowcall-leads-status",
                "summary": "Record a call outcome",
                "description": "Writes the lead's current call outcome and overwrites the previous one. In the same step you can optionally create a comment, an entry in the call history and a new follow-up. Every recorded outcome closes the open follow-up, unless a new date is passed at the same time. Requires projekt_telefonie.",
                "tags": [
                    "flowcall.leads"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "lead_uuid": "f37a2d08-5b14-4e9c-8207-6d0a1f8c3b52",
                                        "status": "Wiedervorlage",
                                        "follow_up_date": "2026-09-25"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "status": {
                                        "type": "string",
                                        "description": "The call outcome, at most 255 characters. Usual values are Offen, Übersprungen, Kein Interesse, Keinen erreicht, Falsche Rufnummer, AP nicht im hause, Wiedervorlage, E-Mail senden and Termin vereinbart; the field is free text."
                                    },
                                    "comment": {
                                        "type": "string",
                                        "description": "Recorded as a comment on the lead, at most 60000 characters."
                                    },
                                    "follow_up_date": {
                                        "type": "string",
                                        "description": "New follow-up in the format YYYY-MM-DD. Without a value, the open follow-up is closed."
                                    },
                                    "follow_up_time": {
                                        "type": "string",
                                        "description": "Time of the follow-up in the format HH:MM, default 08:00."
                                    },
                                    "log_call": {
                                        "type": "boolean",
                                        "description": "Whether an entry in the call history is created as well. Default is true; false suits a skipped lead that never counted as a call."
                                    }
                                },
                                "required": [
                                    "status"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowcall/leads/{uuid}/lock": {
            "post": {
                "operationId": "flowcall.flowcall-leads-lock",
                "summary": "Lock a lead for yourself",
                "description": "Takes the lead for your own work, so two people don't call it at the same time. A lead someone is already working on answers with HTTP 409 instead of being taken over silently. Requires projekt_telefonie.",
                "tags": [
                    "flowcall.leads"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "lead_uuid": "f37a2d08-5b14-4e9c-8207-6d0a1f8c3b52",
                                        "locked": true,
                                        "locked_until": "2026-09-20T10:45:00+02:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowcall.flowcall-leads-unlock",
                "summary": "Release a lead",
                "description": "Returns the lead to the shared list. Requires projekt_telefonie.",
                "tags": [
                    "flowcall.leads"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Sperre aufgehoben."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowcall/leads/{uuid}/comments": {
            "get": {
                "operationId": "flowcall.flowcall-comments-index",
                "summary": "List a lead's comments",
                "description": "The comments of a lead, newest first. Requires 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": "Entries per page, 1 to 200, default 25.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, default 1.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowcall.flowcall-comments-store",
                "summary": "Write a comment",
                "description": "Records a note on the lead and answers with HTTP 201. Requires projekt_telefonie.",
                "tags": [
                    "flowcall.comments"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "text": {
                                        "type": "string",
                                        "description": "The text, at most 60000 characters."
                                    }
                                },
                                "required": [
                                    "text"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowcall/leads/{uuid}/comments/{commentUuid}": {
            "put": {
                "operationId": "flowcall.flowcall-comments-update",
                "summary": "Update a comment",
                "description": "Rewrites a comment. Only the person who wrote it may do so; anyone else gets HTTP 403. Requires 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": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "text": {
                                        "type": "string",
                                        "description": "The new text, at most 60000 characters."
                                    }
                                },
                                "required": [
                                    "text"
                                ]
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowcall.flowcall-comments-destroy",
                "summary": "Delete a comment",
                "description": "Removes a comment. Only the person who wrote it may do so; anyone else gets HTTP 403. Requires 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": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Kommentar gelöscht."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowcall/leads/{uuid}/follow-ups": {
            "get": {
                "operationId": "flowcall.flowcall-follow-ups-index",
                "summary": "List a lead's follow-ups",
                "description": "The lead's follow-up, ordered by date and time. Since a lead has at most one, the list is empty or has one element. Requires projekt_telefonie.",
                "tags": [
                    "flowcall.follow-ups"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowcall.flowcall-follow-ups-store",
                "summary": "Set a follow-up",
                "description": "Puts the lead back on the list for a given day and answers with HTTP 201. An existing follow-up is replaced. Requires projekt_telefonie.",
                "tags": [
                    "flowcall.follow-ups"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "date": {
                                        "type": "string",
                                        "description": "Date in the format YYYY-MM-DD."
                                    },
                                    "time": {
                                        "type": "string",
                                        "description": "Time in the format HH:MM, default 08:00."
                                    }
                                },
                                "required": [
                                    "date"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowcall/leads/{uuid}/follow-ups/{followUpUuid}": {
            "put": {
                "operationId": "flowcall.flowcall-follow-ups-update",
                "summary": "Move a follow-up",
                "description": "Moves an existing follow-up. Date and time can be changed separately. Requires 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": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "date": {
                                        "type": "string",
                                        "description": "New date in the format YYYY-MM-DD."
                                    },
                                    "time": {
                                        "type": "string",
                                        "description": "New time in the format HH:MM."
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowcall.flowcall-follow-ups-destroy",
                "summary": "Delete a follow-up",
                "description": "Removes the follow-up without writing a call outcome. Requires 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": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Wiedervorlage gelöscht."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowcall/leads/{uuid}/calls": {
            "get": {
                "operationId": "flowcall.flowcall-calls-index",
                "summary": "Get a lead's call history",
                "description": "The entries of the call history, newest first. Requires 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": "Entries per page, 1 to 200, default 25.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, default 1.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowcall.flowcall-calls-store",
                "summary": "Log a call afterwards",
                "description": "Logs a call that took place elsewhere and answers with HTTP 201. Only the history entry is written; the lead's current call outcome stays where it is. Requires projekt_telefonie.",
                "tags": [
                    "flowcall.calls"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "status": {
                                        "type": "string",
                                        "description": "The outcome of this call, at most 255 characters. Usual values are the same nine terms as for the call outcome; the field is free text."
                                    }
                                },
                                "required": [
                                    "status"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowcall/leads/{uuid}/emails": {
            "get": {
                "operationId": "flowcall.flowcall-emails-index",
                "summary": "List a lead's emails",
                "description": "The emails written to the lead, newest first. The timestamps for delivery, open, click and bounce are filled in later by the sending service; until then they stay empty. Requires 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": "Entries per page, 1 to 200, default 25.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, default 1.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowcall.flowcall-emails-store",
                "summary": "Queue an email to the lead",
                "description": "Queues an email from the project template and answers with HTTP 202. If a follow-up date is passed, the lead comes back on the list on that day; without a date, the open follow-up is closed. Requires projekt_telefonie.",
                "tags": [
                    "flowcall.emails"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "address": {
                                        "type": "string",
                                        "description": "Recipient address, at most 255 characters."
                                    },
                                    "subject": {
                                        "type": "string",
                                        "description": "Subject, at most 255 characters. Without a value, the project template applies."
                                    },
                                    "body": {
                                        "type": "string",
                                        "description": "Text, at most 200000 characters. Without a value, the project template applies."
                                    },
                                    "skip_verification": {
                                        "type": "boolean",
                                        "description": "Marks the address as valid without verification, as the checkbox in the interface does. This is recorded as a comment on the lead."
                                    },
                                    "follow_up_date": {
                                        "type": "string",
                                        "description": "Follow-up in the format YYYY-MM-DD."
                                    },
                                    "follow_up_time": {
                                        "type": "string",
                                        "description": "Time of the follow-up in the format HH:MM, default 08:00."
                                    }
                                },
                                "required": [
                                    "address"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowcall/roles": {
            "get": {
                "operationId": "flowcall.flowcall-roles-index",
                "summary": "List roles",
                "description": "All FlowCall roles of the team with their ten permissions, in alphabetical order. Requires team_rollen_verwalten.",
                "tags": [
                    "flowcall.team"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowcall.flowcall-roles-store",
                "summary": "Create a role",
                "description": "Creates a role and answers with HTTP 201. The name is stored in lower case and must be unique within the team; a name already in use answers with HTTP 422 and the error already_exists. Permissions that are not named are set to denied. Requires team_rollen_verwalten.",
                "tags": [
                    "flowcall.team"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "The name of the role, at most 255 characters. It is stored in lower case."
                                    },
                                    "flags": {
                                        "type": "object",
                                        "description": "The permissions as booleans, named after the ten names from the overview. An unknown name is rejected instead of being silently skipped."
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowcall/roles/{uuid}": {
            "put": {
                "operationId": "flowcall.flowcall-roles-update",
                "summary": "Update a role",
                "description": "Changes name and permissions. A permission that is not named stays unchanged. A rename carries the new name into the assignments and project permissions in the same step. A name already in use answers with HTTP 422 and the error already_exists. Requires team_rollen_verwalten.",
                "tags": [
                    "flowcall.team"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "9c40b7e2-1a58-4d63-b07f-8e5c2a1d9f34",
                                        "name": "agent senior",
                                        "flags": {
                                            "projekt_telefonie": true,
                                            "projekt_alle_leads": true,
                                            "projekt_leads_export": true
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "The new name, at most 255 characters. It is stored in lower case."
                                    },
                                    "flags": {
                                        "type": "object",
                                        "description": "The permissions to change, as booleans. Permissions that are not named stay as they are."
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowcall.flowcall-roles-destroy",
                "summary": "Delete a role",
                "description": "Deletes a role that nobody holds any more. If someone still holds it, the call answers with HTTP 409 and the error role_in_use. Requires team_rollen_verwalten.",
                "tags": [
                    "flowcall.team"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Rolle gelöscht."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowcall/members": {
            "get": {
                "operationId": "flowcall.flowcall-members-index",
                "summary": "List team members",
                "description": "All members of the FlowCall team with the role they hold. The entry's UUID identifies the membership, user_uuid the person. Requires team_verwalten.",
                "tags": [
                    "flowcall.team"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowcall/members/{userUuid}/role": {
            "put": {
                "operationId": "flowcall.flowcall-members-role",
                "summary": "Give a member a role",
                "description": "Assigns a FlowCall role to a team member. The role is named by its UUID, so a rename is not mistaken for a new assignment. The assignment takes effect immediately in all of this person's project permissions. A person outside the team answers with HTTP 404. Requires team_verwalten.",
                "tags": [
                    "flowcall.team"
                ],
                "parameters": [
                    {
                        "name": "userUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "role_uuid": {
                                        "type": "string",
                                        "description": "UUID of the FlowCall role."
                                    }
                                },
                                "required": [
                                    "role_uuid"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowcall/call-history": {
            "get": {
                "operationId": "flowcall.flowcall-call-history",
                "summary": "Get the call log",
                "description": "The calls from the connected phone system, newest first. With callhistory_all the list covers the whole team, otherwise only your own calls. If a row is matched to a lead, it carries that lead's UUID.",
                "tags": [
                    "flowcall.call-history"
                ],
                "parameters": [
                    {
                        "name": "direction",
                        "in": "query",
                        "required": false,
                        "description": "Direction of the call as the phone system reports it, for example inbound or outbound.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "since",
                        "in": "query",
                        "required": false,
                        "description": "Only calls from this point on, as a date or timestamp.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Entries per page, 1 to 200, default 25.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, default 1.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowcall/reports/leads": {
            "get": {
                "operationId": "flowcall.flowcall-reports-leads",
                "summary": "Lead stock",
                "description": "The state of the leads in the reachable projects: the total, how many are currently being worked on, how many nobody has touched yet and the distribution across call outcomes.",
                "tags": [
                    "flowcall.reports"
                ],
                "parameters": [
                    {
                        "name": "project_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Limit to one call project.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowcall/reports/calls": {
            "get": {
                "operationId": "flowcall.flowcall-reports-calls",
                "summary": "Call volume",
                "description": "How much was called, by whom and with which outcome. The window is counted back in days and is at most one year, because the report works on the full call history.",
                "tags": [
                    "flowcall.reports"
                ],
                "parameters": [
                    {
                        "name": "project_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Limit to one call project.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "days",
                        "in": "query",
                        "required": false,
                        "description": "Time window in days, 1 to 365, default 14.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowcall/reports/follow-ups": {
            "get": {
                "operationId": "flowcall.flowcall-reports-follow-ups",
                "summary": "Follow-ups",
                "description": "What is overdue, what is due today and what comes next. The preview covers the next twenty follow-ups.",
                "tags": [
                    "flowcall.reports"
                ],
                "parameters": [
                    {
                        "name": "project_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Limit to one call project.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowcontacts/contacts": {
            "get": {
                "operationId": "flowcontacts.contacts-list",
                "summary": "List contacts",
                "description": "Retrieves a list of your personal contacts. The response includes all linked data such as email addresses, phone numbers and postal addresses.",
                "tags": [
                    "flowcontacts.endpoints"
                ],
                "parameters": [
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "Filter by status: active, archived, all",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Search term (name, company, job, email)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Number of results (max 200)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "data": [
                                        {
                                            "uuid": "123e4567-e89b-12d3-a456-426614174000",
                                            "id": 1042,
                                            "first_name": "Max",
                                            "last_name": "Doe",
                                            "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowcontacts.contact-create",
                "summary": "Create a contact",
                "description": "Creates a new private contact. Breaking change: the former upsert behaviour via a uuid in the body no longer exists; updates go through PUT /flowcontacts/contacts/{uuid}.",
                "tags": [
                    "flowcontacts.endpoints"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "data": {
                                        "uuid": "223e4567-e89b-12d3-a456-426614174111",
                                        "id": 1043,
                                        "first_name": "Erika",
                                        "last_name": "Doe",
                                        "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@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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "first_name": {
                                        "type": "string",
                                        "description": "First name"
                                    },
                                    "last_name": {
                                        "type": "string",
                                        "description": "Last name"
                                    },
                                    "company": {
                                        "type": "string",
                                        "description": "Company"
                                    },
                                    "job_title": {
                                        "type": "string",
                                        "description": "Job title"
                                    },
                                    "email_addresses": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Array of email objects with label, address and is_primary"
                                    },
                                    "phone_numbers": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Array of phone objects with label, number and is_primary"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowcontacts/contacts/{uuid}": {
            "get": {
                "operationId": "flowcontacts.contact-detail",
                "summary": "Retrieve contact details",
                "description": "Retrieves the full details of a single contact, including email addresses, phone numbers and postal addresses. The recommended way is to address the contact by UUID. As a transition, the numeric ID is accepted as well (/flowcontacts/contacts/123); this form is deprecated and will be removed once the FlowContacts app has fully switched to UUIDs. New integrations must use UUIDs only. Besides uuid, the response temporarily contains the id field again; nested objects (email addresses, phone numbers, postal addresses) still carry no IDs.",
                "tags": [
                    "flowcontacts.endpoints"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "data": {
                                        "uuid": "123e4567-e89b-12d3-a456-426614174000",
                                        "id": 1042,
                                        "first_name": "Max",
                                        "last_name": "Doe",
                                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowcontacts.contact-update",
                "summary": "Update a contact",
                "description": "Updates an existing contact by UUID (partial update: only the fields you send are written). As a transition, the numeric ID is also accepted in the path; this form is deprecated and will be removed. An unknown path value, or one that belongs to someone else, returns HTTP 404 in both forms.",
                "tags": [
                    "flowcontacts.endpoints"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "data": {
                                        "uuid": "223e4567-e89b-12d3-a456-426614174111",
                                        "id": 1043,
                                        "first_name": "Erika",
                                        "last_name": "Doe",
                                        "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@example.com",
                                                "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "first_name": {
                                        "type": "string",
                                        "description": "First name"
                                    },
                                    "last_name": {
                                        "type": "string",
                                        "description": "Last name"
                                    },
                                    "company": {
                                        "type": "string",
                                        "description": "Company"
                                    },
                                    "job_title": {
                                        "type": "string",
                                        "description": "Job title"
                                    },
                                    "email_addresses": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Array of email objects with label, address and is_primary"
                                    },
                                    "phone_numbers": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Array of phone objects with label, number and is_primary"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowcontacts.contact-delete",
                "summary": "Delete a contact",
                "description": "Deletes a contact by UUID (soft delete). As a transition, the numeric ID is also accepted in the path; this form is deprecated and will be removed. An unknown path value, or one that belongs to someone else, returns HTTP 404 in both forms.",
                "tags": [
                    "flowcontacts.endpoints"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowcontacts/contacts/{uuid}/avatar": {
            "post": {
                "operationId": "flowcontacts.contact-avatar-upload",
                "summary": "Upload a profile picture",
                "description": "Uploads a contact's profile picture as multipart/form-data and replaces any existing picture. The server crops the image to 500&times;500 pixels and stores it as JPEG; a previously stored picture is removed. JPEG, PNG and WebP up to 8&nbsp;MB are allowed. HEIC and HEIF are not supported, so iOS clients convert to JPEG before uploading. Profile pictures are deliberately not part of the sync push protocol; clients detect changes through avatar_sha1 in the sync pull.",
                "tags": [
                    "flowcontacts.endpoints"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "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": "Image file as a multipart/form-data field (JPEG, PNG or WebP, max. 8 MB)"
                                    }
                                },
                                "required": [
                                    "avatar"
                                ]
                            }
                        }
                    }
                }
            },
            "get": {
                "operationId": "flowcontacts.contact-avatar-download",
                "summary": "Retrieve a profile picture",
                "description": "Returns the image data of the profile picture, usually as image/jpeg. The response carries an ETag with the SHA-1 of the bytes; a call with If-None-Match is answered with 304 Not Modified and no content. External profile pictures, for example from Google Contacts, are redirected to their original URL with 302. Without a stored picture the endpoint answers with 404. Important: like every other endpoint, the URL is protected by the token. It has to be fetched with the Authorization header and does not work in a plain image tag.",
                "tags": [
                    "flowcontacts.endpoints"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/octet-stream": {
                                "schema": {
                                    "type": "string",
                                    "format": "binary"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowcontacts.contact-avatar-delete",
                "summary": "Delete a profile picture",
                "description": "Removes the contact's profile picture together with the stored file. The call is idempotent: even without a stored picture the server answers with 204 No Content.",
                "tags": [
                    "flowcontacts.endpoints"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/clients": {
            "get": {
                "operationId": "flowcrm.customers-list",
                "summary": "List customers",
                "description": "Retrieves your team's customers, by default only the active ones. With status=archived you get the archived customers, with status=all both. Each customer includes its tags and sources. To address individual customers, use only the uuid field.",
                "tags": [
                    "flowcrm.customers"
                ],
                "parameters": [
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "Which customers are returned: <code>active</code> (default), <code>archived</code> or <code>all</code> for both. Any other value results in 422",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Entries per page (1 to 500, default 500). The response also contains a <code>meta</code> block with <code>current_page</code>, <code>per_page</code>, <code>total</code> and <code>last_page</code>.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, starting at 1",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "count": 1,
                                    "data": [
                                        {
                                            "uuid": "123e4567-e89b-12d3-a456-426614174000",
                                            "name": "Doe GmbH",
                                            "email": "info@example.com",
                                            "phone": "+49 123 456789",
                                            "contact_person": null,
                                            "source": null,
                                            "whmcs_client_id": null,
                                            "external_id": null,
                                            "stripe_customer_id": null,
                                            "website": "https://example.com",
                                            "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowcrm.customers-create",
                "summary": "Create customer (find-or-create)",
                "description": "Creates a customer in the token's team. Idempotent through find-or-create: it first looks up a given external_id, then the email address (team-wide, case-insensitive). If an existing customer is found, including an archived one, the response returns it with created: false and only syncs the tag_uuids and sources that were sent. Only a genuinely new customer returns created: true (HTTP 201). If the email or external_id collides with a customer in the trash, the endpoint responds with HTTP 409.",
                "tags": [
                    "flowcrm.customers"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "created": true,
                                    "data": {
                                        "uuid": "8c1a5d2e-0f4b-4a9c-9d3e-2b7f0a6c1e44",
                                        "name": "Doe GmbH",
                                        "email": "info@example.com",
                                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Customer name"
                                    },
                                    "email": {
                                        "type": "string",
                                        "description": "Email address (used as the find-or-create key)"
                                    },
                                    "phone": {
                                        "type": "string",
                                        "description": "Phone number"
                                    },
                                    "source": {
                                        "type": "string",
                                        "description": "Single source as free text"
                                    },
                                    "external_id": {
                                        "type": "string",
                                        "description": "Machine identifier for upsert matching (takes precedence over the email)"
                                    },
                                    "match_by_email": {
                                        "type": "boolean",
                                        "description": "Default <code>true</code>. Together with <code>external_id</code>, <code>false</code> skips matching by email and creates a separate customer"
                                    },
                                    "whmcs_client_id": {
                                        "type": "integer",
                                        "description": "Optional WHMCS client ID"
                                    },
                                    "address_line_1": {
                                        "type": "string",
                                        "description": "Address line 1"
                                    },
                                    "address_line_2": {
                                        "type": "string",
                                        "description": "Address line 2"
                                    },
                                    "postal_code": {
                                        "type": "string",
                                        "description": "Postal code"
                                    },
                                    "city": {
                                        "type": "string",
                                        "description": "City"
                                    },
                                    "country": {
                                        "type": "string",
                                        "description": "Country (ISO code or name)"
                                    },
                                    "contact_person": {
                                        "type": "string",
                                        "description": "Contact person"
                                    },
                                    "tax_id": {
                                        "type": "string",
                                        "description": "Tax number"
                                    },
                                    "vat_id": {
                                        "type": "string",
                                        "description": "Customer's VAT ID (max. 32 characters). Required for e-invoices with reverse charge"
                                    },
                                    "tax_treatment": {
                                        "type": "string",
                                        "description": "Tax treatment: standard (with VAT, default) | reverse_charge (EU, tax liability shifts to the recipient) | reverse_charge_domestic (§ 13b UStG, domestic) | intra_community_supply (tax-free intra-community supply) | export (tax-free export) | non_taxable_abroad (not taxable in Germany) | tax_exempt (tax-exempt under § 4 UStG). All values except standard produce documents without VAT. reverse_charge, reverse_charge_domestic and intra_community_supply are for business customers (B2B) only. reverse_charge_domestic and tax_exempt exist only under German law: a team whose tax profile does not apply German law cannot newly set them (422); a value that is already stored remains allowed."
                                    },
                                    "billing_language": {
                                        "type": "string",
                                        "description": "Customer's billing language: de (default) | en | pt. Used as the document language of new invoices that do not specify one"
                                    },
                                    "tag_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "List of the team's own tag UUIDs from <code>GET /tags</code> to assign to the customer. An unknown, deleted or other team's UUID leads to HTTP 422, and nothing is created"
                                    },
                                    "sources": {
                                        "type": "array",
                                        "items": [],
                                        "description": "List of sources as free text"
                                    },
                                    "stripe_customer_id": {
                                        "type": "string",
                                        "description": "Optional Stripe customer ID (prefix cus_), written to the payment mapping"
                                    }
                                },
                                "required": [
                                    "name",
                                    "email"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/clients/search": {
            "get": {
                "operationId": "flowcrm.customers-search",
                "summary": "Search customers",
                "description": "Searches your team's customers by name, email address, phone number or website. By default only active customers are found; status includes archived ones.",
                "tags": [
                    "flowcrm.customers"
                ],
                "parameters": [
                    {
                        "name": "search",
                        "in": "query",
                        "required": true,
                        "description": "Search term for the customer search",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "Which customers are returned: <code>active</code> (default), <code>archived</code> or <code>all</code> for both. Any other value results in 422",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Entries per page (1 to 500, default 500). The response also contains a <code>meta</code> block with <code>current_page</code>, <code>per_page</code>, <code>total</code> and <code>last_page</code>.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, starting at 1",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/clients/{uuid}": {
            "patch": {
                "operationId": "flowcrm.customers-update",
                "summary": "Update customer",
                "description": "Updates one of the team's customers by its UUID. Only fields that are explicitly sent are written; omitted fields stay unchanged, and a field with the value null counts as not sent. Archiving and reactivating: in FlowSuite, an inactive customer is called archived. status: archived archives the customer and its projects, status: active reactivates it; the projects stay archived and are reactivated individually. A customer deleted under the GDPR cannot be reactivated (422). Breaking change: the former numeric path /clients/{id} has been removed without replacement (HTTP 404); only the UUID path applies.",
                "tags": [
                    "flowcrm.customers"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "8c1a5d2e-0f4b-4a9c-9d3e-2b7f0a6c1e44",
                                        "name": "Doe GmbH",
                                        "email": "info@example.com",
                                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Customer name"
                                    },
                                    "email": {
                                        "type": "string",
                                        "description": "Email address"
                                    },
                                    "contact_person": {
                                        "type": "string",
                                        "description": "Contact person"
                                    },
                                    "phone": {
                                        "type": "string",
                                        "description": "Phone number"
                                    },
                                    "website": {
                                        "type": "string",
                                        "description": "Website"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Internal notes about the customer"
                                    },
                                    "status": {
                                        "type": "string",
                                        "description": "active | archived. Archives or reactivates the customer, see the description"
                                    },
                                    "tag_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Tag UUIDs to assign to the customer in addition. Existing tags are kept; to remove tags, use <code>PATCH /clients/{uuid}/metadata</code> with <code>remove_tag_uuids</code>"
                                    },
                                    "sources": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Sources as free text to assign to the customer in addition"
                                    },
                                    "address_line_1": {
                                        "type": "string",
                                        "description": "Address line 1"
                                    },
                                    "address_line_2": {
                                        "type": "string",
                                        "description": "Address line 2"
                                    },
                                    "postal_code": {
                                        "type": "string",
                                        "description": "Postal code"
                                    },
                                    "city": {
                                        "type": "string",
                                        "description": "City"
                                    },
                                    "state": {
                                        "type": "string",
                                        "description": "State / region"
                                    },
                                    "country": {
                                        "type": "string",
                                        "description": "Country"
                                    },
                                    "tax_id": {
                                        "type": "string",
                                        "description": "Tax number"
                                    },
                                    "vat_id": {
                                        "type": "string",
                                        "description": "Customer's VAT ID (max. 32 characters). Required for e-invoices with reverse charge"
                                    },
                                    "tax_treatment": {
                                        "type": "string",
                                        "description": "Tax treatment: standard | reverse_charge | reverse_charge_domestic | intra_community_supply | export | non_taxable_abroad | tax_exempt. reverse_charge, reverse_charge_domestic and intra_community_supply are for business customers (B2B) only. reverse_charge_domestic and tax_exempt exist only under German law: a team whose tax profile does not apply German law cannot newly set them (422); a value that is already stored remains allowed."
                                    },
                                    "billing_language": {
                                        "type": "string",
                                        "description": "Customer's billing language: de | en | pt"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "get": {
                "operationId": "flowcrm.customers-show",
                "summary": "Get customer",
                "description": "Retrieves a single customer of your team by its uuid. Unknown customers or customers of other teams result in 404.",
                "tags": [
                    "flowcrm.customers"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowcrm.customers-delete",
                "summary": "Delete customer (GDPR)",
                "description": "Deletes the customer in line with the GDPR. Accounting documents subject to retention requirements are kept. A customer deleted this way cannot be restored. If a customer should only disappear from your active records, archive it instead with PATCH /clients/{uuid} and 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": "With <code>true</code>, the response also contains the customer's GDPR data export",
                        "schema": {
                            "type": "boolean"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/clients/lookup": {
            "get": {
                "operationId": "flowcrm.customers-lookup",
                "summary": "Look up customer",
                "description": "Exact search for exactly one customer, without ever creating one. By default only active customers are found; status includes archived ones. At least one of the parameters is required. If several are given, the fixed order is external_id, then customer_number, then custom field (custom_field_uuid with custom_field_value), then email (case-insensitive). duplicate_count gives the number of matches, data contains the oldest one.",
                "tags": [
                    "flowcrm.customers"
                ],
                "parameters": [
                    {
                        "name": "external_id",
                        "in": "query",
                        "required": false,
                        "description": "External identifier of the customer (max. 255)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "customer_number",
                        "in": "query",
                        "required": false,
                        "description": "Customer number (max. 255)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "custom_field_uuid",
                        "in": "query",
                        "required": false,
                        "description": "UUID of a custom field of this team. Only together with <code>custom_field_value</code>. Another team's UUID behaves like an unknown one (422). Reference and multi-select fields are not supported",
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "custom_field_value",
                        "in": "query",
                        "required": false,
                        "description": "Exact value of the custom field, exactly as it is written (dates as YYYY-MM-DD, select fields as the option value). Only together with <code>custom_field_uuid</code>",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "email",
                        "in": "query",
                        "required": false,
                        "description": "Email address (max. 255)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "Which customers are returned: <code>active</code> (default), <code>archived</code> or <code>all</code> for both. Any other value results in 422",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/clients/{uuid}/restore": {
            "post": {
                "operationId": "flowcrm.customers-restore",
                "summary": "Restore customer",
                "description": "Brings a customer back from the trash. This endpoint is not meant for archived customers; they are reactivated with PATCH /clients/{uuid} and status: active. A customer that is not deleted is returned unchanged; the response states whether a restore took place. Customers deleted under the GDPR are excluded.",
                "tags": [
                    "flowcrm.customers"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/clients/{uuid}/timeline": {
            "get": {
                "operationId": "flowcrm.timeline-list",
                "summary": "List timeline entries",
                "description": "Retrieves all timeline entries for a given customer in chronological order. Each entry includes its uuid for updating and deleting.",
                "tags": [
                    "flowcrm.timeline"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "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": "John Doe",
                                            "automatic": false,
                                            "editable": true,
                                            "created_at": "2026-10-07T09:31:12.000000Z"
                                        }
                                    ],
                                    "count": 1
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowcrm.timeline-create",
                "summary": "Create timeline entry",
                "description": "Creates a new timeline entry for the given customer. Like every timeline change, this requires FlowCRM write access, otherwise HTTP 403. If one of your own entries with identical content and an identical event_date already exists, no second one is created: the response is then HTTP 200 with duplicate: true and the existing entry. Without event_date, a new entry is always created.",
                "tags": [
                    "flowcrm.timeline"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "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": "John Doe",
                                        "automatic": false,
                                        "editable": true,
                                        "created_at": "2026-10-07T09:31:12.000000Z"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "content": {
                                        "type": "string",
                                        "description": "Text of the entry. Older clients that send only title remain valid: the title is then stored as the text."
                                    },
                                    "event_date": {
                                        "type": "string",
                                        "description": "Event date (ISO 8601, default: now)"
                                    },
                                    "title": {
                                        "type": "string",
                                        "description": "Deprecated. Discarded when sent alongside content; sent on its own, it is stored as content."
                                    }
                                },
                                "required": [
                                    "content"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/clients/{uuid}/timeline/{entry_uuid}": {
            "patch": {
                "operationId": "flowcrm.timeline-update",
                "summary": "Update timeline entry",
                "description": "Corrects one of your own manually written entries. Entries by other people and automatically generated entries, for example from a meeting assignment, respond with HTTP 403 and keep their source.",
                "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": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "content": {
                                        "type": "string",
                                        "description": "New content"
                                    },
                                    "title": {
                                        "type": "string",
                                        "description": "Deprecated. Accepted but not stored."
                                    },
                                    "type": {
                                        "type": "string",
                                        "description": "note, meeting, email, call, text, coffee, food, networking, party or other"
                                    },
                                    "event_date": {
                                        "type": "string",
                                        "description": "New point in time"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowcrm.timeline-delete",
                "summary": "Delete timeline entry",
                "description": "Removes one of your own manually written entries.",
                "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": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/clients/{uuid}/timeline/bulk-delete": {
            "post": {
                "operationId": "flowcrm.timeline-bulk-delete",
                "summary": "Delete multiple timeline entries",
                "description": "Removes up to 200 of your own manually written entries for a customer in one call. Each entry follows the same rule as a single delete. Other people's, automatically generated and unknown entries do not abort the call; they appear in results with their outcome.",
                "tags": [
                    "flowcrm.timeline"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "entry_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "List of entry UUIDs to delete (1 to 200, each only once)"
                                    }
                                },
                                "required": [
                                    "entry_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/clients/{uuid}/timeline/search": {
            "get": {
                "operationId": "flowcrm.timeline-search",
                "summary": "Search timeline",
                "description": "Searches a customer's timeline entries by content. For older entries, the former title is searched as well. Matches have the same shape as in the list.",
                "tags": [
                    "flowcrm.timeline"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "required": true,
                        "description": "Search term",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/contacts": {
            "get": {
                "operationId": "flowcrm.contacts-list",
                "summary": "List contacts",
                "description": "Lists the contacts the key in use is allowed to see: shared team contacts and your own private contacts.",
                "tags": [
                    "flowcrm.contacts"
                ],
                "parameters": [
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Searches first name, last name, company and stored email addresses and phone numbers",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "client_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Only contacts of the given customer",
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "<code>active</code> (default), <code>archived</code> or <code>all</code>",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "visibility",
                        "in": "query",
                        "required": false,
                        "description": "<code>team</code> or <code>private</code>; both if omitted",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "custom_field_uuid",
                        "in": "query",
                        "required": false,
                        "description": "UUID of a custom field of this team. Only together with <code>custom_field_value</code>. Another team's UUID behaves like an unknown one (422). Reference and multi-select fields are not supported",
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "custom_field_value",
                        "in": "query",
                        "required": false,
                        "description": "Exact value of the custom field (dates as YYYY-MM-DD, select fields as the option value). Only together with <code>custom_field_uuid</code>",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Entries per page (1 to 200, default 50)",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, starting at 1",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "123e4567-e89b-12d3-a456-426614174000",
                                            "first_name": "Anna",
                                            "last_name": "Beispiel",
                                            "company": "Doe GmbH",
                                            "visibility": "team",
                                            "status": "active",
                                            "external_source": null,
                                            "external_id": null,
                                            "emails": [
                                                {
                                                    "uuid": "7a3f1c44-1b2d-4e8a-9c11-5d6e7f8a9b0c",
                                                    "label": "Geschäftlich",
                                                    "email": "anna@example.com",
                                                    "is_primary": true
                                                }
                                            ]
                                        }
                                    ],
                                    "meta": {
                                        "current_page": 1,
                                        "per_page": 50,
                                        "total": 1,
                                        "last_page": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowcrm.contacts-create",
                "summary": "Create contact",
                "description": "Creates a contact. At least a first or last name is required. If client_uuid is set, the contact is created directly as a team contact of the given customer. Email, sources, custom fields and external identifier are written in the same step. With external_source and external_id, the call can be repeated safely: a contact that is already known is returned unchanged with created: false and HTTP 200, even if it is archived (status shows this); new contacts respond with 201. Identifiers belonging to a deleted contact lead to 409, and the contact is neither restored nor created again. External identifiers apply only to team contacts; for private contacts they lead to 422.",
                "tags": [
                    "flowcrm.contacts"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "first_name": {
                                        "type": "string",
                                        "description": "First name"
                                    },
                                    "last_name": {
                                        "type": "string",
                                        "description": "Last name"
                                    },
                                    "salutation": {
                                        "type": "string",
                                        "description": "Herr, Frau, Divers, Firma or keine (Mr, Ms, diverse, company or none)"
                                    },
                                    "title": {
                                        "type": "string",
                                        "description": "Title, such as Dr. or Prof."
                                    },
                                    "job_title": {
                                        "type": "string",
                                        "description": "Position in the company"
                                    },
                                    "company": {
                                        "type": "string",
                                        "description": "Company name"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Free text about the person"
                                    },
                                    "birth_day": {
                                        "type": "integer",
                                        "description": "Day of birth, 1 to 31"
                                    },
                                    "birth_month": {
                                        "type": "integer",
                                        "description": "Month of birth, 1 to 12"
                                    },
                                    "birth_year": {
                                        "type": "integer",
                                        "description": "Year of birth"
                                    },
                                    "client_uuid": {
                                        "type": "string",
                                        "format": "uuid",
                                        "description": "Customer the contact belongs to"
                                    },
                                    "visibility": {
                                        "type": "string",
                                        "description": "<code>team</code> (default) or <code>private</code>"
                                    },
                                    "email": {
                                        "type": "string",
                                        "description": "Email address, stored as the primary address"
                                    },
                                    "sources": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Sources as free text (max. 20)"
                                    },
                                    "custom_fields": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Custom fields as for leads: entries with <code>definition_uuid</code> or <code>name</code> and <code>value</code>"
                                    },
                                    "external_source": {
                                        "type": "string",
                                        "description": "Source system of the external identifier. Only together with <code>external_id</code>"
                                    },
                                    "external_id": {
                                        "type": "string",
                                        "description": "Identifier in the source system, unique per team and <code>external_source</code>. Only together with <code>external_source</code>"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/contacts/{uuid}": {
            "get": {
                "operationId": "flowcrm.contacts-show",
                "summary": "Get contact",
                "description": "Returns a contact with all value collections: email addresses, phone numbers, addresses, links, profiles, dates and free fields.",
                "tags": [
                    "flowcrm.contacts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "patch": {
                "operationId": "flowcrm.contacts-update",
                "summary": "Update contact",
                "description": "Changes only the fields that are sent. status lets you archive a contact and reactivate it. First and last name must not both become empty.",
                "tags": [
                    "flowcrm.contacts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "first_name": {
                                        "type": "string",
                                        "description": "First name"
                                    },
                                    "last_name": {
                                        "type": "string",
                                        "description": "Last name"
                                    },
                                    "salutation": {
                                        "type": "string",
                                        "description": "Herr, Frau, Divers, Firma or keine (Mr, Ms, diverse, company or none)"
                                    },
                                    "title": {
                                        "type": "string",
                                        "description": "Title"
                                    },
                                    "job_title": {
                                        "type": "string",
                                        "description": "Position in the company"
                                    },
                                    "company": {
                                        "type": "string",
                                        "description": "Company name"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Free text about the person"
                                    },
                                    "birth_day": {
                                        "type": "integer",
                                        "description": "Day of birth"
                                    },
                                    "birth_month": {
                                        "type": "integer",
                                        "description": "Month of birth"
                                    },
                                    "birth_year": {
                                        "type": "integer",
                                        "description": "Year of birth"
                                    },
                                    "status": {
                                        "type": "string",
                                        "description": "<code>active</code> or <code>archived</code>"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowcrm.contacts-delete",
                "summary": "Delete contact",
                "description": "Moves the contact to the trash, just like the contact list in the app. If you only want to hide the contact temporarily, set status: archived instead.",
                "tags": [
                    "flowcrm.contacts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/contacts/{uuid}/client": {
            "put": {
                "operationId": "flowcrm.contacts-assign-client",
                "summary": "Assign contact to a customer",
                "description": "Assigns the contact to a customer, or removes the assignment with client_uuid: null. A previously private contact is deliberately shared with the team in the process. If the customer has no contact person yet, it takes over this contact's name.",
                "tags": [
                    "flowcrm.contacts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "client_uuid": {
                                        "type": "string",
                                        "format": "uuid",
                                        "description": "Customer, or <code>null</code> to remove the assignment"
                                    }
                                },
                                "required": [
                                    "client_uuid"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/contacts/{uuid}/values/{collection}": {
            "post": {
                "operationId": "flowcrm.contacts-value-create",
                "summary": "Add contact value",
                "description": "Adds exactly one value to a collection. Available collections: emails, phones, addresses, links, socials, dates, customs. At most one value per collection can be is_primary; a new primary value replaces the previous one.",
                "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": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "label": {
                                        "type": "string",
                                        "description": "Label, such as work or home. For <code>socials</code>, use <code>platform</code> instead"
                                    },
                                    "email": {
                                        "type": "string",
                                        "description": "Only for <code>emails</code>"
                                    },
                                    "phone": {
                                        "type": "string",
                                        "description": "Only for <code>phones</code>"
                                    },
                                    "url": {
                                        "type": "string",
                                        "description": "Only for <code>links</code> and <code>socials</code>"
                                    },
                                    "date": {
                                        "type": "string",
                                        "description": "Only for <code>dates</code>, in the format YYYY-MM-DD"
                                    },
                                    "value": {
                                        "type": "string",
                                        "description": "Only for <code>customs</code>"
                                    },
                                    "is_primary": {
                                        "type": "boolean",
                                        "description": "Only for <code>emails</code>, <code>phones</code> and <code>addresses</code>"
                                    }
                                },
                                "required": [
                                    "label"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/contacts/{uuid}/values/{collection}/{value_uuid}": {
            "patch": {
                "operationId": "flowcrm.contacts-value-update",
                "summary": "Update contact value",
                "description": "Changes exactly one value. Only the fields that actually changed need to be sent. For addresses, stored coordinates are discarded as soon as an address field changes.",
                "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": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "label": {
                                        "type": "string",
                                        "description": "Label of the value"
                                    },
                                    "is_primary": {
                                        "type": "boolean",
                                        "description": "Makes the value the primary value of the collection"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowcrm.contacts-value-delete",
                "summary": "Remove contact value",
                "description": "Removes exactly one value from the given collection.",
                "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": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/clients/{uuid}/projects": {
            "get": {
                "operationId": "flowcrm.projects-list",
                "summary": "List customer projects",
                "description": "Lists all projects of the given customer, including status, description and a modules array with active integrations (flowcall, flowtime, flowtasks).",
                "tags": [
                    "flowcrm.projects"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowcrm.projects-create-for-client",
                "summary": "Create project for a customer",
                "description": "Like \"Create project\", but the customer is already in the path and does not need to be repeated in the body.",
                "tags": [
                    "flowcrm.projects"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Project name"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Description"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Internal notes"
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/projects": {
            "get": {
                "operationId": "flowcrm.projects-list-all",
                "summary": "List all projects",
                "description": "Lists the team's projects across all customers.",
                "tags": [
                    "flowcrm.projects"
                ],
                "parameters": [
                    {
                        "name": "client_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Only projects of the given customer",
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Searches the project name",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "<code>active</code> (default), <code>archived</code> or <code>all</code>",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Entries per page (1 to 200, default 50)",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, starting at 1",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowcrm.projects-create",
                "summary": "Create project",
                "description": "Creates a project for the given customer.",
                "tags": [
                    "flowcrm.projects"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Project name"
                                    },
                                    "client_uuid": {
                                        "type": "string",
                                        "format": "uuid",
                                        "description": "Customer the project belongs to"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Description"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Internal notes"
                                    },
                                    "budget_type": {
                                        "type": "string",
                                        "description": "<code>hours</code> or <code>amount</code>"
                                    },
                                    "budget_value": {
                                        "type": "number",
                                        "description": "Budget value"
                                    },
                                    "budget_currency": {
                                        "type": "string",
                                        "description": "Currency as a three-letter code"
                                    },
                                    "budget_interval": {
                                        "type": "string",
                                        "description": "<code>total</code>, <code>monthly</code> or <code>daily</code>"
                                    },
                                    "budget_enforcement": {
                                        "type": "string",
                                        "description": "<code>soft</code> or <code>hard</code>"
                                    }
                                },
                                "required": [
                                    "name",
                                    "client_uuid"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/projects/{uuid}": {
            "get": {
                "operationId": "flowcrm.projects-show",
                "summary": "Get project",
                "description": "Returns a single project including budget details and active modules.",
                "tags": [
                    "flowcrm.projects"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "patch": {
                "operationId": "flowcrm.projects-update",
                "summary": "Update project",
                "description": "Changes only the fields that are sent. client_uuid lets you move a project to another customer of the same team, and status lets you archive and reactivate it.",
                "tags": [
                    "flowcrm.projects"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Project name"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Description"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Internal notes"
                                    },
                                    "client_uuid": {
                                        "type": "string",
                                        "format": "uuid",
                                        "description": "New customer of the project"
                                    },
                                    "status": {
                                        "type": "string",
                                        "description": "<code>active</code> or <code>archived</code>"
                                    },
                                    "budget_type": {
                                        "type": "string",
                                        "description": "<code>hours</code> or <code>amount</code>"
                                    },
                                    "budget_value": {
                                        "type": "number",
                                        "description": "Budget value"
                                    },
                                    "budget_currency": {
                                        "type": "string",
                                        "description": "Currency as a three-letter code"
                                    },
                                    "budget_interval": {
                                        "type": "string",
                                        "description": "<code>total</code>, <code>monthly</code> or <code>daily</code>"
                                    },
                                    "budget_enforcement": {
                                        "type": "string",
                                        "description": "<code>soft</code> or <code>hard</code>"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowcrm.projects-archive",
                "summary": "Archive project",
                "description": "Archives the project. It is kept because time tracking, invoices and task boards still refer to it.",
                "tags": [
                    "flowcrm.projects"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/clients/{uuid}/projects/{project_uuid}/timeline": {
            "get": {
                "operationId": "flowcrm.project-timeline-list",
                "summary": "Get project timeline",
                "description": "Retrieves all timeline entries for a given project, like the customer timeline and in the same shape, including a uuid per entry.",
                "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": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowcrm.project-timeline-create",
                "summary": "Create project timeline entry",
                "description": "Appends an entry to the project timeline. Author and team are derived from the key and cannot be set in the body. One of your own entries with identical content, type and event_date is not created twice; the response is then HTTP 200 with 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": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "content": {
                                        "type": "string",
                                        "description": "Content of the entry"
                                    },
                                    "title": {
                                        "type": "string",
                                        "description": "Deprecated. Accepted but not stored."
                                    },
                                    "type": {
                                        "type": "string",
                                        "description": "note (default), meeting, email, call, text, coffee, food, networking, party or other"
                                    },
                                    "event_date": {
                                        "type": "string",
                                        "description": "Time of the event; now if omitted"
                                    }
                                },
                                "required": [
                                    "content"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/clients/{uuid}/projects/{project_uuid}/timeline/{entry_uuid}": {
            "patch": {
                "operationId": "flowcrm.project-timeline-update",
                "summary": "Update project timeline entry",
                "description": "Corrects one of your own manually written entries. Entries by other people and automatically generated entries respond with 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": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "content": {
                                        "type": "string",
                                        "description": "New content"
                                    },
                                    "title": {
                                        "type": "string",
                                        "description": "Deprecated. Accepted but not stored."
                                    },
                                    "type": {
                                        "type": "string",
                                        "description": "New type"
                                    },
                                    "event_date": {
                                        "type": "string",
                                        "description": "New point in time"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowcrm.project-timeline-delete",
                "summary": "Delete project timeline entry",
                "description": "Removes one of your own manually written entries.",
                "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": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/clients/{uuid}/projects/{project_uuid}/timeline/bulk-delete": {
            "post": {
                "operationId": "flowcrm.project-timeline-bulk-delete",
                "summary": "Delete multiple project timeline entries",
                "description": "Removes up to 200 of your own manually written entries for a project in one call. Rules and response match the bulk delete of the customer 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": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "entry_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "List of entry UUIDs to delete (1 to 200, each only once)"
                                    }
                                },
                                "required": [
                                    "entry_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/clients/{uuid}/todos": {
            "get": {
                "operationId": "flowcrm.clients-todos-list",
                "summary": "List to-dos (customers)",
                "description": "Lists the record's to-dos. Completed to-dos only appear with 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": "Include completed to-dos",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Entries per page (1 to 200, default 50)",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, starting at 1",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowcrm.clients-todos-create",
                "summary": "Create to-do (customers)",
                "description": "Creates a to-do on the record. Assignees are specified by their user UUID and must belong to the API key's team. With recurring_interval you create a series, i.e. a to-do that moves itself to the next date each time it is completed. A series requires a due_date and cannot be created as already completed; otherwise the request returns HTTP 422.",
                "tags": [
                    "flowcrm.record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "description": "Title of the to-do"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Description"
                                    },
                                    "due_date": {
                                        "type": "string",
                                        "description": "Due date in the format YYYY-MM-DD"
                                    },
                                    "priority": {
                                        "type": "string",
                                        "description": "<code>high</code>, <code>medium</code> (default) or <code>low</code>"
                                    },
                                    "completed": {
                                        "type": "boolean",
                                        "description": "Create as already completed. Cannot be combined with <code>recurring_interval</code>"
                                    },
                                    "recurring_interval": {
                                        "type": "string",
                                        "description": "Repetition of the to-do: <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> or <code>yearly</code>. Requires <code>due_date</code>"
                                    },
                                    "assigned_user_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "User UUIDs of the assignees"
                                    }
                                },
                                "required": [
                                    "title"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/clients/{uuid}/todos/{todo_uuid}": {
            "patch": {
                "operationId": "flowcrm.clients-todos-update",
                "summary": "Update to-do (customers)",
                "description": "Changes only the fields you send. Use completed to complete or reopen a to-do. Omitting assigned_user_uuids leaves the assignment unchanged; an empty value removes it. For a series (a to-do with recurring_interval), completed: true completes only the current occurrence: the to-do stays open, its due_date advances by one interval, and the completed occurrence is stored as a separate, completed to-do. data is always the addressed to-do, so for a series it still has completed: false and the new due_date. The completed occurrence is returned alongside it in the response field completed_occurrence; in all other cases this field is null. Reopening (completed: false) applies to simple to-dos and to completed occurrences; the series itself is never completed. The due_date of a series cannot be changed directly (HTTP 422). A repeated call would also complete the next occurrence: if you send expected_due_date, you instead receive HTTP 409 with the current date in current_due_date once the series has already advanced.",
                "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": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "description": "Title of the to-do"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Description"
                                    },
                                    "due_date": {
                                        "type": "string",
                                        "description": "Due date in the format YYYY-MM-DD"
                                    },
                                    "priority": {
                                        "type": "string",
                                        "description": "<code>high</code>, <code>medium</code> or <code>low</code>"
                                    },
                                    "completed": {
                                        "type": "boolean",
                                        "description": "Completion state. For a series, <code>true</code> completes only the current occurrence"
                                    },
                                    "recurring_interval": {
                                        "type": "string",
                                        "description": "Repetition of the to-do: <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> or <code>yearly</code>. Requires a <code>due_date</code>; <code>null</code> ends the series"
                                    },
                                    "expected_due_date": {
                                        "type": "string",
                                        "description": "Only when completing a series: the date in the format YYYY-MM-DD that the caller currently sees. If it differs from the current <code>due_date</code>, the endpoint returns HTTP 409 and completes nothing"
                                    },
                                    "assigned_user_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "User UUIDs of the assignees"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowcrm.clients-todos-delete",
                "summary": "Delete to-do (customers)",
                "description": "Removes the to-do.",
                "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": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/clients/{uuid}/metadata": {
            "get": {
                "operationId": "flowcrm.clients-metadata-show",
                "summary": "Get metadata (customers)",
                "description": "Returns the record's tags, sources and custom fields, along with the tags and custom field definitions available in the team. A definition with api_managed: true can only be written via the API and is read-only in the user interface. Custom fields of type reference are returned with the UUID and the name of the target. Each definition states its type: text, textarea, number, url, dropdown, multiselect, reference, date or currency. For dropdown and multiselect, options lists the selectable options with label and value; the value of a multiselect field is a list of option values such as [\"gold\", \"silber\"]. For number and currency, decimals holds the number of allowed decimal places, and for currency, currency additionally holds the field's fixed ISO 4217 code; for all other types both are null. Values of type date use the format YYYY-MM-DD; values of type currency are a decimal number with a period as the decimal separator and state the currency code in currency.",
                "tags": [
                    "flowcrm.record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "patch": {
                "operationId": "flowcrm.clients-metadata-update",
                "summary": "Update metadata (customers)",
                "description": "Adds or removes individual tags, sources and custom field values. Nothing is replaced as a whole; an empty value deletes the respective custom field. Custom fields are identified by definition_uuid or their unique name; for reference fields, the value is the UUID of the target. Fields of type multiselect expect a list of option values from options that completely replaces the previous selection; an empty list deletes the field. Fields of type date expect a date in the format YYYY-MM-DD; fields of type currency expect an amount as a number or numeric string without a currency symbol and without thousands separators. The amount may have at most as many decimal places as the definition specifies in decimals and is stored padded to that number of places. A value that does not match the type results in HTTP 422 with the field reference custom_fields.{index}; nothing is changed in that case.",
                "tags": [
                    "flowcrm.record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "add_tag_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Tags to add"
                                    },
                                    "remove_tag_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Tags to remove"
                                    },
                                    "add_sources": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Sources to add"
                                    },
                                    "remove_sources": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Sources to remove"
                                    },
                                    "custom_fields": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Entries consisting of <code>definition_uuid</code> or <code>name</code> and <code>value</code>. For <code>date</code>, <code>value</code> is a date such as <code>\"2026-12-31\"</code>; for <code>currency</code>, an amount such as <code>12500.5</code> or <code>\"12500.50\"</code>; for <code>multiselect</code>, a list such as <code>[\"gold\", \"silber\"]</code>"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/clients/{uuid}/files": {
            "get": {
                "operationId": "flowcrm.clients-files-list",
                "summary": "List files (customers)",
                "description": "Lists the record's files. has_document_source indicates whether the file was generated from Markdown and can therefore be revised instead of replaced.",
                "tags": [
                    "flowcrm.record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Entries per page (1 to 200, default 50)",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, starting at 1",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowcrm.clients-files-upload",
                "summary": "Upload file (customers)",
                "description": "Attaches an uploaded file to the record. Transfer as multipart/form-data, at most 50 MB. File types that are not allowed return HTTP 422.",
                "tags": [
                    "flowcrm.record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "file": {
                                        "type": "string",
                                        "format": "binary",
                                        "description": "The file to upload"
                                    },
                                    "name": {
                                        "type": "string",
                                        "description": "Alternative file name"
                                    }
                                },
                                "required": [
                                    "file"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/clients/{uuid}/files/{file_uuid}/download": {
            "get": {
                "operationId": "flowcrm.clients-files-download",
                "summary": "Download link for a file (customers)",
                "description": "Returns a short-lived download link along with its validity in seconds. The response contains the link, not the file contents.",
                "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": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/clients/{uuid}/files/{file_uuid}/text": {
            "get": {
                "operationId": "flowcrm.clients-files-text",
                "summary": "Read the text of a file (customers)",
                "description": "Returns the already extracted text of the file in chunks of 20,000 characters. The endpoint is read-only; it does not trigger a new extraction.",
                "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": "Start position in the text; <code>next_offset</code> in the response leads to the next chunk",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/clients/{uuid}/documents": {
            "post": {
                "operationId": "flowcrm.clients-documents-render",
                "summary": "Generate document from Markdown (customers)",
                "description": "Generates a PDF or Word document from Markdown and stores it on the record. With file_uuid, an existing version generated the same way is revised instead of a second one being added next to it.",
                "tags": [
                    "flowcrm.record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "description": "Title, also used as the file name without extension"
                                    },
                                    "source_markdown": {
                                        "type": "string",
                                        "description": "The content as Markdown"
                                    },
                                    "format": {
                                        "type": "string",
                                        "description": "<code>pdf</code> or <code>docx</code>"
                                    },
                                    "file_uuid": {
                                        "type": "string",
                                        "format": "uuid",
                                        "description": "Existing version to be replaced"
                                    }
                                },
                                "required": [
                                    "title",
                                    "source_markdown",
                                    "format"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/contacts/{uuid}/todos": {
            "get": {
                "operationId": "flowcrm.contacts-todos-list",
                "summary": "List to-dos (contacts)",
                "description": "Lists the record's to-dos. Completed to-dos only appear with 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": "Include completed to-dos",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Entries per page (1 to 200, default 50)",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, starting at 1",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowcrm.contacts-todos-create",
                "summary": "Create to-do (contacts)",
                "description": "Creates a to-do on the record. Assignees are specified by their user UUID and must belong to the API key's team. With recurring_interval you create a series, i.e. a to-do that moves itself to the next date each time it is completed. A series requires a due_date and cannot be created as already completed; otherwise the request returns HTTP 422.",
                "tags": [
                    "flowcrm.record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "description": "Title of the to-do"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Description"
                                    },
                                    "due_date": {
                                        "type": "string",
                                        "description": "Due date in the format YYYY-MM-DD"
                                    },
                                    "priority": {
                                        "type": "string",
                                        "description": "<code>high</code>, <code>medium</code> (default) or <code>low</code>"
                                    },
                                    "completed": {
                                        "type": "boolean",
                                        "description": "Create as already completed. Cannot be combined with <code>recurring_interval</code>"
                                    },
                                    "recurring_interval": {
                                        "type": "string",
                                        "description": "Repetition of the to-do: <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> or <code>yearly</code>. Requires <code>due_date</code>"
                                    },
                                    "assigned_user_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "User UUIDs of the assignees"
                                    }
                                },
                                "required": [
                                    "title"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/contacts/{uuid}/todos/{todo_uuid}": {
            "patch": {
                "operationId": "flowcrm.contacts-todos-update",
                "summary": "Update to-do (contacts)",
                "description": "Changes only the fields you send. Use completed to complete or reopen a to-do. Omitting assigned_user_uuids leaves the assignment unchanged; an empty value removes it. For a series (a to-do with recurring_interval), completed: true completes only the current occurrence: the to-do stays open, its due_date advances by one interval, and the completed occurrence is stored as a separate, completed to-do. data is always the addressed to-do, so for a series it still has completed: false and the new due_date. The completed occurrence is returned alongside it in the response field completed_occurrence; in all other cases this field is null. Reopening (completed: false) applies to simple to-dos and to completed occurrences; the series itself is never completed. The due_date of a series cannot be changed directly (HTTP 422). A repeated call would also complete the next occurrence: if you send expected_due_date, you instead receive HTTP 409 with the current date in current_due_date once the series has already advanced.",
                "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": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "description": "Title of the to-do"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Description"
                                    },
                                    "due_date": {
                                        "type": "string",
                                        "description": "Due date in the format YYYY-MM-DD"
                                    },
                                    "priority": {
                                        "type": "string",
                                        "description": "<code>high</code>, <code>medium</code> or <code>low</code>"
                                    },
                                    "completed": {
                                        "type": "boolean",
                                        "description": "Completion state. For a series, <code>true</code> completes only the current occurrence"
                                    },
                                    "recurring_interval": {
                                        "type": "string",
                                        "description": "Repetition of the to-do: <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> or <code>yearly</code>. Requires a <code>due_date</code>; <code>null</code> ends the series"
                                    },
                                    "expected_due_date": {
                                        "type": "string",
                                        "description": "Only when completing a series: the date in the format YYYY-MM-DD that the caller currently sees. If it differs from the current <code>due_date</code>, the endpoint returns HTTP 409 and completes nothing"
                                    },
                                    "assigned_user_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "User UUIDs of the assignees"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowcrm.contacts-todos-delete",
                "summary": "Delete to-do (contacts)",
                "description": "Removes the to-do.",
                "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": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/contacts/{uuid}/metadata": {
            "get": {
                "operationId": "flowcrm.contacts-metadata-show",
                "summary": "Get metadata (contacts)",
                "description": "Returns the record's tags, sources and custom fields, along with the tags and custom field definitions available in the team. A definition with api_managed: true can only be written via the API and is read-only in the user interface. Custom fields of type reference are returned with the UUID and the name of the target. Each definition states its type: text, textarea, number, url, dropdown, multiselect, reference, date or currency. For dropdown and multiselect, options lists the selectable options with label and value; the value of a multiselect field is a list of option values such as [\"gold\", \"silber\"]. For number and currency, decimals holds the number of allowed decimal places, and for currency, currency additionally holds the field's fixed ISO 4217 code; for all other types both are null. Values of type date use the format YYYY-MM-DD; values of type currency are a decimal number with a period as the decimal separator and state the currency code in currency.",
                "tags": [
                    "flowcrm.record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "patch": {
                "operationId": "flowcrm.contacts-metadata-update",
                "summary": "Update metadata (contacts)",
                "description": "Adds or removes individual tags, sources and custom field values. Nothing is replaced as a whole; an empty value deletes the respective custom field. Custom fields are identified by definition_uuid or their unique name; for reference fields, the value is the UUID of the target. Fields of type multiselect expect a list of option values from options that completely replaces the previous selection; an empty list deletes the field. Fields of type date expect a date in the format YYYY-MM-DD; fields of type currency expect an amount as a number or numeric string without a currency symbol and without thousands separators. The amount may have at most as many decimal places as the definition specifies in decimals and is stored padded to that number of places. A value that does not match the type results in HTTP 422 with the field reference custom_fields.{index}; nothing is changed in that case.",
                "tags": [
                    "flowcrm.record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "add_tag_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Tags to add"
                                    },
                                    "remove_tag_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Tags to remove"
                                    },
                                    "add_sources": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Sources to add"
                                    },
                                    "remove_sources": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Sources to remove"
                                    },
                                    "custom_fields": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Entries consisting of <code>definition_uuid</code> or <code>name</code> and <code>value</code>. For <code>date</code>, <code>value</code> is a date such as <code>\"2026-12-31\"</code>; for <code>currency</code>, an amount such as <code>12500.5</code> or <code>\"12500.50\"</code>; for <code>multiselect</code>, a list such as <code>[\"gold\", \"silber\"]</code>"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/contacts/{uuid}/files": {
            "get": {
                "operationId": "flowcrm.contacts-files-list",
                "summary": "List files (contacts)",
                "description": "Lists the record's files. has_document_source indicates whether the file was generated from Markdown and can therefore be revised instead of replaced.",
                "tags": [
                    "flowcrm.record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Entries per page (1 to 200, default 50)",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, starting at 1",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowcrm.contacts-files-upload",
                "summary": "Upload file (contacts)",
                "description": "Attaches an uploaded file to the record. Transfer as multipart/form-data, at most 50 MB. File types that are not allowed return HTTP 422.",
                "tags": [
                    "flowcrm.record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "file": {
                                        "type": "string",
                                        "format": "binary",
                                        "description": "The file to upload"
                                    },
                                    "name": {
                                        "type": "string",
                                        "description": "Alternative file name"
                                    }
                                },
                                "required": [
                                    "file"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/contacts/{uuid}/files/{file_uuid}/download": {
            "get": {
                "operationId": "flowcrm.contacts-files-download",
                "summary": "Download link for a file (contacts)",
                "description": "Returns a short-lived download link along with its validity in seconds. The response contains the link, not the file contents.",
                "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": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/contacts/{uuid}/files/{file_uuid}/text": {
            "get": {
                "operationId": "flowcrm.contacts-files-text",
                "summary": "Read the text of a file (contacts)",
                "description": "Returns the already extracted text of the file in chunks of 20,000 characters. The endpoint is read-only; it does not trigger a new extraction.",
                "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": "Start position in the text; <code>next_offset</code> in the response leads to the next chunk",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/contacts/{uuid}/documents": {
            "post": {
                "operationId": "flowcrm.contacts-documents-render",
                "summary": "Generate document from Markdown (contacts)",
                "description": "Generates a PDF or Word document from Markdown and stores it on the record. With file_uuid, an existing version generated the same way is revised instead of a second one being added next to it.",
                "tags": [
                    "flowcrm.record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "description": "Title, also used as the file name without extension"
                                    },
                                    "source_markdown": {
                                        "type": "string",
                                        "description": "The content as Markdown"
                                    },
                                    "format": {
                                        "type": "string",
                                        "description": "<code>pdf</code> or <code>docx</code>"
                                    },
                                    "file_uuid": {
                                        "type": "string",
                                        "format": "uuid",
                                        "description": "Existing version to be replaced"
                                    }
                                },
                                "required": [
                                    "title",
                                    "source_markdown",
                                    "format"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/projects/{uuid}/todos": {
            "get": {
                "operationId": "flowcrm.projects-todos-list",
                "summary": "List to-dos (projects)",
                "description": "Lists the record's to-dos. Completed to-dos only appear with 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": "Include completed to-dos",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Entries per page (1 to 200, default 50)",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, starting at 1",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowcrm.projects-todos-create",
                "summary": "Create to-do (projects)",
                "description": "Creates a to-do on the record. Assignees are specified by their user UUID and must belong to the API key's team. With recurring_interval you create a series, i.e. a to-do that moves itself to the next date each time it is completed. A series requires a due_date and cannot be created as already completed; otherwise the request returns HTTP 422.",
                "tags": [
                    "flowcrm.record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "description": "Title of the to-do"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Description"
                                    },
                                    "due_date": {
                                        "type": "string",
                                        "description": "Due date in the format YYYY-MM-DD"
                                    },
                                    "priority": {
                                        "type": "string",
                                        "description": "<code>high</code>, <code>medium</code> (default) or <code>low</code>"
                                    },
                                    "completed": {
                                        "type": "boolean",
                                        "description": "Create as already completed. Cannot be combined with <code>recurring_interval</code>"
                                    },
                                    "recurring_interval": {
                                        "type": "string",
                                        "description": "Repetition of the to-do: <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> or <code>yearly</code>. Requires <code>due_date</code>"
                                    },
                                    "assigned_user_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "User UUIDs of the assignees"
                                    }
                                },
                                "required": [
                                    "title"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/projects/{uuid}/todos/{todo_uuid}": {
            "patch": {
                "operationId": "flowcrm.projects-todos-update",
                "summary": "Update to-do (projects)",
                "description": "Changes only the fields you send. Use completed to complete or reopen a to-do. Omitting assigned_user_uuids leaves the assignment unchanged; an empty value removes it. For a series (a to-do with recurring_interval), completed: true completes only the current occurrence: the to-do stays open, its due_date advances by one interval, and the completed occurrence is stored as a separate, completed to-do. data is always the addressed to-do, so for a series it still has completed: false and the new due_date. The completed occurrence is returned alongside it in the response field completed_occurrence; in all other cases this field is null. Reopening (completed: false) applies to simple to-dos and to completed occurrences; the series itself is never completed. The due_date of a series cannot be changed directly (HTTP 422). A repeated call would also complete the next occurrence: if you send expected_due_date, you instead receive HTTP 409 with the current date in current_due_date once the series has already advanced.",
                "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": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "description": "Title of the to-do"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Description"
                                    },
                                    "due_date": {
                                        "type": "string",
                                        "description": "Due date in the format YYYY-MM-DD"
                                    },
                                    "priority": {
                                        "type": "string",
                                        "description": "<code>high</code>, <code>medium</code> or <code>low</code>"
                                    },
                                    "completed": {
                                        "type": "boolean",
                                        "description": "Completion state. For a series, <code>true</code> completes only the current occurrence"
                                    },
                                    "recurring_interval": {
                                        "type": "string",
                                        "description": "Repetition of the to-do: <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> or <code>yearly</code>. Requires a <code>due_date</code>; <code>null</code> ends the series"
                                    },
                                    "expected_due_date": {
                                        "type": "string",
                                        "description": "Only when completing a series: the date in the format YYYY-MM-DD that the caller currently sees. If it differs from the current <code>due_date</code>, the endpoint returns HTTP 409 and completes nothing"
                                    },
                                    "assigned_user_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "User UUIDs of the assignees"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowcrm.projects-todos-delete",
                "summary": "Delete to-do (projects)",
                "description": "Removes the to-do.",
                "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": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/projects/{uuid}/metadata": {
            "get": {
                "operationId": "flowcrm.projects-metadata-show",
                "summary": "Get metadata (projects)",
                "description": "Returns the record's tags, sources and custom fields, along with the tags and custom field definitions available in the team. A definition with api_managed: true can only be written via the API and is read-only in the user interface. Custom fields of type reference are returned with the UUID and the name of the target. Each definition states its type: text, textarea, number, url, dropdown, multiselect, reference, date or currency. For dropdown and multiselect, options lists the selectable options with label and value; the value of a multiselect field is a list of option values such as [\"gold\", \"silber\"]. For number and currency, decimals holds the number of allowed decimal places, and for currency, currency additionally holds the field's fixed ISO 4217 code; for all other types both are null. Values of type date use the format YYYY-MM-DD; values of type currency are a decimal number with a period as the decimal separator and state the currency code in currency.",
                "tags": [
                    "flowcrm.record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "patch": {
                "operationId": "flowcrm.projects-metadata-update",
                "summary": "Update metadata (projects)",
                "description": "Adds or removes individual tags, sources and custom field values. Nothing is replaced as a whole; an empty value deletes the respective custom field. Custom fields are identified by definition_uuid or their unique name; for reference fields, the value is the UUID of the target. Fields of type multiselect expect a list of option values from options that completely replaces the previous selection; an empty list deletes the field. Fields of type date expect a date in the format YYYY-MM-DD; fields of type currency expect an amount as a number or numeric string without a currency symbol and without thousands separators. The amount may have at most as many decimal places as the definition specifies in decimals and is stored padded to that number of places. A value that does not match the type results in HTTP 422 with the field reference custom_fields.{index}; nothing is changed in that case.",
                "tags": [
                    "flowcrm.record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "add_tag_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Tags to add"
                                    },
                                    "remove_tag_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Tags to remove"
                                    },
                                    "add_sources": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Sources to add"
                                    },
                                    "remove_sources": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Sources to remove"
                                    },
                                    "custom_fields": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Entries consisting of <code>definition_uuid</code> or <code>name</code> and <code>value</code>. For <code>date</code>, <code>value</code> is a date such as <code>\"2026-12-31\"</code>; for <code>currency</code>, an amount such as <code>12500.5</code> or <code>\"12500.50\"</code>; for <code>multiselect</code>, a list such as <code>[\"gold\", \"silber\"]</code>"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/projects/{uuid}/files": {
            "get": {
                "operationId": "flowcrm.projects-files-list",
                "summary": "List files (projects)",
                "description": "Lists the record's files. has_document_source indicates whether the file was generated from Markdown and can therefore be revised instead of replaced.",
                "tags": [
                    "flowcrm.record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Entries per page (1 to 200, default 50)",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, starting at 1",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowcrm.projects-files-upload",
                "summary": "Upload file (projects)",
                "description": "Attaches an uploaded file to the record. Transfer as multipart/form-data, at most 50 MB. File types that are not allowed return HTTP 422.",
                "tags": [
                    "flowcrm.record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "file": {
                                        "type": "string",
                                        "format": "binary",
                                        "description": "The file to upload"
                                    },
                                    "name": {
                                        "type": "string",
                                        "description": "Alternative file name"
                                    }
                                },
                                "required": [
                                    "file"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/projects/{uuid}/files/{file_uuid}/download": {
            "get": {
                "operationId": "flowcrm.projects-files-download",
                "summary": "Download link for a file (projects)",
                "description": "Returns a short-lived download link along with its validity in seconds. The response contains the link, not the file contents.",
                "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": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/projects/{uuid}/files/{file_uuid}/text": {
            "get": {
                "operationId": "flowcrm.projects-files-text",
                "summary": "Read the text of a file (projects)",
                "description": "Returns the already extracted text of the file in chunks of 20,000 characters. The endpoint is read-only; it does not trigger a new extraction.",
                "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": "Start position in the text; <code>next_offset</code> in the response leads to the next chunk",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/projects/{uuid}/documents": {
            "post": {
                "operationId": "flowcrm.projects-documents-render",
                "summary": "Generate document from Markdown (projects)",
                "description": "Generates a PDF or Word document from Markdown and stores it on the record. With file_uuid, an existing version generated the same way is revised instead of a second one being added next to it.",
                "tags": [
                    "flowcrm.record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "description": "Title, also used as the file name without extension"
                                    },
                                    "source_markdown": {
                                        "type": "string",
                                        "description": "The content as Markdown"
                                    },
                                    "format": {
                                        "type": "string",
                                        "description": "<code>pdf</code> or <code>docx</code>"
                                    },
                                    "file_uuid": {
                                        "type": "string",
                                        "format": "uuid",
                                        "description": "Existing version to be replaced"
                                    }
                                },
                                "required": [
                                    "title",
                                    "source_markdown",
                                    "format"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/tags": {
            "get": {
                "operationId": "flowcrm.tags-list",
                "summary": "List tags",
                "description": "Lists your team's tags alphabetically by title. Use the list to find a tag's uuid before setting it on a customer, contact or lead. FlowCRM access is sufficient; FlowSend is not required.",
                "tags": [
                    "flowcrm.tags"
                ],
                "parameters": [
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Returns only tags whose title contains the text",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Entries per page (1 to 200, default 50)",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, starting at 1",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowcrm.tags-create",
                "summary": "Create tag (find-or-create)",
                "description": "Creates a tag for your team. The call can be repeated safely: if a tag with this name already exists, it is returned with created: false and HTTP 200; case and special characters are ignored in the comparison. A previously deleted tag with the same name is brought back (restored: true, HTTP 201), without its former assignments. A genuinely new tag responds with created: true and HTTP 201. Requires FlowCRM write access. Renaming and deleting tags is reserved for the FlowSend API.",
                "tags": [
                    "flowcrm.tags"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "description": "Name of the tag, at most 100 characters, containing at least one letter or digit"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Description, at most 1,000 characters. Only stored when the tag is newly created"
                                    }
                                },
                                "required": [
                                    "title"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/leads": {
            "get": {
                "operationId": "flowcrm.leads-list",
                "summary": "List leads",
                "description": "Lists the team's leads, paginated. By default only the open pipeline is shown (closed and converted leads are hidden); with pipeline=false the full set is returned. Leads marked as spam are left out of the list, except with include_spam=1 or an exact search by external_source and external_id: that search always finds a lead, even one marked as spam, so an integration does not create a duplicate before creating a lead. The response follows the standard pagination format with data, links and meta.",
                "tags": [
                    "flowcrm.leads"
                ],
                "parameters": [
                    {
                        "name": "pipeline",
                        "in": "query",
                        "required": false,
                        "description": "Default true (open pipeline only). false shows all leads, closed ones included",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "include_spam",
                        "in": "query",
                        "required": false,
                        "description": "Default false. 1 adds leads marked as spam to the list (recognisable by spam_at). An exact search by external_source and external_id always includes spam leads",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Full-text search across company name, first/last name and email",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "external_source",
                        "in": "query",
                        "required": false,
                        "description": "Exact filter on the origin of the external identifier. Subject to the pipeline default; for closed or converted leads also send pipeline=false",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "external_id",
                        "in": "query",
                        "required": false,
                        "description": "Exact filter on the external identifier. Subject to the pipeline default; for closed or converted leads also send pipeline=false",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "source",
                        "in": "query",
                        "required": false,
                        "description": "Filter on one source, or several separated by commas",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "tag_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Filter on a team-owned tag UUID",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "assigned_user_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Filter on the UUID of the assigned user. A UUID outside the team returns an empty list. Breaking change: assigned_user_id is no longer accepted (422)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "created_from",
                        "in": "query",
                        "required": false,
                        "description": "Created on or after (date, YYYY-MM-DD)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "created_to",
                        "in": "query",
                        "required": false,
                        "description": "Created on or before (date, YYYY-MM-DD)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "updated_from",
                        "in": "query",
                        "required": false,
                        "description": "Changed on or after (date, YYYY-MM-DD)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "updated_to",
                        "in": "query",
                        "required": false,
                        "description": "Changed on or before (date, YYYY-MM-DD)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Entries per page (default 50, maximum 100)",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "include",
                        "in": "query",
                        "required": false,
                        "description": "Additional relations, comma-separated: contacts, sources, tags, status, board_cards, assigned_user, notes, custom_fields",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "data": [
                                        {
                                            "uuid": "9b1c7f3e-2a4d-4c8b-8e1a-6f0d2c9b4a11",
                                            "type": "company",
                                            "company_name": "Doe GmbH",
                                            "first_name": null,
                                            "last_name": null,
                                            "name": "Doe GmbH",
                                            "email": "info@example.com",
                                            "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowcrm.leads-create",
                "summary": "Create a lead (upsert)",
                "description": "Creates a lead, or idempotently updates an existing one through external_source + external_id (merging only the fields sent). The status can never be set here; a new lead starts in the Cold stage of the default pipeline. An optional doc object fills the lead's FlowDoc on first creation, not on an idempotent repeated POST. The former docs[] array is no longer accepted (422), because a lead has exactly one FlowDoc. The response carries created (bool) and duplicate_warning (object with matches, or null). HTTP 201 for a new lead, 200 for an idempotent update.",
                "tags": [
                    "flowcrm.leads"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "created": true,
                                    "data": {
                                        "uuid": "9b1c7f3e-2a4d-4c8b-8e1a-6f0d2c9b4a11",
                                        "type": "company",
                                        "company_name": "Doe GmbH",
                                        "first_name": null,
                                        "last_name": null,
                                        "name": "Doe GmbH",
                                        "email": "info@example.com",
                                        "phone": "+49 30 123456",
                                        "website": "https://example.com",
                                        "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@example.com",
                                                "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "type": "string",
                                        "description": "company or person"
                                    },
                                    "company_name": {
                                        "type": "string",
                                        "description": "Company name (required if type=company)"
                                    },
                                    "first_name": {
                                        "type": "string",
                                        "description": "First name (required if type=person)"
                                    },
                                    "last_name": {
                                        "type": "string",
                                        "description": "Last name"
                                    },
                                    "email": {
                                        "type": "string",
                                        "description": "Email address"
                                    },
                                    "phone": {
                                        "type": "string",
                                        "description": "Phone number"
                                    },
                                    "website": {
                                        "type": "string",
                                        "description": "Website"
                                    },
                                    "address_line_1": {
                                        "type": "string",
                                        "description": "Address line 1"
                                    },
                                    "address_line_2": {
                                        "type": "string",
                                        "description": "Address line 2"
                                    },
                                    "postal_code": {
                                        "type": "string",
                                        "description": "Postal code"
                                    },
                                    "city": {
                                        "type": "string",
                                        "description": "City"
                                    },
                                    "state": {
                                        "type": "string",
                                        "description": "State / region"
                                    },
                                    "country": {
                                        "type": "string",
                                        "description": "Country (ISO code)"
                                    },
                                    "country_display": {
                                        "type": "string",
                                        "description": "Display name of the country"
                                    },
                                    "deal_value": {
                                        "type": "number",
                                        "description": "Potential deal value"
                                    },
                                    "deal_currency": {
                                        "type": "string",
                                        "description": "Currency (3-letter ISO code)"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Free-text note on the lead"
                                    },
                                    "external_source": {
                                        "type": "string",
                                        "description": "Identifier of the source system, part of the idempotency key"
                                    },
                                    "external_id": {
                                        "type": "string",
                                        "description": "Record identifier in the source system, part of the idempotency key"
                                    },
                                    "source_payload": {
                                        "type": "object",
                                        "description": "Raw payload of the source. Stored, but never appears in the response"
                                    },
                                    "sources": {
                                        "type": "array",
                                        "items": [],
                                        "description": "List of sources as free text (max. 20 entries)"
                                    },
                                    "tag_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "List of team-owned tag UUIDs (max. 50 entries)"
                                    },
                                    "assigned_user_uuid": {
                                        "type": "string",
                                        "description": "UUID of a team member as the assigned user. Users outside the team are rejected with 422. Breaking change: assigned_user_id is no longer accepted (validation error)"
                                    },
                                    "contacts": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Contact person objects (first_name, last_name, email, phone, role; max. 50 entries)"
                                    },
                                    "custom_fields": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Custom field values (definition_uuid or name, plus value). For fields of type reference, value is the UUID of the target (customer, contact, project or team member), for example {\"definition_uuid\": \"...\", \"value\": \"3f7c1a02-9b64-4d1e-a5c8-2e7b90d41f6a\"}. For fields of type date, value is a date in the format YYYY-MM-DD; for fields of type currency, an amount as a number or numeric string without currency symbol and without thousands separators, with at most the decimal places set in the definition; for fields of type multiselect, a list of option values such as [\"gold\", \"silber\"]. A value that does not fit leads to 422 and no lead is created. Breaking change: definition_id is no longer accepted, and a numeric target ID in value is also rejected with 422 for reference fields"
                                    },
                                    "doc": {
                                        "type": "object",
                                        "description": "The lead's FlowDoc, only on creation. The only field is content as a Markdown string; there is no title. Breaking change: the former docs[] array is rejected with 422"
                                    }
                                },
                                "required": [
                                    "type"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/leads/{uuid}": {
            "get": {
                "operationId": "flowcrm.leads-show",
                "summary": "Get a lead",
                "description": "Returns a single team-owned lead by UUID. Status, sources, tags, contact persons and the assigned user are included. Custom field values only with include=custom_fields; reference fields are addressed by UUID only.",
                "tags": [
                    "flowcrm.leads"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "include",
                        "in": "query",
                        "required": false,
                        "description": "custom_fields to load the custom field values. Reference fields return the UUID of the target in value and referenced_uuid, and the display name in referenced_name; if the target no longer exists, referenced_uuid is null. Fields of type date return the date as YYYY-MM-DD, fields of type currency the amount as a decimal number with a point in value and the field's ISO 4217 code in currency, fields of type multiselect the list of chosen option values in value",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "9b1c7f3e-2a4d-4c8b-8e1a-6f0d2c9b4a11",
                                        "type": "company",
                                        "company_name": "Doe GmbH",
                                        "first_name": null,
                                        "last_name": null,
                                        "name": "Doe GmbH",
                                        "email": "info@example.com",
                                        "phone": "+49 30 123456",
                                        "website": "https://example.com",
                                        "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": "Doe 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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "patch": {
                "operationId": "flowcrm.leads-update",
                "summary": "Update a lead",
                "description": "Updates the core fields of a team-owned lead (partial update, only the fields sent). The status cannot be set here (status and status_id are rejected with 422); use the status endpoint for that. The response also carries duplicate_warning.",
                "tags": [
                    "flowcrm.leads"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "9b1c7f3e-2a4d-4c8b-8e1a-6f0d2c9b4a11",
                                        "type": "company",
                                        "company_name": "Doe GmbH",
                                        "name": "Doe GmbH",
                                        "email": "kontakt@example.com",
                                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "type": "string",
                                        "description": "company or person"
                                    },
                                    "company_name": {
                                        "type": "string",
                                        "description": "Company name"
                                    },
                                    "first_name": {
                                        "type": "string",
                                        "description": "First name"
                                    },
                                    "last_name": {
                                        "type": "string",
                                        "description": "Last name"
                                    },
                                    "email": {
                                        "type": "string",
                                        "description": "Email address"
                                    },
                                    "phone": {
                                        "type": "string",
                                        "description": "Phone number"
                                    },
                                    "website": {
                                        "type": "string",
                                        "description": "Website"
                                    },
                                    "address_line_1": {
                                        "type": "string",
                                        "description": "Address line 1"
                                    },
                                    "address_line_2": {
                                        "type": "string",
                                        "description": "Address line 2"
                                    },
                                    "postal_code": {
                                        "type": "string",
                                        "description": "Postal code"
                                    },
                                    "city": {
                                        "type": "string",
                                        "description": "City"
                                    },
                                    "state": {
                                        "type": "string",
                                        "description": "State / region"
                                    },
                                    "country": {
                                        "type": "string",
                                        "description": "Country (ISO code)"
                                    },
                                    "country_display": {
                                        "type": "string",
                                        "description": "Display name of the country"
                                    },
                                    "deal_value": {
                                        "type": "number",
                                        "description": "Potential deal value"
                                    },
                                    "deal_currency": {
                                        "type": "string",
                                        "description": "Currency (3-letter ISO code)"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Free-text note"
                                    },
                                    "external_source": {
                                        "type": "string",
                                        "description": "Identifier of the source system"
                                    },
                                    "external_id": {
                                        "type": "string",
                                        "description": "Record identifier in the source system"
                                    },
                                    "source_payload": {
                                        "type": "object",
                                        "description": "Raw payload of the source. Stored, but never appears in the response"
                                    },
                                    "sources": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Sources, additive (only adds, never removes; use PUT /sources to replace; max. 20 entries)"
                                    },
                                    "tag_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Team-owned tag UUIDs, additive (use PUT /tags to replace; max. 50 entries)"
                                    },
                                    "assigned_user_uuid": {
                                        "type": "string",
                                        "description": "UUID of a team member as the assigned user; null removes the assignment. Users outside the team are rejected with 422. Breaking change: assigned_user_id is no longer accepted (validation error)"
                                    },
                                    "contacts": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Contact person objects (first_name, last_name, email, phone, role), additive: creates new contact persons and never changes or deletes existing ones (use the /contacts endpoints for that; max. 50 entries)"
                                    },
                                    "custom_fields": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Custom field values (definition_uuid or name, plus value). For fields of type reference, value is the UUID of the target (customer, contact, project or team member). For fields of type date, value is a date in the format YYYY-MM-DD; for fields of type currency, an amount as a number or numeric string without currency symbol and without thousands separators; for fields of type multiselect, a list of option values (replaces the previous selection). A value that does not fit leads to 422. Breaking change: definition_id is no longer accepted, and a numeric target ID in value is also rejected with 422 for reference fields"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowcrm.leads-delete",
                "summary": "Delete a lead",
                "description": "Deletes a team-owned lead (soft delete).",
                "tags": [
                    "flowcrm.leads"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Lead gelöscht."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/leads/{uuid}/sources": {
            "put": {
                "operationId": "flowcrm.leads-sources-sync",
                "summary": "Sync sources",
                "description": "Full sync of the lead's sources: the list you send replaces the stored one. An empty array clears the sources. The server trims values, removes empty ones and removes duplicates.",
                "tags": [
                    "flowcrm.lead-relations"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "9b1c7f3e-2a4d-4c8b-8e1a-6f0d2c9b4a11",
                                        "type": "company",
                                        "name": "Doe 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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "sources": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Complete list of sources (free text, max. 50 entries). Required; an empty array clears the sources"
                                    }
                                },
                                "required": [
                                    "sources"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/leads/{uuid}/tags": {
            "put": {
                "operationId": "flowcrm.leads-tags-sync",
                "summary": "Sync tags",
                "description": "Full sync of the lead's tags through team-owned tag UUIDs: the list you send replaces the stored one. Kept tags keep their pivot source, newly attached ones get source=api, and tags left out are removed. An empty array removes all tags. A UUID from another team is rejected with 422.",
                "tags": [
                    "flowcrm.lead-relations"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "9b1c7f3e-2a4d-4c8b-8e1a-6f0d2c9b4a11",
                                        "type": "company",
                                        "name": "Doe 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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "tag_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Complete list of team-owned tag UUIDs (max. 50 entries). Required; an empty array removes all tags"
                                    }
                                },
                                "required": [
                                    "tag_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/leads/{uuid}/contacts": {
            "get": {
                "operationId": "flowcrm.leads-contacts-list",
                "summary": "List contact persons",
                "description": "Lists the contact persons of a team-owned lead.",
                "tags": [
                    "flowcrm.lead-relations"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "4f8a2b6c-9d1e-4c3a-8b5f-0a7e6d2c1b9e",
                                            "first_name": "Erika",
                                            "last_name": "Musterfrau",
                                            "email": "erika@example.com",
                                            "phone": null,
                                            "role": "Einkauf",
                                            "created_at": "2026-07-21T10:00:00+00:00",
                                            "updated_at": "2026-07-21T10:00:00+00:00"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowcrm.leads-contacts-create",
                "summary": "Create a contact person",
                "description": "Creates a contact person on the lead. Only first_name is required.",
                "tags": [
                    "flowcrm.lead-relations"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "5a9b3c7d-0e2f-4d4b-9c6a-1b8f7e3d2c0f",
                                        "first_name": "Max",
                                        "last_name": "Doe",
                                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "first_name": {
                                        "type": "string",
                                        "description": "First name"
                                    },
                                    "last_name": {
                                        "type": "string",
                                        "description": "Last name"
                                    },
                                    "email": {
                                        "type": "string",
                                        "description": "Email address"
                                    },
                                    "phone": {
                                        "type": "string",
                                        "description": "Phone number"
                                    },
                                    "role": {
                                        "type": "string",
                                        "description": "Role / position"
                                    }
                                },
                                "required": [
                                    "first_name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/leads/{uuid}/contacts/{contactUuid}": {
            "patch": {
                "operationId": "flowcrm.leads-contacts-update",
                "summary": "Update a contact person",
                "description": "Updates a contact person (partial update). If sent, first_name must not be empty. The contact person is addressed by UUID within the lead; numeric IDs are no longer accepted (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": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "5a9b3c7d-0e2f-4d4b-9c6a-1b8f7e3d2c0f",
                                        "first_name": "Max",
                                        "last_name": "Doe",
                                        "email": "max@example.com",
                                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "first_name": {
                                        "type": "string",
                                        "description": "First name (cannot be cleared)"
                                    },
                                    "last_name": {
                                        "type": "string",
                                        "description": "Last name"
                                    },
                                    "email": {
                                        "type": "string",
                                        "description": "Email address"
                                    },
                                    "phone": {
                                        "type": "string",
                                        "description": "Phone number"
                                    },
                                    "role": {
                                        "type": "string",
                                        "description": "Role / position"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowcrm.leads-contacts-delete",
                "summary": "Remove a contact person",
                "description": "Removes a contact person from the lead.",
                "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": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Kontaktperson entfernt."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/leads/{uuid}/notes": {
            "get": {
                "operationId": "flowcrm.leads-notes-list",
                "summary": "List notes",
                "description": "Lists the lead's notes, newest first. The author is returned as an object (uuid, name).",
                "tags": [
                    "flowcrm.lead-relations"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowcrm.leads-notes-create",
                "summary": "Add a note",
                "description": "Appends a note to the lead. Notes are append-only; they cannot be edited or deleted. The author is always the token user.",
                "tags": [
                    "flowcrm.lead-relations"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "body": {
                                        "type": "string",
                                        "description": "Note content (max. 65535 characters)"
                                    }
                                },
                                "required": [
                                    "body"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/leads/{uuid}/status": {
            "put": {
                "operationId": "flowcrm.leads-status-set",
                "summary": "Set the status",
                "description": "Sets the status of a team-owned lead to a team-owned status, addressed by status UUID. converted is rejected with 422; a UUID that passes validation but matches no status that can be found returns 404. Optionally lost_reason and lost_note, only for a lost stage (otherwise 422).",
                "tags": [
                    "flowcrm.lead-status"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "9b1c7f3e-2a4d-4c8b-8e1a-6f0d2c9b4a11",
                                        "type": "company",
                                        "name": "Doe 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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "status_uuid": {
                                        "type": "string",
                                        "description": "UUID of a team-owned lead status"
                                    },
                                    "lost_reason": {
                                        "type": "string",
                                        "description": "UUID of an active, team-owned lost reason (see GET /leads/lost-reasons). Only allowed for a lost stage; a UUID from another team or of a deactivated reason is rejected with 422"
                                    },
                                    "lost_note": {
                                        "type": "string",
                                        "description": "Free text about the loss, at most 2,000 characters. Only allowed for a lost stage"
                                    }
                                },
                                "required": [
                                    "status_uuid"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/leads/pipelines": {
            "get": {
                "operationId": "flowcrm.leads-pipelines-list",
                "summary": "Pipelines with stages",
                "description": "All pipelines of the team in their order, each with its stages (statuses) in their order. The default pipeline carries is_default, the inbox stage of a pipeline is_inbox. The UUID of a stage is the status_uuid for the status endpoint.",
                "tags": [
                    "flowcrm.lead-status"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/leads/lost-reasons": {
            "get": {
                "operationId": "flowcrm.leads-lost-reasons-list",
                "summary": "Lost reasons",
                "description": "The team's lost reasons in their order. Deactivated reasons are left out, except with include_inactive=1; a status change only accepts active reasons.",
                "tags": [
                    "flowcrm.lead-status"
                ],
                "parameters": [
                    {
                        "name": "include_inactive",
                        "in": "query",
                        "required": false,
                        "description": "Default false. 1 includes deactivated reasons (is_active: false)",
                        "schema": {
                            "type": "boolean"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/leads/{uuid}/timeline": {
            "get": {
                "operationId": "flowcrm.leads-timeline-list",
                "summary": "Get the timeline",
                "description": "Returns the timeline entries of a team-owned lead, paginated (newest first).",
                "tags": [
                    "flowcrm.lead-timeline"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Entries per page (default 50, maximum 100)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "lead": {
                                        "uuid": "9b1c7f3e-2a4d-4c8b-8e1a-6f0d2c9b4a11",
                                        "name": "Doe 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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowcrm.leads-timeline-create",
                "summary": "Create a timeline entry",
                "description": "Appends a timeline entry to the lead. type is checked against the list of allowed timeline types; without type, note is used. For a converted lead the endpoint answers with HTTP 409.",
                "tags": [
                    "flowcrm.lead-timeline"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "content": {
                                        "type": "string",
                                        "description": "Content of the entry"
                                    },
                                    "type": {
                                        "type": "string",
                                        "description": "Timeline type from the allowed vocabulary (default note)"
                                    },
                                    "event_date": {
                                        "type": "string",
                                        "description": "Event date (ISO 8601, default: now)"
                                    }
                                },
                                "required": [
                                    "content"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/leads/{uuid}/convert": {
            "post": {
                "operationId": "flowcrm.leads-convert",
                "summary": "Convert a lead into a customer",
                "description": "Converts the lead into a new customer. Without client_name, the name is derived from the lead (company name for a company, first and last name for a person). The response is the new customer (CmmClient) with HTTP 201. A lead that is already converted returns 409 and names its customer through converted_client_uuid. An external_id already used by another customer returns 422.",
                "tags": [
                    "flowcrm.lead-convert"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "d4e5f6a7-8b9c-40d1-8e2f-3a4b5c6d7e8f",
                                        "name": "Doe GmbH",
                                        "email": "info@example.com",
                                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "client_name": {
                                        "type": "string",
                                        "description": "Explicit customer name (overrides the derived name)"
                                    },
                                    "external_id": {
                                        "type": "string",
                                        "description": "External identifier for the new customer, unique per team (customers in the trash included)"
                                    },
                                    "transfer_contacts": {
                                        "type": "boolean",
                                        "description": "Transfer contact persons"
                                    },
                                    "transfer_todos": {
                                        "type": "boolean",
                                        "description": "Transfer to-dos"
                                    },
                                    "transfer_docs": {
                                        "type": "boolean",
                                        "description": "Transfer FlowDocs"
                                    },
                                    "transfer_custom_fields": {
                                        "type": "boolean",
                                        "description": "Transfer custom field values"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/leads/reports/funnel": {
            "get": {
                "operationId": "flowcrm.leads-report-funnel",
                "summary": "Funnel by status",
                "description": "Number and value of open leads per status, in the order of the status list, plus the number of leads without a status. name is the stored status name, display_name the name in the language of the request (default statuses translated, custom names once a translation exists, otherwise name).",
                "tags": [
                    "flowcrm.lead-reports"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/leads/reports/assignments": {
            "get": {
                "operationId": "flowcrm.leads-report-assignments",
                "summary": "Distribution across assignees",
                "description": "Number and value of open leads per assigned person. Unassigned leads appear as a row of their own with user: null, so exactly this gap stays visible.",
                "tags": [
                    "flowcrm.lead-reports"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/leads/reports/sources": {
            "get": {
                "operationId": "flowcrm.leads-report-sources",
                "summary": "Lead sources",
                "description": "Number of leads per source, sorted in descending order.",
                "tags": [
                    "flowcrm.lead-reports"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/leads/{uuid}/duplicates": {
            "get": {
                "operationId": "flowcrm.leads-duplicates",
                "summary": "Find possible duplicates",
                "description": "Other open leads with the same email address or the same company name, at most twenty. Deliberately narrow: values are compared exactly, not by similarity, because a person decides about merging.",
                "tags": [
                    "flowcrm.lead-reports"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/lead-boards": {
            "get": {
                "operationId": "flowcrm.lead-boards-list",
                "summary": "List boards",
                "description": "Lists the team's boards. With include=columns or include=columns.cards, columns or columns with their cards are loaded as well.",
                "tags": [
                    "flowcrm.lead-boards"
                ],
                "parameters": [
                    {
                        "name": "include",
                        "in": "query",
                        "required": false,
                        "description": "columns or columns.cards",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowcrm.lead-boards-create",
                "summary": "Create a board",
                "description": "Creates a new board. If the limit (5 per team) is exceeded, the endpoint answers with HTTP 422.",
                "tags": [
                    "flowcrm.lead-boards"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name of the board"
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/lead-boards/{uuid}": {
            "get": {
                "operationId": "flowcrm.lead-boards-show",
                "summary": "Get a board",
                "description": "Returns a team-owned board. With include=columns or columns.cards, columns or cards are included. Besides name (the stored value, to be sent back when renaming), each column returns system_key (default columns of the sales board: cold, warming, setting, closing, won, lost; otherwise null) and display_name (the column name in the language of the request, otherwise 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 or columns.cards",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "patch": {
                "operationId": "flowcrm.lead-boards-update",
                "summary": "Rename a board",
                "description": "Renames a team-owned board.",
                "tags": [
                    "flowcrm.lead-boards"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "New name of the board"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowcrm.lead-boards-delete",
                "summary": "Delete a board",
                "description": "Deletes a team-owned board with its columns and cards. The linked leads remain.",
                "tags": [
                    "flowcrm.lead-boards"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Board gelöscht."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/lead-boards/{uuid}/columns": {
            "post": {
                "operationId": "flowcrm.lead-board-columns-create",
                "summary": "Create a column",
                "description": "Creates a column on a team-owned board. Without sort_order the column is added at the end.",
                "tags": [
                    "flowcrm.lead-boards"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name of the column"
                                    },
                                    "sort_order": {
                                        "type": "integer",
                                        "description": "Position of the column (default: added at the end)"
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/lead-board-columns/{uuid}": {
            "patch": {
                "operationId": "flowcrm.lead-board-columns-update",
                "summary": "Update a column",
                "description": "Updates the name or position of a team-owned column.",
                "tags": [
                    "flowcrm.lead-boards"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "New name of the column"
                                    },
                                    "sort_order": {
                                        "type": "integer",
                                        "description": "New position of the column"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowcrm.lead-board-columns-delete",
                "summary": "Delete a column",
                "description": "Deletes a team-owned column. The column's cards are removed with it; the linked leads remain.",
                "tags": [
                    "flowcrm.lead-boards"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Spalte gelöscht."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/lead-board-columns/{uuid}/cards": {
            "post": {
                "operationId": "flowcrm.lead-board-cards-create",
                "summary": "Create a card",
                "description": "Creates a card in a team-owned column. Pass exactly one of the two variants: either lead_uuid (existing lead) OR a nested lead object (new lead and card in one transaction). The card's own deal_value/deal_currency are independent of the lead's deal fields.",
                "tags": [
                    "flowcrm.lead-boards"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "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": "Doe GmbH"
                                        },
                                        "created_at": "2026-07-21T13:40:00+00:00",
                                        "updated_at": "2026-07-21T13:40:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "lead_uuid": {
                                        "type": "string",
                                        "description": "UUID of an existing team-owned lead (alternative to lead)"
                                    },
                                    "lead": {
                                        "type": "object",
                                        "description": "New lead (type plus company_name/first_name etc., as when creating a lead; alternative to lead_uuid)"
                                    },
                                    "deal_value": {
                                        "type": "number",
                                        "description": "Deal value of the card"
                                    },
                                    "deal_currency": {
                                        "type": "string",
                                        "description": "Currency of the card (3-letter ISO code)"
                                    },
                                    "sort_order": {
                                        "type": "integer",
                                        "description": "Position of the card in the column"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/lead-board-cards/{uuid}": {
            "patch": {
                "operationId": "flowcrm.lead-board-cards-update",
                "summary": "Update a card",
                "description": "Updates the deal fields or the position of a team-owned card. The link to the lead and the column are not changed here (use the move endpoint for that).",
                "tags": [
                    "flowcrm.lead-boards"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "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": "Doe GmbH"
                                        },
                                        "created_at": "2026-07-21T13:40:00+00:00",
                                        "updated_at": "2026-07-21T13:45:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "deal_value": {
                                        "type": "number",
                                        "description": "Deal value of the card"
                                    },
                                    "deal_currency": {
                                        "type": "string",
                                        "description": "Currency of the card (3-letter ISO code)"
                                    },
                                    "sort_order": {
                                        "type": "integer",
                                        "description": "Position of the card in the column"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowcrm.lead-board-cards-delete",
                "summary": "Delete a card",
                "description": "Deletes a team-owned card. The linked lead remains.",
                "tags": [
                    "flowcrm.lead-boards"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Karte gelöscht."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/lead-board-cards/{uuid}/move": {
            "put": {
                "operationId": "flowcrm.lead-board-cards-move",
                "summary": "Move a card",
                "description": "Moves a team-owned card into a team-owned target column, with position to a given index (renumbered without gaps). If the target column is mapped to a status, the lead status is set as with drag and drop. The card's link stays unchanged. Without position and sort_order the card is added at the end of the column; sending sort_order and position together returns HTTP 422.",
                "tags": [
                    "flowcrm.lead-boards"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "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": "Doe GmbH"
                                        },
                                        "created_at": "2026-07-21T13:40:00+00:00",
                                        "updated_at": "2026-07-21T13:50:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "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 of the team-owned target column"
                                    },
                                    "position": {
                                        "type": "integer",
                                        "description": "Index in the target column from 0 (0 = top), counted without the moved card. An index past the end appends the card. Both columns are renumbered from 0 without gaps. Not together with sort_order."
                                    },
                                    "sort_order": {
                                        "type": "integer",
                                        "description": "Raw sort_order value, stored without renumbering the other cards (previous behaviour). Not together with position."
                                    }
                                },
                                "required": [
                                    "target_column_uuid"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/leads/{uuid}/docs": {
            "get": {
                "operationId": "flowcrm.leads-docs-show",
                "summary": "Get the lead document",
                "description": "Returns the FlowDoc of a team-owned lead, including latest_version_number. If none exists yet, it is created on the first call and returned empty. documentable.type is crm_lead.",
                "tags": [
                    "flowcrm.flowdoc"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "a1b2c3d4-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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowcrm.leads-docs-update",
                "summary": "Update the lead document",
                "description": "Replaces the content of the FlowDoc completely. content must be sent; null or an empty string clears the document. Every call creates a new version and increments latest_version_number. title in the body is rejected with 422.",
                "tags": [
                    "flowcrm.flowdoc"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "a1b2c3d4-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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "content": {
                                        "type": "string",
                                        "description": "Markdown content, converted to TipTap on the server. null or an empty string clears the document"
                                    }
                                },
                                "required": [
                                    "content"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/clients/{uuid}/docs": {
            "get": {
                "operationId": "flowcrm.clients-docs-show",
                "summary": "Get the customer document",
                "description": "Returns the FlowDoc of a team-owned customer, including latest_version_number. If none exists yet, it is created on the first call and returned empty. documentable.type is cmm_client.",
                "tags": [
                    "flowcrm.flowdoc"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowcrm.clients-docs-update",
                "summary": "Update the customer document",
                "description": "Replaces the content of the FlowDoc completely. content must be sent; null or an empty string clears the document. Every call creates a new version and increments latest_version_number. title in the body is rejected with 422.",
                "tags": [
                    "flowcrm.flowdoc"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "content": {
                                        "type": "string",
                                        "description": "Markdown content, converted to TipTap on the server. null or an empty string clears the document"
                                    }
                                },
                                "required": [
                                    "content"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/contacts/{uuid}/docs": {
            "get": {
                "operationId": "flowcrm.contacts-docs-show",
                "summary": "Get the contact document",
                "description": "Returns the FlowDoc of a contact (a private contact without a team can only be reached by its owner), including latest_version_number. If none exists yet, it is created on the first call and returned empty. documentable.type is cmm_contact.",
                "tags": [
                    "flowcrm.flowdoc"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowcrm.contacts-docs-update",
                "summary": "Update the contact document",
                "description": "Replaces the content of the FlowDoc completely. content must be sent; null or an empty string clears the document. Every call creates a new version and increments latest_version_number. title in the body is rejected with 422.",
                "tags": [
                    "flowcrm.flowdoc"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "content": {
                                        "type": "string",
                                        "description": "Markdown content, converted to TipTap on the server. null or an empty string clears the document"
                                    }
                                },
                                "required": [
                                    "content"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/projects/{uuid}/docs": {
            "get": {
                "operationId": "flowcrm.projects-docs-show",
                "summary": "Get the project document",
                "description": "Returns the FlowDoc of a project (a project has no team of its own and is team-scoped through its customer), including latest_version_number. If none exists yet, it is created on the first call and returned empty. documentable.type is cmm_client_project.",
                "tags": [
                    "flowcrm.flowdoc"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowcrm.projects-docs-update",
                "summary": "Update the project document",
                "description": "Replaces the content of the FlowDoc completely. content must be sent; null or an empty string clears the document. Every call creates a new version and increments latest_version_number. title in the body is rejected with 422.",
                "tags": [
                    "flowcrm.flowdoc"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "content": {
                                        "type": "string",
                                        "description": "Markdown content, converted to TipTap on the server. null or an empty string clears the document"
                                    }
                                },
                                "required": [
                                    "content"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/context": {
            "get": {
                "operationId": "flowdrive.flowdrive-context",
                "summary": "Get areas, shared drives and limits",
                "description": "Returns the addressable areas (personal, shared_drive, client, project, contact), all shared drives with your own permission level, the team's storage in use and the upload limits. Every file extension is accepted (allowed_extensions is null); inline_extensions lists the extensions that are shown directly in the browser, all others are delivered as a download.",
                "tags": [
                    "flowdrive.context"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/areas": {
            "get": {
                "operationId": "flowdrive.flowdrive-areas",
                "summary": "Get areas for apps",
                "description": "The roots an app shows: My FlowDrive (private), the shared team drive (team), every shared drive with access (drive:{uuid}) with your own level, and the FlowCRM area (crm). entry_count counts the top-level entries, for crm the containers. The key value is passed as area to GET /flowdrive/entries.",
                "tags": [
                    "flowdrive.context"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/changes": {
            "get": {
                "operationId": "flowdrive.flowdrive-changes",
                "summary": "Sync changes",
                "description": "Change feed for syncing apps. Without cursor it starts with a full enumeration of all visible entries (full_sync: true), after that it returns only changes: upserts are new or changed entries, deletions name entries in the trash (trashed), permanently deleted ones (purged) and ones moved to another team (moved). Pass meta.next_cursor with the next call; as long as meta.has_more is true, keep reading right away. The feed runs a few seconds behind real time. An upsert does not necessarily mean new content: only a changed content_token shows that the bytes of a file have changed. reset_required: true means the cursor was invalid or older than 30 days and the enumeration starts over. accessible_drive_uuids lists the shared drives the caller currently has access to; entries of other drives should be removed. With include_managed=1 the feed also contains the team's FlowSend system folder (parent_uuid null, area team) and the media in it (parent_uuid = uuid of the folder), each with managed_by flowsend and read-only, for every team member; moving them to the trash and deleting them permanently appear as deletions. The setting belongs to the cursor: a cursor read with the other setting responds with reset_required: true and a new enumeration.",
                "tags": [
                    "flowdrive.context"
                ],
                "parameters": [
                    {
                        "name": "cursor",
                        "in": "query",
                        "required": false,
                        "description": "Opaque cursor from meta.next_cursor of the last response.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "description": "Maximum per list, 1 to 500, default 200.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "include_managed",
                        "in": "query",
                        "required": false,
                        "description": "1 adds the team's FlowSend system folder and its media to the feed (managed_by flowsend, read-only). Without the parameter or with 0, the feed stays unchanged. Allowed values are 1 and 0, other values respond with HTTP 422. Changing the setting with an existing cursor responds with reset_required: true.",
                        "schema": {
                            "type": "boolean"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/entries": {
            "get": {
                "operationId": "flowdrive.flowdrive-entries-index",
                "summary": "List or search entries",
                "description": "Lists folders, files and external links. Visible are your own private entries, the entries of the shared team drive, entries on clients, projects and visible contacts, and the contents of the shared drives you have access to. Folders come before files, then the list is sorted by sort. Every entry also carries area, etag, thumbnail_status, thumbnail_url (short-lived preview address or null) and level, can_edit, can_share, can_delete and can_download for the caller, plus is_favorite, version_count and content_token. content_token is a content revision of files: the value changes only when the file content changes (replacing, restoring a version, a newly generated CRM document), not when renaming, moving, on a new preview or when FlowDrive analyses the content in the background. Unlike etag it is therefore suited to decide whether a cached file has to be downloaded again. Folders and external links carry null. managed_by names the module that manages an entry: flowsend for the FlowSend system folder and its media, otherwise null. Such entries are read-only (can_edit, can_share and can_delete are false); renaming, deleting, sharing as well as creating, uploading and copying into the FlowSend folder respond with HTTP 403 and error managed_read_only. With parent_uuid of the FlowSend folder (uuid from the managed block), the list returns its media, for every team member; they can be retrieved through download-url like any file.",
                "tags": [
                    "flowdrive.entries-read"
                ],
                "parameters": [
                    {
                        "name": "scope",
                        "in": "query",
                        "required": false,
                        "description": "personal, shared_drive, client, project or contact. Without a value, all visible areas are read.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "scope_uuid",
                        "in": "query",
                        "required": false,
                        "description": "UUID of the shared drive, client, project or contact. Required for every area except personal.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "parent_uuid",
                        "in": "query",
                        "required": false,
                        "description": "UUID of the folder whose content is listed. Without a value, the top level is returned.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Searches the whole area for parts of names and ignores parent_uuid. Searching the Shared FlowDrive (area=team) and searching without area and scope also find the team's FlowSend system folder and its media (managed_by flowsend, read-only).",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "area",
                        "in": "query",
                        "required": false,
                        "description": "Alternative to scope: private, team, crm or drive:{uuid} (see GET /flowdrive/areas). area=crm without parent_uuid and search returns the clients, projects and contacts with files as containers (kind crm_client, crm_project, crm_contact); their content is read through scope=client|project|contact. Like any other list, the containers can be fetched page by page through page and per_page (fixed order: clients, projects, contacts, each by name) and carry the same meta with current_page, per_page, total and last_page.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "include_managed",
                        "in": "query",
                        "required": false,
                        "description": "Only with area=team: 1 adds, on page 1 of the top level (without parent_uuid, without search, kind empty or folder), the key managed with the module-managed folders as in the web app: FlowCRM (uuid null if clients, projects or contacts with visible files exist; content through area=crm&crm_node=root), FlowAI (uuid null if FlowAI has created documents for the caller; content through GET /flowdrive/flowai/artifacts) and FlowSend (uuid of the system folder as soon as the team has one; content through parent_uuid). Each entry: key, managed_by, name, uuid, entry_count. Without the parameter the response stays unchanged. Allowed values are 1 and 0, other values respond with HTTP 422.",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "crm_node",
                        "in": "query",
                        "required": false,
                        "description": "Only with area=crm, never with parent_uuid or search: one level of the nested FlowCRM tree as in the web app, in the container format of area=crm and paginated. root returns the clients (entry_count = own entries plus project containers) followed by a container of kind crm_contacts (uuid null, entry_count = number of contacts with files), contacts the contact containers (crm_contact), client:{uuid} the project containers (crm_project) of that client (HTTP 404 for a client of another team). The files of a client, project or contact are still read through scope=client|project|contact with scope_uuid. area=crm without crm_node stays the existing flat list.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "kind",
                        "in": "query",
                        "required": false,
                        "description": "Limit to folder, file or link.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "required": false,
                        "description": "name (default), size, created_at, updated_at or type. Folders always come first.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "direction",
                        "in": "query",
                        "required": false,
                        "description": "asc (default) or desc.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Entries per page, 1 to 200, default 50.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, default 1.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowdrive.flowdrive-entries-store",
                "summary": "Upload a file directly",
                "description": "Multipart upload for small files. The limit is given in \"limits.direct_upload_max_bytes\" in the overview (25 MB by default) and is well below the limit of the presigned route, because these bytes pass through the application. Larger files go through the upload address and confirmation.",
                "tags": [
                    "flowdrive.entries-write"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "file": {
                                        "type": "string",
                                        "format": "binary",
                                        "description": "The file itself. Every file extension is accepted."
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Free text, at most 2000 characters."
                                    },
                                    "parent_uuid": {
                                        "type": "string",
                                        "description": "UUID of the target folder."
                                    },
                                    "client_uuid": {
                                        "type": "string",
                                        "description": "UUID of the client."
                                    },
                                    "project_uuid": {
                                        "type": "string",
                                        "description": "UUID of the project."
                                    },
                                    "contact_uuid": {
                                        "type": "string",
                                        "description": "UUID of the contact."
                                    },
                                    "shared_drive_uuid": {
                                        "type": "string",
                                        "description": "UUID of the shared drive."
                                    },
                                    "target_root": {
                                        "type": "string",
                                        "description": "private (My FlowDrive) or team (root of the shared team drive, writable for every team member). Only without parent_uuid and without a reference UUID."
                                    }
                                },
                                "required": [
                                    "file"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/entries/{uuid}": {
            "get": {
                "operationId": "flowdrive.flowdrive-entries-show",
                "summary": "Get a single entry",
                "description": "Returns an entry together with its path from the top folder of its area down to the entry itself. A UUID from another team is answered like an unknown UUID with HTTP 404.",
                "tags": [
                    "flowdrive.entries-read"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowdrive.flowdrive-entries-update",
                "summary": "Rename an entry",
                "description": "Changes name and description. Changing the location is a separate action. If the new name collides at the same location, a counter is appended. Requires the edit level.",
                "tags": [
                    "flowdrive.entries-write"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "3c5b0a11-...",
                                        "name": "Angebot final.pdf",
                                        "kind": "file"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "New name, at most 240 characters."
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "New free text, at most 2000 characters."
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowdrive.flowdrive-entries-destroy",
                "summary": "Move an entry to the trash",
                "description": "Moves an entry and everything below it to the trash. Requires the manage level. System folders and entries still used in a newsletter are rejected.",
                "tags": [
                    "flowdrive.entries-trash"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "In den Papierkorb verschoben."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/entries/{uuid}/content": {
            "get": {
                "operationId": "flowdrive.flowdrive-entries-content",
                "summary": "Get the extracted text of a file",
                "description": "Returns the already indexed text of a file, the same text the AI tools read. Nothing is extracted again: if the file has not been indexed yet, \"indexed\" is false and \"text\" is empty. For folders the route responds with HTTP 422.",
                "tags": [
                    "flowdrive.entries-read"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "3c5b0a11-...",
                                        "name": "Angebot Muster GmbH.pdf",
                                        "mime_type": "application/pdf",
                                        "indexed": true,
                                        "text": "Angebot Nr. 2026-0184 ..."
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/entries/{uuid}/download-url": {
            "get": {
                "operationId": "flowdrive.flowdrive-entries-download-url",
                "summary": "Create a time-limited download link",
                "description": "Creates a presigned address pointing directly at the stored bytes. The validity is given in \"expires_at\". File types a browser can execute (svg, html, xml) are always delivered as a download through signed headers and never displayed inline. For an external link, its target address is returned with \"expires_at\": null.",
                "tags": [
                    "flowdrive.entries-read"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "url": "https://s3.example.com/team-1/drives/...?X-Amz-Signature=...",
                                        "expires_at": "2026-09-21T15:30:00+00:00",
                                        "kind": "file"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/entries/{uuid}/download": {
            "get": {
                "operationId": "flowdrive.flowdrive-entries-download",
                "summary": "Download a file directly",
                "description": "Returns the file for download. If it is in object storage, the route responds with a redirect (HTTP 302) to the presigned address so that the bytes do not pass through the application; follow this redirect. For folders and external links the route responds with HTTP 422.",
                "tags": [
                    "flowdrive.entries-read"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/octet-stream": {
                                "schema": {
                                    "type": "string",
                                    "format": "binary"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/folders": {
            "post": {
                "operationId": "flowdrive.flowdrive-folders-store",
                "summary": "Create a folder",
                "description": "Creates a folder. If the name already exists at the target, a counter is appended automatically. The name is limited to 240 characters so that this counter and umlauts still fit.",
                "tags": [
                    "flowdrive.entries-write"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "7e1a9c33-...",
                                        "name": "Angebote",
                                        "kind": "folder",
                                        "scope": "team",
                                        "parent_uuid": null
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name of the folder, at most 240 characters."
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Free text, at most 2000 characters."
                                    },
                                    "parent_uuid": {
                                        "type": "string",
                                        "description": "UUID of the parent folder."
                                    },
                                    "client_uuid": {
                                        "type": "string",
                                        "description": "UUID of the client the folder belongs to."
                                    },
                                    "project_uuid": {
                                        "type": "string",
                                        "description": "UUID of the project the folder belongs to."
                                    },
                                    "contact_uuid": {
                                        "type": "string",
                                        "description": "UUID of the contact the folder belongs to."
                                    },
                                    "shared_drive_uuid": {
                                        "type": "string",
                                        "description": "UUID of the shared drive. Requires at least the edit level."
                                    },
                                    "target_root": {
                                        "type": "string",
                                        "description": "private (My FlowDrive) or team (root of the shared team drive, writable for every team member). Only without parent_uuid and without a reference UUID."
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/external-links": {
            "post": {
                "operationId": "flowdrive.flowdrive-external-links-store",
                "summary": "Create an external link",
                "description": "Creates a link to an outside address. Only http and https addresses are allowed; anything else is rejected with HTTP 422.",
                "tags": [
                    "flowdrive.entries-write"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Display name, at most 240 characters."
                                    },
                                    "url": {
                                        "type": "string",
                                        "description": "Target address, only http or https, at most 2048 characters."
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Free text, at most 2000 characters."
                                    },
                                    "parent_uuid": {
                                        "type": "string",
                                        "description": "UUID of the parent folder."
                                    },
                                    "client_uuid": {
                                        "type": "string",
                                        "description": "UUID of the client."
                                    },
                                    "project_uuid": {
                                        "type": "string",
                                        "description": "UUID of the project."
                                    },
                                    "contact_uuid": {
                                        "type": "string",
                                        "description": "UUID of the contact."
                                    },
                                    "shared_drive_uuid": {
                                        "type": "string",
                                        "description": "UUID of the shared drive."
                                    },
                                    "target_root": {
                                        "type": "string",
                                        "description": "private (My FlowDrive) or team (root of the shared team drive, writable for every team member). Only without parent_uuid and without a reference UUID."
                                    }
                                },
                                "required": [
                                    "name",
                                    "url"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/entries/upload-url": {
            "post": {
                "operationId": "flowdrive.flowdrive-entries-upload-url",
                "summary": "Request an upload address",
                "description": "Step one of the presigned upload. Returns an address to which the file is sent with HTTP PUT; the bytes never pass through the application. The size is checked before an address is issued (by default at most 1 GB per file); every file extension is accepted. The stored content type is derived from the file name on the server; a \"mime_type\" you pass is deliberately not used for that.",
                "tags": [
                    "flowdrive.entries-write"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "File name with extension, at most 240 characters."
                                    },
                                    "size": {
                                        "type": "integer",
                                        "description": "Size in bytes."
                                    },
                                    "mime_type": {
                                        "type": "string",
                                        "description": "Informational only; the stored content type is derived from the file extension."
                                    },
                                    "parent_uuid": {
                                        "type": "string",
                                        "description": "UUID of the target folder. Checked already at this step."
                                    },
                                    "client_uuid": {
                                        "type": "string",
                                        "description": "UUID of the client."
                                    },
                                    "project_uuid": {
                                        "type": "string",
                                        "description": "UUID of the project."
                                    },
                                    "contact_uuid": {
                                        "type": "string",
                                        "description": "UUID of the contact."
                                    },
                                    "shared_drive_uuid": {
                                        "type": "string",
                                        "description": "UUID of the shared drive."
                                    },
                                    "target_root": {
                                        "type": "string",
                                        "description": "private (My FlowDrive) or team (root of the shared team drive, writable for every team member). Only without parent_uuid and without a reference UUID."
                                    }
                                },
                                "required": [
                                    "name",
                                    "size"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/entries/confirm": {
            "post": {
                "operationId": "flowdrive.flowdrive-entries-confirm",
                "summary": "Confirm an upload",
                "description": "Step two of the presigned upload. The key must belong to your own team, the object must already be in storage, and the actual length in storage takes precedence over the reported size. A key that has already been confirmed returns the existing entry instead of a second one. on_conflict controls a file with the same name at the target: keep_both (default) creates \"Name (1).ext\", replace replaces the content of the file from replace_uuid (response 200 with replaced: true), skip creates nothing and discards the object (200 with skipped: true), ask responds with HTTP 409 error name_conflict together with existing and can_replace; object and key are then kept and can be confirmed again. With ask this also applies when another writer (the web app, FlowAI, a copy) creates the same name at the same time: the check is repeated right before the entry is created instead of silently assigning \"Name (1).ext\". Errors with replace (all in the flat format {\"success\": false, \"error\": \"\", \"message\": \"...\"}; the object is kept in each case so that the same key can be confirmed with keep_both): HTTP 403 forbidden if the edit level is missing, also if it was revoked between the check and locking the target file; HTTP 422 replace_target_mismatch if replace_uuid is not the file with the same name and extension at the target, or if the target file was moved, renamed or reassigned between the check and the lock; HTTP 422 replace_target_missing if the target file was deleted or moved to the trash in that time or is no longer a plain file; HTTP 409 replace_target_changed if expected_content_token was sent and the target file now has different content (someone else replaced it or restored a version). With expected_content_token the replacement becomes conditional: the comparison runs under the row lock of the target file, so an intermediate change is never overwritten silently, and the object can be confirmed as a conflict copy with keep_both. Without the parameter, replace keeps replacing unconditionally; repeating the same confirmation after success has no effect. Other errors: HTTP 422 invalid_key (key does not belong to the team), object_missing (object is not in storage), file_too_large, upload_rejected (type or content rejected); HTTP 409 upload_trashed (confirmed entry is in the trash).",
                "tags": [
                    "flowdrive.entries-write"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "3c5b0a11-...",
                                        "name": "Angebot.pdf",
                                        "kind": "file",
                                        "size": 284410
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "s3_key": {
                                        "type": "string",
                                        "description": "The key from the response of the upload address."
                                    },
                                    "name": {
                                        "type": "string",
                                        "description": "Displayed file name, at most 240 characters."
                                    },
                                    "size": {
                                        "type": "integer",
                                        "description": "Informational only; the length in storage is what counts."
                                    },
                                    "mime_type": {
                                        "type": "string",
                                        "description": "Informational only; the type is derived from the file extension."
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Free text, at most 2000 characters."
                                    },
                                    "on_conflict": {
                                        "type": "string",
                                        "description": "keep_both (default), replace, skip or ask."
                                    },
                                    "replace_uuid": {
                                        "type": "string",
                                        "description": "Required with replace: UUID of the file with the same name and extension at the target; requires the edit level."
                                    },
                                    "expected_content_token": {
                                        "type": "string",
                                        "description": "Only with replace: content_token of the target file your change is based on (40 hex characters). Replaces only as long as the file still has this content, otherwise HTTP 409 replace_target_changed."
                                    },
                                    "parent_uuid": {
                                        "type": "string",
                                        "description": "UUID of the target folder."
                                    },
                                    "client_uuid": {
                                        "type": "string",
                                        "description": "UUID of the client."
                                    },
                                    "project_uuid": {
                                        "type": "string",
                                        "description": "UUID of the project."
                                    },
                                    "contact_uuid": {
                                        "type": "string",
                                        "description": "UUID of the contact."
                                    },
                                    "shared_drive_uuid": {
                                        "type": "string",
                                        "description": "UUID of the shared drive."
                                    },
                                    "target_root": {
                                        "type": "string",
                                        "description": "private (My FlowDrive) or team (root of the shared team drive, writable for every team member). Only without parent_uuid and without a reference UUID."
                                    }
                                },
                                "required": [
                                    "s3_key",
                                    "name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/entries/conflicts": {
            "post": {
                "operationId": "flowdrive.flowdrive-entries-conflicts",
                "summary": "Check name conflicts before uploading",
                "description": "For up to 200 file names, returns the files with the same name that already exist at the target (upper and lower case and accents do not count), so that you can ask before uploading. Folders and links with the same name are not a conflict. can_replace says whether the caller may replace the content.",
                "tags": [
                    "flowdrive.entries-write"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "names": {
                                        "type": "array",
                                        "items": [],
                                        "description": "File names, 1 to 200, each at most 240 characters."
                                    },
                                    "parent_uuid": {
                                        "type": "string",
                                        "description": "UUID of the target folder."
                                    },
                                    "client_uuid": {
                                        "type": "string",
                                        "description": "UUID of the client."
                                    },
                                    "project_uuid": {
                                        "type": "string",
                                        "description": "UUID of the project."
                                    },
                                    "contact_uuid": {
                                        "type": "string",
                                        "description": "UUID of the contact."
                                    },
                                    "shared_drive_uuid": {
                                        "type": "string",
                                        "description": "UUID of the shared drive."
                                    },
                                    "target_root": {
                                        "type": "string",
                                        "description": "private (My FlowDrive) or team (root of the shared team drive, writable for every team member). Only without parent_uuid and without a reference UUID."
                                    }
                                },
                                "required": [
                                    "names"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/entries/{uuid}/move": {
            "post": {
                "operationId": "flowdrive.flowdrive-entries-move",
                "summary": "Move an entry",
                "description": "Moves an entry into another folder or, with \"parent_uuid\": null, to the top level of its current area. Folders take their entire content with them. The field must be sent explicitly, because leaving it out could not be told apart from an intended move to the top. If the server rejects the move because of a rule, it responds with HTTP 422 and an error code in error, for example private_foreign_items (the moved folder contains entries of other people and the target is private), into_descendant (the target is inside the moved folder), changed_concurrently (entry or target were just changed, try again) or flowsend_boundary.",
                "tags": [
                    "flowdrive.entries-write"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "3c5b0a11-...",
                                        "name": "Angebot.pdf",
                                        "parent_uuid": "7e1a9c33-..."
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "parent_uuid": {
                                        "type": "string",
                                        "description": "UUID of the target folder or null for the top level. The target must be a folder and requires the edit level. Not needed if target_root is sent."
                                    },
                                    "target_root": {
                                        "type": "string",
                                        "description": "Instead of parent_uuid: private moves to the root of My FlowDrive, team to the root of the shared team drive. Links to a client, project, contact or shared drive are removed in the process."
                                    }
                                },
                                "required": [
                                    "parent_uuid"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/entries/{uuid}/copy": {
            "post": {
                "operationId": "flowdrive.flowdrive-entries-copy",
                "summary": "Copy an entry",
                "description": "Copies a file, an external link or an entire folder with its content to another location. The copy runs in the background: the request checks all rules immediately and responds with HTTP 202 and the copy operation (operation, status queued). GET /flowdrive/copies/{uuid} with the UUID of the operation returns progress and result; once it has finished, root_entry_uuids contains the UUID of the top copied entry. The target is determined as when creating: with \"parent_uuid\" the copy lands in that folder and takes over its area. Without a folder, exactly one of client_uuid, project_uuid, contact_uuid or shared_drive_uuid decides, and the copy is placed at the top level of that area. If none is given, it lands at the top level of the caller's \"My FlowDrive\" (area personal). With \"target_root\": \"team\" it lands at the top level of the team's Shared FlowDrive instead, which every team member with FlowDrive access may write to; \"target_root\": \"private\" is the same as leaving it out. target_root cannot be combined with parent_uuid or any of the area UUIDs (HTTP 422 with a validation error on target_root). The source needs the view level, the target requires edit. Copies to clients, projects and contacts also require write access in FlowCRM. Every copy gets a new UUID and its own object in storage; if the name collides at the target, a counter is appended. Not copied are entries in the trash, child items without read access, share links and the analysis results of the original. By default an operation covers at most 5000 entries (every folder counts, including the copied folder itself) and 20 GiB. By default each user may start 20 copy operations per minute, shared between the API and the web app (above that HTTP 429 with rate_limited and Retry-After). Errors with the request: HTTP 403 for missing rights on source or target (access_denied, crm_permission for missing FlowCRM write access); HTTP 404 if source or target folder are not visible in your own team; HTTP 422 with a validation error on parent_uuid if the target is not a folder, on target_root for an unknown value or an invalid combination, as well as with invalid_target (target is inside the copied folder), protected_entry (FlowSend system folder) or limit_exceeded (too many entries or bytes). If the copy fails later in the background, the operation says so (status failed with error); nothing is left behind in that case.",
                "tags": [
                    "flowdrive.entries-write"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "parent_uuid": {
                                        "type": "string",
                                        "description": "UUID of the target folder. It must be a folder, the caller needs the edit level there, and it must not be inside the copied folder itself."
                                    },
                                    "client_uuid": {
                                        "type": "string",
                                        "description": "UUID of the client, if the copy should go to the top level of its files."
                                    },
                                    "project_uuid": {
                                        "type": "string",
                                        "description": "UUID of the project, if the copy should go to the top level of its files."
                                    },
                                    "contact_uuid": {
                                        "type": "string",
                                        "description": "UUID of the contact. For a private contact the copy stays private."
                                    },
                                    "shared_drive_uuid": {
                                        "type": "string",
                                        "description": "UUID of the shared drive; requires the edit level there."
                                    },
                                    "target_root": {
                                        "type": "string",
                                        "description": "Top level without an area UUID: private (the caller's My FlowDrive, default) or team (the team's Shared FlowDrive). Not together with parent_uuid, client_uuid, project_uuid, contact_uuid or shared_drive_uuid."
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/copies/{uuid}": {
            "get": {
                "operationId": "flowdrive.flowdrive-copies-show",
                "summary": "Get a copy operation",
                "description": "Returns status and progress of a copy operation started by POST /flowdrive/entries/{uuid}/copy. status is queued (waiting), running, completed (everything copied), partial (some sources could not be copied, the rest has been created) or failed (nothing created). total_items is the number of planned entries, copied_items grows during the copy. root_entry_uuids contains the top entries of the finished copies, error the reason for a failure in the user's language. Poll the operation at most every few seconds until status is completed, partial or failed. An operation is visible only to the user who started it and only in the team in which it was started; otherwise the API responds with HTTP 404.",
                "tags": [
                    "flowdrive.entries-write"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/entries/{uuid}/restore": {
            "post": {
                "operationId": "flowdrive.flowdrive-entries-restore",
                "summary": "Restore an entry",
                "description": "Brings an entry and everything below it back from the trash. Requires the manage level. If the entry is not in the trash, the route responds with HTTP 422.",
                "tags": [
                    "flowdrive.entries-trash"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "3c5b0a11-...",
                                        "name": "Angebot.pdf",
                                        "trashed": false
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/entries/{uuid}/purge": {
            "delete": {
                "operationId": "flowdrive.flowdrive-entries-purge",
                "summary": "Delete an entry permanently",
                "description": "Permanently deletes an entry in the trash and removes the stored bytes. Requires the manage level. If the entry is not in the trash, the route responds with HTTP 422.",
                "tags": [
                    "flowdrive.entries-trash"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Endgültig gelöscht."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/entries/{uuid}/versions": {
            "get": {
                "operationId": "flowdrive.flowdrive-versions-index",
                "summary": "List the versions of a file",
                "description": "Older contents of a file, newest first. Needs read access to the file.",
                "tags": [
                    "flowdrive.versions-favorites"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/versions/{uuid}/download-url": {
            "get": {
                "operationId": "flowdrive.flowdrive-versions-download-url",
                "summary": "Create a download link for a version",
                "description": "Time-limited download link of the version, always as an attachment with the name of the file. Needs read access.",
                "tags": [
                    "flowdrive.versions-favorites"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "url": "https://s3.example/...",
                                        "expires_at": "2026-11-22T11:15:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/versions/{uuid}/restore": {
            "post": {
                "operationId": "flowdrive.flowdrive-versions-restore",
                "summary": "Restore a version",
                "description": "Makes the version the current content again; the previous content becomes a version itself. UUID, name, location and share links of the file stay the same. Needs edit access. The response is the updated entry.",
                "tags": [
                    "flowdrive.versions-favorites"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "3c5b0a11-...",
                                        "name": "Angebot.pdf",
                                        "kind": "file",
                                        "version_count": 2,
                                        "is_favorite": false
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/versions/{uuid}": {
            "delete": {
                "operationId": "flowdrive.flowdrive-versions-destroy",
                "summary": "Delete a version",
                "description": "Deletes the version permanently. Needs edit access.",
                "tags": [
                    "flowdrive.versions-favorites"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/favorites": {
            "get": {
                "operationId": "flowdrive.flowdrive-favorites-index",
                "summary": "List favorites",
                "description": "Entries the caller starred in the current team, most recently starred first. Entries the caller no longer has access to are left out.",
                "tags": [
                    "flowdrive.versions-favorites"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "3c5b0a11-...",
                                            "name": "Angebot.pdf",
                                            "kind": "file",
                                            "is_favorite": true
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/entries/{uuid}/favorite": {
            "put": {
                "operationId": "flowdrive.flowdrive-favorites-store",
                "summary": "Mark an entry as a favorite",
                "description": "Stars a file or folder. Idempotent, needs read access. The response is the entry.",
                "tags": [
                    "flowdrive.versions-favorites"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "3c5b0a11-...",
                                        "is_favorite": true
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowdrive.flowdrive-favorites-destroy",
                "summary": "Remove a favorite",
                "description": "Removes the star. Idempotent. The response is the entry.",
                "tags": [
                    "flowdrive.versions-favorites"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "3c5b0a11-...",
                                        "is_favorite": false
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/recent": {
            "get": {
                "operationId": "flowdrive.flowdrive-recent-index",
                "summary": "Recently used",
                "description": "Entries the caller recently opened (download link, download, text), uploaded or edited (replaced, renamed, version restored), newest first. Entries in the trash or without access are left out.",
                "tags": [
                    "flowdrive.versions-favorites"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "description": "1 to 200, default 50.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/entries/{uuid}/share-links": {
            "get": {
                "operationId": "flowdrive.flowdrive-share-links-index",
                "summary": "List the share links of an entry",
                "description": "Lists all public links of an entry, newest first. A password that has been set is never returned, only whether one exists.",
                "tags": [
                    "flowdrive.share-links"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "a1b2c3d4-...",
                                            "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowdrive.flowdrive-share-links-store",
                "summary": "Create a share link",
                "description": "Creates a public link. An entry in a shared drive needs the manage level, a private entry needs ownership, and for an entry on a contact the contact's current visibility decides. An entry in the trash cannot be shared.",
                "tags": [
                    "flowdrive.share-links"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "a1b2c3d4-...",
                                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "allow_download": {
                                        "type": "boolean",
                                        "description": "true allows downloading, false only viewing."
                                    },
                                    "password": {
                                        "type": "string",
                                        "description": "Optional password, at least 4 characters. Stored only as a hash."
                                    },
                                    "expires_at": {
                                        "type": "string",
                                        "description": "Expiry time, must be in the future."
                                    }
                                },
                                "required": [
                                    "allow_download"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/share-links/{uuid}": {
            "delete": {
                "operationId": "flowdrive.flowdrive-share-links-destroy",
                "summary": "Revoke a share link",
                "description": "Withdraws a public link. The address is invalid immediately afterwards. A link of another team is answered like an unknown UUID with HTTP 404.",
                "tags": [
                    "flowdrive.share-links"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Freigabe-Link entfernt."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/entries/{uuid}/shares": {
            "get": {
                "operationId": "flowdrive.flowdrive-shares-index",
                "summary": "Shares of an entry",
                "description": "Active personal shares of the entry. Same permission as for creating a share link.",
                "tags": [
                    "flowdrive.personal-shares"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "…",
                                            "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowdrive.flowdrive-shares-store",
                "summary": "Share an entry personally",
                "description": "Shares with a team member (type=internal) or invites an external address (type=external). An existing share for the same person is updated; inviting the same address again replaces the link.",
                "tags": [
                    "flowdrive.personal-shares"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "…",
                                        "type": "external",
                                        "permission": "upload",
                                        "email": "kunde@example.com",
                                        "grantee": null,
                                        "expires_at": "2026-12-01T00:00:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "type": "string",
                                        "description": "internal or external."
                                    },
                                    "user_uuid": {
                                        "type": "string",
                                        "description": "Required with internal: member of your own team."
                                    },
                                    "email": {
                                        "type": "string",
                                        "description": "Required with external."
                                    },
                                    "permission": {
                                        "type": "string",
                                        "description": "internal: view or edit. external: view, download or upload (folders only)."
                                    },
                                    "expires_at": {
                                        "type": "string",
                                        "description": "Expiry time in the future."
                                    },
                                    "message": {
                                        "type": "string",
                                        "description": "Message in the invitation (external), at most 1000 characters."
                                    }
                                },
                                "required": [
                                    "type",
                                    "permission"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/shares/{uuid}": {
            "patch": {
                "operationId": "flowdrive.flowdrive-shares-update",
                "summary": "Change a share",
                "description": "Changes permission and expiry. expires_at: null removes the expiry.",
                "tags": [
                    "flowdrive.personal-shares"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "permission": {
                                        "type": "string",
                                        "description": "New level."
                                    },
                                    "expires_at": {
                                        "type": "string",
                                        "description": "New expiry or null."
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowdrive.flowdrive-shares-destroy",
                "summary": "Revoke a share",
                "description": "Ends the share immediately. The person who received an internal share can also leave it this way.",
                "tags": [
                    "flowdrive.personal-shares"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/members": {
            "get": {
                "operationId": "flowdrive.flowdrive-members",
                "summary": "Team members for selection",
                "description": "Members of your own team without the caller, at most 50.",
                "tags": [
                    "flowdrive.personal-shares"
                ],
                "parameters": [
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Filter by name or email.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "…",
                                            "name": "Lena Hoffmann",
                                            "email": "lena@example.com",
                                            "avatar_url": "…"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/shared-with-me": {
            "get": {
                "operationId": "flowdrive.flowdrive-shared-with-me",
                "summary": "Shared with me",
                "description": "Entries team members have shared with the caller, as normal entries with shared_by_name, share_permission and share_uuid. Subfolders are opened with GET /flowdrive/entries?parent_uuid=… . GET /flowdrive/entries?area=shared returns the same.",
                "tags": [
                    "flowdrive.personal-shares"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/flowai/artifacts": {
            "get": {
                "operationId": "flowdrive.flowdrive-flowai-artifacts-index",
                "summary": "List FlowAI documents",
                "description": "Lists the documents of the FlowAI folder, newest first. name and mime_type describe the file that /content delivers: a document with a Markdown source is delivered as PDF (or as Word if Word was requested), a stored PDF, Word document or spreadsheet as the stored file. size is null if the file is only generated on download. can_download is false if the caller lacks FlowAI.",
                "tags": [
                    "flowdrive.flowai-documents"
                ],
                "parameters": [
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Documents per page, 1 to 200, default 50.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, default 1.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/flowai/artifacts/{uuid}/content": {
            "get": {
                "operationId": "flowdrive.flowdrive-flowai-artifacts-content",
                "summary": "Download a FlowAI document",
                "description": "Returns the bytes of a document as an attachment (Content-Disposition: attachment, X-Content-Type-Options: nosniff), like the download button in the web app: the stored file or the export of the Markdown source to its final format. A document outside the list responds with HTTP 404. Without FlowAI access the route responds with HTTP 403 and error flowai_access_denied (not a module code, FlowDrive access remains). If the document cannot be generated right now, it responds with HTTP 503 and error render_unavailable (for PDF with Retry-After and retry_after), with empty content with HTTP 422 render_empty and with any other error with HTTP 500 render_failed; the last two carry a reference for support. Because Markdown documents are generated on every download, each user may make 30 downloads per minute by default; above that the route responds with HTTP 429, error rate_limited, Retry-After and retry_after.",
                "tags": [
                    "flowdrive.flowai-documents"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/octet-stream": {
                                "schema": {
                                    "type": "string",
                                    "format": "binary"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/drives": {
            "get": {
                "operationId": "flowdrive.flowdrive-drives-index",
                "summary": "List shared drives",
                "description": "Lists all shared drives the caller has access to, each with your own permission level.",
                "tags": [
                    "flowdrive.shared-drives"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "9d2f4c1a-...",
                                            "name": "Vertrieb",
                                            "level": "manage",
                                            "created_by_name": "Sascha"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowdrive.flowdrive-drives-store",
                "summary": "Create a shared drive",
                "description": "Creates a shared drive. The caller immediately receives the manage level.",
                "tags": [
                    "flowdrive.shared-drives"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "9d2f4c1a-...",
                                        "name": "Vertrieb",
                                        "level": "manage"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name of the drive, at most 255 characters."
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/drives/{uuid}": {
            "get": {
                "operationId": "flowdrive.flowdrive-drives-show",
                "summary": "Get a shared drive",
                "description": "Returns a single shared drive with your own permission level. Requires at least the view level.",
                "tags": [
                    "flowdrive.shared-drives"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "9d2f4c1a-...",
                                        "name": "Vertrieb",
                                        "level": "view"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowdrive.flowdrive-drives-update",
                "summary": "Rename a shared drive",
                "description": "Renames a shared drive. Requires the manage level.",
                "tags": [
                    "flowdrive.shared-drives"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "9d2f4c1a-...",
                                        "name": "Vertrieb Nord",
                                        "level": "manage"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "New name, at most 255 characters."
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowdrive.flowdrive-drives-destroy",
                "summary": "Delete a shared drive",
                "description": "Permanently deletes a shared drive together with all files and folders in it and their stored bytes. The drive is unreachable immediately, the bytes are removed shortly afterwards in the background; there is no trash and no way back. If the drive contains the FlowSend folder or media that FlowSend still uses, or if its folders contain entries that belong to another FlowDrive area, the route responds with HTTP 422 (`delete_blocked`) and changes nothing. Requires the manage level.",
                "tags": [
                    "flowdrive.shared-drives"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Geteiltes Drive endgültig gelöscht."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/drives/{uuid}/members": {
            "get": {
                "operationId": "flowdrive.flowdrive-drives-members-index",
                "summary": "List the members of a shared drive",
                "description": "Lists all members with their permission level. Requires at least the view level.",
                "tags": [
                    "flowdrive.shared-drives"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "user_uuid": "4f8a9c5d-...",
                                            "name": "Melanie",
                                            "email": "melanie@example.com",
                                            "level": "edit"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowdrive.flowdrive-drives-members-store",
                "summary": "Add a member or change their level",
                "description": "Adds a member or changes their level; both are the same call. The user must belong to the team, otherwise the route responds with HTTP 404. Requires the manage level.",
                "tags": [
                    "flowdrive.shared-drives"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "user_uuid": "4f8a9c5d-...",
                                        "name": "Melanie",
                                        "level": "edit"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "user_uuid": {
                                        "type": "string",
                                        "description": "UUID of the team member."
                                    },
                                    "level": {
                                        "type": "string",
                                        "description": "view, edit or manage."
                                    }
                                },
                                "required": [
                                    "user_uuid",
                                    "level"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/drives/{uuid}/members/{userUuid}": {
            "delete": {
                "operationId": "flowdrive.flowdrive-drives-members-destroy",
                "summary": "Remove a member",
                "description": "Revokes a member's access. The last managing member cannot remove themselves, because the drive would otherwise have no owner; this case responds with HTTP 422. Requires the manage level.",
                "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": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Mitglied entfernt."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/reports/storage": {
            "get": {
                "operationId": "flowdrive.flowdrive-reports-storage",
                "summary": "Get storage in use",
                "description": "Returns the team's storage in use in bytes, split by shared drives and entries on clients or projects, plus the number of files. The figures apply to the whole team, not to the individual user.",
                "tags": [
                    "flowdrive.reports"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "total": 184320917,
                                        "shared_drives": 120000000,
                                        "crm": 40000000,
                                        "files": 812
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/reports/trash": {
            "get": {
                "operationId": "flowdrive.flowdrive-reports-trash",
                "summary": "List the trash",
                "description": "Lists the entries in the trash, newest first, limited to what the caller may see. Instead of a total, the response reports \"has_more\", because visibility is decided per entry.",
                "tags": [
                    "flowdrive.reports"
                ],
                "parameters": [
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Entries per page, 1 to 200, default 20.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, default 1.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowdrive/reports/shares": {
            "get": {
                "operationId": "flowdrive.flowdrive-reports-shares",
                "summary": "List all share links",
                "description": "Lists every public link of the team whose entry the caller may see. Meant for regular reviews: which files can currently be reached without signing in.",
                "tags": [
                    "flowdrive.reports"
                ],
                "parameters": [
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Entries per page, 1 to 200, default 20.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, default 1.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/context": {
            "get": {
                "operationId": "flowevents.flowevents-context",
                "summary": "Get allowed values, defaults and availability",
                "description": "Returns every allowed value for event status, format, structure, booking mode, participant status, role, certification status, room type and item kind, the field types of feedback forms including the limits of the star rating, the possible send and export kinds, the team's saved signature defaults, and whether FlowAccounting is reachable for this team.",
                "tags": [
                    "flowevents.context"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/reports/participants": {
            "get": {
                "operationId": "flowevents.flowevents-reports-participants",
                "summary": "Registration status",
                "description": "Counts the participants of an event per status. All four statuses are always included, even when there are none.",
                "tags": [
                    "flowevents.reports"
                ],
                "parameters": [
                    {
                        "name": "event_uuid",
                        "in": "query",
                        "required": true,
                        "description": "UUID of the event.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/reports/occupancy": {
            "get": {
                "operationId": "flowevents.flowevents-reports-occupancy",
                "summary": "Occupancy",
                "description": "Returns capacity, taken places, free places and the length of the waiting list. For an event without capacity, free is null rather than zero places, because without a limit there is nothing to count.",
                "tags": [
                    "flowevents.reports"
                ],
                "parameters": [
                    {
                        "name": "event_uuid",
                        "in": "query",
                        "required": true,
                        "description": "UUID of the event.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/reports/rooms": {
            "get": {
                "operationId": "flowevents.flowevents-reports-rooms",
                "summary": "Room occupancy",
                "description": "Lists the rooms of this event with the capacity that applies to them and their current occupancy, plus the number of participants not yet assigned. A different capacity only applies to this event.",
                "tags": [
                    "flowevents.reports"
                ],
                "parameters": [
                    {
                        "name": "event_uuid",
                        "in": "query",
                        "required": true,
                        "description": "UUID of the event.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/reports/attendance": {
            "get": {
                "operationId": "flowevents.flowevents-reports-attendance",
                "summary": "Attendance per session",
                "description": "Counts per session the participants reported present, the cells recorded in total and the homework submitted. The difference between present and recorded is the absences noted.",
                "tags": [
                    "flowevents.reports"
                ],
                "parameters": [
                    {
                        "name": "event_uuid",
                        "in": "query",
                        "required": true,
                        "description": "UUID of the event.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/reports/feedback": {
            "get": {
                "operationId": "flowevents.flowevents-reports-feedback",
                "summary": "Feedback report",
                "description": "Evaluates the feedback submitted for an event. Answers are grouped by the question they belong to, not by the version under which they were given. A question reworded twice therefore stays one question.",
                "tags": [
                    "flowevents.reports"
                ],
                "parameters": [
                    {
                        "name": "event_uuid",
                        "in": "query",
                        "required": true,
                        "description": "UUID of the event.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/events": {
            "get": {
                "operationId": "flowevents.flowevents-events-index",
                "summary": "List events",
                "description": "Lists the team's events. They are sorted by their earliest session; events without a session come last. The date range refers to the sessions, not to the creation date.",
                "tags": [
                    "flowevents.events"
                ],
                "parameters": [
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "draft, active, cancelled or closed.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "format",
                        "in": "query",
                        "required": false,
                        "description": "offline or online.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Full-text search in the title.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "from",
                        "in": "query",
                        "required": false,
                        "description": "Earliest session (YYYY-MM-DD).",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "required": false,
                        "description": "Latest session (YYYY-MM-DD).",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Entries per page, 1 to 200. Default 50.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, starting at 1.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowevents.flowevents-events-store",
                "summary": "Create an event",
                "description": "Creates an event with its sessions and optional items. At least one session is required. An in-house event needs a company. A new event is always active; the status cannot be sent along.",
                "tags": [
                    "flowevents.events"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "description": "Title, at most 255 characters."
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Description, at most 5000 characters."
                                    },
                                    "format": {
                                        "type": "string",
                                        "description": "offline or online. Default offline. With online, rooms and catering are switched off."
                                    },
                                    "structure": {
                                        "type": "string",
                                        "description": "simple or multi_part. With simple, only the first session is stored."
                                    },
                                    "booking_mode": {
                                        "type": "string",
                                        "description": "open or inhouse. Default open. Cannot be changed later."
                                    },
                                    "client_uuid": {
                                        "type": "string",
                                        "description": "UUID of the booking company. Required with booking_mode inhouse."
                                    },
                                    "project_uuid": {
                                        "type": "string",
                                        "description": "UUID of the company's project."
                                    },
                                    "capacity": {
                                        "type": "integer",
                                        "description": "Maximum number of places. No effect for in-house."
                                    },
                                    "price_regular": {
                                        "type": "number",
                                        "description": "Regular seminar price."
                                    },
                                    "price_reduced": {
                                        "type": "number",
                                        "description": "Reduced price."
                                    },
                                    "price_early_bird": {
                                        "type": "number",
                                        "description": "Early bird price."
                                    },
                                    "early_bird_until": {
                                        "type": "string",
                                        "description": "Early bird deadline (YYYY-MM-DD). No effect without an early bird price."
                                    },
                                    "seminar_fee_tax_rate": {
                                        "type": "number",
                                        "description": "Tax rate in percent. Empty means the team default."
                                    },
                                    "prices_include_tax": {
                                        "type": "boolean",
                                        "description": "Whether the prices are gross."
                                    },
                                    "uses_accommodation": {
                                        "type": "boolean",
                                        "description": "Whether board and lodging are used."
                                    },
                                    "tracks_homework": {
                                        "type": "boolean",
                                        "description": "Whether homework is tracked."
                                    },
                                    "signatures_enabled": {
                                        "type": "boolean",
                                        "description": "Whether signatures are collected."
                                    },
                                    "signature_confirmation_text": {
                                        "type": "string",
                                        "description": "Confirmation text of the signature page."
                                    },
                                    "feedback_enabled": {
                                        "type": "boolean",
                                        "description": "Whether feedback can be collected (sending, evaluation, export)."
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Internal notes."
                                    },
                                    "sessions": {
                                        "type": "array",
                                        "items": [],
                                        "description": "At least one session with starts_at, optionally ends_at, venue_uuid and online_access_info."
                                    },
                                    "price_items": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Items with name, kind, amount, optionally tax_rate and is_optional."
                                    }
                                },
                                "required": [
                                    "title",
                                    "sessions"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/events/{uuid}": {
            "get": {
                "operationId": "flowevents.flowevents-events-show",
                "summary": "Get an event",
                "description": "Returns an event with its sessions, its items and the registration status per status.",
                "tags": [
                    "flowevents.events"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowevents.flowevents-events-update",
                "summary": "Update an event",
                "description": "Updates an event. Fields that are not sent stay unchanged. If sessions or price_items are sent, the list is taken as complete. An item that has already been invoiced cannot be removed and causes HTTP 409.",
                "tags": [
                    "flowevents.events"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f",
                                        "title": "Grundkurs Herbst 2026",
                                        "status": "active"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "description": "Title."
                                    },
                                    "format": {
                                        "type": "string",
                                        "description": "offline or online."
                                    },
                                    "structure": {
                                        "type": "string",
                                        "description": "simple or multi_part."
                                    },
                                    "capacity": {
                                        "type": "integer",
                                        "description": "Maximum number of places."
                                    },
                                    "sessions": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Complete list of sessions. Existing sessions carry their uuid."
                                    },
                                    "price_items": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Complete list of items. Existing items carry their uuid."
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowevents.flowevents-events-destroy",
                "summary": "Delete an event",
                "description": "Deletes an event. It is a soft delete: participants, recorded attendance and issued invoices keep their context.",
                "tags": [
                    "flowevents.events"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Veranstaltung gelöscht."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/events/{uuid}/cancel": {
            "post": {
                "operationId": "flowevents.flowevents-events-cancel",
                "summary": "Cancel an event",
                "description": "Sets an active event to cancelled. An event that is not active is rejected with HTTP 409. After the cancellation, no more registrations are possible.",
                "tags": [
                    "flowevents.events"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f",
                                        "status": "cancelled"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/events/{uuid}/close": {
            "post": {
                "operationId": "flowevents.flowevents-events-close",
                "summary": "Close an event",
                "description": "Sets an active event to closed. An event that is not active is rejected with HTTP 409.",
                "tags": [
                    "flowevents.events"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f",
                                        "status": "closed"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/events/{uuid}/duplicate": {
            "post": {
                "operationId": "flowevents.flowevents-events-duplicate",
                "summary": "Duplicate an event",
                "description": "Creates a copy. The copy is active, carries the suffix Kopie (German for copy) in its title and takes over the sessions without their times, because the next run takes place on other days. Participants are not copied, rooms of a conference venue are.",
                "tags": [
                    "flowevents.events"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "4d5e6f70-8192-4c0d-1e2f-3a4b5c6d7e8f",
                                        "title": "Grundkurs Herbst (Kopie)",
                                        "status": "active"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/events/{uuid}/sessions": {
            "get": {
                "operationId": "flowevents.flowevents-sessions-index",
                "summary": "List the sessions of an event",
                "description": "Lists all sessions of an event in their order.",
                "tags": [
                    "flowevents.sessions"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowevents.flowevents-sessions-store",
                "summary": "Add a session",
                "description": "Adds a session to an event. Online access details are only stored for an online event.",
                "tags": [
                    "flowevents.sessions"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "6f708192-a304-4e2f-3a4b-5c6d7e8f9001",
                                        "starts_at": "2026-11-09T09:00:00+01:00",
                                        "sort_order": 3
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "starts_at": {
                                        "type": "string",
                                        "description": "Start as a date or timestamp."
                                    },
                                    "ends_at": {
                                        "type": "string",
                                        "description": "End, not before the start."
                                    },
                                    "title": {
                                        "type": "string",
                                        "description": "Name of the session."
                                    },
                                    "venue_uuid": {
                                        "type": "string",
                                        "description": "UUID of the conference venue."
                                    },
                                    "online_access_info": {
                                        "type": "string",
                                        "description": "Access details, only for online events."
                                    },
                                    "capacity": {
                                        "type": "integer",
                                        "description": "Own capacity of the session."
                                    },
                                    "guest_price": {
                                        "type": "number",
                                        "description": "Price for guest listeners per session."
                                    },
                                    "sort_order": {
                                        "type": "integer",
                                        "description": "Order. Without a value it goes to the end."
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Internal notes."
                                    }
                                },
                                "required": [
                                    "starts_at"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/sessions/{uuid}": {
            "put": {
                "operationId": "flowevents.flowevents-sessions-update",
                "summary": "Update a session",
                "description": "Updates a session. Fields that are not sent stay unchanged. The end is checked against the start the session has after this request, not only against the one in this request.",
                "tags": [
                    "flowevents.sessions"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "2b3c4d5e-6f70-4a8b-9c0d-1e2f3a4b5c6d",
                                        "starts_at": "2026-10-13T09:00:00+02:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "starts_at": {
                                        "type": "string",
                                        "description": "Start."
                                    },
                                    "ends_at": {
                                        "type": "string",
                                        "description": "End, not before the start."
                                    },
                                    "title": {
                                        "type": "string",
                                        "description": "Name."
                                    },
                                    "venue_uuid": {
                                        "type": "string",
                                        "description": "UUID of the conference venue, null removes the assignment."
                                    },
                                    "online_access_info": {
                                        "type": "string",
                                        "description": "Access details, only for online events."
                                    },
                                    "capacity": {
                                        "type": "integer",
                                        "description": "Own capacity."
                                    },
                                    "guest_price": {
                                        "type": "number",
                                        "description": "Price for guest listeners."
                                    },
                                    "sort_order": {
                                        "type": "integer",
                                        "description": "Order."
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Internal notes."
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowevents.flowevents-sessions-destroy",
                "summary": "Delete a session",
                "description": "Deletes a session. It is a soft delete; recorded attendance is kept.",
                "tags": [
                    "flowevents.sessions"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Termin gelöscht."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/participants": {
            "get": {
                "operationId": "flowevents.flowevents-participants-index",
                "summary": "List participants",
                "description": "Lists the team's participants, newest registration first, optionally limited to an event, a status or a role.",
                "tags": [
                    "flowevents.participants"
                ],
                "parameters": [
                    {
                        "name": "event_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Only participants of this event.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "registered, confirmed, waitlisted or cancelled.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "role",
                        "in": "query",
                        "required": false,
                        "description": "regular or guest_listener.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Entries per page, 1 to 200. Default 50.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, starting at 1.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/events/{uuid}/participants": {
            "post": {
                "operationId": "flowevents.flowevents-participants-store",
                "summary": "Register a participant",
                "description": "Registers a CRM customer for an event. Whether this results in a place or the waiting list depends on the capacity and is stated in the returned status. A second active registration of the same customer is rejected with HTTP 409.",
                "tags": [
                    "flowevents.participants"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "708192a3-b415-4f30-4b5c-6d7e8f900112",
                                        "name": "Anna Berger",
                                        "status": "registered",
                                        "role": "regular",
                                        "assigned_price": "480.00"
                                    },
                                    "meta": {
                                        "early_bird_fallback_applied": false
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "client_uuid": {
                                        "type": "string",
                                        "description": "UUID of the CRM customer."
                                    },
                                    "role": {
                                        "type": "string",
                                        "description": "regular or guest_listener. Default regular."
                                    },
                                    "price_tier": {
                                        "type": "string",
                                        "description": "regular, reduced or early_bird. Default regular."
                                    },
                                    "assigned_price": {
                                        "type": "number",
                                        "description": "Different price. The early bird deadline takes precedence."
                                    },
                                    "remarks": {
                                        "type": "string",
                                        "description": "Remarks."
                                    },
                                    "session_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Sessions booked by a guest listener."
                                    },
                                    "price_item_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Booked items. Without a value, all non-optional items apply."
                                    },
                                    "price_item_overrides": {
                                        "type": "object",
                                        "description": "Different amounts per item UUID."
                                    }
                                },
                                "required": [
                                    "client_uuid"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/participants/{uuid}": {
            "get": {
                "operationId": "flowevents.flowevents-participants-show",
                "summary": "Get a participant",
                "description": "Returns a participant with their event, their room and their booked items.",
                "tags": [
                    "flowevents.participants"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowevents.flowevents-participants-update",
                "summary": "Update a participant",
                "description": "Updates a participant. The status cancelled is rejected. Switching from regular to guest listener in a way that would discard recorded attendance requires confirm_attendance_loss. Moving up from the waiting list is checked against the capacity.",
                "tags": [
                    "flowevents.participants"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "708192a3-b415-4f30-4b5c-6d7e8f900112",
                                        "status": "confirmed",
                                        "role": "regular"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "status": {
                                        "type": "string",
                                        "description": "registered, confirmed or waitlisted."
                                    },
                                    "role": {
                                        "type": "string",
                                        "description": "regular or guest_listener."
                                    },
                                    "price_tier": {
                                        "type": "string",
                                        "description": "Price tier."
                                    },
                                    "assigned_price": {
                                        "type": "number",
                                        "description": "Different price. Always empty for a guest listener."
                                    },
                                    "remarks": {
                                        "type": "string",
                                        "description": "Remarks."
                                    },
                                    "dietary_notes": {
                                        "type": "string",
                                        "description": "Dietary notes."
                                    },
                                    "bed_linen_required": {
                                        "type": "boolean",
                                        "description": "Whether bed linen is needed."
                                    },
                                    "certification_status": {
                                        "type": "string",
                                        "description": "none, first_graduation or final_certificate."
                                    },
                                    "confirm_attendance_loss": {
                                        "type": "boolean",
                                        "description": "Confirms the loss of recorded attendance when the role changes."
                                    },
                                    "session_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Sessions booked by a guest listener."
                                    },
                                    "price_item_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Booked items."
                                    },
                                    "price_item_overrides": {
                                        "type": "object",
                                        "description": "Different amounts per item UUID."
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/participants/{uuid}/confirm": {
            "post": {
                "operationId": "flowevents.flowevents-participants-confirm",
                "summary": "Confirm participation",
                "description": "Sets a participant to confirmed. A cancelled participant is rejected with HTTP 409.",
                "tags": [
                    "flowevents.participants"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "708192a3-b415-4f30-4b5c-6d7e8f900112",
                                        "status": "confirmed"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/participants/{uuid}/cancel": {
            "post": {
                "operationId": "flowevents.flowevents-participants-cancel",
                "summary": "Cancel a participant",
                "description": "Cancels a participant. The instalments are cancelled, open invoices are voided and the next person waiting moves up. Paid invoices remain. The response states the numbers and, if there is one, the participant who moved up.",
                "tags": [
                    "flowevents.participants"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/participants/{uuid}/promote": {
            "post": {
                "operationId": "flowevents.flowevents-participants-promote",
                "summary": "Move up from the waiting list",
                "description": "Moves a waiting participant up by hand. There is deliberately no capacity check: whoever moves up here knowingly exceeds the limit. A participant who is not on the waiting list is rejected with HTTP 409.",
                "tags": [
                    "flowevents.participants"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "8192a3b4-1546-4031-5c6d-7e8f90011223",
                                        "status": "registered",
                                        "waitlist_position": null
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/participants/{uuid}/price-items": {
            "get": {
                "operationId": "flowevents.flowevents-participants-price-items-index",
                "summary": "Get booked items",
                "description": "Lists the items booked by this participant with the amount that actually applies. Without a different amount, the event's amount applies.",
                "tags": [
                    "flowevents.participants"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowevents.flowevents-participants-price-items-update",
                "summary": "Set booked items",
                "description": "Sets a participant's item selection. The list replaces the selection completely; an item that is already on an invoice cannot be deselected and causes HTTP 409. Items of other events are discarded.",
                "tags": [
                    "flowevents.participants"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "price_item_uuid": "3c4d5e6f-7081-4b9c-0d1e-2f3a4b5c6d7e",
                                            "name": "Vollpension",
                                            "amount_override": "95.00",
                                            "effective_amount": "95.00"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "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": "The complete selection. An empty list removes all items."
                                    },
                                    "price_item_overrides": {
                                        "type": "object",
                                        "description": "Different amounts, keyed by item UUID."
                                    }
                                },
                                "required": [
                                    "price_item_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/participants/{uuid}/invoice": {
            "post": {
                "operationId": "flowevents.flowevents-participants-invoice",
                "summary": "Create an invoice for a participant",
                "description": "Creates an invoice for the selected items. postens only names what is invoiced, never how much: every amount and every tax rate is read on the server from the participant's own event. Without FlowAccounting, with an existing instalment plan, with an item that has already been invoiced or without an invoice recipient, the call returns HTTP 409 and states the reason.",
                "tags": [
                    "flowevents.participants"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "invoice_uuid": "a3b41546-3041-4263-7e8f-900112233445",
                                        "invoice_number": "RE-2026-0142",
                                        "participant_uuid": "708192a3-b415-4f30-4b5c-6d7e8f900112"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "postens": {
                                        "type": "array",
                                        "items": [],
                                        "description": "List of seminar_fee and the UUIDs of the items to invoice, at most 20 entries."
                                    }
                                },
                                "required": [
                                    "postens"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/events/{uuid}/billing": {
            "get": {
                "operationId": "flowevents.flowevents-events-billing-index",
                "summary": "Get the billing overview of an event",
                "description": "Returns the billing status of all participants of an event in one call: payment status, agreed price, payment type and the related billing items with invoice numbers. In addition, the event's own items that belong to no participant, such as the company invoice of an in-house event. Requires FlowAccounting and otherwise returns HTTP 403.",
                "tags": [
                    "flowevents.participants"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/participants/{uuid}/installments": {
            "get": {
                "operationId": "flowevents.flowevents-participants-installments-index",
                "summary": "Get billing items and instalments",
                "description": "Lists a participant's billing items including the instalment plan. An instalment exists before its invoice does: invoice_uuid stays empty until the run writes the invoice. That is the normal state of a future instalment, not an error.",
                "tags": [
                    "flowevents.participants"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/events/{uuid}/attendance": {
            "get": {
                "operationId": "flowevents.flowevents-attendance-index",
                "summary": "Get the attendance grid",
                "description": "Returns the complete grid of an event: all sessions, all active participants and, for each combination, the attendance and homework state.",
                "tags": [
                    "flowevents.attendance"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/participants/{uuid}/attendance/{sessionUuid}": {
            "put": {
                "operationId": "flowevents.flowevents-attendance-update",
                "summary": "Record attendance",
                "description": "Writes one cell of the grid. A field that is not sent stays untouched, an explicit null resets it to not recorded. Homework can only be recorded if the event tracks it.",
                "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": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "attended": {
                                        "type": "boolean",
                                        "description": "true, false or null."
                                    },
                                    "homework_submitted": {
                                        "type": "boolean",
                                        "description": "true, false or null. Only for events with homework."
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Note on the cell."
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/events/{uuid}/rooms": {
            "get": {
                "operationId": "flowevents.flowevents-event-rooms-index",
                "summary": "List the rooms of an event",
                "description": "Lists the rooms of this event with the capacity that applies to them and their current occupancy.",
                "tags": [
                    "flowevents.event-rooms"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowevents.flowevents-event-rooms-store",
                "summary": "Add rooms to the event",
                "description": "Makes existing rooms available to an event. The call can be repeated: a room that is already assigned keeps its assignment and its different capacity.",
                "tags": [
                    "flowevents.event-rooms"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
                                            "name": "Zimmer 12",
                                            "effective_capacity": 2,
                                            "occupied": 0
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "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 of the rooms, at least one."
                                    }
                                },
                                "required": [
                                    "room_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/events/{uuid}/rooms/ad-hoc": {
            "post": {
                "operationId": "flowevents.flowevents-event-rooms-ad-hoc",
                "summary": "Create a room for this event",
                "description": "Creates a room that belongs to no conference venue and is meant only for this event. That is exactly why it can be removed completely later.",
                "tags": [
                    "flowevents.event-rooms"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "3b4c5d6e-7f80-4192-a3b4-c5d6e7f80112",
                                        "name": "Ferienwohnung nebenan",
                                        "room_type": "multi",
                                        "capacity": 4,
                                        "venue_uuid": null,
                                        "is_ad_hoc": true
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name of the room."
                                    },
                                    "room_type": {
                                        "type": "string",
                                        "description": "single, double or multi."
                                    },
                                    "capacity": {
                                        "type": "integer",
                                        "description": "Number of beds, 1 to 999."
                                    }
                                },
                                "required": [
                                    "name",
                                    "room_type",
                                    "capacity"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/events/{uuid}/rooms/{roomUuid}/capacity": {
            "put": {
                "operationId": "flowevents.flowevents-event-rooms-capacity",
                "summary": "Set a different capacity",
                "description": "Sets the capacity this room has for this one event. The difference belongs to the assignment, not to the room, so a double room does not permanently become a single room. null restores the room's own capacity.",
                "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": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "capacity_override": {
                                        "type": "integer",
                                        "description": "1 to 999 or null."
                                    }
                                },
                                "required": [
                                    "capacity_override"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/events/{uuid}/rooms/{roomUuid}": {
            "delete": {
                "operationId": "flowevents.flowevents-event-rooms-destroy",
                "summary": "Remove a room from the event",
                "description": "Takes a room off the event. Everyone accommodated in it loses their place first. A room created specially for the event is deleted in the process, a room of a conference venue remains.",
                "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": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Zimmer von der Veranstaltung entfernt."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/participants/{uuid}/room": {
            "put": {
                "operationId": "flowevents.flowevents-participants-room",
                "summary": "Assign a participant to a room",
                "description": "Assigns a participant to a room or takes them out. room_uuid is required and may be null; null removes the assignment. A full room returns HTTP 409 with occupancy and capacity; with confirm_overbooking it is written anyway.",
                "tags": [
                    "flowevents.event-rooms"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "708192a3-b415-4f30-4b5c-6d7e8f900112",
                                        "name": "Anna Berger",
                                        "room_uuid": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "room_uuid": {
                                        "type": "string",
                                        "description": "UUID of the room, or null to take the participant out."
                                    },
                                    "confirm_overbooking": {
                                        "type": "boolean",
                                        "description": "Explicitly confirms an overbooking."
                                    }
                                },
                                "required": [
                                    "room_uuid"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/venues": {
            "get": {
                "operationId": "flowevents.flowevents-venues-index",
                "summary": "List conference venues",
                "description": "Lists the team's conference venues with their rooms, sorted by name.",
                "tags": [
                    "flowevents.venues"
                ],
                "parameters": [
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Search in name and city.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Entries per page, 1 to 200. Default 50.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, starting at 1.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowevents.flowevents-venues-store",
                "summary": "Create a conference venue",
                "description": "Creates a conference venue.",
                "tags": [
                    "flowevents.venues"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name of the venue."
                                    },
                                    "address": {
                                        "type": "string",
                                        "description": "Address, at most 500 characters."
                                    },
                                    "city": {
                                        "type": "string",
                                        "description": "City."
                                    },
                                    "country": {
                                        "type": "string",
                                        "description": "Country."
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Internal notes."
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/venues/{uuid}": {
            "get": {
                "operationId": "flowevents.flowevents-venues-show",
                "summary": "Get a conference venue",
                "description": "Returns a conference venue with its rooms.",
                "tags": [
                    "flowevents.venues"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "5e6f7081-9203-4d1e-2f3a-4b5c6d7e8f90",
                                        "name": "Haus am See",
                                        "address": "Seestrasse 4",
                                        "rooms": []
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowevents.flowevents-venues-update",
                "summary": "Update a conference venue",
                "description": "Updates a conference venue. Fields that are not sent stay unchanged.",
                "tags": [
                    "flowevents.venues"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "5e6f7081-9203-4d1e-2f3a-4b5c6d7e8f90",
                                        "name": "Haus am See (neu)"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name of the venue."
                                    },
                                    "address": {
                                        "type": "string",
                                        "description": "Address."
                                    },
                                    "city": {
                                        "type": "string",
                                        "description": "City."
                                    },
                                    "country": {
                                        "type": "string",
                                        "description": "Country."
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Internal notes."
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowevents.flowevents-venues-destroy",
                "summary": "Delete a conference venue",
                "description": "Deletes a conference venue. It is a soft delete; the rooms remain unchanged so that no existing assignment is silently dissolved.",
                "tags": [
                    "flowevents.venues"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Tagungshaus gelöscht."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/venues/{uuid}/rooms": {
            "get": {
                "operationId": "flowevents.flowevents-venue-rooms-index",
                "summary": "List the rooms of a conference venue",
                "description": "Lists the rooms of a conference venue, sorted by name.",
                "tags": [
                    "flowevents.venues"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowevents.flowevents-venue-rooms-store",
                "summary": "Create a room",
                "description": "Creates a room in a conference venue.",
                "tags": [
                    "flowevents.venues"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
                                        "name": "Zimmer 12",
                                        "room_type": "double",
                                        "capacity": 2,
                                        "venue_uuid": "5e6f7081-9203-4d1e-2f3a-4b5c6d7e8f90"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name of the room."
                                    },
                                    "room_type": {
                                        "type": "string",
                                        "description": "single, double or multi."
                                    },
                                    "capacity": {
                                        "type": "integer",
                                        "description": "Number of beds, 1 to 999."
                                    }
                                },
                                "required": [
                                    "name",
                                    "room_type",
                                    "capacity"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/rooms/{uuid}": {
            "put": {
                "operationId": "flowevents.flowevents-rooms-update",
                "summary": "Update a room",
                "description": "Updates a room. The conference venue cannot be changed and is rejected if it is sent along.",
                "tags": [
                    "flowevents.venues"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
                                        "name": "Zimmer 12a",
                                        "capacity": 3
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name."
                                    },
                                    "room_type": {
                                        "type": "string",
                                        "description": "single, double or multi."
                                    },
                                    "capacity": {
                                        "type": "integer",
                                        "description": "Number of beds, 1 to 999."
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowevents.flowevents-rooms-destroy",
                "summary": "Delete a room",
                "description": "Deletes a room. It is a soft delete.",
                "tags": [
                    "flowevents.venues"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Zimmer gelöscht."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/events/{uuid}/signatures/send": {
            "post": {
                "operationId": "flowevents.flowevents-signatures-send",
                "summary": "Request signatures",
                "description": "Sends the signature emails. With scope unsigned, only participants who have not signed yet get an email; with all, everyone gets one again. The response states the tokens created, the emails queued and the recipients without an address.",
                "tags": [
                    "flowevents.mailings"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "event_uuid": "9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f",
                                        "scope": "unsigned",
                                        "tokens_created": 12,
                                        "mails_queued": 11,
                                        "skipped_no_email": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "scope": {
                                        "type": "string",
                                        "description": "unsigned or all. Default unsigned."
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/events/{uuid}/feedback/send": {
            "post": {
                "operationId": "flowevents.flowevents-feedback-send",
                "summary": "Request feedback",
                "description": "Sends the feedback emails for a form and freezes a version of the form in the process. With scope pending, only participants who have not answered yet get an email.",
                "tags": [
                    "flowevents.mailings"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "form_uuid": {
                                        "type": "string",
                                        "description": "UUID of the feedback form."
                                    },
                                    "scope": {
                                        "type": "string",
                                        "description": "pending or all. Default pending."
                                    }
                                },
                                "required": [
                                    "form_uuid"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/events/{uuid}/feedback/evaluation": {
            "get": {
                "operationId": "flowevents.flowevents-feedback-evaluation",
                "summary": "Evaluate the feedback of an event",
                "description": "Evaluates the feedback for an event, grouped by question and not by version. The same content as the report under reports, only addressed through the event in the path.",
                "tags": [
                    "flowevents.mailings"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/feedback-forms": {
            "get": {
                "operationId": "flowevents.flowevents-feedback-forms-index",
                "summary": "List feedback forms",
                "description": "Lists the team's feedback forms with the number of their live version and the number of their fields.",
                "tags": [
                    "flowevents.feedback-forms"
                ],
                "parameters": [
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Search in name and description.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Entries per page, 1 to 200. Default 50.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, starting at 1.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowevents.flowevents-feedback-forms-store",
                "summary": "Create a feedback form",
                "description": "Creates a form. Version 1 is created right away, so the form can be edited from the first moment.",
                "tags": [
                    "flowevents.feedback-forms"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name of the form."
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Description, at most 1000 characters."
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/feedback-forms/{uuid}": {
            "get": {
                "operationId": "flowevents.flowevents-feedback-forms-show",
                "summary": "Get a feedback form",
                "description": "Returns a form with the fields of its live version in their order.",
                "tags": [
                    "flowevents.feedback-forms"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowevents.flowevents-feedback-forms-update",
                "summary": "Update a feedback form",
                "description": "Changes the name or description of a form. Fields that are not sent stay unchanged.",
                "tags": [
                    "flowevents.feedback-forms"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "c5d6e7f8-0112-4233-4455-66778899aabb",
                                        "name": "Abschlussfeedback 2026"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name of the form."
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Description."
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowevents.flowevents-feedback-forms-destroy",
                "summary": "Delete a feedback form",
                "description": "Deletes a form. If there are already answers, deleting is rejected with HTTP 409, because the answers would otherwise be left without their questions.",
                "tags": [
                    "flowevents.feedback-forms"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Feedback-Formular gelöscht."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/feedback-forms/{uuid}/fields": {
            "get": {
                "operationId": "flowevents.flowevents-feedback-fields-index",
                "summary": "List the fields of a form",
                "description": "Lists the fields of the live version in their order.",
                "tags": [
                    "flowevents.feedback-forms"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowevents.flowevents-feedback-fields-store",
                "summary": "Add a field",
                "description": "Adds a field to the live version. The field type is required and cannot be changed later. Without further details, the defaults of the type apply.",
                "tags": [
                    "flowevents.feedback-forms"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "e7f80112-2334-4455-6677-8899aabbccdd",
                                        "field_type": "rating",
                                        "label": "Wie zufrieden waren Sie?",
                                        "options": {
                                            "max": 5,
                                            "display": "numbers"
                                        },
                                        "sort_order": 2
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "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 or paragraph."
                                    },
                                    "label": {
                                        "type": "string",
                                        "description": "Label, at most 255 characters."
                                    },
                                    "help_text": {
                                        "type": "string",
                                        "description": "Help text, at most 1000 characters."
                                    },
                                    "is_required": {
                                        "type": "boolean",
                                        "description": "Whether an answer is required."
                                    },
                                    "options": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Answer texts for select, radio and checkbox; for rating an object with max between 2 and 10 and display (numbers or stars, default numbers). With stars, max is at most 5."
                                    }
                                },
                                "required": [
                                    "field_type"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/feedback-forms/{uuid}/fields/order": {
            "put": {
                "operationId": "flowevents.flowevents-feedback-fields-order",
                "summary": "Reorder fields",
                "description": "Sets the order of the fields. The list is the complete new order; a UUID that belongs to another form is discarded.",
                "tags": [
                    "flowevents.feedback-forms"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "e7f80112-2334-4455-6677-8899aabbccdd",
                                            "sort_order": 1
                                        },
                                        {
                                            "uuid": "d6e7f801-1223-4344-5566-778899aabbcc",
                                            "sort_order": 2
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "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 of the fields in the desired order."
                                    }
                                },
                                "required": [
                                    "field_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/feedback-forms/{uuid}/fields/{fieldUuid}": {
            "put": {
                "operationId": "flowevents.flowevents-feedback-fields-update",
                "summary": "Update a field",
                "description": "Changes the label, help text, required flag or answer options of a field. The field type cannot be changed and is rejected if it is sent along. A star maximum is limited to the allowed range.",
                "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": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "label": {
                                        "type": "string",
                                        "description": "Label."
                                    },
                                    "help_text": {
                                        "type": "string",
                                        "description": "Help text."
                                    },
                                    "is_required": {
                                        "type": "boolean",
                                        "description": "Whether an answer is required."
                                    },
                                    "options": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Answer texts or, for rating, an object with max and display (numbers or stars)."
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowevents.flowevents-feedback-fields-destroy",
                "summary": "Delete a field",
                "description": "Deletes a field from the live version. Versions that are already frozen and the answers given to them stay untouched.",
                "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": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Feld gelöscht."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/events/{uuid}/exports/contacts": {
            "get": {
                "operationId": "flowevents.flowevents-exports-contacts",
                "summary": "Export the contact list",
                "description": "Returns the contact list as CSV: name, email, phone, company, address, role and remarks. This list deliberately contains no amounts and therefore needs no 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. Default registered and confirmed.",
                        "schema": {
                            "type": "array",
                            "items": []
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "text/event-stream": {
                                "schema": {
                                    "type": "string"
                                },
                                "example": "Name;E-Mail;Telefon;Firma;Adresse;Rolle;Bemerkungen"
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/events/{uuid}/exports/rooms": {
            "get": {
                "operationId": "flowevents.flowevents-exports-rooms",
                "summary": "Export the room list",
                "description": "Returns the room list as CSV: name, room, room type, special diet and bed linen. If the event has no item of the kind accommodation, the call returns HTTP 409 instead of an empty file.",
                "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. Default registered and confirmed.",
                        "schema": {
                            "type": "array",
                            "items": []
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "text/event-stream": {
                                "schema": {
                                    "type": "string"
                                },
                                "example": "Name;Zimmer;Zimmertyp;Sonderkost;Bettwäsche"
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/events/{uuid}/exports/cost-payment": {
            "get": {
                "operationId": "flowevents.flowevents-exports-cost-payment",
                "summary": "Export cost and payment",
                "description": "Returns seminar fee, price tier, board and lodging, total and payment status as CSV. Requires FlowAccounting. For an in-house event, the file contains the company total instead of one row per participant.",
                "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. Default registered and confirmed.",
                        "schema": {
                            "type": "array",
                            "items": []
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "text/event-stream": {
                                "schema": {
                                    "type": "string"
                                },
                                "example": "Name;E-Mail;Seminargebühr;Preisstufe;Kost & Logis;Gesamt (brutto);Zahlungsstatus"
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/events/{uuid}/exports/full": {
            "get": {
                "operationId": "flowevents.flowevents-exports-full",
                "summary": "Export the full overview",
                "description": "Returns all columns in one file: contact details, role, prices, payment and certification status, room, special diet, bed linen and remarks. Requires 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. Default registered and confirmed.",
                        "schema": {
                            "type": "array",
                            "items": []
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowevents/events/{uuid}/exports/feedback": {
            "get": {
                "operationId": "flowevents.flowevents-exports-feedback",
                "summary": "Export feedback answers",
                "description": "Returns the submitted answers as CSV with one row per answered question. Requires FlowAccounting. If there are no answers, the call returns HTTP 409 instead of a file that contains only a header row.",
                "tags": [
                    "flowevents.exports"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "text/event-stream": {
                                "schema": {
                                    "type": "string"
                                },
                                "example": "Teilnehmer;Frage;Antwort"
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/public/flowleads/forms/{key}": {
            "get": {
                "operationId": "flowleads.flowleads-forms-show",
                "summary": "Get the form definition",
                "description": "Returns the form's fields (key, label, type text, email, tel, textarea, select or checkbox, whether required, options, maximum length), a fresh signed timestamp, the names of the hidden field and of the timestamp, the submit address and the display mode: inline or iframe (with Turnstile). An unknown or deactivated key answers with HTTP 404.",
                "tags": [
                    "flowleads.forms"
                ],
                "parameters": [
                    {
                        "name": "key",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "ok": true,
                                    "form": {
                                        "key": "FORM_KEY",
                                        "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": "TIMESTAMP.SIGNATURE",
                                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "security": []
            },
            "post": {
                "operationId": "flowleads.flowleads-forms-submit",
                "summary": "Submit an enquiry",
                "description": "Submits an entry as JSON or as form data. On success a lead is created in the configured pipeline (source, tags and assignment from the form) and the response is {\"ok\": true, \"message\": ...}, plus redirect_url if a redirect is set. Errors answer with ok false: 403 for a website that is not allowed, 404 for an unknown or deactivated form, 413 above 32 KB, 422 for invalid fields (errors by field key), an expired or too recent timestamp or a failed Turnstile check, 429 when the rate limit is exceeded. If the form's AI spam check is on, the AI reads the submission and afterwards moves clear spam to the spam view.",
                "tags": [
                    "flowleads.forms"
                ],
                "parameters": [
                    {
                        "name": "key",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "ok": true,
                                    "message": "Vielen Dank! Ihre Anfrage ist bei uns eingegangen."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "fields": {
                                        "type": "object",
                                        "description": "The values by field key, e.g. {\"name\": \"Erika Mustermann\", \"email\": \"erika@beispiel.de\"}. Checkboxes send \"1\" or \"0\". Unknown keys are dropped."
                                    },
                                    "fl_ts": {
                                        "type": "string",
                                        "description": "The signed timestamp token from the form definition, at least 3 seconds and at most 24 hours old."
                                    },
                                    "homepage": {
                                        "type": "string",
                                        "description": "Hidden field against bots. Must stay empty or be left out."
                                    },
                                    "cf-turnstile-response": {
                                        "type": "string",
                                        "description": "Turnstile token, only for forms with Cloudflare Turnstile (hosted page or iframe)."
                                    }
                                },
                                "required": [
                                    "fields",
                                    "fl_ts"
                                ]
                            }
                        }
                    }
                },
                "security": []
            }
        },
        "/flowsaas/context": {
            "get": {
                "operationId": "flowsaas.flowsaas-context",
                "summary": "Get portals, vocabulary and own permissions",
                "description": "Returns all of the team's portals with statuses, tags and open moderation counts, plus the possible moderation states, the available webhook events and whether this key has the manager permission.",
                "tags": [
                    "flowsaas.context"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/reports/moderation": {
            "get": {
                "operationId": "flowsaas.flowsaas-reports-moderation",
                "summary": "Get open moderation",
                "description": "Counts the waiting ideas and comments across all of the team's portals and returns up to twenty of each, newest first.",
                "tags": [
                    "flowsaas.context"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "pending_posts": 2,
                                        "pending_comments": 1,
                                        "posts": [],
                                        "comments": []
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/reports/top-ideas": {
            "get": {
                "operationId": "flowsaas.flowsaas-reports-top-ideas",
                "summary": "Get the most popular ideas",
                "description": "The twenty approved ideas with the most votes. Merged ideas are left out; their votes count towards the idea they were merged into.",
                "tags": [
                    "flowsaas.context"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "ideas": [
                                            {
                                                "uuid": "c1b5a0d2-9e33-4f10-8a77-6b2c4d1e9f08",
                                                "title": "Dunkelmodus",
                                                "votes_count": 42
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/reports/roadmap": {
            "get": {
                "operationId": "flowsaas.flowsaas-reports-roadmap",
                "summary": "Get the published roadmap",
                "description": "The first fifty roadmap items of all portals in their published order, each with the title, column and vote count of the idea behind it.",
                "tags": [
                    "flowsaas.context"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/reports/activity": {
            "get": {
                "operationId": "flowsaas.flowsaas-reports-activity",
                "summary": "Get activity of the last 30 days",
                "description": "Counts new ideas and comments of the last thirty days and returns the ten most recent ideas.",
                "tags": [
                    "flowsaas.context"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "window_days": 30,
                                        "new_ideas": 7,
                                        "new_comments": 12,
                                        "latest": []
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/portals": {
            "get": {
                "operationId": "flowsaas.flowsaas-portals-index",
                "summary": "List portals",
                "description": "All of the team's portals, newest first, with the number of their ideas and of the waiting posts.",
                "tags": [
                    "flowsaas.portals"
                ],
                "parameters": [
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Searches the portal's name and address.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "is_active",
                        "in": "query",
                        "required": false,
                        "description": "Only active or only inactive portals.",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Items per page, 1 to 200, default 50.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, default 1.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowsaas.flowsaas-portals-store",
                "summary": "Create a portal",
                "description": "Creates a portal in the team of the API key, including the five default statuses and the four default tags. Requires the manager permission.",
                "tags": [
                    "flowsaas.portals"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Display name, at least three characters."
                                    },
                                    "slug": {
                                        "type": "string",
                                        "description": "Public address under /p/. Must be unique across the installation; derived from the name if omitted."
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Short description for the portal page."
                                    },
                                    "is_public": {
                                        "type": "boolean",
                                        "description": "Whether the portal is publicly reachable. Default true."
                                    },
                                    "subdomain": {
                                        "type": "string",
                                        "description": "Own subdomain, stored only; the portal is currently reachable only under /p/. Defaults to the slug."
                                    },
                                    "default_language": {
                                        "type": "string",
                                        "description": "de, en or pt. Default de."
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/portals/{uuid}": {
            "get": {
                "operationId": "flowsaas.flowsaas-portals-show",
                "summary": "Get a portal",
                "description": "A portal with its statuses, its tags and the open moderation counts.",
                "tags": [
                    "flowsaas.portals"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f",
                                        "name": "Produktfeedback",
                                        "statuses": [],
                                        "tags": [],
                                        "pending_posts": 2,
                                        "pending_comments": 0
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowsaas.flowsaas-portals-update",
                "summary": "Update a portal",
                "description": "Changes the fields sent; everything else stays untouched. If the request contains is_public, is_active or seo_indexable, the manager permission is required.",
                "tags": [
                    "flowsaas.portals"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f",
                                        "name": "Produktwünsche",
                                        "tag_limit": 3
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Display name."
                                    },
                                    "slug": {
                                        "type": "string",
                                        "description": "Public address. Changing it breaks existing links."
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Short description."
                                    },
                                    "is_public": {
                                        "type": "boolean",
                                        "description": "Public reachability. Manager permission required."
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "Switch the portal on or off. Manager permission required."
                                    },
                                    "seo_indexable": {
                                        "type": "boolean",
                                        "description": "Indexing by search engines. Manager permission required."
                                    },
                                    "subdomain": {
                                        "type": "string",
                                        "description": "Own subdomain. Stored only, no effect at the moment."
                                    },
                                    "custom_domain": {
                                        "type": "string",
                                        "description": "Own domain. Stored only, no effect at the moment."
                                    },
                                    "dark_mode_enabled": {
                                        "type": "boolean",
                                        "description": "Dark mode in the portal."
                                    },
                                    "default_language": {
                                        "type": "string",
                                        "description": "de, en or pt."
                                    },
                                    "voting_without_auth": {
                                        "type": "boolean",
                                        "description": "Allow voting without signing in."
                                    },
                                    "post_approval_required": {
                                        "type": "boolean",
                                        "description": "Show new ideas only after approval."
                                    },
                                    "comment_approval_required": {
                                        "type": "boolean",
                                        "description": "Show new comments only after approval."
                                    },
                                    "allow_anonymous_read": {
                                        "type": "boolean",
                                        "description": "Allow reading without signing in. Stored only; the portal is currently always readable without signing in."
                                    },
                                    "lock_completed_ideas": {
                                        "type": "boolean",
                                        "description": "Lock completed ideas for votes and comments."
                                    },
                                    "tag_limit": {
                                        "type": "integer",
                                        "description": "Maximum number of tags per idea. 0 means no limit."
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowsaas.flowsaas-portals-destroy",
                "summary": "Delete a portal",
                "description": "Deletes the portal with all ideas, votes, comments, statuses, tags, roadmap items and webhooks. Requires the manager permission and cannot be undone.",
                "tags": [
                    "flowsaas.portals"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Portal \"Produktfeedback\" gelöscht."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/portals/{uuid}/toggle-active": {
            "post": {
                "operationId": "flowsaas.flowsaas-portals-toggle-active",
                "summary": "Switch a portal on or off",
                "description": "Flips the is_active switch without changing anything else in the portal. Requires the manager permission.",
                "tags": [
                    "flowsaas.portals"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f",
                                        "is_active": false
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/portals/{uuid}/delete-all-ideas": {
            "post": {
                "operationId": "flowsaas.flowsaas-portals-delete-all-ideas",
                "summary": "Delete all ideas of a portal",
                "description": "Deletes every idea of the portal with its votes, comments, history and roadmap items. The portal itself and its vocabulary remain. Requires the manager permission and cannot be undone.",
                "tags": [
                    "flowsaas.portals"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "deleted_posts": 18
                                    },
                                    "message": "Alle Ideen dieses Portals wurden gelöscht."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/portals/{uuid}/company": {
            "get": {
                "operationId": "flowsaas.flowsaas-portals-company-show",
                "summary": "Get branding",
                "description": "Logos, colours and display name of the portal. A portal without branding responds with its UUID and otherwise empty fields.",
                "tags": [
                    "flowsaas.portals"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowsaas.flowsaas-portals-company-update",
                "summary": "Update branding",
                "description": "Writes the fields sent and creates the record on the first change. The image fields expect finished URLs; the API does not download any file itself.",
                "tags": [
                    "flowsaas.portals"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "portal_uuid": "9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f",
                                        "name": "Creative Skyline",
                                        "primary_color": "#6392D9"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name shown in the portal header."
                                    },
                                    "logo_url": {
                                        "type": "string",
                                        "description": "URL of the logo for light mode."
                                    },
                                    "logo_dark_url": {
                                        "type": "string",
                                        "description": "URL of the logo for dark mode."
                                    },
                                    "logo_landscape_url": {
                                        "type": "string",
                                        "description": "URL of the landscape logo."
                                    },
                                    "logo_landscape_dark_url": {
                                        "type": "string",
                                        "description": "URL of the landscape logo for dark mode."
                                    },
                                    "logo_layout_mode": {
                                        "type": "string",
                                        "description": "square or landscape."
                                    },
                                    "logo_display_mode": {
                                        "type": "string",
                                        "description": "logo_and_name or logo_only."
                                    },
                                    "logo_link": {
                                        "type": "string",
                                        "description": "Target the logo links to."
                                    },
                                    "favicon_url": {
                                        "type": "string",
                                        "description": "URL of the favicon."
                                    },
                                    "open_graph_image_url": {
                                        "type": "string",
                                        "description": "URL of the preview image for social networks."
                                    },
                                    "primary_color": {
                                        "type": "string",
                                        "description": "Accent colour as a hex value, for example #6392D9."
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/portals/{uuid}/statuses": {
            "get": {
                "operationId": "flowsaas.flowsaas-portals-statuses-index",
                "summary": "List a portal's statuses",
                "description": "All statuses of the portal in their own order. The list is not paginated; it is always complete.",
                "tags": [
                    "flowsaas.vocabulary"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "3a7c2f11-8b4e-4d62-9a05-1c6e8f0b2d43",
                                            "name": "Feedback",
                                            "color": "#6392D9",
                                            "is_completed": false,
                                            "sort_order": 1
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowsaas.flowsaas-portals-statuses-store",
                "summary": "Create a status",
                "description": "Appends a status to the end of the portal's list.",
                "tags": [
                    "flowsaas.vocabulary"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "3a7c2f11-8b4e-4d62-9a05-1c6e8f0b2d43",
                                        "name": "Wird geprüft",
                                        "sort_order": 6
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Display name of the status."
                                    },
                                    "color": {
                                        "type": "string",
                                        "description": "Colour as a six-digit hex value, for example #6392D9."
                                    },
                                    "is_completed": {
                                        "type": "boolean",
                                        "description": "Marks the status as completed. Together with lock_completed_ideas it locks votes and comments."
                                    },
                                    "sort_order": {
                                        "type": "integer",
                                        "description": "Position in the list. Appended to the end if omitted."
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/portals/{uuid}/statuses/reorder": {
            "post": {
                "operationId": "flowsaas.flowsaas-portals-statuses-reorder",
                "summary": "Reorder statuses",
                "description": "Sets the order of the portal's statuses to the list sent. UUIDs of other portals of the same team are skipped.",
                "tags": [
                    "flowsaas.vocabulary"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "3a7c2f11-8b4e-4d62-9a05-1c6e8f0b2d43",
                                            "name": "Fertig",
                                            "sort_order": 1
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "status_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "The status UUIDs in the desired order."
                                    }
                                },
                                "required": [
                                    "status_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/statuses/{uuid}": {
            "put": {
                "operationId": "flowsaas.flowsaas-statuses-update",
                "summary": "Update a status",
                "description": "Changes the name, colour, completed flag or position of a status.",
                "tags": [
                    "flowsaas.vocabulary"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "3a7c2f11-8b4e-4d62-9a05-1c6e8f0b2d43",
                                        "name": "In Prüfung",
                                        "color": "#10B981",
                                        "is_completed": true
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Display name."
                                    },
                                    "color": {
                                        "type": "string",
                                        "description": "Six-digit hex value."
                                    },
                                    "is_completed": {
                                        "type": "boolean",
                                        "description": "Completed flag."
                                    },
                                    "sort_order": {
                                        "type": "integer",
                                        "description": "Position in the list."
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowsaas.flowsaas-statuses-destroy",
                "summary": "Delete a status",
                "description": "Deletes the status and moves every idea that had it to the first remaining status of the portal. Requires the manager permission.",
                "tags": [
                    "flowsaas.vocabulary"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Status gelöscht; betroffene Ideen wurden umgehängt."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/portals/{uuid}/tags": {
            "get": {
                "operationId": "flowsaas.flowsaas-portals-tags-index",
                "summary": "List a portal's tags",
                "description": "All tags of the portal in their own order, including the withdrawn ones.",
                "tags": [
                    "flowsaas.vocabulary"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "b2d4e6f8-1a3c-4e5f-8907-abcdef012345",
                                            "name": "Bug 🐞",
                                            "is_active": true,
                                            "sort_order": 2
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowsaas.flowsaas-portals-tags-store",
                "summary": "Create a tag",
                "description": "Appends a tag to the end of the portal's list.",
                "tags": [
                    "flowsaas.vocabulary"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "b2d4e6f8-1a3c-4e5f-8907-abcdef012345",
                                        "name": "Dokumentation",
                                        "is_active": true
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Display name of the tag."
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Explanation for the portal page."
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "Whether the tag is offered. Default true."
                                    },
                                    "sort_order": {
                                        "type": "integer",
                                        "description": "Position in the list. Appended to the end if omitted."
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/portals/{uuid}/tags/reorder": {
            "post": {
                "operationId": "flowsaas.flowsaas-portals-tags-reorder",
                "summary": "Reorder tags",
                "description": "Sets the order of the portal's tags to the list sent. UUIDs of other portals of the same team are skipped.",
                "tags": [
                    "flowsaas.vocabulary"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "b2d4e6f8-1a3c-4e5f-8907-abcdef012345",
                                            "name": "Dokumentation",
                                            "sort_order": 1
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "tag_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "The tag UUIDs in the desired order."
                                    }
                                },
                                "required": [
                                    "tag_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/tags/{uuid}": {
            "put": {
                "operationId": "flowsaas.flowsaas-tags-update",
                "summary": "Update a tag",
                "description": "Changes the name, explanation, position or whether the tag is still offered. A withdrawn tag stays on every idea that has it.",
                "tags": [
                    "flowsaas.vocabulary"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "b2d4e6f8-1a3c-4e5f-8907-abcdef012345",
                                        "is_active": false
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Display name."
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Explanation."
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "Whether the tag is offered."
                                    },
                                    "sort_order": {
                                        "type": "integer",
                                        "description": "Position in the list."
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowsaas.flowsaas-tags-destroy",
                "summary": "Delete a tag",
                "description": "Deletes the tag; it is removed from every idea that had it. Requires the manager permission.",
                "tags": [
                    "flowsaas.vocabulary"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Schlagwort gelöscht."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/posts": {
            "get": {
                "operationId": "flowsaas.flowsaas-posts-index",
                "summary": "List ideas",
                "description": "The ideas of all of the team's portals. Merged ideas are left out unless include_merged is set.",
                "tags": [
                    "flowsaas.posts"
                ],
                "parameters": [
                    {
                        "name": "portal_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Limit to one portal.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "status_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Only ideas in this status.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "tag_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Only ideas with this tag.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "moderation_status",
                        "in": "query",
                        "required": false,
                        "description": "pending, approved, rejected or spam.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Searches the idea's title and text.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "is_private",
                        "in": "query",
                        "required": false,
                        "description": "Only hidden or only visible ideas.",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "is_on_roadmap",
                        "in": "query",
                        "required": false,
                        "description": "Only ideas on the roadmap.",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "include_merged",
                        "in": "query",
                        "required": false,
                        "description": "Include merged ideas.",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "required": false,
                        "description": "newest, oldest, votes or comments. Default newest.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Items per page, 1 to 200, default 50.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, default 1.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowsaas.flowsaas-posts-store",
                "summary": "Create an idea",
                "description": "Creates an idea in the given portal, attributed to the user of the API key and approved straight away. Without a status it lands in the portal's first status; without tags it gets the first tag on offer.",
                "tags": [
                    "flowsaas.posts"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "portal_uuid": {
                                        "type": "string",
                                        "description": "The portal the idea is created in."
                                    },
                                    "title": {
                                        "type": "string",
                                        "description": "Title, at least three characters."
                                    },
                                    "body": {
                                        "type": "string",
                                        "description": "Description of the idea."
                                    },
                                    "status_uuid": {
                                        "type": "string",
                                        "description": "Status of the portal. A status of another portal is ignored."
                                    },
                                    "tag_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Tags of the portal. The portal's tag_limit applies."
                                    },
                                    "is_private": {
                                        "type": "boolean",
                                        "description": "Hide the idea from visitors."
                                    },
                                    "is_on_roadmap": {
                                        "type": "boolean",
                                        "description": "Also create a roadmap item."
                                    }
                                },
                                "required": [
                                    "portal_uuid",
                                    "title"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/posts/{uuid}": {
            "get": {
                "operationId": "flowsaas.flowsaas-posts-show",
                "summary": "Get an idea",
                "description": "An idea with its tags and its complete status history.",
                "tags": [
                    "flowsaas.posts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "c1b5a0d2-9e33-4f10-8a77-6b2c4d1e9f08",
                                        "title": "Dunkelmodus",
                                        "tags": [],
                                        "status_history": [
                                            {
                                                "old_status": "Feedback",
                                                "new_status": "Backlog",
                                                "changed_by_name": "Sascha"
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowsaas.flowsaas-posts-update",
                "summary": "Update an idea",
                "description": "Changes the fields sent. The status is not one of them; it has its own endpoint. An empty tag_uuids list removes all tags.",
                "tags": [
                    "flowsaas.posts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "c1b5a0d2-9e33-4f10-8a77-6b2c4d1e9f08",
                                        "title": "Dunkelmodus, bitte",
                                        "tags": []
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "description": "Title."
                                    },
                                    "body": {
                                        "type": "string",
                                        "description": "Description."
                                    },
                                    "is_private": {
                                        "type": "boolean",
                                        "description": "Visibility for visitors."
                                    },
                                    "is_pinned": {
                                        "type": "boolean",
                                        "description": "Pin the idea to the top. Stored only; the portal does not use it at the moment."
                                    },
                                    "is_archived": {
                                        "type": "boolean",
                                        "description": "Archive the idea. Stored only; the portal does not use it at the moment."
                                    },
                                    "tag_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "The tags that should apply afterwards."
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowsaas.flowsaas-posts-destroy",
                "summary": "Delete an idea",
                "description": "Deletes the idea with its votes, comments and history. Requires the manager permission.",
                "tags": [
                    "flowsaas.posts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Idee gelöscht."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/posts/{uuid}/status": {
            "put": {
                "operationId": "flowsaas.flowsaas-posts-status-update",
                "summary": "Change the status of an idea",
                "description": "Moves the idea to another status of its own portal. Writes a history entry, triggers the portal webhooks and notifies all supporters. A status of another portal responds with HTTP 422 and error status_not_in_portal.",
                "tags": [
                    "flowsaas.posts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "c1b5a0d2-9e33-4f10-8a77-6b2c4d1e9f08",
                                        "status_uuid": "3a7c2f11-8b4e-4d62-9a05-1c6e8f0b2d43",
                                        "status_name": "In Arbeit"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "status_uuid": {
                                        "type": "string",
                                        "description": "The new status, from the idea's portal."
                                    },
                                    "comment": {
                                        "type": "string",
                                        "description": "Reason recorded in the history."
                                    }
                                },
                                "required": [
                                    "status_uuid"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/posts/{uuid}/approve": {
            "post": {
                "operationId": "flowsaas.flowsaas-posts-approve",
                "summary": "Approve an idea",
                "description": "Approves a waiting idea for the portal and notifies its author. Requires the manager permission.",
                "tags": [
                    "flowsaas.posts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "c1b5a0d2-9e33-4f10-8a77-6b2c4d1e9f08",
                                        "moderation_status": "approved"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/posts/{uuid}/reject": {
            "post": {
                "operationId": "flowsaas.flowsaas-posts-reject",
                "summary": "Reject an idea",
                "description": "Rejects an idea and notifies its author. The reason is stored with the idea; the notification itself contains a fixed standard sentence, not the reason. Requires the manager permission.",
                "tags": [
                    "flowsaas.posts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "c1b5a0d2-9e33-4f10-8a77-6b2c4d1e9f08",
                                        "moderation_status": "rejected",
                                        "rejection_reason": "Doppelt vorhanden."
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "reason": {
                                        "type": "string",
                                        "description": "Reason for the rejection."
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/posts/{uuid}/spam": {
            "post": {
                "operationId": "flowsaas.flowsaas-posts-spam",
                "summary": "Mark an idea as spam",
                "description": "Marks an idea as spam. Its author, if they confirmed their email address, receives a short notice that the post was flagged. Requires the manager permission.",
                "tags": [
                    "flowsaas.posts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "c1b5a0d2-9e33-4f10-8a77-6b2c4d1e9f08",
                                        "moderation_status": "spam"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/posts/{uuid}/vote": {
            "post": {
                "operationId": "flowsaas.flowsaas-posts-vote-store",
                "summary": "Vote for an idea",
                "description": "Casts a vote on behalf of the user of the API key. A second vote by the same person is not an error: added is then false and the count stays the same.",
                "tags": [
                    "flowsaas.posts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "added": true,
                                        "votes_count": 43
                                    },
                                    "message": "Stimme abgegeben."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowsaas.flowsaas-posts-vote-destroy",
                "summary": "Withdraw a vote",
                "description": "Withdraws the vote of the user of the API key. If there was none, removed is false.",
                "tags": [
                    "flowsaas.posts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "removed": true,
                                        "votes_count": 42
                                    },
                                    "message": "Stimme zurückgezogen."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/posts/{uuid}/toggle-private": {
            "post": {
                "operationId": "flowsaas.flowsaas-posts-toggle-private",
                "summary": "Hide or show an idea",
                "description": "Flips the visibility for portal visitors and reports the change to the portal webhooks.",
                "tags": [
                    "flowsaas.posts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "c1b5a0d2-9e33-4f10-8a77-6b2c4d1e9f08",
                                        "is_private": true,
                                        "is_public": false
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/posts/{uuid}/merge": {
            "post": {
                "operationId": "flowsaas.flowsaas-posts-merge",
                "summary": "Merge an idea as a duplicate",
                "description": "Merges the idea from the path into the given target idea of the same portal. Votes and public comments move along; internal notes stay with the duplicate. The response shows the target idea.",
                "tags": [
                    "flowsaas.posts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "d3e5f7a9-0b2c-4d6e-8f01-234567890abc",
                                        "votes_count": 45
                                    },
                                    "message": "Als Duplikat zusammengeführt."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "master_post_uuid": {
                                        "type": "string",
                                        "description": "The idea that remains. Must belong to the same portal and be a different idea."
                                    }
                                },
                                "required": [
                                    "master_post_uuid"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/posts/{uuid}/promote-to-roadmap": {
            "post": {
                "operationId": "flowsaas.flowsaas-posts-promote-to-roadmap",
                "summary": "Put an idea on the roadmap",
                "description": "Creates a roadmap item for the idea and marks it accordingly. If it is already on the roadmap, the route responds with HTTP 422 and error already_on_roadmap.",
                "tags": [
                    "flowsaas.posts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "5f1e7b90-2c44-4a19-9f3d-7c8b1a2e6d05",
                                        "post_uuid": "c1b5a0d2-9e33-4f10-8a77-6b2c4d1e9f08",
                                        "title": "Dunkelmodus",
                                        "sort_order": 0
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/posts/{uuid}/similar": {
            "get": {
                "operationId": "flowsaas.flowsaas-posts-similar",
                "summary": "Get similar ideas",
                "description": "Up to ten approved, not completed ideas of the same portal with similar wording, those with the most votes first. The idea itself is not included. The same search the portal offers while someone is writing.",
                "tags": [
                    "flowsaas.posts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "d3e5f7a9-0b2c-4d6e-8f01-234567890abc",
                                            "title": "Dunkelmodus wäre schön",
                                            "votes_count": 12
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/posts/{uuid}/comments": {
            "get": {
                "operationId": "flowsaas.flowsaas-posts-comments-index",
                "summary": "List the comments of an idea",
                "description": "All comments of the idea, oldest first, including internal notes and waiting posts.",
                "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 or spam.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "is_internal",
                        "in": "query",
                        "required": false,
                        "description": "Only internal notes or only public comments.",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Items per page, 1 to 200, default 50.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, default 1.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowsaas.flowsaas-posts-comments-store",
                "summary": "Write a comment",
                "description": "Writes a comment on behalf of the user of the API key. It counts as approved straight away. A parent comment must belong to the same idea, otherwise the route responds with HTTP 422 and error parent_not_in_post.",
                "tags": [
                    "flowsaas.comments"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "7a9c1e35-4d68-4b02-9e7a-3f5c1d8b0e24",
                                        "body": "Danke für den Hinweis.",
                                        "is_internal": false,
                                        "moderation_status": "approved"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "body": {
                                        "type": "string",
                                        "description": "The text of the comment, at most 2000 characters."
                                    },
                                    "is_internal": {
                                        "type": "boolean",
                                        "description": "true turns it into a team note. Default false, so publicly visible."
                                    },
                                    "parent_comment_uuid": {
                                        "type": "string",
                                        "description": "The comment being replied to. Must belong to this idea."
                                    }
                                },
                                "required": [
                                    "body"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/comments/{uuid}/reply": {
            "post": {
                "operationId": "flowsaas.flowsaas-comments-reply",
                "summary": "Reply to a comment",
                "description": "Replies to the comment in the path. The idea follows from this comment, so a reply can never end up in someone else's thread.",
                "tags": [
                    "flowsaas.comments"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "8b0d2f46-5e79-4c13-8f0b-4a6d2e9c1f35",
                                        "parent_comment_uuid": "7a9c1e35-4d68-4b02-9e7a-3f5c1d8b0e24",
                                        "body": "Wir melden uns."
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "body": {
                                        "type": "string",
                                        "description": "The text of the reply, at most 2000 characters."
                                    },
                                    "is_internal": {
                                        "type": "boolean",
                                        "description": "true turns it into a team note."
                                    }
                                },
                                "required": [
                                    "body"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/comments/{uuid}/approve": {
            "post": {
                "operationId": "flowsaas.flowsaas-comments-approve",
                "summary": "Approve a comment",
                "description": "Approves a waiting comment for the portal and notifies its author. Requires the manager permission.",
                "tags": [
                    "flowsaas.comments"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "7a9c1e35-4d68-4b02-9e7a-3f5c1d8b0e24",
                                        "moderation_status": "approved"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/comments/{uuid}/reject": {
            "post": {
                "operationId": "flowsaas.flowsaas-comments-reject",
                "summary": "Reject a comment",
                "description": "Rejects a comment and notifies its author. Requires the manager permission.",
                "tags": [
                    "flowsaas.comments"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "7a9c1e35-4d68-4b02-9e7a-3f5c1d8b0e24",
                                        "moderation_status": "rejected"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/comments/{uuid}/spam": {
            "post": {
                "operationId": "flowsaas.flowsaas-comments-spam",
                "summary": "Mark a comment as spam",
                "description": "Marks a comment as spam without notifying anyone. Requires the manager permission.",
                "tags": [
                    "flowsaas.comments"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "7a9c1e35-4d68-4b02-9e7a-3f5c1d8b0e24",
                                        "moderation_status": "spam"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/comments/{uuid}/moderation": {
            "put": {
                "operationId": "flowsaas.flowsaas-comments-moderation-update",
                "summary": "Set the moderation state of a comment",
                "description": "Sets the state explicitly. Unlike the three shortcuts, this endpoint also reaches pending and so puts a comment back into the queue. Requires the manager permission.",
                "tags": [
                    "flowsaas.comments"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "7a9c1e35-4d68-4b02-9e7a-3f5c1d8b0e24",
                                        "moderation_status": "pending"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "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 or spam."
                                    }
                                },
                                "required": [
                                    "moderation_status"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/roadmap-items": {
            "get": {
                "operationId": "flowsaas.flowsaas-roadmap-items-index",
                "summary": "List roadmap items",
                "description": "The roadmap items of all of the team's portals in their published order.",
                "tags": [
                    "flowsaas.roadmap"
                ],
                "parameters": [
                    {
                        "name": "portal_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Limit to one portal.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "status_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Only items in this column.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Items per page, 1 to 200, default 50.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, default 1.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/roadmap-items/{uuid}": {
            "get": {
                "operationId": "flowsaas.flowsaas-roadmap-items-show",
                "summary": "Get a roadmap item",
                "description": "A roadmap item with the title, column and vote count of the idea behind it.",
                "tags": [
                    "flowsaas.roadmap"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "5f1e7b90-2c44-4a19-9f3d-7c8b1a2e6d05",
                                        "title": "Dunkelmodus",
                                        "status_name": "In Arbeit",
                                        "votes_count": 42
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowsaas.flowsaas-roadmap-items-update",
                "summary": "Change the position of a roadmap item",
                "description": "Changes only the position within the current column. To change the column, use the move endpoint.",
                "tags": [
                    "flowsaas.roadmap"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "5f1e7b90-2c44-4a19-9f3d-7c8b1a2e6d05",
                                        "sort_order": 4
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "sort_order": {
                                        "type": "integer",
                                        "description": "New position, starting at 0."
                                    }
                                },
                                "required": [
                                    "sort_order"
                                ]
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowsaas.flowsaas-roadmap-items-destroy",
                "summary": "Remove a roadmap item",
                "description": "Takes the item off the roadmap. The idea remains with its votes and comments and only loses its roadmap flag. Requires the manager permission.",
                "tags": [
                    "flowsaas.roadmap"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Roadmap-Eintrag entfernt."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/roadmap-items/{uuid}/move": {
            "post": {
                "operationId": "flowsaas.flowsaas-roadmap-items-move",
                "summary": "Move a roadmap item",
                "description": "Moves the item to another column and to a position within it. This is a status change of the idea: it writes history, triggers the webhooks and notifies the supporters. The other items of the target column are renumbered.",
                "tags": [
                    "flowsaas.roadmap"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "5f1e7b90-2c44-4a19-9f3d-7c8b1a2e6d05",
                                        "status_name": "In Arbeit",
                                        "sort_order": 0
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "status_uuid": {
                                        "type": "string",
                                        "description": "The target column, a status of the same portal."
                                    },
                                    "sort_order": {
                                        "type": "integer",
                                        "description": "Position in the target column, starting at 0."
                                    }
                                },
                                "required": [
                                    "status_uuid",
                                    "sort_order"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/roadmap-items/{uuid}/vote": {
            "post": {
                "operationId": "flowsaas.flowsaas-roadmap-items-vote",
                "summary": "Vote for a roadmap item",
                "description": "The vote goes to the idea behind the item, because that is where the roadmap keeps its counts. A second vote by the same person is not an error.",
                "tags": [
                    "flowsaas.roadmap"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "added": true,
                                        "votes_count": 43
                                    },
                                    "message": "Stimme abgegeben."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/portals/{uuid}/webhooks": {
            "get": {
                "operationId": "flowsaas.flowsaas-portals-webhooks-index",
                "summary": "List a portal's webhooks",
                "description": "All webhooks of the portal, newest first, each without its secret.",
                "tags": [
                    "flowsaas.webhooks"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowsaas.flowsaas-portals-webhooks-store",
                "summary": "Create a webhook",
                "description": "Registers a webhook on the portal. The response contains the secret for signature verification once. Requires the manager permission.",
                "tags": [
                    "flowsaas.webhooks"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "url": {
                                        "type": "string",
                                        "description": "The delivery target address."
                                    },
                                    "events": {
                                        "type": "array",
                                        "items": [],
                                        "description": "At least one of post.created, post.status_changed, post.updated, comment.created, vote.created."
                                    },
                                    "secret": {
                                        "type": "string",
                                        "description": "Your own secret, at least 16 characters. One is generated if omitted."
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "Whether deliveries start right away. Default true."
                                    }
                                },
                                "required": [
                                    "url",
                                    "events"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/webhooks/{uuid}": {
            "get": {
                "operationId": "flowsaas.flowsaas-webhooks-show",
                "summary": "Get a webhook",
                "description": "A webhook with its target address, subscribed events and the time of the last successful delivery. The secret is not included.",
                "tags": [
                    "flowsaas.webhooks"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "e4f6a8b0-2c4d-4e6f-8091-a2b3c4d5e6f7",
                                        "url": "https://example.com/hooks/flowsaas",
                                        "events": [
                                            "post.created"
                                        ],
                                        "is_active": true
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowsaas.flowsaas-webhooks-update",
                "summary": "Update a webhook",
                "description": "Changes the fields sent. Without secret the stored secret stays the same, so a change of address does not break signature verification at the receiver. Requires the manager permission.",
                "tags": [
                    "flowsaas.webhooks"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "e4f6a8b0-2c4d-4e6f-8091-a2b3c4d5e6f7",
                                        "url": "https://example.com/hooks/neu",
                                        "is_active": false
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "url": {
                                        "type": "string",
                                        "description": "New target address."
                                    },
                                    "events": {
                                        "type": "array",
                                        "items": [],
                                        "description": "The events that should apply afterwards."
                                    },
                                    "secret": {
                                        "type": "string",
                                        "description": "New secret, at least 16 characters. Not returned."
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "Switch deliveries on or off."
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowsaas.flowsaas-webhooks-destroy",
                "summary": "Delete a webhook",
                "description": "Deletes the webhook together with its delivery log. Requires the manager permission.",
                "tags": [
                    "flowsaas.webhooks"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Webhook gelöscht."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/webhooks/{uuid}/test": {
            "post": {
                "operationId": "flowsaas.flowsaas-webhooks-test",
                "summary": "Send a test delivery",
                "description": "Sends a signed test message to the stored address and reports the result. A receiver that responds with an error is a successful call with an unsuccessful result: delivered is then false. Requires the manager permission.",
                "tags": [
                    "flowsaas.webhooks"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "delivered": true,
                                        "http_status": 200,
                                        "response_body": "ok"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/webhooks/{uuid}/logs": {
            "get": {
                "operationId": "flowsaas.flowsaas-webhooks-logs",
                "summary": "Get the delivery log",
                "description": "The webhook's delivery attempts, newest first, each with the payload sent and the receiver's response.",
                "tags": [
                    "flowsaas.webhooks"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "event_type",
                        "in": "query",
                        "required": false,
                        "description": "Limit to one event, for example post.created.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "succeeded",
                        "in": "query",
                        "required": false,
                        "description": "Only successful or only unsuccessful deliveries.",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Items per page, 1 to 200, default 50.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, default 1.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/subscribers": {
            "get": {
                "operationId": "flowsend.subscribers-list",
                "summary": "List subscribers",
                "description": "Returns a paginated list of all subscribers.",
                "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": "Exact filter on the normalised email address",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Search term (email, name, phone)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "lists[]",
                        "in": "query",
                        "required": false,
                        "description": "Array of list UUIDs",
                        "schema": {
                            "type": "array",
                            "items": []
                        }
                    },
                    {
                        "name": "tags[]",
                        "in": "query",
                        "required": false,
                        "description": "Array of tag UUIDs",
                        "schema": {
                            "type": "array",
                            "items": []
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Number per page (1-200, default: 50)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "550e8400-...",
                                        "email": "max@example.com",
                                        "firstname": "Max",
                                        "lastname": "Doe",
                                        "full_name": "John Doe",
                                        "status": "subscribed",
                                        "source": "api",
                                        "lists": [
                                            {
                                                "uuid": "...",
                                                "title": "Newsletter"
                                            }
                                        ],
                                        "tags": [
                                            {
                                                "uuid": "...",
                                                "title": "VIP-Kunde"
                                            }
                                        ],
                                        "created_at": "2024-01-15T10:30:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowsend.subscribers-create",
                "summary": "Create a subscriber",
                "description": "Creates a new subscriber.",
                "tags": [
                    "flowsend.subscribers"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "email": {
                                        "type": "string",
                                        "description": "Email address of the subscriber"
                                    },
                                    "prefix": {
                                        "type": "string",
                                        "description": "Salutation (for example Herr, Frau)"
                                    },
                                    "firstname": {
                                        "type": "string",
                                        "description": "First name"
                                    },
                                    "lastname": {
                                        "type": "string",
                                        "description": "Last name"
                                    },
                                    "phone": {
                                        "type": "string",
                                        "description": "Phone number"
                                    },
                                    "status": {
                                        "type": "string",
                                        "description": "Status (default: subscribed)"
                                    },
                                    "lists": {
                                        "type": "array",
                                        "items": [],
                                        "description": "List of list UUIDs"
                                    },
                                    "tags": {
                                        "type": "array",
                                        "items": [],
                                        "description": "List of tag UUIDs"
                                    },
                                    "meta": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Meta data as an array of {key, value} objects"
                                    }
                                },
                                "required": [
                                    "email"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/subscribers/by-client/{client_uuid}": {
            "get": {
                "operationId": "flowsend.subscribers-preview-client",
                "summary": "Check the subscriber for a CRM customer",
                "description": "Requires FlowSend and FlowCRM access. Runs the same customer matching as PUT without saving any changes. Returns the existing UUID, tags and lists, also when an allowed address change applies. If a new subscriber would be created, uuid is null. Protected address changes and matching conflicts return 409; missing, deleted or anonymised customers return 404.",
                "tags": [
                    "flowsend.subscribers"
                ],
                "parameters": [
                    {
                        "name": "client_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowsend.subscribers-upsert-client",
                "summary": "Sync the subscriber for a CRM customer",
                "description": "Requires FlowSend and FlowCRM access. Resolves the current primary address of a CRM customer of the same team. Repeated calls return the same subscriber: 201 when it is created, 200 when it is reused. Unclear matches or protected address changes return 409; missing, deleted or anonymised customers return 404. Lists, tags and existing newsletter statuses are not reset. The request needs no body.",
                "tags": [
                    "flowsend.subscribers"
                ],
                "parameters": [
                    {
                        "name": "client_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/subscribers/{uuid}": {
            "get": {
                "operationId": "flowsend.subscribers-show",
                "summary": "Get a subscriber",
                "description": "Returns the details of a single subscriber.",
                "tags": [
                    "flowsend.subscribers"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowsend.subscribers-update",
                "summary": "Update a subscriber",
                "description": "Updates an existing subscriber.",
                "tags": [
                    "flowsend.subscribers"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "email": {
                                        "type": "string",
                                        "description": "Email address"
                                    },
                                    "firstname": {
                                        "type": "string",
                                        "description": "First name"
                                    },
                                    "lastname": {
                                        "type": "string",
                                        "description": "Last name"
                                    },
                                    "status": {
                                        "type": "string",
                                        "description": "Status (subscribed, unsubscribed)"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowsend.subscribers-delete",
                "summary": "Delete a subscriber",
                "description": "Deletes a subscriber permanently.",
                "tags": [
                    "flowsend.subscribers"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/subscribers/{uuid}/lists": {
            "put": {
                "operationId": "flowsend.subscribers-sync-lists",
                "summary": "Sync subscriber lists",
                "description": "Replaces all list assignments of the subscriber (full synchronisation).",
                "tags": [
                    "flowsend.subscribers"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "list_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "List of list UUIDs (replaces existing assignments)"
                                    }
                                },
                                "required": [
                                    "list_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/subscribers/{uuid}/resend-double-opt-in": {
            "post": {
                "operationId": "flowsend.subscribers-resend-double-opt-in",
                "summary": "Resend the double opt-in email",
                "description": "Sends the double opt-in confirmation email again and creates a fresh confirmation link. Only useful for subscribers who have not confirmed yet; a subscriber who has already confirmed returns 422. Whether a subscriber is waiting for confirmation is shown in the double_opt_in.awaiting_confirmation field of the subscriber response. The request needs no body.",
                "tags": [
                    "flowsend.subscribers"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/subscribers/{uuid}/tags": {
            "put": {
                "operationId": "flowsend.subscribers-sync-tags",
                "summary": "Sync subscriber tags",
                "description": "Replaces all tag assignments of the subscriber (full synchronisation).",
                "tags": [
                    "flowsend.subscribers"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "tag_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "List of tag UUIDs (replaces existing assignments)"
                                    }
                                },
                                "required": [
                                    "tag_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/subscribers/bulk/add-to-lists": {
            "post": {
                "operationId": "flowsend.bulk-add-to-lists",
                "summary": "Add subscribers to lists",
                "description": "Adds several subscribers to several lists at once. This applies regardless of status, including unsubscribed, bounced and complained: the status stays unchanged, and campaigns still reach only subscribed. affected_count counts all subscribers found.",
                "tags": [
                    "flowsend.subscribers-bulk"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "subscriber_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "UUIDs of the subscribers"
                                    },
                                    "list_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "UUIDs of the target lists"
                                    }
                                },
                                "required": [
                                    "subscriber_uuids",
                                    "list_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/subscribers/bulk/add-tags": {
            "post": {
                "operationId": "flowsend.bulk-add-tags",
                "summary": "Add tags to subscribers",
                "description": "Assigns several tags to several subscribers at once. This applies regardless of status, including unsubscribed, bounced and complained: the status stays unchanged, and campaigns still reach only subscribed. affected_count counts all subscribers found.",
                "tags": [
                    "flowsend.subscribers-bulk"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "subscriber_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "UUIDs of the subscribers"
                                    },
                                    "tag_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "UUIDs of the target tags"
                                    }
                                },
                                "required": [
                                    "subscriber_uuids",
                                    "tag_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/subscribers/bulk/remove-from-lists": {
            "post": {
                "operationId": "flowsend.bulk-remove-from-lists",
                "summary": "Remove subscribers from lists",
                "description": "Removes several subscribers from several lists at once.",
                "tags": [
                    "flowsend.subscribers-bulk"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "subscriber_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "UUIDs of the subscribers"
                                    },
                                    "list_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "UUIDs of the lists"
                                    }
                                },
                                "required": [
                                    "subscriber_uuids",
                                    "list_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/subscribers/bulk/remove-tags": {
            "post": {
                "operationId": "flowsend.bulk-remove-tags",
                "summary": "Remove tags from subscribers",
                "description": "Removes several tags from several subscribers at once.",
                "tags": [
                    "flowsend.subscribers-bulk"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "subscriber_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "UUIDs of the subscribers"
                                    },
                                    "tag_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "UUIDs of the tags"
                                    }
                                },
                                "required": [
                                    "subscriber_uuids",
                                    "tag_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/subscribers/bulk/delete": {
            "post": {
                "operationId": "flowsend.bulk-delete",
                "summary": "Bulk delete subscribers",
                "description": "Deletes several subscribers at once. This action cannot be undone.",
                "tags": [
                    "flowsend.subscribers-bulk"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "subscriber_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "UUIDs of the subscribers to delete"
                                    }
                                },
                                "required": [
                                    "subscriber_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/subscribers/bulk/status": {
            "post": {
                "operationId": "flowsend.bulk-status",
                "summary": "Change the status of several subscribers",
                "description": "Sets the status of several subscribers at once. Only subscribed and pending are allowed. Subscribers who are already unsubscribed, bounced or complained stay unchanged: these states come from the recipient's own decision or from the sending service and are never overwritten. The response contains selected_count, affected_count and skipped_count.",
                "tags": [
                    "flowsend.subscribers-bulk"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "subscriber_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "UUIDs of the subscribers to change (1 to 500)"
                                    },
                                    "status": {
                                        "type": "string",
                                        "description": "New status: subscribed or pending"
                                    }
                                },
                                "required": [
                                    "subscriber_uuids",
                                    "status"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/lists": {
            "get": {
                "operationId": "flowsend.lists-list",
                "summary": "List lists",
                "description": "Returns all lists, including the number of subscribers.",
                "tags": [
                    "flowsend.lists"
                ],
                "parameters": [
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Entries per page (1 to 500, default 500). The response also contains a <code>meta</code> block with <code>current_page</code>, <code>per_page</code>, <code>total</code> and <code>last_page</code>.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, starting at 1",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowsend.lists-create",
                "summary": "Create a list",
                "description": "Creates a new list.",
                "tags": [
                    "flowsend.lists"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "description": "Name of the list"
                                    },
                                    "slug": {
                                        "type": "string",
                                        "description": "URL slug (optional, generated automatically)"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Description of the list"
                                    }
                                },
                                "required": [
                                    "title"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/lists/{uuid}": {
            "get": {
                "operationId": "flowsend.lists-show",
                "summary": "Get list details",
                "description": "Returns the details of a specific list.",
                "tags": [
                    "flowsend.lists"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowsend.lists-update",
                "summary": "Update a list",
                "description": "Updates an existing list.",
                "tags": [
                    "flowsend.lists"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "description": "Name of the list"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Description"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowsend.lists-delete",
                "summary": "Delete a list",
                "description": "Deletes a list. Subscribers on this list are not deleted.",
                "tags": [
                    "flowsend.lists"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/lists/{uuid}/subscribers": {
            "get": {
                "operationId": "flowsend.lists-subscribers",
                "summary": "Subscribers of a list",
                "description": "Lists the subscribers of the list page by page. The response contains a meta block with the paging details.",
                "tags": [
                    "flowsend.lists"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Entries per page (1 to 200, default 50)",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, starting at 1",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowsend.lists-add-subscribers",
                "summary": "Add subscribers to the list",
                "description": "Adds existing subscribers to the list. Subscribers already on it stay unchanged; unknown UUIDs or UUIDs of another team are skipped.",
                "tags": [
                    "flowsend.lists"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "subscriber_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "UUIDs of the subscribers to add"
                                    }
                                },
                                "required": [
                                    "subscriber_uuids"
                                ]
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowsend.lists-remove-subscribers",
                "summary": "Remove subscribers from the list",
                "description": "Removes the given subscribers from this list. The subscribers themselves, their status and their other lists and tags stay unchanged: being removed from a list is not the same as unsubscribing. Unknown UUIDs or UUIDs of another team are skipped; removed_count gives the number of assignments actually removed.",
                "tags": [
                    "flowsend.lists"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "subscriber_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "UUIDs of the subscribers to remove (1 to 500)"
                                    }
                                },
                                "required": [
                                    "subscriber_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/tags": {
            "get": {
                "operationId": "flowsend.tags-list",
                "summary": "List tags",
                "description": "Returns all tags, including the number of subscribers.",
                "tags": [
                    "flowsend.tags"
                ],
                "parameters": [
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Entries per page (1 to 500, default 500). The response also contains a <code>meta</code> block with <code>current_page</code>, <code>per_page</code>, <code>total</code> and <code>last_page</code>.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, starting at 1",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowsend.tags-create",
                "summary": "Create a tag",
                "description": "Creates a new tag.",
                "tags": [
                    "flowsend.tags"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "description": "Name of the tag"
                                    },
                                    "slug": {
                                        "type": "string",
                                        "description": "URL slug (optional, generated automatically)"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Description of the tag"
                                    }
                                },
                                "required": [
                                    "title"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/tags/{uuid}": {
            "get": {
                "operationId": "flowsend.tags-show",
                "summary": "Get tag details",
                "description": "Returns the details of a specific tag.",
                "tags": [
                    "flowsend.tags"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowsend.tags-update",
                "summary": "Update a tag",
                "description": "Updates an existing tag.",
                "tags": [
                    "flowsend.tags"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "description": "Name of the tag"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Description"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowsend.tags-delete",
                "summary": "Delete a tag",
                "description": "Deletes a tag. Subscribers with this tag lose the assignment.",
                "tags": [
                    "flowsend.tags"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/tags/{uuid}/subscribers": {
            "get": {
                "operationId": "flowsend.tags-subscribers",
                "summary": "Subscribers of a tag",
                "description": "Lists the subscribers with this tag page by page. The response contains a meta block with the paging details.",
                "tags": [
                    "flowsend.tags"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Entries per page (1 to 200, default 50)",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, starting at 1",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/campaigns": {
            "get": {
                "operationId": "flowsend.campaigns-list",
                "summary": "List campaigns",
                "description": "Returns the team's campaigns page by page, newest first. The response contains a meta block with the paging details.",
                "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": "Search term in name and subject",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Entries per page (1 to 200, default 25)",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, starting at 1",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowsend.campaigns-create",
                "summary": "Create a campaign",
                "description": "Creates a campaign as a draft. The content is a Templatical document in content_json; it is validated against the schema and sanitised before anything is saved. FlowSend generates content_html itself and does not accept it. With template_uuid the draft starts from a visible template; content sent explicitly takes precedence. To change single blocks afterwards, use POST /campaigns/{uuid}/content/operations.",
                "tags": [
                    "flowsend.campaigns"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Internal name of the campaign"
                                    },
                                    "subject": {
                                        "type": "string",
                                        "description": "Subject line"
                                    },
                                    "preview_text": {
                                        "type": "string",
                                        "description": "Preview text in the inbox. It is copied into the content as the preheader (settings.preheaderText) and follows its changes."
                                    },
                                    "from_name": {
                                        "type": "string",
                                        "description": "Sender name"
                                    },
                                    "from_email": {
                                        "type": "string",
                                        "description": "Sender address; must match the verified sender domain"
                                    },
                                    "editor_type": {
                                        "type": "string",
                                        "description": "Only visual is accepted; other values return 422"
                                    },
                                    "content_json": {
                                        "type": "object",
                                        "description": "Templatical document {\"blocks\": [...], \"settings\": {...}}, as an object or a JSON string. It is validated against the Templatical schema; the old builder format (root/childrenIds) returns 422 legacy_content_format."
                                    },
                                    "template_uuid": {
                                        "type": "string",
                                        "description": "UUID of an own or system template whose content is used"
                                    },
                                    "list_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "UUIDs of the recipient lists"
                                    },
                                    "include_tag_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "UUIDs of the tags to include"
                                    },
                                    "exclude_tag_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "UUIDs of the tags to exclude"
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/campaigns/{uuid}": {
            "get": {
                "operationId": "flowsend.campaigns-show",
                "summary": "Get a campaign",
                "description": "Returns the campaign with its content, recipient selection, statistics and the blockers list. An empty blockers means the campaign is ready to send; current_recipients gives the current reach. content.content_json is always a Templatical document (object), content.revision the current revision and content.content_html the preview generated from it.",
                "tags": [
                    "flowsend.campaigns"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowsend.campaigns-update",
                "summary": "Update a campaign",
                "description": "Changes a draft. Only campaigns in the states draft, scheduled and failed can be changed; everything else is send history and returns 422. Omitted fields keep their value; an empty list_uuids clears the list selection. A content_json sent along replaces the whole document; the previous state is saved as a version and open editors reload. For single blocks, POST /campaigns/{uuid}/content/operations is the better choice.",
                "tags": [
                    "flowsend.campaigns"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Internal name"
                                    },
                                    "subject": {
                                        "type": "string",
                                        "description": "Subject line"
                                    },
                                    "preview_text": {
                                        "type": "string",
                                        "description": "Preview text in the inbox. It is copied into the content as the preheader (settings.preheaderText) and follows its changes."
                                    },
                                    "from_name": {
                                        "type": "string",
                                        "description": "Sender name"
                                    },
                                    "from_email": {
                                        "type": "string",
                                        "description": "Sender address"
                                    },
                                    "editor_type": {
                                        "type": "string",
                                        "description": "Only visual is accepted; other values return 422"
                                    },
                                    "content_json": {
                                        "type": "object",
                                        "description": "Templatical document {\"blocks\": [...], \"settings\": {...}}, as an object or a JSON string. It is validated against the Templatical schema; the old builder format (root/childrenIds) returns 422 legacy_content_format."
                                    },
                                    "list_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Replaces the list selection"
                                    },
                                    "include_tag_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Replaces the included tags"
                                    },
                                    "exclude_tag_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Replaces the excluded tags"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowsend.campaigns-delete",
                "summary": "Delete a campaign",
                "description": "Deletes a campaign. Only drafts and cancelled campaigns can be deleted; a sent campaign is send history and returns 422.",
                "tags": [
                    "flowsend.campaigns"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/campaigns/{uuid}/duplicate": {
            "post": {
                "operationId": "flowsend.campaigns-duplicate",
                "summary": "Duplicate a campaign",
                "description": "Creates a copy with content and recipient selection as a new draft. Send time, counters and send history are not copied. The request needs no body.",
                "tags": [
                    "flowsend.campaigns"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/campaigns/{uuid}/send-test": {
            "post": {
                "operationId": "flowsend.campaigns-send-test",
                "summary": "Send a test email",
                "description": "Sends the campaign to up to five test addresses. The recipient selection is ignored and the campaign's counters stay untouched. The response has a separate result for each address, because the sending service may accept one and reject another; if at least one fails, the response is 422.",
                "tags": [
                    "flowsend.campaigns"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "emails": {
                                        "type": "array",
                                        "items": [],
                                        "description": "One to five test addresses"
                                    },
                                    "subscriber_uuid": {
                                        "type": "string",
                                        "description": "UUID of a real subscriber whose data fills the placeholders"
                                    }
                                },
                                "required": [
                                    "emails"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/campaigns/{uuid}/send": {
            "post": {
                "operationId": "flowsend.campaigns-send",
                "summary": "Send a campaign now",
                "description": "Puts the campaign into sending immediately. If it is not ready to send, the endpoint returns 422 and a blockers list naming each reason separately, for example a missing subject, missing content, a missing list or an exceeded monthly limit. The request needs no body.",
                "tags": [
                    "flowsend.campaigns"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/campaigns/{uuid}/schedule": {
            "post": {
                "operationId": "flowsend.campaigns-schedule",
                "summary": "Schedule a campaign",
                "description": "Schedules sending for a time in the future. The same readiness check as for immediate sending runs, and any obstacle is answered with 422 and blockers.",
                "tags": [
                    "flowsend.campaigns"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "scheduled_at": {
                                        "type": "string",
                                        "description": "Send time as date and time; must be in the future"
                                    }
                                },
                                "required": [
                                    "scheduled_at"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/campaigns/{uuid}/cancel": {
            "post": {
                "operationId": "flowsend.campaigns-cancel",
                "summary": "Cancel sending",
                "description": "Cancels a scheduled or running campaign. A campaign that is neither scheduled nor sending returns 422. Emails already delivered cannot be recalled. The request needs no body.",
                "tags": [
                    "flowsend.campaigns"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/campaigns/{uuid}/recipients": {
            "get": {
                "operationId": "flowsend.campaigns-recipients",
                "summary": "Campaign recipients",
                "description": "Returns, page by page, the recipients the campaign would reach with the current selection. It is the same query that sending uses, so preview and sending cannot drift apart. The total is in the meta block as 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": "Entries per page (1 to 200, default 50)",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, starting at 1",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/campaigns/{uuid}/stats": {
            "get": {
                "operationId": "flowsend.campaigns-stats",
                "summary": "Campaign statistics",
                "description": "Returns delivery figures, opens, clicks, unsubscribes and bounces as well as the current reach and the blockers list.",
                "tags": [
                    "flowsend.campaigns"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/campaigns/{uuid}/events": {
            "get": {
                "operationId": "flowsend.campaigns-events",
                "summary": "Campaign delivery events",
                "description": "Lists the individual delivery events page by page, newest first. Each event gives its type, the time and the UUID of the recipient concerned.",
                "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": "Entries per page (1 to 200, default 50)",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, starting at 1",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/campaigns/{uuid}/content": {
            "get": {
                "operationId": "flowsend.campaigns-content",
                "summary": "Campaign: read the content block by block",
                "description": "Returns the Templatical document with revision, an overview of the settings and blocks: every block in reading order with block_id, type, position (parent with sectionId and column) and its content fields under their Templatical names. A legacy document is converted in memory. The mandatory footer with legal notice and unsubscribe link is not a block.",
                "tags": [
                    "flowsend.campaigns"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/campaigns/{uuid}/content/operations": {
            "post": {
                "operationId": "flowsend.campaigns-content-operations",
                "summary": "Campaign: change the content with operations",
                "description": "Applies a batch of Templatical operations: all or nothing, validated against the schema, sanitised and saved with a new revision. The previous state is saved as a version, and open editors show the change immediately. A rejection names the operation (opIndex from 0) and the reason: 409 for an unknown block, a missing anchor, an outdated expected_revision or a block someone is editing in the editor right now; 422 for an invalid operation. The response contains the new revision, the newly created blocks (created) and the block overview. Only campaigns in the states draft, scheduled and failed; via MCP only drafts.",
                "tags": [
                    "flowsend.campaigns"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "operations": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Templatical operations, applied in order and all or nothing: <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> (only with expected_revision). At most 80 per call. Blocks without an id get one from FlowSend."
                                    },
                                    "expected_revision": {
                                        "type": "integer",
                                        "description": "The revision the operations were planned on; if the current one differs, the response is 409 stale_revision. Required for setContent."
                                    }
                                },
                                "required": [
                                    "operations"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/templates": {
            "get": {
                "operationId": "flowsend.templates-list",
                "summary": "List templates",
                "description": "Lists your own templates and the shared system templates page by page.",
                "tags": [
                    "flowsend.templates"
                ],
                "parameters": [
                    {
                        "name": "scope",
                        "in": "query",
                        "required": false,
                        "description": "all (default), own or 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 (legacy templates not yet converted carry richtext or html)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "is_active",
                        "in": "query",
                        "required": false,
                        "description": "Filter by active or deactivated templates",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Search term in name and description",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Entries per page (1 to 200, default 25)",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, starting at 1",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowsend.templates-create",
                "summary": "Create a template",
                "description": "Creates a template of your own. The content is a Templatical document in content_json, which is validated against the schema and sanitised; the old builder format returns 422. content_html is the generated preview and read-only. HTML exports from other providers are imported in FlowSend with \"Import HTML\".",
                "tags": [
                    "flowsend.templates"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name of the template"
                                    },
                                    "category": {
                                        "type": "string",
                                        "description": "newsletter, welcome, announcement, promo or custom (default)"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Description"
                                    },
                                    "editor_type": {
                                        "type": "string",
                                        "description": "Only visual is accepted; other values return 422"
                                    },
                                    "content_json": {
                                        "type": "object",
                                        "description": "Templatical document {\"blocks\": [...], \"settings\": {...}}, as an object or a JSON string. It is validated against the Templatical schema; the old builder format (root/childrenIds) returns 422 legacy_content_format."
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "Whether the template appears in the selection (default: true)"
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/templates/{uuid}": {
            "get": {
                "operationId": "flowsend.templates-show",
                "summary": "Get a template",
                "description": "Returns an own or shared system template with its saved content. The editable field says whether the template may be changed.",
                "tags": [
                    "flowsend.templates"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowsend.templates-update",
                "summary": "Update a template",
                "description": "Changes a template of your own. A system template belongs to all teams and returns 422; duplicate it first. A content_json (Templatical) sent along replaces the whole document; the previous state is saved as a version first.",
                "tags": [
                    "flowsend.templates"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name of the template"
                                    },
                                    "category": {
                                        "type": "string",
                                        "description": "newsletter, welcome, announcement, promo or custom"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Description"
                                    },
                                    "editor_type": {
                                        "type": "string",
                                        "description": "Only visual is accepted; other values return 422"
                                    },
                                    "content_json": {
                                        "type": "object",
                                        "description": "Templatical document {\"blocks\": [...], \"settings\": {...}}, as an object or a JSON string. It is validated against the Templatical schema; the old builder format (root/childrenIds) returns 422 legacy_content_format."
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "Whether the template appears in the selection"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowsend.templates-delete",
                "summary": "Delete a template",
                "description": "Deletes a template of your own. System templates cannot be reached this way and return 404.",
                "tags": [
                    "flowsend.templates"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/templates/{uuid}/duplicate": {
            "post": {
                "operationId": "flowsend.templates-duplicate",
                "summary": "Duplicate a template",
                "description": "Creates a copy of your own from an own or shared system template, which you can change freely. The copy's thumbnail is created in the background. The request needs no body.",
                "tags": [
                    "flowsend.templates"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/templates/{uuid}/content": {
            "get": {
                "operationId": "flowsend.templates-content",
                "summary": "Template: read the content block by block",
                "description": "Returns the Templatical document with revision, an overview of the settings and blocks: every block in reading order with block_id, type, position (parent with sectionId and column) and its content fields under their Templatical names. A legacy document is converted in memory. The mandatory footer with legal notice and unsubscribe link is not a block.",
                "tags": [
                    "flowsend.templates"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/templates/{uuid}/content/operations": {
            "post": {
                "operationId": "flowsend.templates-content-operations",
                "summary": "Template: change the content with operations",
                "description": "Applies a batch of Templatical operations: all or nothing, validated against the schema, sanitised and saved with a new revision. The previous state is saved as a version, and open editors show the change immediately. A rejection names the operation (opIndex from 0) and the reason: 409 for an unknown block, a missing anchor, an outdated expected_revision or a block someone is editing in the editor right now; 422 for an invalid operation. The response contains the new revision, the newly created blocks (created) and the block overview. System templates return 422; duplicate them first.",
                "tags": [
                    "flowsend.templates"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "operations": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Templatical operations, applied in order and all or nothing: <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> (only with expected_revision). At most 80 per call. Blocks without an id get one from FlowSend."
                                    },
                                    "expected_revision": {
                                        "type": "integer",
                                        "description": "The revision the operations were planned on; if the current one differs, the response is 409 stale_revision. Required for setContent."
                                    }
                                },
                                "required": [
                                    "operations"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/sender-domains": {
            "get": {
                "operationId": "flowsend.sender-domains-list",
                "summary": "List the sender domain",
                "description": "Returns the configured sender domain as a list with zero or one entry, without querying the sending service.",
                "tags": [
                    "flowsend.sender-domains"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowsend.sender-domains-create",
                "summary": "Add a sender domain",
                "description": "Registers a sender domain with the sending service and returns the DNS records to publish. If a domain is already configured, the endpoint returns 422.",
                "tags": [
                    "flowsend.sender-domains"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "domain": {
                                        "type": "string",
                                        "description": "The domain, for example beispiel.de"
                                    }
                                },
                                "required": [
                                    "domain"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/sender-domains/current": {
            "get": {
                "operationId": "flowsend.sender-domains-show",
                "summary": "Get the sender domain",
                "description": "Returns the domain with its DNS records and asks the sending service for the current verification state. If the service cannot be reached, the stored state comes back with reachable: false.",
                "tags": [
                    "flowsend.sender-domains"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowsend.sender-domains-delete",
                "summary": "Remove the sender domain",
                "description": "Removes the sender domain. The local state is always deleted; whether the sending service released the domain as well is shown in the provider_removed field. If it is false, the domain must be removed at the service manually before it can be added again.",
                "tags": [
                    "flowsend.sender-domains"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/sender-domains/current/verify": {
            "post": {
                "operationId": "flowsend.sender-domains-verify",
                "summary": "Verify the sender domain",
                "description": "Asks the sending service to check the published DNS records again. The request needs no body.",
                "tags": [
                    "flowsend.sender-domains"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/context": {
            "get": {
                "operationId": "flowsend.context",
                "summary": "Get the context",
                "description": "Returns in one call everything you need to know before writing: the field contracts per record type, the allowed subscriber and campaign statuses, the protected consent states, the template categories, the double opt-in state, the sender domain and the monthly limit.",
                "tags": [
                    "flowsend.insights"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/limit": {
            "get": {
                "operationId": "flowsend.limit",
                "summary": "Get the monthly limit",
                "description": "Returns the monthly sending quota: limit, the sent emails already used, the remaining ones, the reached flag and the usage in percent.",
                "tags": [
                    "flowsend.insights"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/reports/overview": {
            "get": {
                "operationId": "flowsend.reports-overview",
                "summary": "Overview",
                "description": "Counts subscribers per status, lists, tags and campaigns per state, and gives the monthly limit.",
                "tags": [
                    "flowsend.insights"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/reports/audience": {
            "get": {
                "operationId": "flowsend.reports-audience",
                "summary": "Estimate the reach",
                "description": "Counts how many subscribers a selection of lists and tags actually reaches. It is the same query that sending uses: unsubscribed, undeliverable and not yet confirmed subscribers are not counted. Without a selection you get the number of all subscribed recipients.",
                "tags": [
                    "flowsend.insights"
                ],
                "parameters": [
                    {
                        "name": "list_uuids[]",
                        "in": "query",
                        "required": false,
                        "description": "UUIDs of the recipient lists",
                        "schema": {
                            "type": "array",
                            "items": []
                        }
                    },
                    {
                        "name": "include_tag_uuids[]",
                        "in": "query",
                        "required": false,
                        "description": "UUIDs of the tags to include",
                        "schema": {
                            "type": "array",
                            "items": []
                        }
                    },
                    {
                        "name": "exclude_tag_uuids[]",
                        "in": "query",
                        "required": false,
                        "description": "UUIDs of the tags to exclude",
                        "schema": {
                            "type": "array",
                            "items": []
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/context": {
            "get": {
                "operationId": "flowsupport.flowsupport-context",
                "summary": "Get inboxes, states and limits",
                "description": "Returns every reachable inbox with your own access level, its channel's capabilities, the connection state and the assignable team members per inbox, plus the four states of a conversation, the two share levels you can grant and the limits for file attachments.",
                "tags": [
                    "flowsupport.context"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/inboxes": {
            "get": {
                "operationId": "flowsupport.flowsupport-inboxes-index",
                "summary": "List inboxes",
                "description": "All inboxes this key reaches, with your own access level, the channel's capabilities, the connection state and whether you may send, share and manage.",
                "tags": [
                    "flowsupport.inboxes"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/inboxes/{uuid}": {
            "get": {
                "operationId": "flowsupport.flowsupport-inboxes-show",
                "summary": "Get an inbox",
                "description": "A single inbox with your own access level and, in addition, the team members who can be assigned in this inbox. An inbox without an access level answers with HTTP 404.",
                "tags": [
                    "flowsupport.inboxes"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "patch": {
                "operationId": "flowsupport.flowsupport-inboxes-update",
                "summary": "Rename an inbox",
                "description": "Changes the inbox's name and the address it shows as its own. Both fields are sent together: if the own address is missing, it is cleared. Requires the right to manage inboxes, even for the inbox owner; without this right the route answers with HTTP 403.",
                "tags": [
                    "flowsupport.inboxes"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f",
                                        "name": "Kundenservice",
                                        "own_number": "4915100000000",
                                        "status": "ready",
                                        "level": "owner"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "The name, at most 255 characters."
                                    },
                                    "own_address": {
                                        "type": "string",
                                        "description": "The inbox's own address, for WhatsApp the phone number, at most 20 characters. If the field is missing or empty, the address is cleared. own_number is accepted as an equivalent name."
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/inboxes/{uuid}/pacing": {
            "put": {
                "operationId": "flowsupport.flowsupport-inboxes-pacing",
                "summary": "Set an inbox's sending pace",
                "description": "Sets the wait time and the two hourly limits. The limits reject nothing; they decide how fast the queue is handed to the channel. All three values are sent together. Allowed for the inbox owner and anyone who may manage inboxes. If the inbox is in use right now, the route answers with HTTP 503 and the error code inbox_busy; the call can then be repeated.",
                "tags": [
                    "flowsupport.inboxes"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "outbound_wait_hours": {
                                        "type": "integer",
                                        "description": "How many hours an item waits for the channel before it expires. 1 to 168."
                                    },
                                    "max_new_chats_per_hour": {
                                        "type": "integer",
                                        "description": "How many new conversations the inbox starts per hour. 1 to 1000."
                                    },
                                    "max_messages_per_hour": {
                                        "type": "integer",
                                        "description": "How many messages the inbox hands over per hour. 1 to 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": "Get an inbox's label sync",
                "description": "The state of syncing labels with the channel: whether it is on, whether the account supports it and the label set has been read completely, and the number of pending, failed and conflicting transfers. Requires the same right as changing it.",
                "tags": [
                    "flowsupport.inboxes"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "enabled": false,
                                        "supported": true,
                                        "initialized": true,
                                        "resync_requested": false,
                                        "pending": 0,
                                        "failed": 0,
                                        "conflicts": 0
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowsupport.flowsupport-inbox-label-sync-update",
                "summary": "Turn label sync on or off",
                "description": "Turns syncing labels with the channel on or off. Turning it on for the first time merges the inbox's labels with those on the device and therefore requires device_verified. It can only be turned on once supported and initialized are true, and only with at most 20 labels. Turning it off discards pending transfers. Allowed for the inbox owner and anyone who may manage inboxes.",
                "tags": [
                    "flowsupport.inboxes"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "enabled": true,
                                        "supported": true,
                                        "initialized": true,
                                        "resync_requested": false,
                                        "pending": 4,
                                        "failed": 0,
                                        "conflicts": 0
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "enabled": {
                                        "type": "boolean",
                                        "description": "true turns syncing on, false turns it off."
                                    },
                                    "device_verified": {
                                        "type": "boolean",
                                        "description": "Confirms that the sync was checked on the device with the real account. Required when turning it on for the first time, otherwise without effect."
                                    }
                                },
                                "required": [
                                    "enabled"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/inboxes/{uuid}/shares": {
            "get": {
                "operationId": "flowsupport.flowsupport-inbox-shares-index",
                "summary": "List an inbox's shares",
                "description": "The access levels granted on an inbox. Reading this list requires the same right as changing it: whoever may not share does not learn who else has access either. The owner does not appear here; their level follows from the inbox itself.",
                "tags": [
                    "flowsupport.inboxes"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowsupport.flowsupport-inbox-shares-store",
                "summary": "Share an inbox",
                "description": "Shares the inbox with a team member at a level. A second share to the same person changes the level instead of creating a second row, and answers with HTTP 201 in both cases.",
                "tags": [
                    "flowsupport.inboxes"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "user_uuid": "3f8b1c6e-2d44-4a9b-8e77-5c1a0b9d3e22",
                                        "name": "Anna Berger",
                                        "level": "reply",
                                        "created_at": "2026-09-12T08:14:00+02:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "user_uuid": {
                                        "type": "string",
                                        "description": "UUID of the team member. A person outside the team leads to a validation error."
                                    },
                                    "level": {
                                        "type": "string",
                                        "description": "read or reply. owner cannot be granted."
                                    }
                                },
                                "required": [
                                    "user_uuid",
                                    "level"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/inboxes/{uuid}/shares/{userUuid}": {
            "delete": {
                "operationId": "flowsupport.flowsupport-inbox-shares-destroy",
                "summary": "Revoke a share",
                "description": "Removes a team member's access to the inbox. Revoking a share that does not exist is not an error.",
                "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": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Freigabe entzogen."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/inboxes/{uuid}/suspend": {
            "post": {
                "operationId": "flowsupport.flowsupport-inboxes-suspend",
                "summary": "Suspend an inbox",
                "description": "Ends receiving and visibility of the inbox. Messages, attachments and media stay unchanged; what is withdrawn is the view, not the data.",
                "tags": [
                    "flowsupport.inboxes"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Postfach stillgelegt."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/inboxes/{uuid}/request-deletion": {
            "post": {
                "operationId": "flowsupport.flowsupport-inboxes-request-deletion",
                "summary": "Mark an inbox for deletion",
                "description": "Marks the inbox with all its messages and media for deletion. This step cannot be undone via the API.",
                "tags": [
                    "flowsupport.inboxes"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Postfach zur Löschung vorgemerkt."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/conversations": {
            "get": {
                "operationId": "flowsupport.flowsupport-conversations-index",
                "summary": "List conversations",
                "description": "The conversations of all reachable inboxes, most recent activity first. Without a filter the list covers every inbox this key sees.",
                "tags": [
                    "flowsupport.conversations"
                ],
                "parameters": [
                    {
                        "name": "inbox_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Limit to one inbox.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "open, in_progress, waiting or done.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "assigned_user_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Only conversations of this team member.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "label_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Only conversations with this label.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Searches the conversation name and the counterpart's name and phone number.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "unread",
                        "in": "query",
                        "required": false,
                        "description": "Only conversations with unread incoming messages.",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Items per page, 1 to 200, default 50.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, default 1.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowsupport.flowsupport-conversations-store",
                "summary": "Start a conversation with a phone number",
                "description": "Opens a conversation with a phone number that has not written to us. Three outcomes: HTTP 200 with the existing conversation, HTTP 201 with the newly opened conversation, or HTTP 202 with a lookup if the phone number first has to be checked with WhatsApp by the listener. If the inbox is not connected, its hourly limit for new chats is used up or WhatsApp's own quota is reached, nothing is rejected: the conversation is created right away and returned with HTTP 202 together with `queued: true` and `estimated_start_at`; check and sending wait in the inbox's queue. An unreadable, unreachable or ambiguous phone number answers with HTTP 422.",
                "tags": [
                    "flowsupport.conversations"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "inbox_uuid": {
                                        "type": "string",
                                        "description": "The inbox to write from. Requires the permission to send."
                                    },
                                    "phone": {
                                        "type": "string",
                                        "description": "The phone number as typed. The platform converts it to the international format itself."
                                    },
                                    "name": {
                                        "type": "string",
                                        "description": "Display name of the counterpart, if known."
                                    },
                                    "contact_uuid": {
                                        "type": "string",
                                        "description": "CRM contact the counterpart is linked to."
                                    }
                                },
                                "required": [
                                    "inbox_uuid",
                                    "phone"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/conversations/{uuid}": {
            "get": {
                "operationId": "flowsupport.flowsupport-conversations-show",
                "summary": "Get a conversation",
                "description": "A conversation with its counterparts, labels, CRM links, the number of unread messages and this key's rights on it.",
                "tags": [
                    "flowsupport.conversations"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/conversations/{uuid}/status": {
            "put": {
                "operationId": "flowsupport.flowsupport-conversations-status",
                "summary": "Change a conversation's state",
                "description": "Sets the processing state. A closed conversation is reopened automatically by a new incoming message.",
                "tags": [
                    "flowsupport.conversations"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "c1b5a0d2-9e33-4f10-8a77-6b2c4d1e9f08",
                                        "status": "done"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "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 or done."
                                    }
                                },
                                "required": [
                                    "status"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/conversations/{uuid}/assignee": {
            "put": {
                "operationId": "flowsupport.flowsupport-conversations-assignee",
                "summary": "Set or remove the assignee",
                "description": "Hands the conversation to a team member or removes the assignment. A member without access to this inbox is rejected with HTTP 422 instead of being entered silently.",
                "tags": [
                    "flowsupport.conversations"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "c1b5a0d2-9e33-4f10-8a77-6b2c4d1e9f08",
                                        "assigned_user_uuid": "3f8b1c6e-2d44-4a9b-8e77-5c1a0b9d3e22",
                                        "assigned_user_name": "Anna Berger"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "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 of the team member, or null to remove. The field must be present."
                                    }
                                },
                                "required": [
                                    "assigned_user_uuid"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/conversations/{uuid}/labels": {
            "put": {
                "operationId": "flowsupport.flowsupport-conversations-labels",
                "summary": "Set a conversation's labels",
                "description": "The list you pass is the desired end state, not a toggle: missing labels are added, labels not named are removed. Sending the same request twice therefore changes nothing. A label that does not belong to this inbox is rejected with HTTP 422.",
                "tags": [
                    "flowsupport.conversations"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "c1b5a0d2-9e33-4f10-8a77-6b2c4d1e9f08",
                                        "labels": [
                                            {
                                                "uuid": "e9b3f7a1-40cd-4b52-9d18-6a0c2f5e7b33",
                                                "name": "Dringend",
                                                "color": 3
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "label_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "List of label UUIDs, at most 50. An empty list removes all labels."
                                    }
                                },
                                "required": [
                                    "label_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/conversations/{uuid}/links": {
            "put": {
                "operationId": "flowsupport.flowsupport-conversations-links",
                "summary": "Set the CRM links",
                "description": "Links the conversation to a client, project, contact or lead. A field you leave out stays unchanged, an explicit null removes the link. A record this key may not link is rejected with HTTP 422 instead of silently doing nothing.",
                "tags": [
                    "flowsupport.conversations"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "client_uuid": {
                                        "type": "string",
                                        "description": "CRM client, or null to remove."
                                    },
                                    "project_uuid": {
                                        "type": "string",
                                        "description": "Project of the linked client, or null."
                                    },
                                    "contact_uuid": {
                                        "type": "string",
                                        "description": "CRM contact, or null."
                                    },
                                    "lead_uuid": {
                                        "type": "string",
                                        "description": "Lead, or null."
                                    },
                                    "prefer": {
                                        "type": "string",
                                        "description": "client or lead. Decides which side wins if both are set. Default is client."
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/conversations/{uuid}/read": {
            "post": {
                "operationId": "flowsupport.flowsupport-conversations-read",
                "summary": "Mark a conversation as read",
                "description": "Sets the read position to the newest message. The response states the remaining number of unread messages.",
                "tags": [
                    "flowsupport.conversations"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "unread_messages": 0
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/conversations/{uuid}/messages": {
            "get": {
                "operationId": "flowsupport.flowsupport-messages-index",
                "summary": "Get a conversation's history",
                "description": "The messages of a conversation, newest first. Channel-internal protocol lines do not appear, just as in the interface. Each message names its channel (channel: whatsapp or email). Emails also carry subject, from, to and cc (addresses as objects with email and name), your own emails additionally send_status. For WhatsApp messages these fields are null. The HTML content and the source of an email are returned by the two endpoints /messages/{uuid}/html and /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": "Items per page, 1 to 200, default 50.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, default 1.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowsupport.flowsupport-messages-store",
                "summary": "Send a reply",
                "description": "WhatsApp: puts a reply into the delivery queue and answers with HTTP 202. Text and files each become their own item. Email: hands the reply straight to the sending of the email account and answers with HTTP 202 and your own message ({\"success\": true, \"data\": {\"channel\": \"email\", \"message_uuid\": \"...\", \"subject\": \"Re: Frage zur Rechnung\", \"send_status\": \"queued\", \"message\": {...}}}); message has the shape of a history item. Without recipients in to, a reply goes to Reply-To, otherwise to the sender of the newest message. \"Reply all\" adds the other recipients from To and Cc; your own addresses are always dropped. If reply_all is missing, the inbox default applies. Without subject the subject is derived from the conversation (\"Re:\" or \"Fwd:\"). If no sending is set up for the account, the call answers with HTTP 422 and the code sending_not_configured. Files come as multipart/form-data or as UUIDs of pre-uploaded files; an address chosen by the caller is never fetched.",
                "tags": [
                    "flowsupport.messages"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "body": {
                                        "type": "string",
                                        "description": "WhatsApp: the text, at most 5000 characters, required if no file is sent. Email: equivalent to text."
                                    },
                                    "html": {
                                        "type": "string",
                                        "description": "Email only: the content as HTML, at most 200,000 characters. Sanitised before sending (no scripts, no active content). Not together with text or body. One of html, text or body is required, except for files or a forward."
                                    },
                                    "text": {
                                        "type": "string",
                                        "description": "Email only: the content as plain text, at most 100,000 characters. Line breaks are kept."
                                    },
                                    "subject": {
                                        "type": "string",
                                        "description": "Email only: your own subject, at most 998 characters; line breaks become spaces. Without it, the derived subject applies."
                                    },
                                    "to": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Email only: additional recipients of a reply, or the recipients of a forward (then required). At most 50 valid addresses."
                                    },
                                    "cc": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Email only: recipients in copy, at most 50 valid addresses."
                                    },
                                    "bcc": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Email only: recipients in blind copy, at most 50 valid addresses."
                                    },
                                    "reply_all": {
                                        "type": "boolean",
                                        "description": "Email only: reply to all. Without it, the inbox default applies. Not together with forward_of."
                                    },
                                    "forward_of": {
                                        "type": "string",
                                        "description": "Email only: UUID of a message in the same conversation that is forwarded, including its attachments. A message from another conversation is rejected with HTTP 422."
                                    },
                                    "attachments": {
                                        "type": "array",
                                        "items": {
                                            "type": "string",
                                            "format": "binary"
                                        },
                                        "description": "WhatsApp: up to five files, email: up to ten. At most 25 MB each, only the file types named in the overview."
                                    },
                                    "upload_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "UUIDs of pre-uploaded files of this inbox, in sending order. Together with attachments at most five (WhatsApp) or ten (email)."
                                    },
                                    "request_id": {
                                        "type": "string",
                                        "description": "UUID for safe retries. The same request with the same value returns the original submission instead of sending a second time."
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/conversations/{uuid}/messages/{outboundUuid}/retry": {
            "post": {
                "operationId": "flowsupport.flowsupport-messages-retry",
                "summary": "Retry a delivery",
                "description": "Puts a failed or expired item back into the queue. An item in any other state is rejected with HTTP 409.",
                "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": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/conversations/{uuid}/messages/{outboundUuid}/cancel": {
            "post": {
                "operationId": "flowsupport.flowsupport-messages-cancel",
                "summary": "Cancel a delivery",
                "description": "Cancels an item that has not been sent yet. An item that has already been delivered is rejected with HTTP 409.",
                "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": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Ausgehende Nachricht abgebrochen.",
                                    "data": {
                                        "uuid": "f0a6d329-5b17-41e8-9c2d-8e4b7a0f3512",
                                        "status": "cancelled"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/messages/search": {
            "get": {
                "operationId": "flowsupport.flowsupport-messages-search",
                "summary": "Search messages",
                "description": "Full-text search across the message texts of all reachable inboxes. Search terms under three characters are not in the index and return nothing. If the index is unavailable, the response reports available: false instead of an error.",
                "tags": [
                    "flowsupport.messages"
                ],
                "parameters": [
                    {
                        "name": "q",
                        "in": "query",
                        "required": true,
                        "description": "The search term.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Hits per page, 1 to 200, default 50.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, default 1.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/messages/{uuid}/attachments/{attachmentUuid}/download": {
            "get": {
                "operationId": "flowsupport.flowsupport-messages-attachment-download",
                "summary": "Get an attachment",
                "description": "Returns a time-limited address for an attachment's file, valid for 15 minutes. The attachment of a revoked message answers with 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 or playback. Default is original; if the requested version is missing, the original is returned.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/messages/{uuid}/html": {
            "get": {
                "operationId": "flowsupport.flowsupport-messages-html",
                "summary": "Get an email's HTML content",
                "description": "Returns the sanitised HTML content of an email as a standalone document (Content-Type: text/html; charset=utf-8). A strict Content Security Policy prevents scripts, forms, embedding in other sites and any reloading, including external images. If the HTML content is too large to store, the document contains the full text. A WhatsApp message answers with HTTP 404.",
                "tags": [
                    "flowsupport.messages"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/octet-stream": {
                                "schema": {
                                    "type": "string",
                                    "format": "binary"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/messages/{uuid}/raw": {
            "get": {
                "operationId": "flowsupport.flowsupport-messages-raw",
                "summary": "Download an email's source",
                "description": "Downloads the original message in RFC 822 format (Content-Type: message/rfc822, file name .eml). For your own email, this is the version that was sent until it has been matched with the \"Sent\" folder. A WhatsApp message, or a message without stored source, answers with HTTP 404.",
                "tags": [
                    "flowsupport.messages"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/octet-stream": {
                                "schema": {
                                    "type": "string",
                                    "format": "binary"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/inboxes/{uuid}/uploads": {
            "post": {
                "operationId": "flowsupport.flowsupport-uploads-store",
                "summary": "Pre-upload a file",
                "description": "Accepts a file as multipart/form-data and keeps it ready for this inbox for 60 minutes. The returned uuid is named under upload_uuids when sending or on a note. Requires at least the reply level. The sending limits apply: at most 25 MB and the file types named in the overview. Uploading the same file again returns the same item.",
                "tags": [
                    "flowsupport.messages"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "file": {
                                        "type": "string",
                                        "format": "binary",
                                        "description": "The file."
                                    }
                                },
                                "required": [
                                    "file"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/inboxes/{uuid}/uploads/inline": {
            "post": {
                "operationId": "flowsupport.flowsupport-uploads-store-inline",
                "summary": "Pre-upload a small file as Base64",
                "description": "Like the multipart upload, but with the content as Base64 in a JSON body. Meant for callers without multipart. The file type is detected from the content, not the name. The size is limited to about 2.8 MB; larger files go through the multipart upload.",
                "tags": [
                    "flowsupport.messages"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "filename": {
                                        "type": "string",
                                        "description": "The file name as the recipient should see it, at most 180 characters."
                                    },
                                    "content_base64": {
                                        "type": "string",
                                        "description": "The file content as standard Base64. A data: prefix and whitespace are allowed."
                                    }
                                },
                                "required": [
                                    "filename",
                                    "content_base64"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/uploads/{uuid}": {
            "get": {
                "operationId": "flowsupport.flowsupport-uploads-show",
                "summary": "View a pre-uploaded file",
                "description": "Name, type, size and expiry of a pre-uploaded file. Only whoever uploaded it can see it; everyone else gets HTTP 404.",
                "tags": [
                    "flowsupport.messages"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowsupport.flowsupport-uploads-destroy",
                "summary": "Discard a pre-uploaded file",
                "description": "Removes a pre-uploaded file immediately instead of waiting for it to expire. Items already queued and notes already written are not affected.",
                "tags": [
                    "flowsupport.messages"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Datei verworfen."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/number-lookups/{uuid}": {
            "get": {
                "operationId": "flowsupport.flowsupport-number-lookups-show",
                "summary": "Get the state of a number lookup",
                "description": "The state of a lookup that starting a conversation created with HTTP 202. As long as open is true, the listener is still working on it. As soon as a conversation has been created, conversation_uuid names it.",
                "tags": [
                    "flowsupport.messages"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "a4f7c2b8-1d09-4e66-b3a1-7c5f2e0d9b44",
                                        "status": "resolved",
                                        "number": "+4915112345678",
                                        "open": false,
                                        "conversation_uuid": "c1b5a0d2-9e33-4f10-8a77-6b2c4d1e9f08",
                                        "error_code": null
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/conversations/{uuid}/notes": {
            "get": {
                "operationId": "flowsupport.flowsupport-notes-index",
                "summary": "List a conversation's notes",
                "description": "The internal notes of a conversation, newest first.",
                "tags": [
                    "flowsupport.notes"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Items per page, 1 to 200, default 50.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, default 1.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowsupport.flowsupport-notes-store",
                "summary": "Write a note",
                "description": "Creates an internal note with text, files or both. Requires at least the reply level on the inbox. Files are uploaded beforehand and named here by their UUIDs. If a file could not be stored, this is listed under warnings.",
                "tags": [
                    "flowsupport.notes"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "note": {
                                        "type": "string",
                                        "description": "The text, at most 5000 characters. Required if no file is named."
                                    },
                                    "upload_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "UUIDs of pre-uploaded files of this inbox, at most five. Videos are not allowed on notes."
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/conversations/{uuid}/notes/{noteUuid}": {
            "patch": {
                "operationId": "flowsupport.flowsupport-notes-update",
                "summary": "Change a note",
                "description": "Rewrites a note. Only the person who wrote it may do so; everyone else gets 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": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "note": {
                                        "type": "string",
                                        "description": "The new text, at most 5000 characters."
                                    }
                                },
                                "required": [
                                    "note"
                                ]
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowsupport.flowsupport-notes-destroy",
                "summary": "Remove a note",
                "description": "Removes a note. The author may do so, and so may the inbox owner.",
                "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": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Notiz entfernt."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/labels": {
            "get": {
                "operationId": "flowsupport.flowsupport-labels-index",
                "summary": "List labels",
                "description": "The labels of all reachable inboxes, alphabetically.",
                "tags": [
                    "flowsupport.catalogs"
                ],
                "parameters": [
                    {
                        "name": "inbox_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Limit to one inbox.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowsupport.flowsupport-labels-store",
                "summary": "Create a label",
                "description": "Creates a label in an inbox. Requires at least the reply level. If syncing with WhatsApp is active, the maximum of 20 labels per inbox applies.",
                "tags": [
                    "flowsupport.catalogs"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "e9b3f7a1-40cd-4b52-9d18-6a0c2f5e7b33",
                                        "name": "Dringend",
                                        "color": 3
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "inbox_uuid": {
                                        "type": "string",
                                        "description": "The inbox the label belongs to."
                                    },
                                    "name": {
                                        "type": "string",
                                        "description": "The name, at most 100 characters."
                                    },
                                    "color": {
                                        "type": "integer",
                                        "description": "The colour from the channel's palette, 0 to 19."
                                    }
                                },
                                "required": [
                                    "inbox_uuid",
                                    "name",
                                    "color"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/labels/{uuid}": {
            "patch": {
                "operationId": "flowsupport.flowsupport-labels-update",
                "summary": "Rename or recolour a label",
                "description": "Changes name and colour. A label's inbox cannot be changed.",
                "tags": [
                    "flowsupport.catalogs"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "e9b3f7a1-40cd-4b52-9d18-6a0c2f5e7b33",
                                        "name": "Eilig",
                                        "color": 5
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "The name, at most 100 characters."
                                    },
                                    "color": {
                                        "type": "integer",
                                        "description": "The colour, 0 to 19."
                                    }
                                },
                                "required": [
                                    "name",
                                    "color"
                                ]
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowsupport.flowsupport-labels-destroy",
                "summary": "Delete a label",
                "description": "Deletes the label and removes it from all conversations of the inbox.",
                "tags": [
                    "flowsupport.catalogs"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Label gelöscht."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/templates": {
            "get": {
                "operationId": "flowsupport.flowsupport-templates-index",
                "summary": "List reply templates",
                "description": "The visible text snippets, most used first. may_edit says whether this key may also change the template.",
                "tags": [
                    "flowsupport.catalogs"
                ],
                "parameters": [
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Items per page, 1 to 200, default 50.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, default 1.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowsupport.flowsupport-templates-store",
                "summary": "Create a reply template",
                "description": "Creates a text snippet. Without inbox_uuid it applies team-wide. Binding it to an inbox requires at least the reply level on exactly that inbox.",
                "tags": [
                    "flowsupport.catalogs"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "The name, at most 120 characters."
                                    },
                                    "content": {
                                        "type": "string",
                                        "description": "The text, at most 5000 characters."
                                    },
                                    "is_private": {
                                        "type": "boolean",
                                        "description": "true keeps the template with its author. Default is false."
                                    },
                                    "inbox_uuid": {
                                        "type": "string",
                                        "description": "Binds the template to an inbox."
                                    }
                                },
                                "required": [
                                    "name",
                                    "content"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/templates/{uuid}": {
            "patch": {
                "operationId": "flowsupport.flowsupport-templates-update",
                "summary": "Change a reply template",
                "description": "Writes name, text and visibility together. The author may change it, and so may the team owner. A template's inbox cannot be changed.",
                "tags": [
                    "flowsupport.catalogs"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "1a7e5c93-6b20-4d18-8f45-9c0d3e7a2b61",
                                        "name": "Begrüßung kurz",
                                        "content": "Guten Tag.",
                                        "may_edit": true
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "The name, at most 120 characters."
                                    },
                                    "content": {
                                        "type": "string",
                                        "description": "The text, at most 5000 characters."
                                    },
                                    "is_private": {
                                        "type": "boolean",
                                        "description": "Visibility. Without it, the previous value stays."
                                    }
                                },
                                "required": [
                                    "name",
                                    "content"
                                ]
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowsupport.flowsupport-templates-destroy",
                "summary": "Delete a reply template",
                "description": "Deletes the text snippet. The same rights apply as for changing it.",
                "tags": [
                    "flowsupport.catalogs"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Vorlage gelöscht."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/reports/open": {
            "get": {
                "operationId": "flowsupport.flowsupport-reports-open",
                "summary": "Open conversations",
                "description": "What is still waiting for a reply: the number of open conversations, how many of them are unassigned, and the twenty most recently active as a list.",
                "tags": [
                    "flowsupport.reports"
                ],
                "parameters": [
                    {
                        "name": "inbox_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Limit to one inbox.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/reports/assignments": {
            "get": {
                "operationId": "flowsupport.flowsupport-reports-assignments",
                "summary": "Assignments",
                "description": "Who carries how many open conversations, and how many of them fall to your own key. The row with user_uuid null collects the unassigned ones.",
                "tags": [
                    "flowsupport.reports"
                ],
                "parameters": [
                    {
                        "name": "inbox_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Limit to one inbox.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "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": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsupport/reports/outbound": {
            "get": {
                "operationId": "flowsupport.flowsupport-reports-outbound",
                "summary": "Delivery queue",
                "description": "The number of items per delivery state, so that a reply that has not been delivered yet is visible before another one is written. Message texts are not included.",
                "tags": [
                    "flowsupport.reports"
                ],
                "parameters": [
                    {
                        "name": "inbox_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Limit to one inbox.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "queue": {
                                            "pending": 2,
                                            "failed": 1
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos": {
            "get": {
                "operationId": "flowtasks.todos-list",
                "summary": "List to-dos",
                "description": "Returns your team's to-dos with cursor pagination. Without board_id only your own personal to-dos are returned; with board_id the to-dos of that board are returned (optionally narrowed further by list_id).",
                "tags": [
                    "flowtasks.todos"
                ],
                "parameters": [
                    {
                        "name": "type",
                        "in": "query",
                        "required": false,
                        "description": "Filter within the result set by type: assigned (assigned to me), completed or created (created by me)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "completed",
                        "in": "query",
                        "required": false,
                        "description": "Filter by status: true or false",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "priority",
                        "in": "query",
                        "required": false,
                        "description": "Filter by priority: low, medium, high",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "board_id",
                        "in": "query",
                        "required": false,
                        "description": "Board UUID; limits the results to to-dos of this board (requires board access)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "list_id",
                        "in": "query",
                        "required": false,
                        "description": "List UUID; only together with board_id, narrows down to one list",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "required": false,
                        "description": "Cursor from the meta object of the previous response for the next or previous page",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Results per page, 1-100 (default 50)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "550e8400-e29b-41d4-a716-446655440000",
                                            "title": "Feature implementieren",
                                            "priority": "high",
                                            "completed": false,
                                            "list": {
                                                "uuid": "f0e1d2c3-...",
                                                "name": "In Progress"
                                            }
                                        }
                                    ],
                                    "meta": {
                                        "next_cursor": "eyJpZCI6MTIzfQ==",
                                        "prev_cursor": null,
                                        "has_more": true,
                                        "per_page": 50
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowtasks.todos-create",
                "summary": "Create a to-do",
                "description": "Creates a new to-do, either personal (without list_id/board_id) or on a board. With recurring_interval you create a series, a to-do that moves itself to its next date each time it is completed. A series requires a due_date, otherwise the endpoint answers with HTTP 422.",
                "tags": [
                    "flowtasks.todos"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "550e8400-e29b-41d4-a716-446655440000",
                                        "title": "Feature implementieren",
                                        "priority": "high",
                                        "completed": false,
                                        "list": {
                                            "uuid": "f0e1d2c3-...",
                                            "name": "In Progress"
                                        },
                                        "created_at": "2024-01-01T10:00:00Z"
                                    },
                                    "message": "Todo created successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "description": "Title of the to-do (max. 255 characters)"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Description (max. 65,535 characters)"
                                    },
                                    "due_date": {
                                        "type": "string",
                                        "description": "Due date (ISO 8601)"
                                    },
                                    "priority": {
                                        "type": "string",
                                        "description": "Priority: low, medium, high"
                                    },
                                    "list_id": {
                                        "type": "string",
                                        "description": "UUID of the target list"
                                    },
                                    "board_id": {
                                        "type": "string",
                                        "description": "UUID of the target board (without list_id the first list of the board is used)"
                                    },
                                    "recurring_interval": {
                                        "type": "string",
                                        "description": "Recurrence interval: daily, every_2_days, weekly, every_2_weeks, monthly, every_2_months, quarterly, half_yearly, yearly. Requires due_date"
                                    },
                                    "assigned_to": {
                                        "type": "string",
                                        "description": "UUID of the assigned user (ignored when assigned_to_ids is set)"
                                    },
                                    "assigned_to_ids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Array of user UUIDs for multiple assignees; takes precedence over assigned_to"
                                    },
                                    "card_settings": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Card display; allowed keys: color (max. 32 characters), labels (max. 50 strings)"
                                    }
                                },
                                "required": [
                                    "title"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/todos/search": {
            "get": {
                "operationId": "flowtasks.todos-search",
                "summary": "Search to-dos",
                "description": "Searches title and description of every to-do you have access to (your own personal to-dos plus to-dos on boards you can access).",
                "tags": [
                    "flowtasks.todos"
                ],
                "parameters": [
                    {
                        "name": "search",
                        "in": "query",
                        "required": true,
                        "description": "Search term (1-100 characters). Characters such as % and _ are matched literally, not as wildcards",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "required": false,
                        "description": "Cursor from the meta object of the previous response for the next or previous page",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Results per page, 1-100 (default 50)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "550e8400-e29b-41d4-a716-446655440000",
                                            "title": "Feature implementieren",
                                            "priority": "high",
                                            "completed": false
                                        }
                                    ],
                                    "meta": {
                                        "next_cursor": "eyJpZCI6MTIzfQ==",
                                        "prev_cursor": null,
                                        "has_more": true,
                                        "per_page": 50
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/context": {
            "get": {
                "operationId": "flowtasks.todos-context",
                "summary": "Get module context",
                "description": "Returns the writable fields of each record type with their rules, the allowed priorities, the intervals for recurring tasks, the label colours and the board roles, so a client does not need to hard-code maximum lengths or value lists. rights.manage_labels also tells you whether the key may manage labels.",
                "tags": [
                    "flowtasks.todos"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "fields": {
                                            "todo": {
                                                "title": "required|string|max:255",
                                                "priority": "nullable|in:low,medium,high"
                                            }
                                        },
                                        "priorities": [
                                            "low",
                                            "medium",
                                            "high"
                                        ],
                                        "recurring_intervals": [
                                            "daily",
                                            "weekly",
                                            "monthly"
                                        ],
                                        "label_colors": [
                                            "zinc",
                                            "red",
                                            "blue"
                                        ],
                                        "board_roles": [
                                            "owner",
                                            "admin",
                                            "member"
                                        ],
                                        "rights": {
                                            "manage_labels": true
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/{todoUuid}": {
            "get": {
                "operationId": "flowtasks.todos-show",
                "summary": "Get a to-do",
                "description": "Returns a single to-do with all its details (including comments, checklists and labels).",
                "tags": [
                    "flowtasks.todos"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "550e8400-e29b-41d4-a716-446655440000",
                                        "title": "Feature implementieren",
                                        "description": null,
                                        "priority": "high",
                                        "completed": false,
                                        "list": {
                                            "uuid": "f0e1d2c3-...",
                                            "name": "In Progress"
                                        },
                                        "comments": [],
                                        "created_at": "2024-01-01T10:00:00Z"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowtasks.todos-update",
                "summary": "Update a to-do",
                "description": "Updates an existing to-do. All fields are optional, only the fields you send are changed. list_id:null is not allowed; use the detach endpoint to remove a to-do from its board explicitly. Validation errors return HTTP 422 with message and errors. On a series (a to-do with recurring_interval), completed:true only completes the current occurrence: the to-do stays open, its due_date moves ahead by one interval, and the completed occurrence is stored as a separate, completed to-do. data is always the to-do you addressed, so for a series it still has completed:false and the new due_date. The completed occurrence is returned next to it in the completed_occurrence field; in every other case that field is null. Reopening (completed:false) works on plain to-dos and on completed occurrences; the series itself is never completed. The due_date of a series cannot be changed directly (HTTP 422). A repeated call would also complete the next occurrence: if you send expected_due_date, you get HTTP 409 with the current date in current_due_date instead, as soon as the series has already moved on.",
                "tags": [
                    "flowtasks.todos"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "550e8400-e29b-41d4-a716-446655440000",
                                        "title": "Feature implementieren (aktualisiert)",
                                        "priority": "high",
                                        "completed": true,
                                        "recurring_interval": null
                                    },
                                    "completed_occurrence": null,
                                    "message": "Todo updated successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "description": "Title (if sent: required, max. 255 characters)"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Description (max. 65,535 characters)"
                                    },
                                    "due_date": {
                                        "type": "string",
                                        "description": "Due date"
                                    },
                                    "priority": {
                                        "type": "string",
                                        "description": "Priority: low, medium, high"
                                    },
                                    "list_id": {
                                        "type": "string",
                                        "description": "UUID of the new target list (moves the to-do)"
                                    },
                                    "assigned_to": {
                                        "type": "string",
                                        "description": "UUID of the assigned user (ignored when assigned_to_ids is sent)"
                                    },
                                    "assigned_to_ids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Array of user UUIDs; replaces the complete list of assignees"
                                    },
                                    "completed": {
                                        "type": "boolean",
                                        "description": "true completes the to-do, false reopens it. On a series, true only completes the current occurrence"
                                    },
                                    "recurring_interval": {
                                        "type": "string",
                                        "description": "Recurrence interval: daily, every_2_days, weekly, every_2_weeks, monthly, every_2_months, quarterly, half_yearly, yearly. Requires a due_date; null ends the series"
                                    },
                                    "expected_due_date": {
                                        "type": "string",
                                        "description": "Only when completing a series: the date (YYYY-MM-DD) the caller currently sees. If it differs from the current due_date, the endpoint answers with HTTP 409 and completes nothing"
                                    },
                                    "card_settings": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Card display; allowed keys: color (max. 32 characters), labels (max. 50 strings)"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowtasks.todos-delete",
                "summary": "Delete a to-do",
                "description": "Deletes a to-do permanently.",
                "tags": [
                    "flowtasks.todos"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Todo deleted successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/{todoUuid}/duplicate": {
            "post": {
                "operationId": "flowtasks.todos-duplicate",
                "summary": "Duplicate a to-do",
                "description": "Creates a copy of a to-do. Checklists, labels and assignments are copied by default; you can switch that off with the body parameters.",
                "tags": [
                    "flowtasks.todos"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
                                        "title": "Feature implementieren",
                                        "priority": "high",
                                        "completed": false
                                    },
                                    "message": "Todo duplicated successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "include_checklists": {
                                        "type": "boolean",
                                        "description": "Copy checklists (default true)"
                                    },
                                    "include_labels": {
                                        "type": "boolean",
                                        "description": "Copy labels (default true)"
                                    },
                                    "include_assignments": {
                                        "type": "boolean",
                                        "description": "Copy assigned users (default true)"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/{todoUuid}/move": {
            "put": {
                "operationId": "flowtasks.todos-move",
                "summary": "Move a to-do",
                "description": "Moves a to-do to another board list, with position to an index among the open to-dos (renumbered without gaps). Requires access to the board of the target list. Sending sort_order and position together returns HTTP 422, and so does position for a completed to-do.",
                "tags": [
                    "flowtasks.todos"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "550e8400-e29b-41d4-a716-446655440000",
                                        "title": "Feature implementieren",
                                        "list": {
                                            "uuid": "1a2b3c4d-...",
                                            "name": "Done"
                                        }
                                    },
                                    "message": "Todo moved successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "list_uuid": {
                                        "type": "string",
                                        "description": "UUID of the target list"
                                    },
                                    "position": {
                                        "type": "integer",
                                        "description": "Index among the open to-dos of the target list, starting at 0 (0 = top), counted without the moved to-do. An index past the end appends. Source and target list are renumbered from 1 without gaps. Only for open to-dos, not together with sort_order."
                                    },
                                    "sort_order": {
                                        "type": "integer",
                                        "description": "Raw sort value in the target list; to-dos from this value on move down by one (previous behaviour, otherwise placed at the end automatically). Not together with position."
                                    }
                                },
                                "required": [
                                    "list_uuid"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/todos/{todoUuid}/detach": {
            "post": {
                "operationId": "flowtasks.todos-detach",
                "summary": "Detach a to-do from its board",
                "description": "Removes a board to-do from its board explicitly, with an audit log entry, and moves it to the personal to-do list of the board owner. Only the current board owner may do this; visible resources with an insufficient role return HTTP 403, inaccessible resources HTTP 404.",
                "tags": [
                    "flowtasks.todos"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "550e8400-e29b-41d4-a716-446655440000",
                                        "title": "Feature implementieren",
                                        "list": null
                                    },
                                    "message": "Todo detached from board successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/boards": {
            "get": {
                "operationId": "flowtasks.boards-list",
                "summary": "List boards",
                "description": "Returns the boards the authenticated user has access to (not every board of the team), including their nested lists. Cursor-paginated.",
                "tags": [
                    "flowtasks.boards"
                ],
                "parameters": [
                    {
                        "name": "cursor",
                        "in": "query",
                        "required": false,
                        "description": "Cursor from the meta object of the previous response for the next or previous page",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Results per page, 1-100 (default 50)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "a1b2c3d4-...",
                                            "name": "Projekt Alpha",
                                            "description": null,
                                            "background_settings": {
                                                "color": "#0ea5e9"
                                            },
                                            "is_archived": false,
                                            "sort_order": 1,
                                            "lists": [
                                                {
                                                    "uuid": "f0e1d2c3-...",
                                                    "name": "Backlog"
                                                },
                                                {
                                                    "uuid": "1a2b3c4d-...",
                                                    "name": "In Progress"
                                                }
                                            ],
                                            "created_at": "2024-01-01T10:00:00Z"
                                        }
                                    ],
                                    "meta": {
                                        "next_cursor": "eyJpZCI6MTIzfQ==",
                                        "prev_cursor": null,
                                        "has_more": false,
                                        "per_page": 50
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowtasks.boards-create",
                "summary": "Create a board",
                "description": "Creates a new board. The user who creates it automatically becomes the owner.",
                "tags": [
                    "flowtasks.boards"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "a1b2c3d4-...",
                                        "name": "Projekt Alpha",
                                        "description": null,
                                        "background_settings": [],
                                        "is_archived": false,
                                        "sort_order": 1,
                                        "users_with_access": [
                                            {
                                                "uuid": "9c858901-8a57-4791-81fe-4c455b099bc9",
                                                "name": "Maria Beispiel"
                                            }
                                        ],
                                        "created_at": "2024-01-01T10:00:00Z"
                                    },
                                    "message": "Board created successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name of the board (max. 255 characters)"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Description (max. 65,535 characters)"
                                    },
                                    "background_settings": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Background and display; allowed keys: color (max. 32 characters), image (max. 2,048 characters)"
                                    },
                                    "project_id": {
                                        "type": "string",
                                        "description": "UUID of a FlowCRM project to link the board to"
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/todos/boards/{uuid}": {
            "get": {
                "operationId": "flowtasks.boards-show",
                "summary": "Get a board",
                "description": "Returns a single board with its full tree: lists -> to-dos -> assigned users + labels, including statistics (total_todos, completed_todos, progress_percentage) and the list of users with access.",
                "tags": [
                    "flowtasks.boards"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "a1b2c3d4-...",
                                        "name": "Projekt Alpha",
                                        "description": null,
                                        "background_settings": {
                                            "color": "#0ea5e9"
                                        },
                                        "is_archived": false,
                                        "sort_order": 1,
                                        "total_todos": 12,
                                        "completed_todos": 5,
                                        "progress_percentage": 42,
                                        "lists": [
                                            {
                                                "uuid": "f0e1d2c3-...",
                                                "name": "Backlog",
                                                "todos": []
                                            }
                                        ],
                                        "users_with_access": [
                                            {
                                                "uuid": "9c858901-8a57-4791-81fe-4c455b099bc9",
                                                "name": "Maria Beispiel",
                                                "email": "maria@example.com"
                                            }
                                        ],
                                        "created_at": "2024-01-01T10:00:00Z"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowtasks.boards-update",
                "summary": "Update a board",
                "description": "Updates the name, description or background settings of a board. All fields are optional, only the fields you send are changed.",
                "tags": [
                    "flowtasks.boards"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "a1b2c3d4-...",
                                        "name": "Projekt Alpha (aktualisiert)",
                                        "description": "Neue Beschreibung",
                                        "is_archived": false
                                    },
                                    "message": "Board updated successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name (if sent: required, max. 255 characters)"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Description (max. 65,535 characters)"
                                    },
                                    "background_settings": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Background and display; allowed keys: color (max. 32 characters), image (max. 2,048 characters)"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowtasks.boards-delete",
                "summary": "Delete a board",
                "description": "Deletes a board permanently, cascading to its lists, to-dos, access rights and external shares. Owner only: only the board owner may delete it; admins and members get HTTP 403 (\"You do not have permission to perform this action on this board.\").",
                "tags": [
                    "flowtasks.boards"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Board deleted successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/boards/{uuid}/archive": {
            "put": {
                "operationId": "flowtasks.boards-archive",
                "summary": "Archive or unarchive a board",
                "description": "Toggles the archive state of a board (archived -> active or the other way round). Only requires board access, no role check.",
                "tags": [
                    "flowtasks.boards"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "a1b2c3d4-...",
                                        "name": "Projekt Alpha",
                                        "is_archived": true
                                    },
                                    "message": "Board archived successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/boards/{uuid}/users": {
            "get": {
                "operationId": "flowtasks.boards-users-list",
                "summary": "List board members",
                "description": "Returns every user with access to a board.",
                "tags": [
                    "flowtasks.boards"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "9c858901-8a57-4791-81fe-4c455b099bc9",
                                            "name": "Maria Beispiel",
                                            "email": "maria@example.com"
                                        }
                                    ],
                                    "count": 1
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowtasks.boards-users-grant",
                "summary": "Grant board access",
                "description": "Gives a team member access to a board. New or restored grants return HTTP 201; a grant that is already active (idempotent) returns HTTP 200. New grants always get the member role; roles are only changed through the role endpoint. Only owners or admins may grant access; members get HTTP 403.",
                "tags": [
                    "flowtasks.boards"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "User access granted successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "user_uuid": {
                                        "type": "string",
                                        "description": "UUID of the team member who should get access"
                                    }
                                },
                                "required": [
                                    "user_uuid"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/todos/boards/{uuid}/users/{userUuid}": {
            "delete": {
                "operationId": "flowtasks.boards-users-revoke",
                "summary": "Revoke board access",
                "description": "Removes a user's access to a board. Only owners or admins may revoke the access of ANOTHER member (otherwise HTTP 403 \"You do not have permission to perform this action on this board.\"); every member may, however, revoke their OWN access (self-removal). Exception: the owner cannot remove themselves and has to transfer ownership first (HTTP 403 \"The board Owner cannot remove their own access. Transfer ownership first.\"); likewise, the owner can never be removed by others through this endpoint.",
                "tags": [
                    "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": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "User access revoked successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/boards/{uuid}/users/{userUuid}/role": {
            "put": {
                "operationId": "flowtasks.boards-users-update-role",
                "summary": "Change a board role or transfer ownership",
                "description": "Owner-only action: only the board owner may change roles or transfer ownership; admins and members get HTTP 403 (\"You do not have permission to perform this action on this board.\"). role=admin or role=member changes the target user's role (\"User role updated successfully.\"). role=owner transfers ownership atomically: the target user becomes owner and the previous owner is automatically demoted to admin (\"Board ownership transferred successfully.\"). Error cases: HTTP 404 if the board or the target user is not found, HTTP 422 if the target user has no active board access, HTTP 422 if the owner tries to transfer ownership to themselves (\"You are already the Owner of this board.\"), HTTP 422 if you try to demote the owner directly with role=admin/member (use role=owner on another target user to transfer ownership instead), and HTTP 409 if the ownership transfer was blocked by a concurrent change to the calling owner's permissions (\"Ownership changed concurrently. Please retry.\", retrying is recommended).",
                "tags": [
                    "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": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "User role updated successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "role": {
                                        "type": "string",
                                        "description": "New role: admin, member or owner (owner triggers an ownership transfer)"
                                    }
                                },
                                "required": [
                                    "role"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/todos/boards/{uuid}/lists": {
            "post": {
                "operationId": "flowtasks.lists-create",
                "summary": "Create a list",
                "description": "Creates a new list on a board. Requires board access.",
                "tags": [
                    "flowtasks.lists"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "f0e1d2c3-...",
                                        "name": "Backlog",
                                        "sort_order": 1,
                                        "list_settings": [],
                                        "is_archived": false
                                    },
                                    "message": "List created successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name of the list (max. 255 characters)"
                                    },
                                    "list_settings": {
                                        "type": "array",
                                        "items": [],
                                        "description": "List display; allowed keys: color (max. 32 characters), label (max. 255 characters)"
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                }
            },
            "get": {
                "operationId": "flowtasks.lists-index",
                "summary": "List the lists of a board",
                "description": "Returns the lists of a board page by page, each with the number of its to-dos. Unlike the board tree, this route only returns the columns and stays usable even with thousands of cards.",
                "tags": [
                    "flowtasks.lists"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "archived",
                        "in": "query",
                        "required": false,
                        "description": "Limits the result to archived (true) or active (false) lists",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, starting at 1",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Entries per page, 1-200 (default 50)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "f0e1d2c3-...",
                                            "board_uuid": "a1b2c3d4-...",
                                            "name": "Backlog",
                                            "sort_order": 1,
                                            "is_archived": false,
                                            "todos_count": 12
                                        }
                                    ],
                                    "meta": {
                                        "current_page": 1,
                                        "per_page": 50,
                                        "total": 3,
                                        "last_page": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/boards/{uuid}/lists/{listUuid}": {
            "get": {
                "operationId": "flowtasks.lists-show",
                "summary": "Get a list",
                "description": "Returns a single list with its to-dos (including assigned users and labels). This is the actual endpoint for fetching a single list; there is no endpoint that lists all lists of a board separately from the board itself (use GET /todos/boards/{uuid} for that, which returns the board with all its lists).",
                "tags": [
                    "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": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "f0e1d2c3-...",
                                        "name": "Backlog",
                                        "sort_order": 1,
                                        "list_settings": [],
                                        "is_archived": false,
                                        "todos": [
                                            {
                                                "uuid": "550e8400-e29b-41d4-a716-446655440000",
                                                "title": "Feature implementieren",
                                                "priority": "high",
                                                "completed": false
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowtasks.lists-update",
                "summary": "Update a list",
                "description": "Updates the name or list_settings of a list. All fields are optional, only the fields you send are changed.",
                "tags": [
                    "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": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "f0e1d2c3-...",
                                        "name": "Backlog (umbenannt)",
                                        "sort_order": 1,
                                        "is_archived": false
                                    },
                                    "message": "List updated successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name (if sent: required, max. 255 characters)"
                                    },
                                    "list_settings": {
                                        "type": "array",
                                        "items": [],
                                        "description": "List display; allowed keys: color (max. 32 characters), label (max. 255 characters)"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowtasks.lists-delete",
                "summary": "Delete a list",
                "description": "Deletes a list permanently; cascades to every to-do in the list.",
                "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": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "List deleted successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/lists/{listUuid}/todos/reorder": {
            "put": {
                "operationId": "flowtasks.lists-todos-reorder",
                "summary": "Reorder the to-dos of a list",
                "description": "Reorders the to-dos of a list following the order of the UUIDs you send. The array must contain every to-do of the list exactly once; missing or unknown UUIDs return HTTP 422 with skipped and change no order.",
                "tags": [
                    "flowtasks.lists"
                ],
                "parameters": [
                    {
                        "name": "listUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Todos reordered successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "todo_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Array of all to-do UUIDs of the list in the order you want"
                                    }
                                },
                                "required": [
                                    "todo_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/todos/boards/{uuid}/lists/reorder": {
            "put": {
                "operationId": "flowtasks.lists-reorder",
                "summary": "Reorder lists",
                "description": "Reorders all lists of a board atomically and without collisions, following the order of the UUIDs you send. The array must contain every list of the board exactly once; missing or unknown UUIDs return HTTP 422 with skipped and change no order.",
                "tags": [
                    "flowtasks.lists"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Lists reordered successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "list_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Array of all list UUIDs of the board in the order you want"
                                    }
                                },
                                "required": [
                                    "list_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/todos/boards/{uuid}/lists/{listUuid}/archive": {
            "put": {
                "operationId": "flowtasks.lists-archive",
                "summary": "Archive or unarchive a list",
                "description": "Toggles the archive state of a list (archived -> active or the other way round).",
                "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": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "f0e1d2c3-...",
                                        "name": "Backlog",
                                        "is_archived": true
                                    },
                                    "message": "List archived successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/{todoUuid}/assignments": {
            "get": {
                "operationId": "flowtasks.todos-assignments-list",
                "summary": "List assignments",
                "description": "Returns every user currently assigned to a to-do.",
                "tags": [
                    "flowtasks.assignments"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "9c858901-8a57-4791-81fe-4c455b099bc9",
                                            "name": "Maria Beispiel",
                                            "email": "maria@example.com"
                                        }
                                    ],
                                    "count": 1
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowtasks.todos-assignments-add",
                "summary": "Assign a user",
                "description": "Assigns another user to a to-do (additive, existing assignments stay). The user must be a member of the team.",
                "tags": [
                    "flowtasks.assignments"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "User assigned successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "user_uuid": {
                                        "type": "string",
                                        "description": "UUID of the team member to assign"
                                    }
                                },
                                "required": [
                                    "user_uuid"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/todos/{todoUuid}/assignments/{userUuid}": {
            "delete": {
                "operationId": "flowtasks.todos-assignments-remove",
                "summary": "Remove an assignment",
                "description": "Removes a user's assignment from a to-do.",
                "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": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "User assignment removed successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/{todoUuid}/comments": {
            "get": {
                "operationId": "flowtasks.todos-comments-list",
                "summary": "List comments",
                "description": "Returns every comment of a to-do in ascending chronological order.",
                "tags": [
                    "flowtasks.comments"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                                            "comment": "Bitte bis Freitag erledigen.",
                                            "user": {
                                                "uuid": "9c858901-8a57-4791-81fe-4c455b099bc9",
                                                "name": "Maria Beispiel"
                                            },
                                            "created_at": "2024-01-01T10:00:00Z"
                                        }
                                    ],
                                    "count": 1
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowtasks.todos-comments-create",
                "summary": "Add a comment",
                "description": "Adds a new comment to a to-do.",
                "tags": [
                    "flowtasks.comments"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                                        "comment": "Bitte bis Freitag erledigen.",
                                        "created_at": "2024-01-01T10:00:00Z"
                                    },
                                    "message": "Comment added successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "comment": {
                                        "type": "string",
                                        "description": "Comment text (max. 1000 characters)"
                                    }
                                },
                                "required": [
                                    "comment"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/todos/{todoUuid}/comments/{commentUuid}": {
            "put": {
                "operationId": "flowtasks.todos-comments-update",
                "summary": "Edit a comment",
                "description": "Edits a comment. Only the original author may edit their own comment; otherwise the API answers with HTTP 403 \"You can only edit your own comments.\"",
                "tags": [
                    "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": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                                        "comment": "Bitte bis Montag erledigen.",
                                        "created_at": "2024-01-01T10:00:00Z"
                                    },
                                    "message": "Comment updated successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "comment": {
                                        "type": "string",
                                        "description": "New comment text (max. 1000 characters)"
                                    }
                                },
                                "required": [
                                    "comment"
                                ]
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowtasks.todos-comments-delete",
                "summary": "Delete a comment",
                "description": "Deletes a comment permanently. Only the original author may delete their own comment; otherwise the API answers with HTTP 403 \"You can only delete your own comments.\"",
                "tags": [
                    "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": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Comment deleted successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/labels": {
            "get": {
                "operationId": "flowtasks.labels-list",
                "summary": "List labels",
                "description": "Returns every label of the team with cursor pagination, sorted by sort_order.",
                "tags": [
                    "flowtasks.labels"
                ],
                "parameters": [
                    {
                        "name": "cursor",
                        "in": "query",
                        "required": false,
                        "description": "Cursor from the meta object of the previous response for the next or previous page",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Results per page, 1-100 (default 50)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "b2c3d4e5-...",
                                            "name": "Dringend",
                                            "color": "red",
                                            "sort_order": 1
                                        }
                                    ],
                                    "meta": {
                                        "next_cursor": "eyJpZCI6MTIzfQ==",
                                        "prev_cursor": null,
                                        "has_more": false,
                                        "per_page": 50
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowtasks.labels-create",
                "summary": "Create a label",
                "description": "Creates a new team-wide label.",
                "tags": [
                    "flowtasks.labels"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "b2c3d4e5-...",
                                        "name": "Dringend",
                                        "color": "red",
                                        "sort_order": 5
                                    },
                                    "message": "Label created successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name of the label (max. 255 characters)"
                                    },
                                    "color": {
                                        "type": "string",
                                        "description": "Colour of the label. Allowed values: zinc, red, orange, amber, yellow, lime, green, emerald, teal, cyan, sky, blue, indigo, violet, purple, fuchsia, pink, rose."
                                    }
                                },
                                "required": [
                                    "name",
                                    "color"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/todos/labels/{labelUuid}": {
            "get": {
                "operationId": "flowtasks.labels-show",
                "summary": "Get a label",
                "description": "Returns a single label of the team, including the number of to-dos that carry it.",
                "tags": [
                    "flowtasks.labels"
                ],
                "parameters": [
                    {
                        "name": "labelUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "b2c3d4e5-...",
                                        "name": "Dringend",
                                        "color": "red",
                                        "sort_order": 5,
                                        "todos_count": 7
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowtasks.labels-update",
                "summary": "Update a label",
                "description": "Updates the name or colour of a label. All fields are optional, only the fields you send are changed.",
                "tags": [
                    "flowtasks.labels"
                ],
                "parameters": [
                    {
                        "name": "labelUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "b2c3d4e5-...",
                                        "name": "Dringend (aktualisiert)",
                                        "color": "orange",
                                        "sort_order": 5
                                    },
                                    "message": "Label updated successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name (if sent: required, max. 255 characters)"
                                    },
                                    "color": {
                                        "type": "string",
                                        "description": "Colour (if sent: required). Allowed values: zinc, red, orange, amber, yellow, lime, green, emerald, teal, cyan, sky, blue, indigo, violet, purple, fuchsia, pink, rose."
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowtasks.labels-delete",
                "summary": "Delete a label",
                "description": "Deletes a label (soft delete). A model boot event detaches the label from every to-do beforehand.",
                "tags": [
                    "flowtasks.labels"
                ],
                "parameters": [
                    {
                        "name": "labelUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Label deleted successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/{todoUuid}/labels": {
            "get": {
                "operationId": "flowtasks.todos-labels-list",
                "summary": "List the labels of a to-do",
                "description": "Returns every label attached to a specific to-do.",
                "tags": [
                    "flowtasks.labels"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "b2c3d4e5-...",
                                            "name": "Dringend",
                                            "color": "red",
                                            "sort_order": 1
                                        }
                                    ],
                                    "count": 1
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowtasks.todos-labels-attach",
                "summary": "Attach labels to a to-do",
                "description": "Attaches one or more labels to a to-do additively and returns HTTP 201 on success. If a UUID does not resolve to a team label, the endpoint answers with HTTP 422 and skipped; no labels are attached in that case.",
                "tags": [
                    "flowtasks.labels"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "b2c3d4e5-...",
                                            "name": "Dringend",
                                            "color": "red",
                                            "sort_order": 1
                                        }
                                    ],
                                    "message": "Labels attached successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "label_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Array of label UUIDs (at least 1 entry)"
                                    }
                                },
                                "required": [
                                    "label_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/todos/{todoUuid}/labels/{labelUuid}": {
            "delete": {
                "operationId": "flowtasks.todos-labels-detach",
                "summary": "Remove a label from a to-do",
                "description": "Removes a single label from a to-do (the label itself stays available to the team).",
                "tags": [
                    "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": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Label removed from todo."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/{todoUuid}/checklists": {
            "get": {
                "operationId": "flowtasks.checklists-list",
                "summary": "List checklists",
                "description": "Returns every checklist of a to-do including its items and progress (progress_percentage, total_items_count, completed_items_count).",
                "tags": [
                    "flowtasks.checklists"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "c3d4e5f6-...",
                                            "name": "Vorbereitung",
                                            "sort_order": 1,
                                            "progress_percentage": 50,
                                            "total_items_count": 2,
                                            "completed_items_count": 1,
                                            "items": [
                                                {
                                                    "uuid": "d4e5f6a7-...",
                                                    "content": "Kickoff-Meeting planen",
                                                    "completed": false,
                                                    "sort_order": 1,
                                                    "assignedUser": null
                                                }
                                            ]
                                        }
                                    ],
                                    "count": 1
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowtasks.checklists-create",
                "summary": "Create a checklist",
                "description": "Creates a new checklist on a to-do.",
                "tags": [
                    "flowtasks.checklists"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "c3d4e5f6-...",
                                        "name": "Vorbereitung",
                                        "sort_order": 1,
                                        "progress_percentage": 0,
                                        "total_items_count": 0,
                                        "completed_items_count": 0,
                                        "items": []
                                    },
                                    "message": "Checklist created successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name of the checklist (max. 255 characters)"
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/todos/{todoUuid}/checklists/{checklistUuid}": {
            "get": {
                "operationId": "flowtasks.checklists-show",
                "summary": "Get a checklist",
                "description": "Returns a single checklist of a to-do with all its items and its progress.",
                "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": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "c3d4e5f6-...",
                                        "todo_uuid": "550e8400-...",
                                        "name": "Vorbereitung",
                                        "sort_order": 1,
                                        "total_items_count": 2,
                                        "completed_items_count": 1,
                                        "progress_percentage": 50,
                                        "items": [
                                            {
                                                "uuid": "d4e5f6a7-...",
                                                "content": "Kickoff planen",
                                                "completed": false,
                                                "assigned_to_uuid": null
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowtasks.checklists-update",
                "summary": "Update a checklist",
                "description": "Updates the name or sort_order of a checklist. All fields are optional, only the fields you send are changed.",
                "tags": [
                    "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": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "c3d4e5f6-...",
                                        "name": "Vorbereitung (aktualisiert)",
                                        "sort_order": 2,
                                        "progress_percentage": 50
                                    },
                                    "message": "Checklist updated successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name (if sent: required, max. 255 characters)"
                                    },
                                    "sort_order": {
                                        "type": "integer",
                                        "description": "Explicit sort index"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowtasks.checklists-delete",
                "summary": "Delete a checklist",
                "description": "Deletes a checklist permanently, including all its 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": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Checklist deleted successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/{todoUuid}/checklists/reorder": {
            "put": {
                "operationId": "flowtasks.checklists-reorder",
                "summary": "Reorder checklists",
                "description": "Reorders the checklists of a to-do following the order of the UUIDs you send. The array must contain every checklist of the to-do exactly once; missing or unknown UUIDs return HTTP 422 with skipped and change no order.",
                "tags": [
                    "flowtasks.checklists"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Checklists reordered successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "checklist_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Array of all checklist UUIDs of the to-do in the order you want"
                                    }
                                },
                                "required": [
                                    "checklist_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/todos/{todoUuid}/checklists/{checklistUuid}/items": {
            "get": {
                "operationId": "flowtasks.checklists-items-list",
                "summary": "List checklist items",
                "description": "Returns the items of a checklist page by page, optionally only the completed or only the open ones.",
                "tags": [
                    "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": "Limits the result to completed (true) or open (false) items",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, starting at 1",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Entries per page, 1-200 (default 50)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "d4e5f6a7-...",
                                            "checklist_uuid": "c3d4e5f6-...",
                                            "content": "Kickoff planen",
                                            "completed": false,
                                            "assigned_to_uuid": null,
                                            "sort_order": 1
                                        }
                                    ],
                                    "meta": {
                                        "current_page": 1,
                                        "per_page": 50,
                                        "total": 2,
                                        "last_page": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowtasks.checklists-items-create",
                "summary": "Create a checklist item",
                "description": "Adds a new item to a checklist. If assigned_to is sent, the UUID must belong to a team member; otherwise the API answers with HTTP 404 \"Assigned user not found or not a team member.\"",
                "tags": [
                    "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": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "d4e5f6a7-...",
                                        "content": "Kickoff-Meeting planen",
                                        "completed": false,
                                        "sort_order": 1,
                                        "assignedUser": {
                                            "uuid": "9c858901-8a57-4791-81fe-4c455b099bc9",
                                            "name": "Maria Beispiel",
                                            "email": "maria@example.com"
                                        }
                                    },
                                    "message": "Checklist item created successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "content": {
                                        "type": "string",
                                        "description": "Text of the item (max. 500 characters)"
                                    },
                                    "assigned_to": {
                                        "type": "string",
                                        "description": "UUID of the assigned team member"
                                    }
                                },
                                "required": [
                                    "content"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/todos/checklists/{checklistUuid}/items/reorder": {
            "put": {
                "operationId": "flowtasks.checklists-items-reorder",
                "summary": "Reorder checklist items",
                "description": "Reorders the items of a checklist following the order of the UUIDs you send. The array must contain every item of the checklist exactly once; missing or unknown UUIDs return HTTP 422 with skipped and change no order.",
                "tags": [
                    "flowtasks.checklists"
                ],
                "parameters": [
                    {
                        "name": "checklistUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Checklist items reordered successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "item_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Array of all item UUIDs of the checklist in the order you want"
                                    }
                                },
                                "required": [
                                    "item_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/todos/{todoUuid}/checklists/{checklistUuid}/items/{itemUuid}": {
            "put": {
                "operationId": "flowtasks.checklists-items-update",
                "summary": "Update a checklist item",
                "description": "Updates the text or assignment of a checklist item. All fields are optional, only the fields you send are changed; assigned_to=null removes an existing assignment.",
                "tags": [
                    "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": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "d4e5f6a7-...",
                                        "content": "Kickoff-Meeting vorbereiten",
                                        "completed": false,
                                        "sort_order": 1,
                                        "assignedUser": null
                                    },
                                    "message": "Checklist item updated successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "content": {
                                        "type": "string",
                                        "description": "Text (if sent: required, max. 500 characters)"
                                    },
                                    "assigned_to": {
                                        "type": "string",
                                        "description": "UUID of the assigned team member, or null to remove the assignment"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowtasks.checklists-items-delete",
                "summary": "Delete a checklist item",
                "description": "Deletes a checklist item permanently.",
                "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": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Checklist item deleted successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/{todoUuid}/checklists/{checklistUuid}/items/{itemUuid}/toggle": {
            "put": {
                "operationId": "flowtasks.checklists-items-toggle",
                "summary": "Toggle a checklist item",
                "description": "Toggles the completed state of a checklist item (open -> completed or the other way round). The message depends on the new state: \"Checklist item marked complete.\" or \"Checklist item marked incomplete.\"",
                "tags": [
                    "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": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "d4e5f6a7-...",
                                        "content": "Kickoff-Meeting planen",
                                        "completed": true,
                                        "sort_order": 1,
                                        "assignedUser": null
                                    },
                                    "message": "Checklist item marked complete."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/boards/{uuid}/access": {
            "get": {
                "operationId": "flowtasks.boards-access-show",
                "summary": "Get the access of a board",
                "description": "Returns the board members with their roles, your own role, the state of external sharing and, for accounts with administration rights, the invited guests and the share address.",
                "tags": [
                    "flowtasks.sharing"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "board_uuid": "a1b2c3d4-...",
                                        "is_shared": true,
                                        "can_manage_access": true,
                                        "own_role": "owner",
                                        "members": [
                                            {
                                                "user_uuid": "e5f6a7b8-...",
                                                "name": "Anna",
                                                "role": "owner"
                                            }
                                        ],
                                        "share_url": "https://app.example.com/share/board/…",
                                        "external_invites": [
                                            {
                                                "uuid": "9f8e7d6c-...",
                                                "name": "Gast",
                                                "email": "gast@example.com"
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/boards/{uuid}/sharing/enable": {
            "post": {
                "operationId": "flowtasks.boards-sharing-enable",
                "summary": "Enable external sharing",
                "description": "Turns on external sharing for the board and creates a share address. A board that is already shared keeps its address.",
                "tags": [
                    "flowtasks.sharing"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "board_uuid": "a1b2c3d4-...",
                                        "is_shared": true,
                                        "share_url": "https://app.example.com/share/board/…"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/boards/{uuid}/sharing/disable": {
            "post": {
                "operationId": "flowtasks.boards-sharing-disable",
                "summary": "Disable external sharing",
                "description": "Turns off external sharing and discards the share address. Guests who were already invited can no longer reach the board.",
                "tags": [
                    "flowtasks.sharing"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "board_uuid": "a1b2c3d4-...",
                                        "is_shared": false,
                                        "share_url": null
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/boards/{uuid}/sharing/rotate": {
            "post": {
                "operationId": "flowtasks.boards-sharing-rotate",
                "summary": "Renew the share address",
                "description": "Replaces the share address with a new one. Every address handed out before becomes invalid; the guests stay on the list and regain access through a new invitation.",
                "tags": [
                    "flowtasks.sharing"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "board_uuid": "a1b2c3d4-...",
                                        "is_shared": true,
                                        "share_url": "https://app.example.com/share/board/…"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/boards/{uuid}/external-invites": {
            "post": {
                "operationId": "flowtasks.boards-external-invite",
                "summary": "Invite a guest",
                "description": "Invites a person without an account to the board and sends them an invitation with a time-limited access link. If external sharing is not active yet, it is turned on, because the invitation would otherwise lead nowhere.",
                "tags": [
                    "flowtasks.sharing"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "9f8e7d6c-...",
                                        "name": "Gast",
                                        "email": "gast@example.com"
                                    },
                                    "message": "Invitation sent successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "email": {
                                        "type": "string",
                                        "description": "Email address of the guest"
                                    },
                                    "name": {
                                        "type": "string",
                                        "description": "Display name of the guest (max. 255 characters)"
                                    }
                                },
                                "required": [
                                    "email",
                                    "name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/todos/boards/{uuid}/external-invites/{inviteUuid}": {
            "delete": {
                "operationId": "flowtasks.boards-external-invite-revoke",
                "summary": "Revoke guest access",
                "description": "Removes a guest's access to this board. The share address of the board stays the same.",
                "tags": [
                    "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": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "External access revoked successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/boards/{uuid}/transfer-ownership": {
            "post": {
                "operationId": "flowtasks.boards-transfer-ownership",
                "summary": "Transfer ownership",
                "description": "Hands the board over to another member; the previous owner becomes an admin. The target person must already have access to the board, otherwise the API answers with HTTP 422.",
                "tags": [
                    "flowtasks.sharing"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Board ownership transferred successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "user_uuid": {
                                        "type": "string",
                                        "description": "UUID of the new owner; must be a member of the team and of the board"
                                    }
                                },
                                "required": [
                                    "user_uuid"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/todos/{todoUuid}/files": {
            "get": {
                "operationId": "flowtasks.todos-files-list",
                "summary": "List the files of a to-do",
                "description": "Returns the attachments of a to-do page by page, newest first. Attachments that a guest uploaded through a shared board are marked by uploaded_by_external.",
                "tags": [
                    "flowtasks.files"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, starting at 1",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Entries per page, 1-200 (default 50)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "7a6b5c4d-...",
                                            "todo_uuid": "550e8400-...",
                                            "name": "Angebot.pdf",
                                            "mime_type": "application/pdf",
                                            "size": 182344,
                                            "kind": "document",
                                            "uploaded_by_name": "Anna",
                                            "uploaded_by_external": false
                                        }
                                    ],
                                    "meta": {
                                        "current_page": 1,
                                        "per_page": 50,
                                        "total": 1,
                                        "last_page": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowtasks.todos-files-upload",
                "summary": "Attach a file to a to-do",
                "description": "Attaches an uploaded file to a to-do. The call is made as multipart/form-data with the file field.",
                "tags": [
                    "flowtasks.files"
                ],
                "parameters": [
                    {
                        "name": "todoUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "7a6b5c4d-...",
                                        "name": "Angebot.pdf",
                                        "mime_type": "application/pdf",
                                        "size": 182344,
                                        "kind": "document"
                                    },
                                    "message": "File attached successfully."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "file": {
                                        "type": "string",
                                        "format": "binary",
                                        "description": "The file to upload, at most 50 MB, in one of the allowed formats"
                                    }
                                },
                                "required": [
                                    "file"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/todos/{todoUuid}/files/{fileUuid}/download": {
            "get": {
                "operationId": "flowtasks.todos-files-download",
                "summary": "Download a file",
                "description": "Delivers the file itself as a download. The response is not JSON but the file content with the matching content type. If the stored file is missing, the API answers with HTTP 404 and the error file_missing.",
                "tags": [
                    "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": "Successful response",
                        "content": {
                            "application/octet-stream": {
                                "schema": {
                                    "type": "string",
                                    "format": "binary"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/todos/{todoUuid}/files/{fileUuid}/text": {
            "get": {
                "operationId": "flowtasks.todos-files-text",
                "summary": "Read the text of a file",
                "description": "Reads the text of an attached file with the same extraction that is used for chat attachments. Formats without a reader answer with extraction_available=false instead of an error. Long texts are delivered in chunks of 20,000 characters; next_offset tells you where to continue.",
                "tags": [
                    "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": "Character offset to continue a long text (default 0)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "7a6b5c4d-...",
                                        "name": "Angebot.pdf",
                                        "extraction_available": true,
                                        "text": "Angebot Nr. 4711 …",
                                        "next_offset": null
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/timer/status": {
            "get": {
                "operationId": "flowtime.timer-status",
                "summary": "Get the timer status",
                "description": "Returns the current timer status: whether a timer is running and for how long. If no timer is running, \"is_tracking\" is false and \"timer\" is null. \"timer.source\" names the origin (api, app, app_offline, geofence or null for the web). In the \"Simple time tracking\" mode, the fields \"timer.entry_type\" (work|break) and \"timer.state\" (working|on_break) show whether you are working or on a break.",
                "tags": [
                    "flowtime.timer"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "is_tracking": true,
                                        "timer": {
                                            "uuid": "6f1e2a3b-...",
                                            "entry_type": "work",
                                            "state": "working",
                                            "description": "Feature-Entwicklung",
                                            "project": {
                                                "uuid": "9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f",
                                                "name": "Website Redesign",
                                                "client_name": "Example Company GmbH"
                                            },
                                            "starts_at": "2024-01-15T09:00:00+00:00",
                                            "elapsed_seconds": 3600,
                                            "elapsed_formatted": "01:00:00",
                                            "source": "app"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/timer/start": {
            "post": {
                "operationId": "flowtime.timer-start",
                "summary": "Start the timer",
                "description": "Starts a new timer. If a timer is already running, it is NOT replaced: the API answers with HTTP 409 and returns the UUID of the running timer in the field \"data.active_timer_uuid\". Stop or cancel the active timer before you start a new one. Breaking change: the former numeric field \"project_id\" is no longer accepted (validation error); the project is only given through \"project_uuid\". In the \"Simple time tracking\" mode, \"description\" and \"project_uuid\" are not allowed (HTTP 422), because starting the timer is clocking in.",
                "tags": [
                    "flowtime.timer"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": false,
                                    "error": "A timer is already running",
                                    "code": "timer_running",
                                    "data": {
                                        "active_timer_uuid": "6f1e2a3b-..."
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "description": {
                                        "type": "string",
                                        "description": "Description of the activity (max. 500 characters). Not allowed in the \"Simple time tracking\" mode."
                                    },
                                    "project_uuid": {
                                        "type": "string",
                                        "description": "UUID of the related project (bound to the team). Not allowed in the \"Simple time tracking\" mode."
                                    },
                                    "occurred_at": {
                                        "type": "string",
                                        "description": "Time of the clock event, ISO 8601 with offset (for example 2026-11-22T08:15:00+01:00), for clock events recorded offline or by location. At most 30 seconds in the future, at most 24 hours back, not before the start of the open entry and, without an open entry, not before the end of the last one (HTTP 422, code occurred_at_out_of_range). Default: server time."
                                    },
                                    "client_request_id": {
                                        "type": "string",
                                        "description": "UUID as an idempotency key per user. A repeat returns the first result with \"replayed\": true without clocking again. The same key for a different action: HTTP 409, code client_request_conflict."
                                    },
                                    "source": {
                                        "type": "string",
                                        "description": "Origin: api, app, app_offline or geofence. Default api for API keys, app for app tokens. app_offline and geofence show up on the web as a note on the entry."
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/timer/stop": {
            "post": {
                "operationId": "flowtime.timer-stop",
                "summary": "Stop the timer",
                "description": "Stops the running timer and saves the time entry. In project mode, project and description must be set (HTTP 400). In the \"Simple time tracking\" mode (clocking out), both requirements are dropped; this also applies to a running break, which ends as a result (leaving from a break). As with start and update, \"description\"/\"project_uuid\" are not allowed there (HTTP 422). HTTP 409 if the state changed in the meantime (for example a break started in parallel).",
                "tags": [
                    "flowtime.timer"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Timer stopped successfully",
                                    "data": {
                                        "uuid": "6f1e2a3b-...",
                                        "description": "Bug-Fixing",
                                        "project": {
                                            "uuid": "9d2f4c1a-...",
                                            "name": "Website Redesign",
                                            "client_name": "Example Company GmbH"
                                        },
                                        "starts_at": "2024-01-15T09:00:00+00:00",
                                        "ends_at": "2024-01-15T10:30:00+00:00",
                                        "seconds": 5400,
                                        "duration_formatted": "01:30:00",
                                        "source": "api"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "description": {
                                        "type": "string",
                                        "description": "Description (project mode only)."
                                    },
                                    "project_uuid": {
                                        "type": "string",
                                        "description": "UUID of the project (project mode only, bound to the team)."
                                    },
                                    "occurred_at": {
                                        "type": "string",
                                        "description": "Time of the clock event, ISO 8601 with offset (for example 2026-11-22T08:15:00+01:00), for clock events recorded offline or by location. At most 30 seconds in the future, at most 24 hours back, not before the start of the open entry and, without an open entry, not before the end of the last one (HTTP 422, code occurred_at_out_of_range). Default: server time."
                                    },
                                    "client_request_id": {
                                        "type": "string",
                                        "description": "UUID as an idempotency key per user. A repeat returns the first result with \"replayed\": true without clocking again. The same key for a different action: HTTP 409, code client_request_conflict."
                                    },
                                    "source": {
                                        "type": "string",
                                        "description": "Origin: api, app, app_offline or geofence. Default api for API keys, app for app tokens. app_offline and geofence show up on the web as a note on the entry."
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/timer": {
            "put": {
                "operationId": "flowtime.timer-update",
                "summary": "Update the running timer",
                "description": "Updates the running timer (change the description or project). Breaking change: the former numeric field \"project_id\" is no longer accepted; the project is only given through \"project_uuid\". In the \"Simple time tracking\" mode (and during a running break), \"description\"/\"project_uuid\" are not allowed (HTTP 422); only \"starts_at\" can still be changed.",
                "tags": [
                    "flowtime.timer"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "description": {
                                        "type": "string",
                                        "description": "New description"
                                    },
                                    "project_uuid": {
                                        "type": "string",
                                        "description": "UUID of the new project (bound to the team)"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowtime.timer-cancel",
                "summary": "Cancel the timer",
                "description": "Cancels the running timer without saving the time. A running break cannot be cancelled (HTTP 409). It has to be ended (\"End break\") or you clock out.",
                "tags": [
                    "flowtime.timer"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/timer/break/start": {
            "post": {
                "operationId": "flowtime.timer-break-start",
                "summary": "Start a break",
                "description": "Only in the \"Simple time tracking\" mode (otherwise HTTP 409). Closes the running work entry and atomically opens a break entry (entry_type=break). Breaks never count as working time. HTTP 404 without a running timer, HTTP 409 if already on a break.",
                "tags": [
                    "flowtime.timer"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Break started successfully",
                                    "data": {
                                        "uuid": "6f1e2a3b-...",
                                        "entry_type": "break",
                                        "state": "on_break",
                                        "starts_at": "2026-09-01T12:00:00+00:00",
                                        "source": "app"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "occurred_at": {
                                        "type": "string",
                                        "description": "Time of the clock event, ISO 8601 with offset (for example 2026-11-22T08:15:00+01:00), for clock events recorded offline or by location. At most 30 seconds in the future, at most 24 hours back, not before the start of the open entry and, without an open entry, not before the end of the last one (HTTP 422, code occurred_at_out_of_range). Default: server time."
                                    },
                                    "client_request_id": {
                                        "type": "string",
                                        "description": "UUID as an idempotency key per user. A repeat returns the first result with \"replayed\": true without clocking again. The same key for a different action: HTTP 409, code client_request_conflict."
                                    },
                                    "source": {
                                        "type": "string",
                                        "description": "Origin: api, app, app_offline or geofence. Default api for API keys, app for app tokens. app_offline and geofence show up on the web as a note on the entry."
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/timer/break/stop": {
            "post": {
                "operationId": "flowtime.timer-break-stop",
                "summary": "End a break",
                "description": "Only in the \"Simple time tracking\" mode (otherwise HTTP 409). Closes the running break entry and atomically opens a new work entry. HTTP 404 without a running timer, HTTP 409 if not on a break.",
                "tags": [
                    "flowtime.timer"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Break ended successfully",
                                    "data": {
                                        "uuid": "7a2b3c4d-...",
                                        "entry_type": "work",
                                        "state": "working",
                                        "starts_at": "2026-09-01T12:30:00+00:00",
                                        "source": "app"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "occurred_at": {
                                        "type": "string",
                                        "description": "Time of the clock event, ISO 8601 with offset (for example 2026-11-22T08:15:00+01:00), for clock events recorded offline or by location. At most 30 seconds in the future, at most 24 hours back, not before the start of the open entry and, without an open entry, not before the end of the last one (HTTP 422, code occurred_at_out_of_range). Default: server time."
                                    },
                                    "client_request_id": {
                                        "type": "string",
                                        "description": "UUID as an idempotency key per user. A repeat returns the first result with \"replayed\": true without clocking again. The same key for a different action: HTTP 409, code client_request_conflict."
                                    },
                                    "source": {
                                        "type": "string",
                                        "description": "Origin: api, app, app_offline or geofence. Default api for API keys, app for app tokens. app_offline and geofence show up on the web as a note on the entry."
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/entries": {
            "get": {
                "operationId": "flowtime.entries-list",
                "summary": "List time entries",
                "description": "Returns all time entries with optional filters. Every entry carries \"source\" (null for the web and FlowAI, otherwise api, app, app_offline or geofence).",
                "tags": [
                    "flowtime.entries"
                ],
                "parameters": [
                    {
                        "name": "start_date",
                        "in": "query",
                        "required": false,
                        "description": "Start date (YYYY-MM-DD)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "end_date",
                        "in": "query",
                        "required": false,
                        "description": "End date (YYYY-MM-DD)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "project_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Filter by project UUID",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "user_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Your own UUID is allowed for every FlowTime member and limits the result to your own entries. Team owner (or members with FlowTime full access) only: filter the entries of a specific user (UUID). Members with the \"berichte\" sub-right see team-wide entries, without it only their own.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "entry_type",
                        "in": "query",
                        "required": false,
                        "description": "Filter by entry type: \"work\" or \"break\" (\"Simple time tracking\" mode)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "description": "Maximum number of entries (1-500, default: 50)",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "offset",
                        "in": "query",
                        "required": false,
                        "description": "Offset for pagination",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowtime.entries-create",
                "summary": "Create a time entry",
                "description": "Creates a manual time entry (without a timer). Start and end time are required; the duration is calculated on the server from the difference. Breaking change: the former numeric field \"project_id\" is no longer accepted; the project is only given through \"project_uuid\". The \"Simple time tracking\" mode has a different contract: \"description\" and \"project_uuid\" are NOT allowed there; instead, \"entry_type\" (work|break, default: work) can be set. Validation errors of this endpoint (including the mode restrictions) answer with HTTP 400 and {\"success\": false, \"errors\": {...}}.",
                "tags": [
                    "flowtime.entries"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "description": {
                                        "type": "string",
                                        "description": "Conditional: required in project mode (max. 500 characters); not allowed in the \"Simple time tracking\" mode (HTTP 400)."
                                    },
                                    "project_uuid": {
                                        "type": "string",
                                        "description": "Conditional: required in project mode (project UUID, must belong to the team); not allowed in the \"Simple time tracking\" mode (HTTP 400)."
                                    },
                                    "starts_at": {
                                        "type": "string",
                                        "description": "Start time (ISO 8601)"
                                    },
                                    "ends_at": {
                                        "type": "string",
                                        "description": "End time (ISO 8601), must be after starts_at"
                                    },
                                    "entry_type": {
                                        "type": "string",
                                        "description": "Only in the \"Simple time tracking\" mode: \"work\" or \"break\" (default: work). Not allowed in project mode (HTTP 400)."
                                    }
                                },
                                "required": [
                                    "starts_at",
                                    "ends_at"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/entries/{uuid}": {
            "get": {
                "operationId": "flowtime.entries-show",
                "summary": "Get a time entry",
                "description": "Returns a single time entry with all details, including \"source\" (origin as in the list).",
                "tags": [
                    "flowtime.entries"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowtime.entries-update",
                "summary": "Update a time entry",
                "description": "Updates an existing time entry. Breaking change: the former numeric field \"project_id\" is no longer accepted; the project is only given through \"project_uuid\". Field validation answers with HTTP 400. Time clock entries (breaks, entries in the \"Simple time tracking\" mode and completed attendance entries without project and description) accept neither \"description\" nor \"project_uuid\" (HTTP 422); only start and end time can be changed, and \"entry_type\" is immutable. A running entry (timer or break) cannot be edited here (HTTP 409); use PUT /flowtime/timer for that.",
                "tags": [
                    "flowtime.entries"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "description": {
                                        "type": "string",
                                        "description": "Description"
                                    },
                                    "project_uuid": {
                                        "type": "string",
                                        "description": "Project UUID (bound to the team)"
                                    },
                                    "starts_at": {
                                        "type": "string",
                                        "description": "Start time (ISO 8601)"
                                    },
                                    "ends_at": {
                                        "type": "string",
                                        "description": "End time (ISO 8601)"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowtime.entries-delete",
                "summary": "Delete a time entry",
                "description": "Deletes a time entry permanently. A running entry (timer or break) cannot be deleted here (HTTP 409); use the timer endpoints (stop or cancel) for that.",
                "tags": [
                    "flowtime.entries"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/projects": {
            "get": {
                "operationId": "flowtime.projects-list",
                "summary": "List projects",
                "description": "Lists the active projects of the team that the user may book time on. Owners see all active projects. Members see public projects and those they have been granted, never hidden ones. Owners and members with the FlowTime \"Projekte\" sub-right get the full object (is_public, is_billable, billable_rate, currency; owners additionally budget). Members without this sub-right get the same bookable list with only uuid, name, client_name and color_code, so they can stop a project timer (POST /flowtime/timer/stop). Project details (GET /flowtime/projects/{uuid}) remain reserved for the sub-right, creating and editing for the owner as before (otherwise HTTP 403).",
                "tags": [
                    "flowtime.projects"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f",
                                            "name": "Website Redesign",
                                            "client_name": "Example Company GmbH",
                                            "color_code": "#3B82F6",
                                            "is_public": true,
                                            "is_billable": false,
                                            "billable_rate": null,
                                            "currency": "EUR"
                                        }
                                    ],
                                    "count": 1
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowtime.projects-create",
                "summary": "Create a project",
                "description": "Creates a new project (team owner or members with FlowTime full access only; everyone else gets 403). Breaking change: the client is passed as client_uuid; the former numeric field client_id is no longer accepted (validation error). Only available in project mode; in the \"Simple time tracking\" mode the endpoint answers with HTTP 409 and the error code mode_mismatch.",
                "tags": [
                    "flowtime.projects"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Project name (max. 255 characters)"
                                    },
                                    "client_uuid": {
                                        "type": "string",
                                        "description": "UUID of the CRM client, which must belong to the team"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Project description"
                                    },
                                    "color_code": {
                                        "type": "string",
                                        "description": "Hex colour (for example #10B981, default: #3B82F6)"
                                    },
                                    "is_public": {
                                        "type": "boolean",
                                        "description": "Visible to all team members (default: true)"
                                    },
                                    "is_billable": {
                                        "type": "boolean",
                                        "description": "The project is billable (default: false)"
                                    },
                                    "billable_rate": {
                                        "type": "number",
                                        "description": "Hourly rate for billing; required when is_billable is true (otherwise a validation error with HTTP 400), default 0 if omitted"
                                    },
                                    "currency": {
                                        "type": "string",
                                        "description": "ISO 4217 currency code (3 characters, default: team currency)"
                                    }
                                },
                                "required": [
                                    "name",
                                    "client_uuid"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/projects/{uuid}": {
            "get": {
                "operationId": "flowtime.projects-show",
                "summary": "Get project details",
                "description": "Returns the details of a single project, including time statistics. The project is addressed by its UUID; numeric IDs are no longer accepted (HTTP 404).",
                "tags": [
                    "flowtime.projects"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowtime.projects-update",
                "summary": "Update a project",
                "description": "Updates an existing project (team owner or members with FlowTime full access only; everyone else gets 403). The project is addressed by its UUID; numeric IDs are no longer accepted (HTTP 404). Only available in project mode; in the \"Simple time tracking\" mode the endpoint answers with HTTP 409 and the error code mode_mismatch.",
                "tags": [
                    "flowtime.projects"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Project name (max. 255 characters)"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Project description"
                                    },
                                    "status": {
                                        "type": "string",
                                        "description": "Project status: active or archived"
                                    },
                                    "color_code": {
                                        "type": "string",
                                        "description": "Hex colour (for example #10B981)"
                                    },
                                    "is_public": {
                                        "type": "boolean",
                                        "description": "Visible to all team members"
                                    },
                                    "is_hidden": {
                                        "type": "boolean",
                                        "description": "Hide the project in lists"
                                    },
                                    "is_billable": {
                                        "type": "boolean",
                                        "description": "The project is billable"
                                    },
                                    "billable_rate": {
                                        "type": "number",
                                        "description": "Hourly rate for billing; null is stored as 0"
                                    },
                                    "currency": {
                                        "type": "string",
                                        "description": "ISO 4217 currency code (3 characters)"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowtime.projects-delete",
                "summary": "Delete a project",
                "description": "Removes a project from FlowTime (team owner or members with FlowTime full access only; everyone else gets 403). As in the web interface, the project must be archived first, otherwise the API answers with HTTP 409 and the error project_not_archived. A project that still has time entries booked on it is kept and answers with HTTP 409 and the error project_has_entries, so booked hours never lose their project. Only the FlowTime side of the project is deleted; the client project record in FlowCRM stays untouched.",
                "tags": [
                    "flowtime.projects"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Project deleted successfully"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/projects/{uuid}/permissions": {
            "put": {
                "operationId": "flowtime.projects-permissions",
                "summary": "Set project permissions",
                "description": "Sets which team members have access to a private project (team owner or members with FlowTime full access only; everyone else gets 403). The list you send replaces the existing permissions completely. Only users who belong to the team are taken over. Only available in project mode; in the \"Simple time tracking\" mode the endpoint answers with HTTP 409 and the error code mode_mismatch.",
                "tags": [
                    "flowtime.projects"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "user_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "List of user UUIDs that should get access",
                                        "properties": {
                                            "*": {
                                                "type": "string",
                                                "description": "Single user UUID (valid UUID format)"
                                            }
                                        }
                                    }
                                },
                                "required": [
                                    "user_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/context": {
            "get": {
                "operationId": "flowtime.flowtime-context",
                "summary": "Get module context",
                "description": "Returns the team's working time model, your own sub-rights, the working hours settings and the state of the time clock. A client needs this before its first write: in the \"Simple time tracking\" mode an entry carries neither project nor description, and the shift endpoints are only available when the team has switched on shift planning. The state of the time clock is one of clocked_out, clocked_in, on_break or inactive. If the team's overtime switch is off, the target hours weekly_hours and daily_hours are missing from working_hours.",
                "tags": [
                    "flowtime.reports"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "mode": "stamp_clock",
                                        "simple_mode": true,
                                        "shifts_enabled": false,
                                        "rights": {
                                            "owner": true,
                                            "reports": true,
                                            "team_reports": true,
                                            "projects": true,
                                            "logs": true,
                                            "shifts": false,
                                            "shift_planning": false
                                        },
                                        "working_hours": {
                                            "weekly_hours": "40.00",
                                            "working_days": [
                                                1,
                                                2,
                                                3,
                                                4,
                                                5
                                            ],
                                            "daily_hours": {
                                                "1": 8,
                                                "2": 8,
                                                "3": 8,
                                                "4": 8,
                                                "5": 8
                                            },
                                            "track_overtime": true
                                        },
                                        "stamp_clock": {
                                            "state": "clocked_in",
                                            "running_entry_uuid": "11aa22bb-...",
                                            "running_since": "2026-09-21T08:02:00+02:00"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/search": {
            "get": {
                "operationId": "flowtime.flowtime-search",
                "summary": "Search records",
                "description": "Searches the FlowTime records of one type. Visibility follows the rights of the key: without report rights only your own time entries appear, projects only with the projekte sub-right, clients only for the team owner. A type the key cannot reach answers with HTTP 403 and the error record_type_not_available.",
                "tags": [
                    "flowtime.reports"
                ],
                "parameters": [
                    {
                        "name": "type",
                        "in": "query",
                        "required": true,
                        "description": "Record type: entry, project, client, member, shift_plan, shift_type or shift_template",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "q",
                        "in": "query",
                        "required": false,
                        "description": "Search term; matches the record name, and for members also the email address",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "from",
                        "in": "query",
                        "required": false,
                        "description": "Only for type=entry: earliest start date (YYYY-MM-DD)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "required": false,
                        "description": "Only for type=entry: latest start date (YYYY-MM-DD)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "user_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Only for type=entry: limits the result to one person's entries; other people require the teamberichte sub-right",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, starting at 1",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Entries per page, 1-200 (default 50)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "11aa22bb-...",
                                            "user_uuid": "e5f6a7b8-...",
                                            "user_name": "Anna",
                                            "project_uuid": "8b7a6f5e-...",
                                            "project_name": "Relaunch",
                                            "client_name": "Muster GmbH",
                                            "description": "Konzept",
                                            "starts_at": "2026-09-21T08:00:00+02:00",
                                            "ends_at": "2026-09-21T09:30:00+02:00",
                                            "seconds": 5400,
                                            "is_running": false,
                                            "is_stamp": false,
                                            "entry_type": "work",
                                            "source": null
                                        }
                                    ],
                                    "meta": {
                                        "current_page": 1,
                                        "per_page": 50,
                                        "total": 1,
                                        "last_page": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/reports/{report}": {
            "get": {
                "operationId": "flowtime.reports-detailed",
                "summary": "Get the detailed report",
                "description": "Returns one of the four reports. The path segment report is detailed, team, overtime or logs. detailed returns the completed work entries of a period page by page (the default is the current month) and accepts from, to and user_uuid. team returns the monthly evaluation per team member and accepts year and month. overtime returns the overtime balance of the current week, your own by default; another person's user_uuid is reserved for the team owner. If the team's overtime switch is off, overtime has no data key, and the team report has no target_hours and overtime_reduction_hours; if no overtime is tracked for the person, these values are null. logs returns the module's log lines page by page.",
                "tags": [
                    "flowtime.reports"
                ],
                "parameters": [
                    {
                        "name": "report",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "from",
                        "in": "query",
                        "required": false,
                        "description": "detailed only: start of the period (YYYY-MM-DD), default start of the month",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "required": false,
                        "description": "detailed only: end of the period (YYYY-MM-DD), default today",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "year",
                        "in": "query",
                        "required": false,
                        "description": "team only: year of the evaluation, default current year",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "month",
                        "in": "query",
                        "required": false,
                        "description": "team only: month of the evaluation (1-12), default current month",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "user_uuid",
                        "in": "query",
                        "required": false,
                        "description": "For detailed and overtime: the person whose figures you want",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "For detailed and logs: page number, starting at 1",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "For detailed and logs: entries per page, 1-200 (default 50)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "11aa22bb-...",
                                            "user_uuid": "e5f6a7b8-...",
                                            "user_name": "Anna",
                                            "project_uuid": "8b7a6f5e-...",
                                            "project_name": "Relaunch",
                                            "client_name": "Muster GmbH",
                                            "description": "Konzept",
                                            "starts_at": "2026-09-21T08:00:00+02:00",
                                            "ends_at": "2026-09-21T09:30:00+02:00",
                                            "seconds": 5400,
                                            "is_running": false,
                                            "is_stamp": false,
                                            "entry_type": "work",
                                            "source": null
                                        }
                                    ],
                                    "meta": {
                                        "current_page": 1,
                                        "per_page": 50,
                                        "total": 1,
                                        "last_page": 1
                                    },
                                    "report": "detailed",
                                    "from": "2026-09-01",
                                    "to": "2026-09-21"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/stats/today": {
            "get": {
                "operationId": "flowtime.stats-today",
                "summary": "Daily evaluation",
                "description": "Aggregated evaluation of the time the user tracked today, including breaks and a breakdown by project (data.by_project, identified by project_uuid).",
                "tags": [
                    "flowtime.statistics"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "date": "2026-09-21",
                                        "total_seconds": 5400,
                                        "total_hours": 1.5,
                                        "total_formatted": "01:30:00",
                                        "break_seconds": 0,
                                        "entries_count": 1,
                                        "is_tracking": false,
                                        "by_project": [
                                            {
                                                "project_uuid": "8b7a6f5e-...",
                                                "project_name": "Relaunch",
                                                "client_name": "Muster GmbH",
                                                "seconds": 5400,
                                                "entries_count": 1
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/stats/week": {
            "get": {
                "operationId": "flowtime.stats-week",
                "summary": "Weekly evaluation",
                "description": "Aggregated evaluation of the current week with a daily breakdown and project shares.",
                "tags": [
                    "flowtime.statistics"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "week_start": "2026-09-21",
                                        "week_end": "2026-09-27",
                                        "total_seconds": 5400,
                                        "total_hours": 1.5,
                                        "total_formatted": "01:30:00",
                                        "break_seconds": 0,
                                        "entries_count": 1,
                                        "by_day": [
                                            {
                                                "date": "2026-09-21",
                                                "day_name": "Monday",
                                                "seconds": 5400,
                                                "hours": 1.5
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/working-hours/status": {
            "get": {
                "operationId": "flowtime.working-hours-status",
                "summary": "Get the working time status",
                "description": "Returns the current working time balance of the signed-in user (daily, weekly and monthly balance and overtime balance). The balance in \"overtime_balance\" is calculated on every call from the tracked time, the target and the corrections, not read from a stored value. A team with overtime tracking switched off, and likewise a member for whom no overtime is tracked, only gets \"configured\" (false) and \"message\"; settings, target and balance fields do not appear at all and are not null. The same shape applies when no working hours are configured. The settings can still be written.",
                "tags": [
                    "flowtime.working-hours"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "configured": true,
                                        "settings": {
                                            "weekly_hours": "40.00",
                                            "working_days": [
                                                1,
                                                2,
                                                3,
                                                4,
                                                5,
                                                6,
                                                7
                                            ],
                                            "daily_hours": null,
                                            "track_overtime": true
                                        },
                                        "overtime_balance": {
                                            "minutes": -1123,
                                            "hours": -18.72,
                                            "formatted": "-18:43"
                                        },
                                        "today": {
                                            "date": "2026-09-23",
                                            "day_name": "Mittwoch",
                                            "is_working_day": true,
                                            "day_kind": "regular",
                                            "day_label": null,
                                            "target_seconds": 7714,
                                            "target_hours": 2.14,
                                            "target_formatted": "02:08",
                                            "actual_seconds": 0,
                                            "actual_hours": 0,
                                            "actual_formatted": "00:00",
                                            "difference_seconds": -7714,
                                            "difference_formatted": "-02:08",
                                            "remaining_seconds": 7714,
                                            "remaining_formatted": "02:08",
                                            "is_complete": false,
                                            "percentage": 0,
                                            "has_active_timer": false
                                        },
                                        "this_week": {
                                            "week_start": "2026-09-21",
                                            "week_end": "2026-09-27",
                                            "target_seconds": 48856,
                                            "target_hours": 13.57,
                                            "target_formatted": "13:34",
                                            "actual_seconds": 64800,
                                            "actual_hours": 18,
                                            "actual_formatted": "18:00",
                                            "difference_seconds": 15944,
                                            "difference_hours": 4.43,
                                            "difference_formatted": "+04:25",
                                            "percentage": 132.6,
                                            "is_over_target": true,
                                            "has_active_timer": false
                                        },
                                        "this_month": {
                                            "month": "2026-09",
                                            "month_name": "September 2026",
                                            "target_seconds": 460276,
                                            "target_hours": 127.85,
                                            "actual_seconds": 97200,
                                            "actual_hours": 27,
                                            "difference_seconds": -363076,
                                            "difference_hours": -100.85,
                                            "difference_formatted": "-100:51",
                                            "working_days_count": 23,
                                            "percentage": 21.1,
                                            "has_active_timer": false
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/working-hours/settings": {
            "put": {
                "operationId": "flowtime.working-hours-settings",
                "summary": "Change working hours settings",
                "description": "Deprecated, replaced by PUT /members/{user_uuid}. Changes the working hours settings of a team member (team owner or members with FlowTime full access only; everyone else gets 403). The target member is identified by \"user_uuid\" in the body. Only the fields you send are updated. The endpoint writes through the same logic as the members endpoint and therefore answers in its shape; fields that are no longer supported are silently ignored here. Every response carries the headers \"Deprecation: true\" and \"Sunset\".",
                "tags": [
                    "flowtime.working-hours"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Member updated successfully",
                                    "data": {
                                        "user_uuid": "9d3c6a2e-5b1f-4f7a-8c2d-1e4b7a9f0c35",
                                        "weekly_hours": "32.00",
                                        "working_days": [
                                            1,
                                            2,
                                            3,
                                            4,
                                            5,
                                            6,
                                            7
                                        ],
                                        "daily_hours": null,
                                        "track_overtime": true,
                                        "compensation": {
                                            "type": "hourly",
                                            "hourly_rate": null,
                                            "monthly_salary": null,
                                            "currency": null,
                                            "valid_from": "2026-09-23"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "user_uuid": {
                                        "type": "string",
                                        "description": "UUID of the target member"
                                    },
                                    "weekly_hours": {
                                        "type": "number",
                                        "description": "Weekly hours (0-168)"
                                    },
                                    "working_days": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Working days as numbers 1-7 (Mon-Sun), at least one day, each day at most once"
                                    },
                                    "daily_hours": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Target hours per day (0-24)"
                                    },
                                    "track_overtime": {
                                        "type": "boolean",
                                        "description": "Track overtime; if sent, true or false, not null"
                                    }
                                },
                                "required": [
                                    "user_uuid"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/working-hours/overtime/adjust": {
            "post": {
                "operationId": "flowtime.working-hours-overtime-adjust",
                "summary": "Adjust the overtime balance",
                "description": "Adjusts the overtime balance of a team member (team owner or members with FlowTime full access only; everyone else gets 403). With \"mode\" the value is either added (add, default) or set absolutely (set). The resulting balance is limited to the permitted bounds on the server.",
                "tags": [
                    "flowtime.working-hours"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "user_uuid": {
                                        "type": "string",
                                        "description": "UUID of the target member"
                                    },
                                    "minutes": {
                                        "type": "integer",
                                        "description": "Number of minutes (with mode=add the delta, with mode=set the target value)"
                                    },
                                    "mode": {
                                        "type": "string",
                                        "description": "add (add, default) or set (set absolutely)"
                                    },
                                    "reason": {
                                        "type": "string",
                                        "description": "Reason for the audit trail (max. 500 characters)"
                                    }
                                },
                                "required": [
                                    "user_uuid",
                                    "minutes"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/working-hours/history": {
            "get": {
                "operationId": "flowtime.working-hours-history",
                "summary": "Get the working time history",
                "description": "Returns the day-by-day working time history, by default for the current week of the signed-in user. Team owners and members with FlowTime full access can get another member's history through \"user_uuid\". The period is limited to 31 days. \"summary\" sums up target and actual time of the requested days; \"overtime_balance\" is, separately, the running overtime balance as of today, calculated on every call. A team with overtime tracking switched off, and likewise a member for whom no overtime is tracked, only gets \"configured\" (false) and an empty list of days; the requested member is what counts. Period, summary and balance then do not appear at all and are not null. The settings can still be written.",
                "tags": [
                    "flowtime.working-hours"
                ],
                "parameters": [
                    {
                        "name": "start_date",
                        "in": "query",
                        "required": false,
                        "description": "Start date (YYYY-MM-DD, default: start of the week)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "end_date",
                        "in": "query",
                        "required": false,
                        "description": "End date (YYYY-MM-DD, must be >= start_date)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "user_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Team owner (or members with FlowTime full access) only: history of a specific user",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "configured": true,
                                        "period": {
                                            "start_date": "2026-09-22",
                                            "end_date": "2026-09-22"
                                        },
                                        "summary": {
                                            "target_hours": 5.71,
                                            "actual_hours": 9,
                                            "difference_hours": 3.29
                                        },
                                        "overtime_balance": {
                                            "minutes": -1123,
                                            "hours": -18.72,
                                            "formatted": "-18:43"
                                        },
                                        "days": [
                                            {
                                                "date": "2026-09-22",
                                                "day_name": "Dienstag",
                                                "is_working_day": true,
                                                "day_kind": "regular",
                                                "day_label": null,
                                                "target_seconds": 20571,
                                                "target_hours": 5.71,
                                                "target_formatted": "05:42",
                                                "actual_seconds": 32400,
                                                "actual_hours": 9,
                                                "actual_formatted": "09:00",
                                                "difference_seconds": 11829,
                                                "difference_formatted": "+03:17",
                                                "remaining_seconds": 0,
                                                "remaining_formatted": "00:00",
                                                "is_complete": true,
                                                "percentage": 157.5,
                                                "has_active_timer": false
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/members": {
            "get": {
                "operationId": "flowtime.members-index",
                "summary": "List members",
                "description": "Lists all members of the team with working hours, pay, vacation allowance and overtime balance (team owner or members with FlowTime full access only; everyone else gets 403). The pay is the row of the pay history valid on the reference date; if no row exists for a member, all values of the block are null in the response, never 0. The vacation block applies to the year of the reference date, the overtime block is the balance up to the reference date. If FlowTime cannot calculate a value, for example for a member without FlowTime access, it is null in the block. If no overtime is tracked for a member (track_overtime false), all values of their overtime block are null. If the team has switched overtime off, the fields data.*.overtime, data.*.working_time.weekly_hours and data.*.working_time.daily_hours are missing entirely from every entry; working days, track_overtime, pay and vacation remain.",
                "tags": [
                    "flowtime.members"
                ],
                "parameters": [
                    {
                        "name": "date",
                        "in": "query",
                        "required": false,
                        "description": "Reference date (YYYY-MM-DD), default: today",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Entries per page (1-200, default 50)",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page (starting at 1)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "user_uuid": "44ad890b-f7f3-4154-8b38-83261195e475",
                                            "name": "John Doe",
                                            "working_time": {
                                                "weekly_hours": "40.00",
                                                "working_days": [
                                                    1,
                                                    2,
                                                    3,
                                                    4,
                                                    5
                                                ],
                                                "daily_hours": {
                                                    "1": 8,
                                                    "2": 8,
                                                    "3": 8,
                                                    "4": 8,
                                                    "5": 8
                                                },
                                                "track_overtime": true
                                            },
                                            "compensation": {
                                                "type": "hourly",
                                                "hourly_rate": 25.5,
                                                "monthly_salary": null,
                                                "currency": "EUR",
                                                "valid_from": "2026-09-23"
                                            },
                                            "vacation": {
                                                "year": 2026,
                                                "has_contingent": true,
                                                "entitlement": 30,
                                                "carryover": 2.5,
                                                "taken": 12,
                                                "planned": 5,
                                                "requested": 2,
                                                "remaining": 13.5
                                            },
                                            "overtime": {
                                                "minutes": 450,
                                                "hours": 7.5,
                                                "formatted": "+07:30"
                                            }
                                        }
                                    ],
                                    "meta": {
                                        "total": 1,
                                        "per_page": 50,
                                        "current_page": 1,
                                        "last_page": 1,
                                        "date": "2026-09-23"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/members/{user_uuid}": {
            "put": {
                "operationId": "flowtime.members-update",
                "summary": "Edit a member",
                "description": "Changes the working hours and pay of a team member (team owner or members with FlowTime full access only; everyone else gets 403). The member is addressed by the UUID in the path. Only the fields you send are updated; daily hours are only kept for selected working days. A pay change is recorded in the pay history with a valid-from date; a second change on the same day replaces that day's row instead of adding another. The response contains the pay block valid today. Validation errors are answered with HTTP 422.",
                "tags": [
                    "flowtime.members"
                ],
                "parameters": [
                    {
                        "name": "user_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Member updated successfully",
                                    "data": {
                                        "user_uuid": "9d3c6a2e-5b1f-4f7a-8c2d-1e4b7a9f0c35",
                                        "weekly_hours": "32.00",
                                        "working_days": [
                                            1,
                                            2,
                                            3,
                                            4
                                        ],
                                        "daily_hours": {
                                            "1": 8,
                                            "2": 8,
                                            "3": 8,
                                            "4": 8
                                        },
                                        "track_overtime": true,
                                        "compensation": {
                                            "type": "monthly",
                                            "hourly_rate": null,
                                            "monthly_salary": 4200,
                                            "currency": "EUR",
                                            "valid_from": "2026-09-23"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "weekly_hours": {
                                        "type": "number",
                                        "description": "Weekly hours (0-168)"
                                    },
                                    "working_days": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Working days as numbers 1-7 (Mon-Sun), at least one day, each day at most once"
                                    },
                                    "daily_hours": {
                                        "type": "object",
                                        "description": "Target hours per working day (0-24), the key is the weekday 1-7"
                                    },
                                    "track_overtime": {
                                        "type": "boolean",
                                        "description": "Track overtime; if sent, true or false, not null"
                                    },
                                    "compensation_type": {
                                        "type": "string",
                                        "description": "Pay type: hourly (hourly rate) or monthly (monthly salary); if sent, not null"
                                    },
                                    "hourly_rate": {
                                        "type": "number",
                                        "description": "Hourly rate (0 to 999999.99). Required for the pay type hourly unless an hourly rate is stored; not stored for monthly"
                                    },
                                    "monthly_salary": {
                                        "type": "number",
                                        "description": "Monthly salary (0 to 999999.99). Required for the pay type monthly unless a monthly salary is stored; not stored for hourly"
                                    },
                                    "currency": {
                                        "type": "string",
                                        "description": "Currency as a three-letter code, for example EUR; if omitted, the previous currency stays"
                                    },
                                    "valid_from": {
                                        "type": "string",
                                        "format": "date",
                                        "description": "Valid from (YYYY-MM-DD), default: today. The date must not be in the future, at most 118 months before the current month (from its first day) and not before the start of the last row of the pay history with a different amount; each of these limits is rejected with HTTP 422. A date equal to that start replaces the row. Later rows without an amount (such as the row from the start date of employment) or with exactly the new pay are replaced."
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/holidays": {
            "get": {
                "operationId": "flowtime.holidays-index",
                "summary": "Get public holidays",
                "description": "Returns the statutory public holidays in Germany for a year, in ascending date order. This is master data that is identical for all teams; every member with FlowTime access can retrieve it. With state you get the nationwide holidays and those of the given federal state.",
                "tags": [
                    "flowtime.members"
                ],
                "parameters": [
                    {
                        "name": "year",
                        "in": "query",
                        "required": false,
                        "description": "Year (1990-2100), default: current year",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "state",
                        "in": "query",
                        "required": false,
                        "description": "Federal state as an abbreviation (BW, BY, BE, BB, HB, HH, HE, MV, NI, NW, RP, SL, SN, ST, SH, TH). DE only returns the nationwide holidays; any other code is rejected with HTTP 422. Without it, all holidays of the year are returned.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "date": "2026-01-01",
                                            "state": "DE",
                                            "name": "Neujahr",
                                            "source": "feiertage-api.de"
                                        },
                                        {
                                            "date": "2026-01-06",
                                            "state": "BY",
                                            "name": "Heilige Drei Könige",
                                            "source": "feiertage-api.de"
                                        },
                                        {
                                            "date": "2026-12-25",
                                            "state": "DE",
                                            "name": "1. Weihnachtstag",
                                            "source": "feiertage-api.de"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/absences": {
            "get": {
                "operationId": "flowtime.absences-index",
                "summary": "List absences",
                "description": "Lists the team's absences, sorted by first day in descending order. Members only get their own entries. A period from from and to returns every absence that has at least one day in it.",
                "tags": [
                    "flowtime.absences"
                ],
                "parameters": [
                    {
                        "name": "from",
                        "in": "query",
                        "required": false,
                        "description": "Start of the period (YYYY-MM-DD)",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "required": false,
                        "description": "End of the period (YYYY-MM-DD), not before from",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "type",
                        "in": "query",
                        "required": false,
                        "description": "vacation, sick, overtime_reduction or business_trip",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "requested, approved, rejected or cancelled",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "user_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Only absences of this member (team owner; members only with their own UUID)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Entries per page (1-200, default 50)",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page (starting at 1)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "8f2b4c1e-3d5a-4e6f-9a7b-2c1d0e9f8a76",
                                            "user_uuid": "44ad890b-f7f3-4154-8b38-83261195e475",
                                            "user_name": "John Doe",
                                            "type": "vacation",
                                            "starts_on": "2026-09-28",
                                            "ends_on": "2026-09-30",
                                            "half_day_start": "none",
                                            "half_day_end": "none",
                                            "hours": null,
                                            "status": "approved",
                                            "note": "Sommerurlaub",
                                            "decided_by_uuid": "a57b92df-c5e3-4e64-81f0-4dcfddba105c",
                                            "decided_at": "2026-09-23T17:03:49+02:00",
                                            "decision_note": null,
                                            "created_at": "2026-09-23T17:03:49+02:00",
                                            "updated_at": "2026-09-23T17:03:49+02:00"
                                        }
                                    ],
                                    "meta": {
                                        "total": 1,
                                        "per_page": 50,
                                        "current_page": 1,
                                        "last_page": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowtime.absences-store",
                "summary": "Create an absence",
                "description": "Creates an absence. Without user_uuid it is your own request or notification; with user_uuid the team owner enters the absence for a member. FlowTime sets the status; status and decision fields must not be sent. warnings contains notes for the team owner (for example an overlap) that do not prevent saving. No absence can be created for a member without FlowTime access, not even by the team owner (HTTP 422, error on the user_uuid field). Response HTTP 201.",
                "tags": [
                    "flowtime.absences"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Absence created successfully",
                                    "data": {
                                        "uuid": "8f2b4c1e-3d5a-4e6f-9a7b-2c1d0e9f8a76",
                                        "user_uuid": "44ad890b-f7f3-4154-8b38-83261195e475",
                                        "user_name": "John Doe",
                                        "type": "vacation",
                                        "starts_on": "2026-09-28",
                                        "ends_on": "2026-09-30",
                                        "half_day_start": "none",
                                        "half_day_end": "none",
                                        "hours": null,
                                        "status": "approved",
                                        "note": "Sommerurlaub",
                                        "decided_by_uuid": "a57b92df-c5e3-4e64-81f0-4dcfddba105c",
                                        "decided_at": "2026-09-23T17:03:49+02:00",
                                        "decision_note": null,
                                        "created_at": "2026-09-23T17:03:49+02:00",
                                        "updated_at": "2026-09-23T17:03:49+02:00"
                                    },
                                    "warnings": []
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "user_uuid": {
                                        "type": "string",
                                        "description": "Member of the team (team owner only); if omitted, the absence applies to you"
                                    },
                                    "type": {
                                        "type": "string",
                                        "description": "vacation, sick, overtime_reduction or business_trip"
                                    },
                                    "starts_on": {
                                        "type": "string",
                                        "format": "date",
                                        "description": "First day (YYYY-MM-DD)"
                                    },
                                    "ends_on": {
                                        "type": "string",
                                        "format": "date",
                                        "description": "Last day (YYYY-MM-DD), not before starts_on; required except for overtime_reduction (a single day)"
                                    },
                                    "half_day_start": {
                                        "type": "string",
                                        "description": "Half day on the first day: none, am or pm (default none)"
                                    },
                                    "half_day_end": {
                                        "type": "string",
                                        "description": "Half day on the last day: none, am or pm (default none)"
                                    },
                                    "hours": {
                                        "type": "number",
                                        "description": "Hours, only for overtime_reduction and then required (greater than 0, at most 24, in quarter hours)"
                                    },
                                    "note": {
                                        "type": "string",
                                        "description": "Note (max. 500 characters)"
                                    }
                                },
                                "required": [
                                    "type",
                                    "starts_on"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/absences/balance": {
            "get": {
                "operationId": "flowtime.absences-balance",
                "summary": "Get the vacation and overtime balance",
                "description": "Returns a member's vacation allowance for a year and current overtime balance, exactly as FlowTime calculates them. A member can only retrieve their own figures; another person's user_uuid returns 403. Only the team owner and members with FlowTime full access see other people's figures; the team reports right is not enough. A member of another team returns 404. The vacation block applies to the requested year, the overtime block is the running balance up to today. If the team has switched overtime off, the data.overtime block is missing entirely from the response; the vacation block remains. If FlowTime cannot calculate a value, it is null in the block. If no overtime is tracked for the member, all values of the overtime block are null; for a member without FlowTime access this applies to both blocks, exactly as in GET /members. entitlement and remaining are null as long as no vacation entitlement is stored for the member.",
                "tags": [
                    "flowtime.absences"
                ],
                "parameters": [
                    {
                        "name": "user_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Member of the team; if omitted, your own figures (other members only for the team owner and members with FlowTime full access)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "year",
                        "in": "query",
                        "required": false,
                        "description": "Year of the vacation allowance (2000-2100, default: current year)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "user_uuid": "44ad890b-f7f3-4154-8b38-83261195e475",
                                        "year": 2026,
                                        "vacation": {
                                            "has_contingent": true,
                                            "entitlement": 30,
                                            "carryover": 2.5,
                                            "taken": 12,
                                            "planned": 5,
                                            "requested": 2,
                                            "remaining": 13.5
                                        },
                                        "overtime": {
                                            "minutes": 450,
                                            "hours": 7.5,
                                            "formatted": "+07:30"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/absences/{uuid}": {
            "get": {
                "operationId": "flowtime.absences-show",
                "summary": "Get an absence",
                "description": "Returns an absence. Members only get their own absences; any other UUID returns 404.",
                "tags": [
                    "flowtime.absences"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "8f2b4c1e-3d5a-4e6f-9a7b-2c1d0e9f8a76",
                                        "user_uuid": "44ad890b-f7f3-4154-8b38-83261195e475",
                                        "user_name": "John Doe",
                                        "type": "vacation",
                                        "starts_on": "2026-09-28",
                                        "ends_on": "2026-09-30",
                                        "half_day_start": "none",
                                        "half_day_end": "none",
                                        "hours": null,
                                        "status": "approved",
                                        "note": "Sommerurlaub",
                                        "decided_by_uuid": "a57b92df-c5e3-4e64-81f0-4dcfddba105c",
                                        "decided_at": "2026-09-23T17:03:49+02:00",
                                        "decision_note": null,
                                        "created_at": "2026-09-23T17:03:49+02:00",
                                        "updated_at": "2026-09-23T17:03:49+02:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowtime.absences-update",
                "summary": "Change an absence",
                "description": "Changes an absence (team owner or members with FlowTime full access only; everyone else gets 403). Only the fields you send are changed. The status, the decision fields and the member cannot be changed here.",
                "tags": [
                    "flowtime.absences"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Absence updated successfully",
                                    "data": {
                                        "uuid": "8f2b4c1e-3d5a-4e6f-9a7b-2c1d0e9f8a76",
                                        "user_uuid": "44ad890b-f7f3-4154-8b38-83261195e475",
                                        "user_name": "John Doe",
                                        "type": "vacation",
                                        "starts_on": "2026-09-28",
                                        "ends_on": "2026-09-30",
                                        "half_day_start": "none",
                                        "half_day_end": "none",
                                        "hours": null,
                                        "status": "approved",
                                        "note": "Sommerurlaub an der Ostsee",
                                        "decided_by_uuid": "a57b92df-c5e3-4e64-81f0-4dcfddba105c",
                                        "decided_at": "2026-09-23T17:03:49+02:00",
                                        "decision_note": null,
                                        "created_at": "2026-09-23T17:03:49+02:00",
                                        "updated_at": "2026-09-23T17:03:49+02:00"
                                    },
                                    "warnings": []
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "type": "string",
                                        "description": "vacation, sick, overtime_reduction or business_trip"
                                    },
                                    "starts_on": {
                                        "type": "string",
                                        "format": "date",
                                        "description": "First day (YYYY-MM-DD)"
                                    },
                                    "ends_on": {
                                        "type": "string",
                                        "format": "date",
                                        "description": "Last day (YYYY-MM-DD)"
                                    },
                                    "half_day_start": {
                                        "type": "string",
                                        "description": "none, am or pm"
                                    },
                                    "half_day_end": {
                                        "type": "string",
                                        "description": "none, am or pm"
                                    },
                                    "hours": {
                                        "type": "number",
                                        "description": "Hours for overtime_reduction (greater than 0, at most 24, in quarter hours); if sent, not null, if omitted unchanged"
                                    },
                                    "note": {
                                        "type": "string",
                                        "description": "Note (max. 500 characters)"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowtime.absences-destroy",
                "summary": "Delete an absence",
                "description": "Deletes an absence (team owner or members with FlowTime full access only; everyone else gets 403). The absence is archived and its decision stays traceable. An absence that has already been deleted returns 404.",
                "tags": [
                    "flowtime.absences"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Absence deleted successfully"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/absences/{uuid}/approve": {
            "post": {
                "operationId": "flowtime.absences-approve",
                "summary": "Approve an absence",
                "description": "Approves an open request (team owner or members with FlowTime full access only; everyone else gets 403). Only a request with the status requested can be approved; a request that has already been decided returns 409 and keeps its first decision. If the requesting person no longer belongs to the team or no longer has FlowTime access, the request is not approved (HTTP 422, error on the user_uuid field); such a request can still be rejected. The member receives a notification.",
                "tags": [
                    "flowtime.absences"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Absence approved successfully",
                                    "data": {
                                        "uuid": "8f2b4c1e-3d5a-4e6f-9a7b-2c1d0e9f8a76",
                                        "user_uuid": "44ad890b-f7f3-4154-8b38-83261195e475",
                                        "user_name": "John Doe",
                                        "type": "vacation",
                                        "starts_on": "2026-09-28",
                                        "ends_on": "2026-09-30",
                                        "half_day_start": "none",
                                        "half_day_end": "none",
                                        "hours": null,
                                        "status": "approved",
                                        "note": "Sommerurlaub",
                                        "decided_by_uuid": "a57b92df-c5e3-4e64-81f0-4dcfddba105c",
                                        "decided_at": "2026-09-23T17:17:20+02:00",
                                        "decision_note": null,
                                        "created_at": "2026-09-23T17:03:49+02:00",
                                        "updated_at": "2026-09-23T17:17:20+02:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "decision_note": {
                                        "type": "string",
                                        "description": "Note on the decision (max. 500 characters)"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/absences/{uuid}/reject": {
            "post": {
                "operationId": "flowtime.absences-reject",
                "summary": "Reject an absence",
                "description": "Rejects an open request (team owner or members with FlowTime full access only; everyone else gets 403). A rejection needs a reason, which the member reads in their notification; if it is missing from the request of the team owner or a member with FlowTime full access, the API answers with HTTP 422. A request that has already been decided returns 409.",
                "tags": [
                    "flowtime.absences"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Absence rejected successfully",
                                    "data": {
                                        "uuid": "8f2b4c1e-3d5a-4e6f-9a7b-2c1d0e9f8a76",
                                        "user_uuid": "44ad890b-f7f3-4154-8b38-83261195e475",
                                        "user_name": "John Doe",
                                        "type": "vacation",
                                        "starts_on": "2026-09-28",
                                        "ends_on": "2026-09-30",
                                        "half_day_start": "none",
                                        "half_day_end": "none",
                                        "hours": null,
                                        "status": "rejected",
                                        "note": "Sommerurlaub",
                                        "decided_by_uuid": "a57b92df-c5e3-4e64-81f0-4dcfddba105c",
                                        "decided_at": "2026-09-23T17:17:20+02:00",
                                        "decision_note": "Zu dieser Zeit ist das Team unterbesetzt.",
                                        "created_at": "2026-09-23T17:03:49+02:00",
                                        "updated_at": "2026-09-23T17:17:20+02:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "decision_note": {
                                        "type": "string",
                                        "description": "Reason for the rejection (max. 500 characters)"
                                    }
                                },
                                "required": [
                                    "decision_note"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/absences/{uuid}/cancel": {
            "post": {
                "operationId": "flowtime.absences-cancel",
                "summary": "Withdraw an absence",
                "description": "Withdraws your own absence. This is not a right of the team owner: only the person who requested the absence can withdraw it, an open request as well as an approved absence, at the latest on the day before it starts. The team owner removes a member's absence with DELETE instead; if they call this endpoint for another member, they get 403. If withdrawing is no longer possible, the API answers with HTTP 409. No reason is sent.",
                "tags": [
                    "flowtime.absences"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Absence cancelled successfully",
                                    "data": {
                                        "uuid": "8f2b4c1e-3d5a-4e6f-9a7b-2c1d0e9f8a76",
                                        "user_uuid": "44ad890b-f7f3-4154-8b38-83261195e475",
                                        "user_name": "John Doe",
                                        "type": "vacation",
                                        "starts_on": "2026-09-28",
                                        "ends_on": "2026-09-30",
                                        "half_day_start": "none",
                                        "half_day_end": "none",
                                        "hours": null,
                                        "status": "cancelled",
                                        "note": "Sommerurlaub",
                                        "decided_by_uuid": null,
                                        "decided_at": null,
                                        "decision_note": null,
                                        "created_at": "2026-09-23T17:03:49+02:00",
                                        "updated_at": "2026-09-23T17:17:20+02:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/team/status": {
            "get": {
                "operationId": "flowtime.team-status",
                "summary": "Get the team status",
                "description": "Who is currently clocked in, on a break or clocked out. For the team owner, members with FlowTime full access and members with the teamberichte sub-right; everyone else gets HTTP 403 with code team_status_denied. Only entries of this team count. since is the start of the open entry, or for clocked-out people the end of the last entry (or null).",
                "tags": [
                    "flowtime.app"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "user": {
                                                "uuid": "44ad890b-f7f3-4154-8b38-83261195e475",
                                                "name": "John Doe",
                                                "profile_photo_url": "https://ui-avatars.com/api/?name=M+M"
                                            },
                                            "state": "clocked_in",
                                            "since": "2026-11-22T08:02:00+01:00",
                                            "project": null
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/me/location": {
            "get": {
                "operationId": "flowtime.me-location-show",
                "summary": "Get your own work location",
                "description": "Your own work location for the location notice of the FlowTime app in the current team. data is null as long as none is set. address is the address entered on the web, and null if the location was set in the app.",
                "tags": [
                    "flowtime.app"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "label": "Büro Berlin",
                                        "address": "Alexanderplatz 1, 10178 Berlin",
                                        "latitude": 52.52,
                                        "longitude": 13.405,
                                        "radius_m": 150,
                                        "mode": "reminder",
                                        "enabled": true,
                                        "updated_at": "2026-11-22T09:00:00+01:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowtime.me-location-update",
                "summary": "Set your own work location",
                "description": "Creates or replaces your own work location (one row per user and team). address is optional. If it is omitted and the coordinates change, an address saved on the web is cleared because it no longer matches the location.",
                "tags": [
                    "flowtime.app"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "label": "Büro Berlin",
                                        "address": null,
                                        "latitude": 52.52,
                                        "longitude": 13.405,
                                        "radius_m": 150,
                                        "mode": "auto",
                                        "enabled": true,
                                        "updated_at": "2026-11-22T09:00:00+01:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "label": {
                                        "type": "string",
                                        "description": "Label (max. 100 characters)"
                                    },
                                    "address": {
                                        "type": "string",
                                        "description": "Address of the work location (max. 255 characters, optional, null allowed). Only stored, not evaluated."
                                    },
                                    "latitude": {
                                        "type": "number",
                                        "description": "Latitude (-90 to 90)"
                                    },
                                    "longitude": {
                                        "type": "number",
                                        "description": "Longitude (-180 to 180)"
                                    },
                                    "radius_m": {
                                        "type": "integer",
                                        "description": "Radius in metres (50 to 1000)"
                                    },
                                    "mode": {
                                        "type": "string",
                                        "description": "reminder (reminder) or auto (clock in and out automatically)"
                                    },
                                    "enabled": {
                                        "type": "boolean",
                                        "description": "Active"
                                    }
                                },
                                "required": [
                                    "label",
                                    "latitude",
                                    "longitude",
                                    "radius_m",
                                    "mode",
                                    "enabled"
                                ]
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowtime.me-location-destroy",
                "summary": "Remove your own work location",
                "description": "Removes your own work location. Always answers with HTTP 204 without content.",
                "tags": [
                    "flowtime.app"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/types": {
            "get": {
                "operationId": "flowtime.shifts-types-index",
                "summary": "List shift types",
                "description": "Lists all shift types of the team.",
                "tags": [
                    "flowtime.shifts"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowtime.shifts-types-store",
                "summary": "Create a shift type",
                "description": "Creates a new shift type (requires the \"schichtplanung\" sub-right, team owner or FlowTime full access).",
                "tags": [
                    "flowtime.shifts"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name of the shift type (max. 255 characters)"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Description"
                                    },
                                    "color": {
                                        "type": "string",
                                        "description": "Hex colour (max. 7 characters)"
                                    },
                                    "icon": {
                                        "type": "string",
                                        "description": "Icon identifier (max. 50 characters)"
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "Shift type active"
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/types/{uuid}": {
            "get": {
                "operationId": "flowtime.shifts-types-show",
                "summary": "Get a shift type",
                "description": "Returns a single shift type, including the number of its templates and shifts.",
                "tags": [
                    "flowtime.shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "3c2b1a09-...",
                                        "name": "Frühschicht",
                                        "short_name": "FS",
                                        "description": null,
                                        "color": "#3B82F6",
                                        "icon": null,
                                        "is_active": true,
                                        "sort_order": 0,
                                        "templates_count": 2,
                                        "shifts_count": 14,
                                        "created_at": "2026-09-14T10:00:00+02:00",
                                        "updated_at": "2026-09-14T10:00:00+02:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowtime.shifts-types-update",
                "summary": "Update a shift type",
                "description": "Updates a shift type (requires the \"schichtplanung\" sub-right, team owner or FlowTime full access). Addressed by UUID only.",
                "tags": [
                    "flowtime.shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name of the shift type (max. 255 characters)"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Description"
                                    },
                                    "color": {
                                        "type": "string",
                                        "description": "Hex colour in the format #RRGGBB"
                                    },
                                    "icon": {
                                        "type": "string",
                                        "description": "Icon identifier (max. 50 characters)"
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "Shift type active"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowtime.shifts-types-destroy",
                "summary": "Delete a shift type",
                "description": "Deletes a shift type (requires the \"schichtplanung\" sub-right, team owner or FlowTime full access). Addressed by UUID only.",
                "tags": [
                    "flowtime.shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/templates": {
            "get": {
                "operationId": "flowtime.shifts-templates-index",
                "summary": "List shift templates",
                "description": "Lists all shift templates of the team.",
                "tags": [
                    "flowtime.shifts"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowtime.shifts-templates-store",
                "summary": "Create a shift template",
                "description": "Creates a new shift template (requires the \"schichtplanung\" sub-right, team owner or FlowTime full access). Breaking change: the former numeric field \"shift_type_id\" is no longer accepted; the shift type is only given through \"shift_type_uuid\".",
                "tags": [
                    "flowtime.shifts"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name of the shift template (max. 255 characters)"
                                    },
                                    "shift_type_uuid": {
                                        "type": "string",
                                        "description": "UUID of the shift type (bound to the team)"
                                    },
                                    "start_time": {
                                        "type": "string",
                                        "description": "Start time (HH:MM)"
                                    },
                                    "end_time": {
                                        "type": "string",
                                        "description": "End time (HH:MM)"
                                    },
                                    "min_staff": {
                                        "type": "integer",
                                        "description": "Minimum staffing"
                                    },
                                    "max_staff": {
                                        "type": "integer",
                                        "description": "Maximum staffing (>= min_staff)"
                                    },
                                    "default_days": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Default weekdays (1-7)"
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "Shift template active"
                                    }
                                },
                                "required": [
                                    "name",
                                    "shift_type_uuid",
                                    "start_time",
                                    "end_time"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/templates/{uuid}": {
            "get": {
                "operationId": "flowtime.shifts-templates-show",
                "summary": "Get a shift template",
                "description": "Returns a single shift template with its shift type.",
                "tags": [
                    "flowtime.shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "4d3c2b1a-...",
                                        "name": "Frühdienst Werktag",
                                        "shift_type_uuid": "3c2b1a09-...",
                                        "shift_type_name": "Frühschicht",
                                        "start_time": "06:00",
                                        "end_time": "14:00",
                                        "duration_minutes": 480,
                                        "min_staff": 2,
                                        "max_staff": 4,
                                        "default_days": [
                                            1,
                                            2,
                                            3,
                                            4,
                                            5
                                        ],
                                        "is_active": true,
                                        "sort_order": 0,
                                        "created_at": "2026-09-14T10:00:00+02:00",
                                        "updated_at": "2026-09-14T10:00:00+02:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowtime.shifts-templates-update",
                "summary": "Update a shift template",
                "description": "Updates a shift template (requires the \"schichtplanung\" sub-right, team owner or FlowTime full access). Addressed by UUID only. Breaking change: the former numeric field \"shift_type_id\" is no longer accepted; the shift type is only given through \"shift_type_uuid\".",
                "tags": [
                    "flowtime.shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name of the shift template (max. 255 characters)"
                                    },
                                    "shift_type_uuid": {
                                        "type": "string",
                                        "description": "UUID of the shift type (bound to the team)"
                                    },
                                    "start_time": {
                                        "type": "string",
                                        "description": "Start time (HH:MM)"
                                    },
                                    "end_time": {
                                        "type": "string",
                                        "description": "End time (HH:MM)"
                                    },
                                    "min_staff": {
                                        "type": "integer",
                                        "description": "Minimum staffing"
                                    },
                                    "max_staff": {
                                        "type": "integer",
                                        "description": "Maximum staffing (>= min_staff)"
                                    },
                                    "default_days": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Default weekdays (1-7)"
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "Shift template active"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowtime.shifts-templates-destroy",
                "summary": "Delete a shift template",
                "description": "Deletes a shift template (requires the \"schichtplanung\" sub-right, team owner or FlowTime full access). Addressed by UUID only.",
                "tags": [
                    "flowtime.shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/plans": {
            "get": {
                "operationId": "flowtime.shifts-plans-index",
                "summary": "List shift plans",
                "description": "Lists the shift plans of the team.",
                "tags": [
                    "flowtime.shifts"
                ],
                "parameters": [
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "Filters by status (draft, published or archived)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "start_date",
                        "in": "query",
                        "required": false,
                        "description": "Filters plans from this date",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "end_date",
                        "in": "query",
                        "required": false,
                        "description": "Filters plans up to this date (must be >= start_date)",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowtime.shifts-plans-store",
                "summary": "Create a shift plan",
                "description": "Creates a new shift plan for one week (requires the \"schichtplanung\" sub-right, team owner or FlowTime full access). Breaking change: the former numeric field \"shift_type_ids\" is no longer accepted; the shift types are only given through \"shift_type_uuids\".",
                "tags": [
                    "flowtime.shifts"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "week_start": {
                                        "type": "string",
                                        "description": "Start of the week (date)"
                                    },
                                    "name": {
                                        "type": "string",
                                        "description": "Name of the plan (max. 255 characters)"
                                    },
                                    "create_from_templates": {
                                        "type": "boolean",
                                        "description": "Generate the plan from templates"
                                    },
                                    "shift_type_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "UUIDs of the shift types to include (bound to the team)",
                                        "properties": {
                                            "*": {
                                                "type": "string",
                                                "description": "Single shift type UUID"
                                            }
                                        }
                                    }
                                },
                                "required": [
                                    "week_start"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/plans/{uuid}": {
            "get": {
                "operationId": "flowtime.shifts-plans-show",
                "summary": "Get shift plan details",
                "description": "Returns a single shift plan with its shifts. Addressed by UUID only.",
                "tags": [
                    "flowtime.shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowtime.shifts-plans-update",
                "summary": "Change a shift plan",
                "description": "Changes the name and note of a shift plan (requires the \"schichtplanung\" sub-right, team owner or FlowTime full access). Only drafts can be changed; a published or archived plan answers with HTTP 409 and the error plan_not_editable. The plan week itself cannot be changed, because the shifts are tied to its days; for another week there is the copy action. The status only changes through publish and archive.",
                "tags": [
                    "flowtime.shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "5e4d3c2b-...",
                                        "name": "KW 39/2026",
                                        "start_date": "2026-09-21",
                                        "end_date": "2026-09-27",
                                        "status": "draft",
                                        "notes": "Urlaubszeit",
                                        "editable": true,
                                        "published_at": null,
                                        "published_by_name": null,
                                        "shifts_count": 12,
                                        "created_at": "2026-09-14T10:00:00+02:00",
                                        "updated_at": "2026-09-14T10:00:00+02:00"
                                    },
                                    "message": "Shift plan updated successfully"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "New name of the plan (max. 255 characters)"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Note on the plan; null clears it"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowtime.shifts-plans-destroy",
                "summary": "Delete a shift plan",
                "description": "Deletes a shift plan with its shifts and their assignments (requires the \"schichtplanung\" sub-right, team owner or FlowTime full access). Only drafts can be deleted: a published plan is the roster the team works by, an archived one the record of a past week. Both answer with HTTP 409 and the error plan_not_editable and are archived instead.",
                "tags": [
                    "flowtime.shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Shift plan deleted successfully"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/plans/{uuid}/shifts": {
            "get": {
                "operationId": "flowtime.shifts-plans-shifts",
                "summary": "List the shifts of a plan",
                "description": "Returns the shifts of a plan page by page, optionally limited to one day or one shift type. The plan detail view, by contrast, returns the whole week in one response.",
                "tags": [
                    "flowtime.shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "date",
                        "in": "query",
                        "required": false,
                        "description": "Limits the result to one day (YYYY-MM-DD)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "shift_type_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Limits the result to one shift type of the team",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, starting at 1",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Entries per page, 1-200 (default 50)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "6f5e4d3c-...",
                                            "shift_plan_uuid": "5e4d3c2b-...",
                                            "shift_type_uuid": "3c2b1a09-...",
                                            "shift_type_name": "Frühschicht",
                                            "shift_type_color": "#3B82F6",
                                            "date": "2026-09-21",
                                            "start_time": "06:00",
                                            "end_time": "14:00",
                                            "duration_minutes": 480,
                                            "min_staff": 2,
                                            "max_staff": 4,
                                            "assigned_count": 2,
                                            "staffing_status": "ok",
                                            "notes": null,
                                            "editable": true,
                                            "assignments": [
                                                {
                                                    "uuid": "7a6f5e4d-...",
                                                    "user_uuid": "e5f6a7b8-...",
                                                    "user_name": "Anna",
                                                    "status": "confirmed",
                                                    "confirmed_at": "2026-09-15T09:00:00+02:00",
                                                    "notes": null,
                                                    "created_at": "2026-09-14T10:00:00+02:00",
                                                    "updated_at": "2026-09-14T10:00:00+02:00"
                                                }
                                            ],
                                            "created_at": "2026-09-14T10:00:00+02:00",
                                            "updated_at": "2026-09-14T10:00:00+02:00"
                                        }
                                    ],
                                    "meta": {
                                        "current_page": 1,
                                        "per_page": 50,
                                        "total": 12,
                                        "last_page": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/plans/{uuid}/publish": {
            "post": {
                "operationId": "flowtime.shifts-plans-publish",
                "summary": "Publish a shift plan",
                "description": "Publishes a shift plan (requires the \"schichtplanung\" sub-right, team owner or FlowTime full access).",
                "tags": [
                    "flowtime.shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/plans/{uuid}/archive": {
            "post": {
                "operationId": "flowtime.shifts-plans-archive",
                "summary": "Archive a shift plan",
                "description": "Archives a shift plan (requires the \"schichtplanung\" sub-right, team owner or FlowTime full access).",
                "tags": [
                    "flowtime.shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/plans/{uuid}/copy": {
            "post": {
                "operationId": "flowtime.shifts-plans-copy",
                "summary": "Copy a shift plan",
                "description": "Copies a shift plan to another week (requires the \"schichtplanung\" sub-right, team owner or FlowTime full access).",
                "tags": [
                    "flowtime.shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "target_week_start": {
                                        "type": "string",
                                        "description": "Start date of the target week"
                                    }
                                },
                                "required": [
                                    "target_week_start"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts": {
            "post": {
                "operationId": "flowtime.shifts-store",
                "summary": "Create a shift",
                "description": "Creates a single shift within a plan (requires the \"schichtplanung\" sub-right, team owner or FlowTime full access). Breaking change: the former numeric fields \"shift_plan_id\" and \"shift_type_id\" are no longer accepted; plan and type are only given through \"shift_plan_uuid\" and \"shift_type_uuid\".",
                "tags": [
                    "flowtime.shifts"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "shift_plan_uuid": {
                                        "type": "string",
                                        "description": "UUID of the shift plan (bound to the team)"
                                    },
                                    "shift_type_uuid": {
                                        "type": "string",
                                        "description": "UUID of the shift type (bound to the team)"
                                    },
                                    "date": {
                                        "type": "string",
                                        "description": "Date of the shift"
                                    },
                                    "start_time": {
                                        "type": "string",
                                        "description": "Start time (HH:MM)"
                                    },
                                    "end_time": {
                                        "type": "string",
                                        "description": "End time (HH:MM)"
                                    },
                                    "min_staff": {
                                        "type": "integer",
                                        "description": "Minimum staffing"
                                    },
                                    "max_staff": {
                                        "type": "integer",
                                        "description": "Maximum staffing (>= min_staff)"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Notes on the shift"
                                    }
                                },
                                "required": [
                                    "shift_plan_uuid",
                                    "shift_type_uuid",
                                    "date",
                                    "start_time",
                                    "end_time"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/{uuid}": {
            "get": {
                "operationId": "flowtime.shifts-show",
                "summary": "Get a shift",
                "description": "Returns a single shift with its assignments and staffing level. The editable field repeats the rule of the planning interface: only shifts in a draft can be changed.",
                "tags": [
                    "flowtime.shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "6f5e4d3c-...",
                                        "shift_plan_uuid": "5e4d3c2b-...",
                                        "shift_type_uuid": "3c2b1a09-...",
                                        "shift_type_name": "Frühschicht",
                                        "shift_type_color": "#3B82F6",
                                        "date": "2026-09-21",
                                        "start_time": "06:00",
                                        "end_time": "14:00",
                                        "duration_minutes": 480,
                                        "min_staff": 2,
                                        "max_staff": 4,
                                        "assigned_count": 2,
                                        "staffing_status": "ok",
                                        "notes": null,
                                        "editable": true,
                                        "assignments": [
                                            {
                                                "uuid": "7a6f5e4d-...",
                                                "user_uuid": "e5f6a7b8-...",
                                                "user_name": "Anna",
                                                "status": "confirmed",
                                                "confirmed_at": "2026-09-15T09:00:00+02:00",
                                                "notes": null,
                                                "created_at": "2026-09-14T10:00:00+02:00",
                                                "updated_at": "2026-09-14T10:00:00+02:00"
                                            }
                                        ],
                                        "created_at": "2026-09-14T10:00:00+02:00",
                                        "updated_at": "2026-09-14T10:00:00+02:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowtime.shifts-update",
                "summary": "Change a shift",
                "description": "Changes a shift (requires the \"schichtplanung\" sub-right, team owner or FlowTime full access). Only shifts in a draft can be changed, otherwise HTTP 409 with the error plan_not_editable. The date must be within the plan week, otherwise HTTP 422 with date_outside_plan_week. A shift stays in its plan; for another week it is created anew in the target plan. The API calculates the duration itself and takes night shifts past midnight into account.",
                "tags": [
                    "flowtime.shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "6f5e4d3c-...",
                                        "shift_plan_uuid": "5e4d3c2b-...",
                                        "shift_type_uuid": "3c2b1a09-...",
                                        "shift_type_name": "Frühschicht",
                                        "shift_type_color": "#3B82F6",
                                        "date": "2026-09-22",
                                        "start_time": "07:00",
                                        "end_time": "15:00",
                                        "duration_minutes": 480,
                                        "min_staff": 2,
                                        "max_staff": 4,
                                        "assigned_count": 2,
                                        "staffing_status": "ok",
                                        "notes": null,
                                        "editable": true,
                                        "assignments": [
                                            {
                                                "uuid": "7a6f5e4d-...",
                                                "user_uuid": "e5f6a7b8-...",
                                                "user_name": "Anna",
                                                "status": "confirmed",
                                                "confirmed_at": "2026-09-15T09:00:00+02:00",
                                                "notes": null,
                                                "created_at": "2026-09-14T10:00:00+02:00",
                                                "updated_at": "2026-09-14T10:00:00+02:00"
                                            }
                                        ],
                                        "created_at": "2026-09-14T10:00:00+02:00",
                                        "updated_at": "2026-09-14T10:00:00+02:00"
                                    },
                                    "message": "Shift updated successfully"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "shift_type_uuid": {
                                        "type": "string",
                                        "description": "Another shift type of the team"
                                    },
                                    "date": {
                                        "type": "string",
                                        "description": "New date (YYYY-MM-DD), must be within the plan week"
                                    },
                                    "start_time": {
                                        "type": "string",
                                        "description": "Start in the format HH:MM"
                                    },
                                    "end_time": {
                                        "type": "string",
                                        "description": "End in the format HH:MM"
                                    },
                                    "min_staff": {
                                        "type": "integer",
                                        "description": "Minimum staffing, at least 1"
                                    },
                                    "max_staff": {
                                        "type": "integer",
                                        "description": "Maximum staffing; must not be below the minimum staffing, null removes the upper limit"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Note on the shift"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowtime.shifts-destroy",
                "summary": "Delete a shift",
                "description": "Deletes a shift (requires the \"schichtplanung\" sub-right, team owner or FlowTime full access). Addressed by UUID only.",
                "tags": [
                    "flowtime.shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/{uuid}/assign": {
            "post": {
                "operationId": "flowtime.shifts-assign",
                "summary": "Assign a user to a shift",
                "description": "Assigns a user to a shift (requires the \"schichtplanung\" sub-right, team owner or FlowTime full access).",
                "tags": [
                    "flowtime.shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "user_uuid": {
                                        "type": "string",
                                        "description": "UUID of the user to assign"
                                    },
                                    "check_conflicts": {
                                        "type": "boolean",
                                        "description": "Check for time conflicts"
                                    }
                                },
                                "required": [
                                    "user_uuid"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/{uuid}/assign/{userUuid}": {
            "delete": {
                "operationId": "flowtime.shifts-unassign",
                "summary": "Remove an assignment",
                "description": "Removes a user's assignment from a shift (requires the \"schichtplanung\" sub-right, team owner or FlowTime full access).",
                "tags": [
                    "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": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/{uuid}/available-users": {
            "get": {
                "operationId": "flowtime.shifts-available-users",
                "summary": "Available users for a shift",
                "description": "Lists the users who can be assigned to a shift (requires the \"schichtplanung\" sub-right, team owner or FlowTime full access).",
                "tags": [
                    "flowtime.shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/assignments/{uuid}/confirm": {
            "post": {
                "operationId": "flowtime.shifts-assignments-confirm",
                "summary": "Confirm an assignment",
                "description": "Confirms one of your own shift assignments. Open to every member for their own assignments.",
                "tags": [
                    "flowtime.shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/assignments/{uuid}/decline": {
            "post": {
                "operationId": "flowtime.shifts-assignments-decline",
                "summary": "Decline an assignment",
                "description": "Declines one of your own shift assignments. Open to every member for their own assignments.",
                "tags": [
                    "flowtime.shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "reason": {
                                        "type": "string",
                                        "description": "Reason for declining"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/my-shifts": {
            "get": {
                "operationId": "flowtime.shifts-my-shifts",
                "summary": "Get your own shifts",
                "description": "Returns the shifts of the signed-in user.",
                "tags": [
                    "flowtime.shifts"
                ],
                "parameters": [
                    {
                        "name": "start_date",
                        "in": "query",
                        "required": false,
                        "description": "Filters shifts from this date",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "end_date",
                        "in": "query",
                        "required": false,
                        "description": "Filters shifts up to this date (must be >= start_date)",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/current": {
            "get": {
                "operationId": "flowtime.shifts-current",
                "summary": "Current shift overview",
                "description": "Returns the current shift overview.",
                "tags": [
                    "flowtime.shifts"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/preferences": {
            "get": {
                "operationId": "flowtime.shifts-preferences-index",
                "summary": "Your own availability preferences",
                "description": "Returns the availability preferences of the signed-in user.",
                "tags": [
                    "flowtime.shifts"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/preferences/{dayOfWeek}": {
            "put": {
                "operationId": "flowtime.shifts-preferences-update",
                "summary": "Set an availability preference",
                "description": "Sets your own availability preference for a weekday (1-7). Open to every member for their own preferences.",
                "tags": [
                    "flowtime.shifts"
                ],
                "parameters": [
                    {
                        "name": "dayOfWeek",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "availability": {
                                        "type": "string",
                                        "description": "Availability: available, preferred, unavailable or if_needed"
                                    },
                                    "available_from": {
                                        "type": "string",
                                        "description": "Available from (HH:MM)"
                                    },
                                    "available_until": {
                                        "type": "string",
                                        "description": "Available until (HH:MM)"
                                    },
                                    "preferred_shift_types": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Preferred shift types as UUIDs (bound to the team)"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Notes (max. 500 characters)"
                                    }
                                },
                                "required": [
                                    "availability"
                                ]
                            }
                        }
                    }
                }
            }
        }
    },
    "components": {
        "securitySchemes": {
            "bearerAuth": {
                "type": "http",
                "scheme": "bearer",
                "description": "API key (pk_… or at_…) as Authorization: Bearer <key>. Any other way of sending it is rejected with 401."
            }
        },
        "schemas": {
            "Error": {
                "type": "object",
                "properties": {
                    "success": {
                        "type": "boolean"
                    },
                    "error": {
                        "type": "string"
                    },
                    "message": {
                        "type": "string"
                    },
                    "errors": {
                        "type": "object"
                    }
                }
            }
        }
    }
}