{
    "openapi": "3.1.0",
    "info": {
        "title": "FlowSaas API",
        "version": "v1",
        "description": "REST API für die Feedback-Portale: Portale und ihr Erscheinungsbild, Status und Schlagwörter, Ideen mit Stimmen und Kommentaren, die veröffentlichte Roadmap und die Webhooks."
    },
    "servers": [
        {
            "url": "https://api.flowsuite.one",
            "description": "FlowSuite API"
        }
    ],
    "security": [
        {
            "bearerAuth": []
        }
    ],
    "tags": [
        {
            "name": "context",
            "description": "Überblick und Auswertungen"
        },
        {
            "name": "portals",
            "description": "Portale"
        },
        {
            "name": "vocabulary",
            "description": "Status und Schlagwörter"
        },
        {
            "name": "posts",
            "description": "Ideen"
        },
        {
            "name": "comments",
            "description": "Kommentare"
        },
        {
            "name": "roadmap",
            "description": "Roadmap"
        },
        {
            "name": "webhooks",
            "description": "Webhooks"
        }
    ],
    "paths": {
        "/flowsaas/context": {
            "get": {
                "operationId": "flowsaas-context",
                "summary": "Portale, Vokabular und eigene Rechte abrufen",
                "description": "Liefert alle Portale des Teams mit Status, Schlagwörtern und offenen Moderationszahlen, dazu die möglichen Moderationszustände, die verfügbaren Webhook-Ereignisse und ob dieser Schlüssel die Verwaltungsberechtigung besitzt.",
                "tags": [
                    "context"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "is_manager": true,
                                        "moderation_states": [
                                            "pending",
                                            "approved",
                                            "rejected",
                                            "spam"
                                        ],
                                        "webhook_events": [
                                            "post.created",
                                            "post.status_changed",
                                            "post.updated",
                                            "comment.created",
                                            "vote.created"
                                        ],
                                        "portals": [
                                            {
                                                "uuid": "9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f",
                                                "name": "Produktfeedback",
                                                "public_url": "https://creativeskyline.de/p/produktfeedback",
                                                "statuses": [],
                                                "tags": [],
                                                "pending_posts": 2,
                                                "pending_comments": 0
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/reports/moderation": {
            "get": {
                "operationId": "flowsaas-reports-moderation",
                "summary": "Offene Moderation abrufen",
                "description": "Zählt die wartenden Ideen und Kommentare aller Portale des Teams und liefert je bis zu zwanzig davon, neueste zuerst.",
                "tags": [
                    "context"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "pending_posts": 2,
                                        "pending_comments": 1,
                                        "posts": [],
                                        "comments": []
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/reports/top-ideas": {
            "get": {
                "operationId": "flowsaas-reports-top-ideas",
                "summary": "Beliebteste Ideen abrufen",
                "description": "Die zwanzig freigegebenen Ideen mit den meisten Stimmen. Zusammengeführte Ideen bleiben außen vor, ihre Stimmen zählen bei der Idee, in die sie übernommen wurden.",
                "tags": [
                    "context"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "ideas": [
                                            {
                                                "uuid": "c1b5a0d2-9e33-4f10-8a77-6b2c4d1e9f08",
                                                "title": "Dunkelmodus",
                                                "votes_count": 42
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/reports/roadmap": {
            "get": {
                "operationId": "flowsaas-reports-roadmap",
                "summary": "Veröffentlichte Roadmap abrufen",
                "description": "Die ersten fünfzig Roadmap-Einträge aller Portale in ihrer veröffentlichten Reihenfolge, jeweils mit Titel, Spalte und Stimmenzahl der dahinterliegenden Idee.",
                "tags": [
                    "context"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "items": [
                                            {
                                                "uuid": "5f1e7b90-2c44-4a19-9f3d-7c8b1a2e6d05",
                                                "title": "Dunkelmodus",
                                                "status_name": "In Arbeit",
                                                "votes_count": 42,
                                                "sort_order": 0
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/reports/activity": {
            "get": {
                "operationId": "flowsaas-reports-activity",
                "summary": "Aktivität der letzten 30 Tage abrufen",
                "description": "Zählt neue Ideen und Kommentare der letzten dreißig Tage und liefert die zehn jüngsten Ideen dazu.",
                "tags": [
                    "context"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "window_days": 30,
                                        "new_ideas": 7,
                                        "new_comments": 12,
                                        "latest": []
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/portals": {
            "get": {
                "operationId": "flowsaas-portals-index",
                "summary": "Portale auflisten",
                "description": "Alle Portale des Teams, neueste zuerst, mit der Zahl ihrer Ideen und der wartenden Beiträge.",
                "tags": [
                    "portals"
                ],
                "parameters": [
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Sucht in Name und Adresse des Portals.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "is_active",
                        "in": "query",
                        "required": false,
                        "description": "Nur eingeschaltete beziehungsweise nur abgeschaltete Portale.",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Einträge pro Seite, 1 bis 200, Standard 50.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Seitenzahl, Standard 1.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f",
                                            "name": "Produktfeedback",
                                            "slug": "produktfeedback",
                                            "public_url": "https://creativeskyline.de/p/produktfeedback",
                                            "is_public": true,
                                            "is_active": true,
                                            "tag_limit": 3,
                                            "posts_count": 18,
                                            "pending_posts_count": 2
                                        }
                                    ],
                                    "meta": {
                                        "current_page": 1,
                                        "per_page": 50,
                                        "total": 1,
                                        "last_page": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowsaas-portals-store",
                "summary": "Portal anlegen",
                "description": "Legt ein Portal im Team des API-Schlüssels an, samt der fünf Standard-Status und der vier Standard-Schlagwörter. Verlangt die Verwaltungsberechtigung.",
                "tags": [
                    "portals"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f",
                                        "name": "Produktfeedback",
                                        "slug": "produktfeedback",
                                        "is_public": true,
                                        "is_active": true
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Anzeigename, mindestens drei Zeichen."
                                    },
                                    "slug": {
                                        "type": "string",
                                        "description": "Öffentliche Adresse unter /p/. Muss installationsweit eindeutig sein; ohne Angabe aus dem Namen abgeleitet."
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Kurzbeschreibung für die Portalseite."
                                    },
                                    "is_public": {
                                        "type": "boolean",
                                        "description": "Ob das Portal öffentlich erreichbar ist. Standard true."
                                    },
                                    "subdomain": {
                                        "type": "string",
                                        "description": "Eigene Subdomain, wird nur gespeichert; das Portal ist derzeit nur unter /p/ erreichbar. Ohne Angabe wird der Slug übernommen."
                                    },
                                    "default_language": {
                                        "type": "string",
                                        "description": "de, en oder pt. Standard de."
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/portals/{uuid}": {
            "get": {
                "operationId": "flowsaas-portals-show",
                "summary": "Portal abrufen",
                "description": "Ein Portal mit seinen Status, seinen Schlagwörtern und den offenen Moderationszahlen.",
                "tags": [
                    "portals"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f",
                                        "name": "Produktfeedback",
                                        "statuses": [],
                                        "tags": [],
                                        "pending_posts": 2,
                                        "pending_comments": 0
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowsaas-portals-update",
                "summary": "Portal ändern",
                "description": "Ändert die gesendeten Felder; alles Übrige bleibt unangetastet. Enthält die Anfrage is_public, is_active oder seo_indexable, ist die Verwaltungsberechtigung nötig.",
                "tags": [
                    "portals"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f",
                                        "name": "Produktwünsche",
                                        "tag_limit": 3
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Anzeigename."
                                    },
                                    "slug": {
                                        "type": "string",
                                        "description": "Öffentliche Adresse. Eine Änderung bricht bestehende Links."
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Kurzbeschreibung."
                                    },
                                    "is_public": {
                                        "type": "boolean",
                                        "description": "Öffentliche Erreichbarkeit. Verwaltungsberechtigung nötig."
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "Portal ein- oder ausschalten. Verwaltungsberechtigung nötig."
                                    },
                                    "seo_indexable": {
                                        "type": "boolean",
                                        "description": "Indexierung durch Suchmaschinen. Verwaltungsberechtigung nötig."
                                    },
                                    "subdomain": {
                                        "type": "string",
                                        "description": "Eigene Subdomain. Wird nur gespeichert, derzeit ohne Wirkung."
                                    },
                                    "custom_domain": {
                                        "type": "string",
                                        "description": "Eigene Domain. Wird nur gespeichert, derzeit ohne Wirkung."
                                    },
                                    "dark_mode_enabled": {
                                        "type": "boolean",
                                        "description": "Dunkler Modus im Portal."
                                    },
                                    "default_language": {
                                        "type": "string",
                                        "description": "de, en oder pt."
                                    },
                                    "voting_without_auth": {
                                        "type": "boolean",
                                        "description": "Abstimmen ohne Anmeldung erlauben."
                                    },
                                    "post_approval_required": {
                                        "type": "boolean",
                                        "description": "Neue Ideen erst nach Freigabe zeigen."
                                    },
                                    "comment_approval_required": {
                                        "type": "boolean",
                                        "description": "Neue Kommentare erst nach Freigabe zeigen."
                                    },
                                    "allow_anonymous_read": {
                                        "type": "boolean",
                                        "description": "Lesen ohne Anmeldung erlauben. Wird nur gespeichert; das Portal ist derzeit immer ohne Anmeldung lesbar."
                                    },
                                    "lock_completed_ideas": {
                                        "type": "boolean",
                                        "description": "Abgeschlossene Ideen für Stimmen und Kommentare sperren."
                                    },
                                    "tag_limit": {
                                        "type": "integer",
                                        "description": "Höchstzahl Schlagwörter je Idee. 0 bedeutet keine Grenze."
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowsaas-portals-destroy",
                "summary": "Portal löschen",
                "description": "Löscht das Portal mit allen Ideen, Stimmen, Kommentaren, Status, Schlagwörtern, Roadmap-Einträgen und Webhooks. Verlangt die Verwaltungsberechtigung und ist nicht umkehrbar.",
                "tags": [
                    "portals"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Portal \"Produktfeedback\" gelöscht."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/portals/{uuid}/toggle-active": {
            "post": {
                "operationId": "flowsaas-portals-toggle-active",
                "summary": "Portal ein- oder ausschalten",
                "description": "Kehrt den Schalter is_active um, ohne etwas im Portal zu verändern. Verlangt die Verwaltungsberechtigung.",
                "tags": [
                    "portals"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f",
                                        "is_active": false
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/portals/{uuid}/delete-all-ideas": {
            "post": {
                "operationId": "flowsaas-portals-delete-all-ideas",
                "summary": "Alle Ideen eines Portals löschen",
                "description": "Löscht jede Idee des Portals mit ihren Stimmen, Kommentaren, Verlauf und Roadmap-Einträgen. Das Portal selbst und sein Vokabular bleiben bestehen. Verlangt die Verwaltungsberechtigung und ist nicht umkehrbar.",
                "tags": [
                    "portals"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "deleted_posts": 18
                                    },
                                    "message": "Alle Ideen dieses Portals wurden gelöscht."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/portals/{uuid}/company": {
            "get": {
                "operationId": "flowsaas-portals-company-show",
                "summary": "Erscheinungsbild abrufen",
                "description": "Logos, Farbgebung und Anzeigename des Portals. Ein Portal ohne gepflegtes Erscheinungsbild antwortet mit seiner UUID und sonst leeren Feldern.",
                "tags": [
                    "portals"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "portal_uuid": "9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f",
                                        "name": "Creative Skyline",
                                        "logo_url": "https://creativeskyline.de/storage/portals/logos/logo.png",
                                        "primary_color": "#6392D9"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowsaas-portals-company-update",
                "summary": "Erscheinungsbild ändern",
                "description": "Schreibt die gesendeten Felder und legt den Datensatz bei der ersten Änderung an. Die Bildfelder erwarten fertige Adressen; die Schnittstelle lädt selbst keine Datei herunter.",
                "tags": [
                    "portals"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "portal_uuid": "9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f",
                                        "name": "Creative Skyline",
                                        "primary_color": "#6392D9"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Angezeigter Name im Portalkopf."
                                    },
                                    "logo_url": {
                                        "type": "string",
                                        "description": "Adresse des Logos für den hellen Modus."
                                    },
                                    "logo_dark_url": {
                                        "type": "string",
                                        "description": "Adresse des Logos für den dunklen Modus."
                                    },
                                    "logo_landscape_url": {
                                        "type": "string",
                                        "description": "Adresse des Querformat-Logos."
                                    },
                                    "logo_landscape_dark_url": {
                                        "type": "string",
                                        "description": "Adresse des Querformat-Logos für den dunklen Modus."
                                    },
                                    "logo_layout_mode": {
                                        "type": "string",
                                        "description": "square oder landscape."
                                    },
                                    "logo_display_mode": {
                                        "type": "string",
                                        "description": "logo_and_name oder logo_only."
                                    },
                                    "logo_link": {
                                        "type": "string",
                                        "description": "Ziel, auf das das Logo verweist."
                                    },
                                    "favicon_url": {
                                        "type": "string",
                                        "description": "Adresse des Favicons."
                                    },
                                    "open_graph_image_url": {
                                        "type": "string",
                                        "description": "Adresse des Vorschaubildes für soziale Netzwerke."
                                    },
                                    "primary_color": {
                                        "type": "string",
                                        "description": "Akzentfarbe als Hex-Wert, etwa #6392D9."
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/portals/{uuid}/statuses": {
            "get": {
                "operationId": "flowsaas-portals-statuses-index",
                "summary": "Status eines Portals auflisten",
                "description": "Alle Status des Portals in ihrer eigenen Reihenfolge. Die Liste ist nicht seitenweise, sie ist immer vollständig.",
                "tags": [
                    "vocabulary"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "3a7c2f11-8b4e-4d62-9a05-1c6e8f0b2d43",
                                            "name": "Feedback",
                                            "color": "#6392D9",
                                            "is_completed": false,
                                            "sort_order": 1
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowsaas-portals-statuses-store",
                "summary": "Status anlegen",
                "description": "Hängt einen Status an das Ende der Liste des Portals.",
                "tags": [
                    "vocabulary"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "3a7c2f11-8b4e-4d62-9a05-1c6e8f0b2d43",
                                        "name": "Wird geprüft",
                                        "sort_order": 6
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Anzeigename des Status."
                                    },
                                    "color": {
                                        "type": "string",
                                        "description": "Farbe als sechsstelliger Hex-Wert, etwa #6392D9."
                                    },
                                    "is_completed": {
                                        "type": "boolean",
                                        "description": "Markiert den Status als Abschluss. Zusammen mit lock_completed_ideas sperrt er Stimmen und Kommentare."
                                    },
                                    "sort_order": {
                                        "type": "integer",
                                        "description": "Position in der Liste. Ohne Angabe ans Ende."
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/portals/{uuid}/statuses/reorder": {
            "post": {
                "operationId": "flowsaas-portals-statuses-reorder",
                "summary": "Status umsortieren",
                "description": "Setzt die Reihenfolge der Status des Portals auf die gesendete Liste. UUIDs anderer Portale desselben Teams werden übergangen.",
                "tags": [
                    "vocabulary"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "3a7c2f11-8b4e-4d62-9a05-1c6e8f0b2d43",
                                            "name": "Fertig",
                                            "sort_order": 1
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "status_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Die Status-UUIDs in der gewünschten Reihenfolge."
                                    }
                                },
                                "required": [
                                    "status_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/statuses/{uuid}": {
            "put": {
                "operationId": "flowsaas-statuses-update",
                "summary": "Status ändern",
                "description": "Ändert Name, Farbe, Abschlusskennzeichen oder Position eines Status.",
                "tags": [
                    "vocabulary"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "3a7c2f11-8b4e-4d62-9a05-1c6e8f0b2d43",
                                        "name": "In Prüfung",
                                        "color": "#10B981",
                                        "is_completed": true
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Anzeigename."
                                    },
                                    "color": {
                                        "type": "string",
                                        "description": "Sechsstelliger Hex-Wert."
                                    },
                                    "is_completed": {
                                        "type": "boolean",
                                        "description": "Abschlusskennzeichen."
                                    },
                                    "sort_order": {
                                        "type": "integer",
                                        "description": "Position in der Liste."
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowsaas-statuses-destroy",
                "summary": "Status löschen",
                "description": "Löscht den Status und hängt jede Idee, die ihn trug, auf den ersten verbleibenden Status des Portals um. Verlangt die Verwaltungsberechtigung.",
                "tags": [
                    "vocabulary"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Status gelöscht; betroffene Ideen wurden umgehängt."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/portals/{uuid}/tags": {
            "get": {
                "operationId": "flowsaas-portals-tags-index",
                "summary": "Schlagwörter eines Portals auflisten",
                "description": "Alle Schlagwörter des Portals in ihrer eigenen Reihenfolge, auch die zurückgezogenen.",
                "tags": [
                    "vocabulary"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "b2d4e6f8-1a3c-4e5f-8907-abcdef012345",
                                            "name": "Bug 🐞",
                                            "is_active": true,
                                            "sort_order": 2
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowsaas-portals-tags-store",
                "summary": "Schlagwort anlegen",
                "description": "Hängt ein Schlagwort an das Ende der Liste des Portals.",
                "tags": [
                    "vocabulary"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "b2d4e6f8-1a3c-4e5f-8907-abcdef012345",
                                        "name": "Dokumentation",
                                        "is_active": true
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Anzeigename des Schlagworts."
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Erläuterung für die Portalseite."
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "Ob das Schlagwort angeboten wird. Standard true."
                                    },
                                    "sort_order": {
                                        "type": "integer",
                                        "description": "Position in der Liste. Ohne Angabe ans Ende."
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/portals/{uuid}/tags/reorder": {
            "post": {
                "operationId": "flowsaas-portals-tags-reorder",
                "summary": "Schlagwörter umsortieren",
                "description": "Setzt die Reihenfolge der Schlagwörter des Portals auf die gesendete Liste. UUIDs anderer Portale desselben Teams werden übergangen.",
                "tags": [
                    "vocabulary"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "b2d4e6f8-1a3c-4e5f-8907-abcdef012345",
                                            "name": "Dokumentation",
                                            "sort_order": 1
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "tag_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Die Schlagwort-UUIDs in der gewünschten Reihenfolge."
                                    }
                                },
                                "required": [
                                    "tag_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/tags/{uuid}": {
            "put": {
                "operationId": "flowsaas-tags-update",
                "summary": "Schlagwort ändern",
                "description": "Ändert Name, Erläuterung, Position oder ob das Schlagwort noch angeboten wird. Ein zurückgezogenes Schlagwort bleibt an jeder Idee, die es trägt.",
                "tags": [
                    "vocabulary"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "b2d4e6f8-1a3c-4e5f-8907-abcdef012345",
                                        "is_active": false
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Anzeigename."
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Erläuterung."
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "Ob das Schlagwort angeboten wird."
                                    },
                                    "sort_order": {
                                        "type": "integer",
                                        "description": "Position in der Liste."
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowsaas-tags-destroy",
                "summary": "Schlagwort löschen",
                "description": "Löscht das Schlagwort; die Zuordnung verschwindet damit an jeder Idee, die es trug. Verlangt die Verwaltungsberechtigung.",
                "tags": [
                    "vocabulary"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Schlagwort gelöscht."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/posts": {
            "get": {
                "operationId": "flowsaas-posts-index",
                "summary": "Ideen auflisten",
                "description": "Die Ideen aller Portale des Teams. Zusammengeführte Ideen bleiben außen vor, sofern include_merged nicht gesetzt ist.",
                "tags": [
                    "posts"
                ],
                "parameters": [
                    {
                        "name": "portal_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Auf ein Portal einschränken.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "status_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Nur Ideen in diesem Status.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "tag_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Nur Ideen mit diesem Schlagwort.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "moderation_status",
                        "in": "query",
                        "required": false,
                        "description": "pending, approved, rejected oder spam.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Sucht in Titel und Text der Idee.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "is_private",
                        "in": "query",
                        "required": false,
                        "description": "Nur verborgene beziehungsweise nur sichtbare Ideen.",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "is_on_roadmap",
                        "in": "query",
                        "required": false,
                        "description": "Nur Ideen auf der Roadmap.",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "include_merged",
                        "in": "query",
                        "required": false,
                        "description": "Zusammengeführte Ideen mit aufnehmen.",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "required": false,
                        "description": "newest, oldest, votes oder comments. Standard newest.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Einträge pro Seite, 1 bis 200, Standard 50.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Seitenzahl, Standard 1.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "c1b5a0d2-9e33-4f10-8a77-6b2c4d1e9f08",
                                            "portal_uuid": "9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f",
                                            "title": "Dunkelmodus",
                                            "status_name": "Backlog",
                                            "moderation_status": "approved",
                                            "is_public": true,
                                            "votes_count": 42,
                                            "comments_count": 3,
                                            "author_name": "Sascha",
                                            "author_kind": "user"
                                        }
                                    ],
                                    "meta": {
                                        "current_page": 1,
                                        "per_page": 50,
                                        "total": 1,
                                        "last_page": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowsaas-posts-store",
                "summary": "Idee anlegen",
                "description": "Legt eine Idee im genannten Portal an, zugeschrieben an den Benutzer des API-Schlüssels und sofort freigegeben. Ohne Statusangabe landet sie im ersten Status des Portals, ohne Schlagwörter erhält sie das erste angebotene.",
                "tags": [
                    "posts"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "c1b5a0d2-9e33-4f10-8a77-6b2c4d1e9f08",
                                        "title": "Dunkelmodus",
                                        "moderation_status": "approved",
                                        "author_kind": "user"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "portal_uuid": {
                                        "type": "string",
                                        "description": "Das Portal, in dem die Idee entsteht."
                                    },
                                    "title": {
                                        "type": "string",
                                        "description": "Titel, mindestens drei Zeichen."
                                    },
                                    "body": {
                                        "type": "string",
                                        "description": "Beschreibung der Idee."
                                    },
                                    "status_uuid": {
                                        "type": "string",
                                        "description": "Status des Portals. Ein Status eines anderen Portals wird übergangen."
                                    },
                                    "tag_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Schlagwörter des Portals. Die Grenze tag_limit des Portals gilt."
                                    },
                                    "is_private": {
                                        "type": "boolean",
                                        "description": "Die Idee vor Besuchern verbergen."
                                    },
                                    "is_on_roadmap": {
                                        "type": "boolean",
                                        "description": "Zugleich einen Roadmap-Eintrag anlegen."
                                    }
                                },
                                "required": [
                                    "portal_uuid",
                                    "title"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/posts/{uuid}": {
            "get": {
                "operationId": "flowsaas-posts-show",
                "summary": "Idee abrufen",
                "description": "Eine Idee mit ihren Schlagwörtern und ihrem vollständigen Statusverlauf.",
                "tags": [
                    "posts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "c1b5a0d2-9e33-4f10-8a77-6b2c4d1e9f08",
                                        "title": "Dunkelmodus",
                                        "tags": [],
                                        "status_history": [
                                            {
                                                "old_status": "Feedback",
                                                "new_status": "Backlog",
                                                "changed_by_name": "Sascha"
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowsaas-posts-update",
                "summary": "Idee ändern",
                "description": "Ändert die gesendeten Felder. Der Status gehört nicht dazu, er hat einen eigenen Endpunkt. Eine leere Liste tag_uuids nimmt alle Schlagwörter ab.",
                "tags": [
                    "posts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "c1b5a0d2-9e33-4f10-8a77-6b2c4d1e9f08",
                                        "title": "Dunkelmodus, bitte",
                                        "tags": []
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "description": "Titel."
                                    },
                                    "body": {
                                        "type": "string",
                                        "description": "Beschreibung."
                                    },
                                    "is_private": {
                                        "type": "boolean",
                                        "description": "Sichtbarkeit für Besucher."
                                    },
                                    "is_pinned": {
                                        "type": "boolean",
                                        "description": "Die Idee oben anheften. Wird nur gespeichert; das Portal nutzt das Feld derzeit nicht."
                                    },
                                    "is_archived": {
                                        "type": "boolean",
                                        "description": "Die Idee archivieren. Wird nur gespeichert; das Portal nutzt das Feld derzeit nicht."
                                    },
                                    "tag_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Die Schlagwörter, die danach gelten sollen."
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowsaas-posts-destroy",
                "summary": "Idee löschen",
                "description": "Löscht die Idee mit ihren Stimmen, Kommentaren und ihrem Verlauf. Verlangt die Verwaltungsberechtigung.",
                "tags": [
                    "posts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Idee gelöscht."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/posts/{uuid}/status": {
            "put": {
                "operationId": "flowsaas-posts-status-update",
                "summary": "Status einer Idee ändern",
                "description": "Setzt die Idee auf einen anderen Status ihres eigenen Portals. Schreibt einen Verlaufseintrag, löst die Portal-Webhooks aus und benachrichtigt alle Unterstützer. Ein Status eines anderen Portals antwortet mit HTTP 422 und error status_not_in_portal.",
                "tags": [
                    "posts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "c1b5a0d2-9e33-4f10-8a77-6b2c4d1e9f08",
                                        "status_uuid": "3a7c2f11-8b4e-4d62-9a05-1c6e8f0b2d43",
                                        "status_name": "In Arbeit"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "status_uuid": {
                                        "type": "string",
                                        "description": "Der neue Status, aus dem Portal der Idee."
                                    },
                                    "comment": {
                                        "type": "string",
                                        "description": "Begründung, die im Verlauf festgehalten wird."
                                    }
                                },
                                "required": [
                                    "status_uuid"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/posts/{uuid}/approve": {
            "post": {
                "operationId": "flowsaas-posts-approve",
                "summary": "Idee freigeben",
                "description": "Gibt eine wartende Idee für das Portal frei und benachrichtigt die verfassende Person. Verlangt die Verwaltungsberechtigung.",
                "tags": [
                    "posts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "c1b5a0d2-9e33-4f10-8a77-6b2c4d1e9f08",
                                        "moderation_status": "approved"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/posts/{uuid}/reject": {
            "post": {
                "operationId": "flowsaas-posts-reject",
                "summary": "Idee ablehnen",
                "description": "Lehnt eine Idee ab und benachrichtigt die verfassende Person. Die Begründung wird an der Idee gespeichert; die Benachrichtigung selbst enthält einen festen Standardsatz, nicht die Begründung. Verlangt die Verwaltungsberechtigung.",
                "tags": [
                    "posts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "c1b5a0d2-9e33-4f10-8a77-6b2c4d1e9f08",
                                        "moderation_status": "rejected",
                                        "rejection_reason": "Doppelt vorhanden."
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "reason": {
                                        "type": "string",
                                        "description": "Begründung der Ablehnung."
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/posts/{uuid}/spam": {
            "post": {
                "operationId": "flowsaas-posts-spam",
                "summary": "Idee als Spam markieren",
                "description": "Markiert eine Idee als Spam. Die verfassende Person erhält, sofern ihre E-Mail-Adresse bestätigt ist, einen kurzen Hinweis, dass ihr Beitrag markiert wurde. Verlangt die Verwaltungsberechtigung.",
                "tags": [
                    "posts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "c1b5a0d2-9e33-4f10-8a77-6b2c4d1e9f08",
                                        "moderation_status": "spam"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/posts/{uuid}/vote": {
            "post": {
                "operationId": "flowsaas-posts-vote-store",
                "summary": "Für eine Idee stimmen",
                "description": "Gibt eine Stimme im Namen des Benutzers des API-Schlüssels ab. Eine zweite Stimme derselben Person ist kein Fehler: added ist dann false und die Zahl bleibt unverändert.",
                "tags": [
                    "posts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "added": true,
                                        "votes_count": 43
                                    },
                                    "message": "Stimme abgegeben."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowsaas-posts-vote-destroy",
                "summary": "Stimme zurückziehen",
                "description": "Nimmt die Stimme des Benutzers des API-Schlüssels zurück. Lag keine vor, ist removed false.",
                "tags": [
                    "posts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "removed": true,
                                        "votes_count": 42
                                    },
                                    "message": "Stimme zurückgezogen."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/posts/{uuid}/toggle-private": {
            "post": {
                "operationId": "flowsaas-posts-toggle-private",
                "summary": "Idee verbergen oder wieder zeigen",
                "description": "Kehrt die Sichtbarkeit für Portalbesucher um und meldet die Änderung an die Portal-Webhooks.",
                "tags": [
                    "posts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "c1b5a0d2-9e33-4f10-8a77-6b2c4d1e9f08",
                                        "is_private": true,
                                        "is_public": false
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/posts/{uuid}/merge": {
            "post": {
                "operationId": "flowsaas-posts-merge",
                "summary": "Idee als Duplikat zusammenführen",
                "description": "Führt die Idee aus dem Pfad in die genannte Ziel-Idee desselben Portals über. Stimmen und öffentliche Kommentare wandern mit, interne Notizen bleiben beim Duplikat. Die Antwort zeigt die Ziel-Idee.",
                "tags": [
                    "posts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "d3e5f7a9-0b2c-4d6e-8f01-234567890abc",
                                        "votes_count": 45
                                    },
                                    "message": "Als Duplikat zusammengeführt."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "master_post_uuid": {
                                        "type": "string",
                                        "description": "Die Idee, die bestehen bleibt. Muss zum selben Portal gehören und eine andere sein."
                                    }
                                },
                                "required": [
                                    "master_post_uuid"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/posts/{uuid}/promote-to-roadmap": {
            "post": {
                "operationId": "flowsaas-posts-promote-to-roadmap",
                "summary": "Idee auf die Roadmap heben",
                "description": "Legt einen Roadmap-Eintrag für die Idee an und markiert sie entsprechend. Steht sie bereits auf der Roadmap, antwortet die Route mit HTTP 422 und error already_on_roadmap.",
                "tags": [
                    "posts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "5f1e7b90-2c44-4a19-9f3d-7c8b1a2e6d05",
                                        "post_uuid": "c1b5a0d2-9e33-4f10-8a77-6b2c4d1e9f08",
                                        "title": "Dunkelmodus",
                                        "sort_order": 0
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/posts/{uuid}/similar": {
            "get": {
                "operationId": "flowsaas-posts-similar",
                "summary": "Ähnliche Ideen abrufen",
                "description": "Bis zu zehn freigegebene, nicht abgeschlossene Ideen desselben Portals mit ähnlichem Wortlaut, die stimmstärksten zuerst. Die Idee selbst ist nicht dabei. Dieselbe Suche, die das Portal beim Schreiben anbietet.",
                "tags": [
                    "posts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "d3e5f7a9-0b2c-4d6e-8f01-234567890abc",
                                            "title": "Dunkelmodus wäre schön",
                                            "votes_count": 12
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/posts/{uuid}/comments": {
            "get": {
                "operationId": "flowsaas-posts-comments-index",
                "summary": "Kommentare einer Idee auflisten",
                "description": "Alle Kommentare der Idee, älteste zuerst, einschließlich der internen Notizen und der wartenden Beiträge.",
                "tags": [
                    "comments"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "moderation_status",
                        "in": "query",
                        "required": false,
                        "description": "pending, approved, rejected oder spam.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "is_internal",
                        "in": "query",
                        "required": false,
                        "description": "Nur interne Notizen beziehungsweise nur öffentliche Kommentare.",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Einträge pro Seite, 1 bis 200, Standard 50.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Seitenzahl, Standard 1.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "7a9c1e35-4d68-4b02-9e7a-3f5c1d8b0e24",
                                            "post_uuid": "c1b5a0d2-9e33-4f10-8a77-6b2c4d1e9f08",
                                            "body": "Danke für den Hinweis.",
                                            "is_internal": false,
                                            "moderation_status": "approved",
                                            "author_kind": "user"
                                        }
                                    ],
                                    "meta": {
                                        "current_page": 1,
                                        "per_page": 50,
                                        "total": 1,
                                        "last_page": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowsaas-posts-comments-store",
                "summary": "Kommentar schreiben",
                "description": "Schreibt einen Kommentar im Namen des Benutzers des API-Schlüssels. Er gilt sofort als freigegeben. Ein Bezugskommentar muss zu derselben Idee gehören, sonst antwortet die Route mit HTTP 422 und error parent_not_in_post.",
                "tags": [
                    "comments"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "7a9c1e35-4d68-4b02-9e7a-3f5c1d8b0e24",
                                        "body": "Danke für den Hinweis.",
                                        "is_internal": false,
                                        "moderation_status": "approved"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "body": {
                                        "type": "string",
                                        "description": "Der Text des Kommentars, höchstens 2000 Zeichen."
                                    },
                                    "is_internal": {
                                        "type": "boolean",
                                        "description": "true macht daraus eine Teamnotiz. Standard false, also öffentlich sichtbar."
                                    },
                                    "parent_comment_uuid": {
                                        "type": "string",
                                        "description": "Der Kommentar, auf den geantwortet wird. Muss zu dieser Idee gehören."
                                    }
                                },
                                "required": [
                                    "body"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/comments/{uuid}/reply": {
            "post": {
                "operationId": "flowsaas-comments-reply",
                "summary": "Auf einen Kommentar antworten",
                "description": "Antwortet auf den Kommentar im Pfad. Die Idee ergibt sich aus diesem Kommentar, eine Antwort kann daher nie in einem fremden Strang landen.",
                "tags": [
                    "comments"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "8b0d2f46-5e79-4c13-8f0b-4a6d2e9c1f35",
                                        "parent_comment_uuid": "7a9c1e35-4d68-4b02-9e7a-3f5c1d8b0e24",
                                        "body": "Wir melden uns."
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "body": {
                                        "type": "string",
                                        "description": "Der Text der Antwort, höchstens 2000 Zeichen."
                                    },
                                    "is_internal": {
                                        "type": "boolean",
                                        "description": "true macht daraus eine Teamnotiz."
                                    }
                                },
                                "required": [
                                    "body"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/comments/{uuid}/approve": {
            "post": {
                "operationId": "flowsaas-comments-approve",
                "summary": "Kommentar freigeben",
                "description": "Gibt einen wartenden Kommentar für das Portal frei und benachrichtigt die verfassende Person. Verlangt die Verwaltungsberechtigung.",
                "tags": [
                    "comments"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "7a9c1e35-4d68-4b02-9e7a-3f5c1d8b0e24",
                                        "moderation_status": "approved"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/comments/{uuid}/reject": {
            "post": {
                "operationId": "flowsaas-comments-reject",
                "summary": "Kommentar ablehnen",
                "description": "Lehnt einen Kommentar ab und benachrichtigt die verfassende Person. Verlangt die Verwaltungsberechtigung.",
                "tags": [
                    "comments"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "7a9c1e35-4d68-4b02-9e7a-3f5c1d8b0e24",
                                        "moderation_status": "rejected"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/comments/{uuid}/spam": {
            "post": {
                "operationId": "flowsaas-comments-spam",
                "summary": "Kommentar als Spam markieren",
                "description": "Markiert einen Kommentar als Spam, ohne jemanden zu benachrichtigen. Verlangt die Verwaltungsberechtigung.",
                "tags": [
                    "comments"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "7a9c1e35-4d68-4b02-9e7a-3f5c1d8b0e24",
                                        "moderation_status": "spam"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/comments/{uuid}/moderation": {
            "put": {
                "operationId": "flowsaas-comments-moderation-update",
                "summary": "Moderationszustand eines Kommentars setzen",
                "description": "Setzt den Zustand ausdrücklich. Anders als die drei Kurzwege erreicht dieser Endpunkt auch pending und stellt einen Kommentar damit zurück in die Warteschlange. Verlangt die Verwaltungsberechtigung.",
                "tags": [
                    "comments"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "7a9c1e35-4d68-4b02-9e7a-3f5c1d8b0e24",
                                        "moderation_status": "pending"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "moderation_status": {
                                        "type": "string",
                                        "description": "pending, approved, rejected oder spam."
                                    }
                                },
                                "required": [
                                    "moderation_status"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/roadmap-items": {
            "get": {
                "operationId": "flowsaas-roadmap-items-index",
                "summary": "Roadmap-Einträge auflisten",
                "description": "Die Roadmap-Einträge aller Portale des Teams in ihrer veröffentlichten Reihenfolge.",
                "tags": [
                    "roadmap"
                ],
                "parameters": [
                    {
                        "name": "portal_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Auf ein Portal einschränken.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "status_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Nur Einträge in dieser Spalte.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Einträge pro Seite, 1 bis 200, Standard 50.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Seitenzahl, Standard 1.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "5f1e7b90-2c44-4a19-9f3d-7c8b1a2e6d05",
                                            "portal_uuid": "9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f",
                                            "post_uuid": "c1b5a0d2-9e33-4f10-8a77-6b2c4d1e9f08",
                                            "title": "Dunkelmodus",
                                            "status_name": "In Arbeit",
                                            "votes_count": 42,
                                            "sort_order": 0
                                        }
                                    ],
                                    "meta": {
                                        "current_page": 1,
                                        "per_page": 50,
                                        "total": 1,
                                        "last_page": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/roadmap-items/{uuid}": {
            "get": {
                "operationId": "flowsaas-roadmap-items-show",
                "summary": "Roadmap-Eintrag abrufen",
                "description": "Ein Roadmap-Eintrag mit Titel, Spalte und Stimmenzahl der Idee dahinter.",
                "tags": [
                    "roadmap"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "5f1e7b90-2c44-4a19-9f3d-7c8b1a2e6d05",
                                        "title": "Dunkelmodus",
                                        "status_name": "In Arbeit",
                                        "votes_count": 42
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowsaas-roadmap-items-update",
                "summary": "Position eines Roadmap-Eintrags ändern",
                "description": "Ändert allein die Position innerhalb der bestehenden Spalte. Für einen Spaltenwechsel gibt es den Endpunkt move.",
                "tags": [
                    "roadmap"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "5f1e7b90-2c44-4a19-9f3d-7c8b1a2e6d05",
                                        "sort_order": 4
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "sort_order": {
                                        "type": "integer",
                                        "description": "Neue Position, ab 0."
                                    }
                                },
                                "required": [
                                    "sort_order"
                                ]
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowsaas-roadmap-items-destroy",
                "summary": "Roadmap-Eintrag entfernen",
                "description": "Nimmt den Eintrag von der Roadmap. Die Idee bleibt mit Stimmen und Kommentaren bestehen und verliert nur ihre Roadmap-Markierung. Verlangt die Verwaltungsberechtigung.",
                "tags": [
                    "roadmap"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Roadmap-Eintrag entfernt."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/roadmap-items/{uuid}/move": {
            "post": {
                "operationId": "flowsaas-roadmap-items-move",
                "summary": "Roadmap-Eintrag verschieben",
                "description": "Verschiebt den Eintrag in eine andere Spalte und an eine Position darin. Das ist ein Statuswechsel der Idee: er schreibt Verlauf, löst die Webhooks aus und benachrichtigt die Unterstützer. Die übrigen Einträge der Zielspalte werden neu durchnummeriert.",
                "tags": [
                    "roadmap"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "5f1e7b90-2c44-4a19-9f3d-7c8b1a2e6d05",
                                        "status_name": "In Arbeit",
                                        "sort_order": 0
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "status_uuid": {
                                        "type": "string",
                                        "description": "Die Zielspalte, ein Status desselben Portals."
                                    },
                                    "sort_order": {
                                        "type": "integer",
                                        "description": "Position in der Zielspalte, ab 0."
                                    }
                                },
                                "required": [
                                    "status_uuid",
                                    "sort_order"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/roadmap-items/{uuid}/vote": {
            "post": {
                "operationId": "flowsaas-roadmap-items-vote",
                "summary": "Für einen Roadmap-Eintrag stimmen",
                "description": "Die Stimme landet auf der Idee hinter dem Eintrag, denn dort führt die Roadmap ihre Zahlen. Eine zweite Stimme derselben Person ist kein Fehler.",
                "tags": [
                    "roadmap"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "added": true,
                                        "votes_count": 43
                                    },
                                    "message": "Stimme abgegeben."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/portals/{uuid}/webhooks": {
            "get": {
                "operationId": "flowsaas-portals-webhooks-index",
                "summary": "Webhooks eines Portals auflisten",
                "description": "Alle Webhooks des Portals, neueste zuerst, jeweils ohne Schlüssel.",
                "tags": [
                    "webhooks"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "e4f6a8b0-2c4d-4e6f-8091-a2b3c4d5e6f7",
                                            "url": "https://example.com/hooks/flowsaas",
                                            "events": [
                                                "post.created"
                                            ],
                                            "is_active": true,
                                            "last_triggered_at": "2026-09-20T15:02:00+02:00"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "flowsaas-portals-webhooks-store",
                "summary": "Webhook anlegen",
                "description": "Registriert einen Webhook auf dem Portal. Die Antwort enthält einmalig den Schlüssel für die Signaturprüfung. Verlangt die Verwaltungsberechtigung.",
                "tags": [
                    "webhooks"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "e4f6a8b0-2c4d-4e6f-8091-a2b3c4d5e6f7",
                                        "url": "https://example.com/hooks/flowsaas",
                                        "events": [
                                            "post.created"
                                        ],
                                        "is_active": true,
                                        "secret": "Hn3k9QxT2bVr7LpZ4wYs8CmA1dFgJ6e0"
                                    },
                                    "message": "Der Schlüssel wird nur dieses eine Mal angezeigt. Bitte sicher aufbewahren."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "url": {
                                        "type": "string",
                                        "description": "Die Zieladresse der Zustellung."
                                    },
                                    "events": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Mindestens eines aus post.created, post.status_changed, post.updated, comment.created, vote.created."
                                    },
                                    "secret": {
                                        "type": "string",
                                        "description": "Eigener Schlüssel, mindestens 16 Zeichen. Ohne Angabe wird einer erzeugt."
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "Ob sofort zugestellt wird. Standard true."
                                    }
                                },
                                "required": [
                                    "url",
                                    "events"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/webhooks/{uuid}": {
            "get": {
                "operationId": "flowsaas-webhooks-show",
                "summary": "Webhook abrufen",
                "description": "Ein Webhook mit Zieladresse, abonnierten Ereignissen und Zeitpunkt der letzten erfolgreichen Zustellung. Der Schlüssel ist nicht dabei.",
                "tags": [
                    "webhooks"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "e4f6a8b0-2c4d-4e6f-8091-a2b3c4d5e6f7",
                                        "url": "https://example.com/hooks/flowsaas",
                                        "events": [
                                            "post.created"
                                        ],
                                        "is_active": true
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "flowsaas-webhooks-update",
                "summary": "Webhook ändern",
                "description": "Ändert die gesendeten Felder. Ohne secret bleibt der hinterlegte Schlüssel unverändert, damit ein Adresswechsel nicht die Signaturprüfung beim Empfänger bricht. Verlangt die Verwaltungsberechtigung.",
                "tags": [
                    "webhooks"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "e4f6a8b0-2c4d-4e6f-8091-a2b3c4d5e6f7",
                                        "url": "https://example.com/hooks/neu",
                                        "is_active": false
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "url": {
                                        "type": "string",
                                        "description": "Neue Zieladresse."
                                    },
                                    "events": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Die Ereignisse, die danach gelten sollen."
                                    },
                                    "secret": {
                                        "type": "string",
                                        "description": "Neuer Schlüssel, mindestens 16 Zeichen. Wird nicht zurückgegeben."
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "Zustellung ein- oder ausschalten."
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "flowsaas-webhooks-destroy",
                "summary": "Webhook löschen",
                "description": "Löscht den Webhook samt seinem Zustellungsprotokoll. Verlangt die Verwaltungsberechtigung.",
                "tags": [
                    "webhooks"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Webhook gelöscht."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/webhooks/{uuid}/test": {
            "post": {
                "operationId": "flowsaas-webhooks-test",
                "summary": "Testzustellung senden",
                "description": "Sendet eine signierte Testnachricht an die hinterlegte Adresse und meldet das Ergebnis zurück. Ein Empfänger, der mit einem Fehler antwortet, ist ein erfolgreicher Aufruf mit erfolglosem Ergebnis: delivered ist dann false. Verlangt die Verwaltungsberechtigung.",
                "tags": [
                    "webhooks"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "delivered": true,
                                        "http_status": 200,
                                        "response_body": "ok"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsaas/webhooks/{uuid}/logs": {
            "get": {
                "operationId": "flowsaas-webhooks-logs",
                "summary": "Zustellungsprotokoll abrufen",
                "description": "Die Zustellversuche des Webhooks, neueste zuerst, jeweils mit der gesendeten Nutzlast und der Antwort des Empfängers.",
                "tags": [
                    "webhooks"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "event_type",
                        "in": "query",
                        "required": false,
                        "description": "Auf ein Ereignis einschränken, etwa post.created.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "succeeded",
                        "in": "query",
                        "required": false,
                        "description": "Nur erfolgreiche beziehungsweise nur erfolglose Zustellungen.",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Einträge pro Seite, 1 bis 200, Standard 50.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Seitenzahl, Standard 1.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "9c1e3f57-6a8b-4d2e-9f01-3b5d7c9e1a24",
                                            "event_reference": "1f2e3d4c-5b6a-4790-8123-456789abcdef",
                                            "event_type": "post.created",
                                            "http_status": 200,
                                            "succeeded_at": "2026-09-20T15:02:00+02:00"
                                        }
                                    ],
                                    "meta": {
                                        "current_page": 1,
                                        "per_page": 50,
                                        "total": 1,
                                        "last_page": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        }
    },
    "components": {
        "securitySchemes": {
            "bearerAuth": {
                "type": "http",
                "scheme": "bearer",
                "description": "API-Schlüssel (pk_… oder at_…) als Authorization: Bearer <Schlüssel>. Andere Übergabewege werden mit 401 abgelehnt."
            }
        },
        "schemas": {
            "Error": {
                "type": "object",
                "properties": {
                    "success": {
                        "type": "boolean"
                    },
                    "error": {
                        "type": "string"
                    },
                    "message": {
                        "type": "string"
                    },
                    "errors": {
                        "type": "object"
                    }
                }
            }
        }
    }
}