{"openapi":"3.1.0","info":{"title":"Janeway API Gateway","description":"Einheitliche REST-API für die Janeway Suite","version":"0.46.0"},"paths":{"/v1/contacts/contacts":{"get":{"summary":"Kontakte auflisten","description":"`deleted=true` zeigt den PAPIERKORB statt der lebenden Kontakte. Ohne den Parameter bleibt der Papierkorb unsichtbar — er ist es, aus dem `POST /api/v1/contacts/{id}/restore` zurückholt.","tags":["Kontakte"],"parameters":[{"name":"limit","in":"query","required":false,"description":"Max. Anzahl (Default 50)","schema":{"type":"integer"}},{"name":"offset","in":"query","required":false,"description":"Offset für Pagination","schema":{"type":"integer"}},{"name":"search","in":"query","required":false,"description":"Volltextsuche","schema":{"type":"string"}},{"name":"deleted","in":"query","required":false,"description":"true = Papierkorb statt lebender Kontakte","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"first_name":{"type":"string","minLength":1,"maxLength":255},"last_name":{"default":"","type":"string","maxLength":255},"is_favorite":{"default":false,"type":"boolean"},"nickname":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"middle_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"prefix":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"suffix":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"email":{"anyOf":[{"type":"string","maxLength":255,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"company":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"position":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"department":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"address":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"city":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"postal_code":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"country":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":10000},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"null"}]},"group_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"birthday":{"anyOf":[{"type":"string","pattern":"^(\\d{4}-\\d{2}-\\d{2}|--\\d{2}-\\d{2})$"},{"type":"null"}]},"anniversary":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"website":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"null"}]},"phones":{"anyOf":[{"maxItems":10,"type":"array","items":{"type":"object","properties":{"number":{"type":"string","minLength":1,"maxLength":50},"type":{"type":"string","enum":["mobile","home","work","fax","other"]},"is_primary":{"type":"boolean"}},"required":["number","type"],"additionalProperties":false}},{"type":"null"}]},"emails":{"anyOf":[{"maxItems":10,"type":"array","items":{"type":"object","properties":{"address":{"type":"string","maxLength":255,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"type":{"type":"string","enum":["personal","work","other"]},"is_primary":{"type":"boolean"}},"required":["address","type"],"additionalProperties":false}},{"type":"null"}]},"addresses":{"anyOf":[{"maxItems":10,"type":"array","items":{"type":"object","properties":{"street":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"city":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"postal_code":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"state":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"country":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"type":{"type":"string","enum":["home","work","other"]},"is_primary":{"type":"boolean"}},"required":["type"],"additionalProperties":false}},{"type":"null"}]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["first_name","last_name","is_favorite","id","workspace_id","created_at","updated_at"],"additionalProperties":false}},"total":{"type":"number"}},"required":["data","total"],"additionalProperties":false}}}}}},"post":{"summary":"Kontakt anlegen","description":"Leeren: null senden (ein leerer String \"\" wird als null gelesen). Ein fehlender Schlüssel lässt das Feld unverändert — null und „nicht gesendet\" sind NICHT dasselbe. phones, emails und addresses ersetzen die jeweilige Liste VOLLSTÄNDIG: ein fehlender Schlüssel lässt sie unverändert, ein leeres Array leert sie. Ohne Markierung ist der erste Eintrag der primäre; er spiegelt sich in die flachen Felder phone, email, address, city, postal_code und country. Jede Leseantwort liefert alle drei Listen in genau dieser Form mit: wer ergänzen will, liest den Kontakt, hängt den neuen Eintrag an und schickt die vollständige Liste zurück. Eine Anschrift muss mindestens eines von street, city, postal_code, state oder country tragen.","tags":["Kontakte"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"first_name":{"type":"string","minLength":1,"maxLength":255},"last_name":{"default":"","type":"string","maxLength":255},"is_favorite":{"default":false,"type":"boolean"},"nickname":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"middle_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"prefix":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"suffix":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"email":{"anyOf":[{"type":"string","maxLength":255,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"company":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"position":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"department":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"address":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"city":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"postal_code":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"country":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":10000},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"null"}]},"group_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"birthday":{"anyOf":[{"type":"string","pattern":"^(\\d{4}-\\d{2}-\\d{2}|--\\d{2}-\\d{2})$"},{"type":"null"}]},"anniversary":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"website":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"null"}]},"phones":{"anyOf":[{"maxItems":10,"type":"array","items":{"type":"object","properties":{"number":{"type":"string","minLength":1,"maxLength":50},"type":{"type":"string","enum":["mobile","home","work","fax","other"]},"is_primary":{"type":"boolean"}},"required":["number","type"],"additionalProperties":false}},{"type":"null"}]},"emails":{"anyOf":[{"maxItems":10,"type":"array","items":{"type":"object","properties":{"address":{"type":"string","maxLength":255,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"type":{"type":"string","enum":["personal","work","other"]},"is_primary":{"type":"boolean"}},"required":["address","type"],"additionalProperties":false}},{"type":"null"}]},"addresses":{"anyOf":[{"maxItems":10,"type":"array","items":{"type":"object","properties":{"street":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"city":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"postal_code":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"state":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"country":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"type":{"type":"string","enum":["home","work","other"]},"is_primary":{"type":"boolean"}},"required":["type"],"additionalProperties":false}},{"type":"null"}]}},"required":["first_name"]}}}},"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"first_name":{"type":"string","minLength":1,"maxLength":255},"last_name":{"default":"","type":"string","maxLength":255},"is_favorite":{"default":false,"type":"boolean"},"nickname":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"middle_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"prefix":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"suffix":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"email":{"anyOf":[{"type":"string","maxLength":255,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"company":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"position":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"department":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"address":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"city":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"postal_code":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"country":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":10000},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"null"}]},"group_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"birthday":{"anyOf":[{"type":"string","pattern":"^(\\d{4}-\\d{2}-\\d{2}|--\\d{2}-\\d{2})$"},{"type":"null"}]},"anniversary":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"website":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"null"}]},"phones":{"anyOf":[{"maxItems":10,"type":"array","items":{"type":"object","properties":{"number":{"type":"string","minLength":1,"maxLength":50},"type":{"type":"string","enum":["mobile","home","work","fax","other"]},"is_primary":{"type":"boolean"}},"required":["number","type"],"additionalProperties":false}},{"type":"null"}]},"emails":{"anyOf":[{"maxItems":10,"type":"array","items":{"type":"object","properties":{"address":{"type":"string","maxLength":255,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"type":{"type":"string","enum":["personal","work","other"]},"is_primary":{"type":"boolean"}},"required":["address","type"],"additionalProperties":false}},{"type":"null"}]},"addresses":{"anyOf":[{"maxItems":10,"type":"array","items":{"type":"object","properties":{"street":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"city":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"postal_code":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"state":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"country":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"type":{"type":"string","enum":["home","work","other"]},"is_primary":{"type":"boolean"}},"required":["type"],"additionalProperties":false}},{"type":"null"}]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["first_name","last_name","is_favorite","id","workspace_id","created_at","updated_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}},"patch":{"summary":"Mehrere Kontakte gleich ändern (max. 100 ids, Ergebnis je id)","description":"Dieselbe Änderung auf bis zu 100 Kontakten. Es gelten dieselben Feldregeln wie bei PATCH /api/v1/contacts/{id} (leeren mit null, fehlender Schlüssel = unverändert). phones, emails und addresses sind hier NICHT erlaubt und werden mit 400 abgewiesen: eine Liste ist Vollersatz und wäre für alle genannten Kontakte dieselbe — je Kontakt einzeln an PATCH /api/v1/contacts/{id} schicken. Die Antwort nennt je id, ob es geklappt hat.","tags":["Kontakte"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"fields":{"type":"object","properties":{"first_name":{"type":"string","minLength":1,"maxLength":255},"last_name":{"type":"string","maxLength":255},"is_favorite":{"type":"boolean"},"nickname":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"middle_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"prefix":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"suffix":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"email":{"anyOf":[{"type":"string","maxLength":255,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"company":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"position":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"department":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"address":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"city":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"postal_code":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"country":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":10000},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"null"}]},"group_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"birthday":{"anyOf":[{"type":"string","pattern":"^(\\d{4}-\\d{2}-\\d{2}|--\\d{2}-\\d{2})$"},{"type":"null"}]},"anniversary":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"website":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"null"}]}}}},"required":["ids","fields"]}}}},"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"action":{"type":"string"},"fields":{"type":"array","items":{"type":"string"}},"succeeded":{"type":"number"},"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"reason":{"type":"string"}},"required":["id","reason"],"additionalProperties":false}}},"required":["action","fields","succeeded","contacts","failed"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}}},"/v1/contacts/contacts/{id}":{"get":{"summary":"Kontakt abrufen","tags":["Kontakte"],"parameters":[{"name":"id","in":"path","required":true,"description":"Kontakt-UUID","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"first_name":{"type":"string","minLength":1,"maxLength":255},"last_name":{"default":"","type":"string","maxLength":255},"is_favorite":{"default":false,"type":"boolean"},"nickname":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"middle_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"prefix":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"suffix":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"email":{"anyOf":[{"type":"string","maxLength":255,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"company":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"position":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"department":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"address":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"city":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"postal_code":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"country":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":10000},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"null"}]},"group_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"birthday":{"anyOf":[{"type":"string","pattern":"^(\\d{4}-\\d{2}-\\d{2}|--\\d{2}-\\d{2})$"},{"type":"null"}]},"anniversary":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"website":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"null"}]},"phones":{"anyOf":[{"maxItems":10,"type":"array","items":{"type":"object","properties":{"number":{"type":"string","minLength":1,"maxLength":50},"type":{"type":"string","enum":["mobile","home","work","fax","other"]},"is_primary":{"type":"boolean"}},"required":["number","type"],"additionalProperties":false}},{"type":"null"}]},"emails":{"anyOf":[{"maxItems":10,"type":"array","items":{"type":"object","properties":{"address":{"type":"string","maxLength":255,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"type":{"type":"string","enum":["personal","work","other"]},"is_primary":{"type":"boolean"}},"required":["address","type"],"additionalProperties":false}},{"type":"null"}]},"addresses":{"anyOf":[{"maxItems":10,"type":"array","items":{"type":"object","properties":{"street":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"city":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"postal_code":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"state":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"country":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"type":{"type":"string","enum":["home","work","other"]},"is_primary":{"type":"boolean"}},"required":["type"],"additionalProperties":false}},{"type":"null"}]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["first_name","last_name","is_favorite","id","workspace_id","created_at","updated_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}},"patch":{"summary":"Kontakt aktualisieren","description":"Leeren: null senden (ein leerer String \"\" wird als null gelesen). Ein fehlender Schlüssel lässt das Feld unverändert — null und „nicht gesendet\" sind NICHT dasselbe. phones, emails und addresses ersetzen die jeweilige Liste VOLLSTÄNDIG: ein fehlender Schlüssel lässt sie unverändert, ein leeres Array leert sie. Ohne Markierung ist der erste Eintrag der primäre; er spiegelt sich in die flachen Felder phone, email, address, city, postal_code und country. Jede Leseantwort liefert alle drei Listen in genau dieser Form mit: wer ergänzen will, liest den Kontakt, hängt den neuen Eintrag an und schickt die vollständige Liste zurück. Eine Anschrift muss mindestens eines von street, city, postal_code, state oder country tragen. Ein aus einem verbundenen Konto (Google, Outlook) gespiegelter Kontakt wird mit 409 abgelehnt — der nächste Sync-Lauf würde die Änderung ohnehin überschreiben. Ausnahme: is_favorite und group_id, allein gesendet, denn diese beiden schreibt der Sync nie.","tags":["Kontakte"],"parameters":[{"name":"id","in":"path","required":true,"description":"Kontakt-UUID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"first_name":{"type":"string","minLength":1,"maxLength":255},"last_name":{"type":"string","maxLength":255},"is_favorite":{"type":"boolean"},"nickname":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"middle_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"prefix":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"suffix":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"email":{"anyOf":[{"type":"string","maxLength":255,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"company":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"position":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"department":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"address":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"city":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"postal_code":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"country":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":10000},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"null"}]},"group_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"birthday":{"anyOf":[{"type":"string","pattern":"^(\\d{4}-\\d{2}-\\d{2}|--\\d{2}-\\d{2})$"},{"type":"null"}]},"anniversary":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"website":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"null"}]},"phones":{"anyOf":[{"maxItems":10,"type":"array","items":{"type":"object","properties":{"number":{"type":"string","minLength":1,"maxLength":50},"type":{"type":"string","enum":["mobile","home","work","fax","other"]},"is_primary":{"type":"boolean"}},"required":["number","type"],"additionalProperties":false}},{"type":"null"}]},"emails":{"anyOf":[{"maxItems":10,"type":"array","items":{"type":"object","properties":{"address":{"type":"string","maxLength":255,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"type":{"type":"string","enum":["personal","work","other"]},"is_primary":{"type":"boolean"}},"required":["address","type"],"additionalProperties":false}},{"type":"null"}]},"addresses":{"anyOf":[{"maxItems":10,"type":"array","items":{"type":"object","properties":{"street":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"city":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"postal_code":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"state":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"country":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"type":{"type":"string","enum":["home","work","other"]},"is_primary":{"type":"boolean"}},"required":["type"],"additionalProperties":false}},{"type":"null"}]}}}}}},"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"first_name":{"type":"string","minLength":1,"maxLength":255},"last_name":{"default":"","type":"string","maxLength":255},"is_favorite":{"default":false,"type":"boolean"},"nickname":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"middle_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"prefix":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"suffix":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"email":{"anyOf":[{"type":"string","maxLength":255,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"company":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"position":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"department":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"address":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"city":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"postal_code":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"country":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":10000},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"null"}]},"group_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"birthday":{"anyOf":[{"type":"string","pattern":"^(\\d{4}-\\d{2}-\\d{2}|--\\d{2}-\\d{2})$"},{"type":"null"}]},"anniversary":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"website":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"null"}]},"phones":{"anyOf":[{"maxItems":10,"type":"array","items":{"type":"object","properties":{"number":{"type":"string","minLength":1,"maxLength":50},"type":{"type":"string","enum":["mobile","home","work","fax","other"]},"is_primary":{"type":"boolean"}},"required":["number","type"],"additionalProperties":false}},{"type":"null"}]},"emails":{"anyOf":[{"maxItems":10,"type":"array","items":{"type":"object","properties":{"address":{"type":"string","maxLength":255,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"type":{"type":"string","enum":["personal","work","other"]},"is_primary":{"type":"boolean"}},"required":["address","type"],"additionalProperties":false}},{"type":"null"}]},"addresses":{"anyOf":[{"maxItems":10,"type":"array","items":{"type":"object","properties":{"street":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"city":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"postal_code":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"state":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"country":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"type":{"type":"string","enum":["home","work","other"]},"is_primary":{"type":"boolean"}},"required":["type"],"additionalProperties":false}},{"type":"null"}]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["first_name","last_name","is_favorite","id","workspace_id","created_at","updated_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}},"delete":{"summary":"Kontakt löschen (Papierkorb, mit permanent=true endgültig)","description":"Ohne Parameter ein Soft-Delete: der Kontakt liegt danach im Papierkorb und ist über `POST .../restore` zurückholbar. `permanent=true` löscht Zeile UND Kontaktfoto endgültig; das ist der Weg für ein Löschverlangen nach Art. 17 DSGVO, weil `avatar_url` nach dem Löschen der Zeile der einzige Weg zum Bild wäre.","tags":["Kontakte"],"parameters":[{"name":"id","in":"path","required":true,"description":"Kontakt-UUID","schema":{"type":"string"}},{"name":"permanent","in":"query","required":false,"description":"true = endgültig, samt Kontaktfoto","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}}}}},"/v1/contacts/contacts/{id}/restore":{"post":{"summary":"Kontakt aus dem Papierkorb zurückholen","description":"Die Gegenrichtung zu DELETE. Nur Zeilen IM Papierkorb; für einen lebenden Kontakt kommt 404 statt einer wirkungslosen Erfolgsmeldung. Ein aus einem verbundenen Konto (Google, Outlook) gespiegelter Kontakt wird mit 409 abgelehnt — der nächste Sync-Lauf würde ihn ohnehin wieder überschreiben.","tags":["Kontakte"],"parameters":[{"name":"id","in":"path","required":true,"description":"Kontakt-UUID","schema":{"type":"string"}}],"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"first_name":{"type":"string","minLength":1,"maxLength":255},"last_name":{"default":"","type":"string","maxLength":255},"is_favorite":{"default":false,"type":"boolean"},"nickname":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"middle_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"prefix":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"suffix":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"email":{"anyOf":[{"type":"string","maxLength":255,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"company":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"position":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"department":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"address":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"city":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"postal_code":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"country":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":10000},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"null"}]},"group_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"birthday":{"anyOf":[{"type":"string","pattern":"^(\\d{4}-\\d{2}-\\d{2}|--\\d{2}-\\d{2})$"},{"type":"null"}]},"anniversary":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"website":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"null"}]},"phones":{"anyOf":[{"maxItems":10,"type":"array","items":{"type":"object","properties":{"number":{"type":"string","minLength":1,"maxLength":50},"type":{"type":"string","enum":["mobile","home","work","fax","other"]},"is_primary":{"type":"boolean"}},"required":["number","type"],"additionalProperties":false}},{"type":"null"}]},"emails":{"anyOf":[{"maxItems":10,"type":"array","items":{"type":"object","properties":{"address":{"type":"string","maxLength":255,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"type":{"type":"string","enum":["personal","work","other"]},"is_primary":{"type":"boolean"}},"required":["address","type"],"additionalProperties":false}},{"type":"null"}]},"addresses":{"anyOf":[{"maxItems":10,"type":"array","items":{"type":"object","properties":{"street":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"city":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"postal_code":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"state":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"country":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"type":{"type":"string","enum":["home","work","other"]},"is_primary":{"type":"boolean"}},"required":["type"],"additionalProperties":false}},{"type":"null"}]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["first_name","last_name","is_favorite","id","workspace_id","created_at","updated_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}}},"/v1/contacts/contacts/birthdays":{"get":{"summary":"Anstehende Geburtstage","tags":["Kontakte"],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"first_name":{"type":"string","minLength":1,"maxLength":255},"last_name":{"default":"","type":"string","maxLength":255},"is_favorite":{"default":false,"type":"boolean"},"nickname":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"middle_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"prefix":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"suffix":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"email":{"anyOf":[{"type":"string","maxLength":255,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"company":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"position":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"department":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"address":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"city":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"postal_code":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"country":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":10000},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"null"}]},"group_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"birthday":{"anyOf":[{"type":"string","pattern":"^(\\d{4}-\\d{2}-\\d{2}|--\\d{2}-\\d{2})$"},{"type":"null"}]},"anniversary":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"website":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"null"}]},"phones":{"anyOf":[{"maxItems":10,"type":"array","items":{"type":"object","properties":{"number":{"type":"string","minLength":1,"maxLength":50},"type":{"type":"string","enum":["mobile","home","work","fax","other"]},"is_primary":{"type":"boolean"}},"required":["number","type"],"additionalProperties":false}},{"type":"null"}]},"emails":{"anyOf":[{"maxItems":10,"type":"array","items":{"type":"object","properties":{"address":{"type":"string","maxLength":255,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"type":{"type":"string","enum":["personal","work","other"]},"is_primary":{"type":"boolean"}},"required":["address","type"],"additionalProperties":false}},{"type":"null"}]},"addresses":{"anyOf":[{"maxItems":10,"type":"array","items":{"type":"object","properties":{"street":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"city":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"postal_code":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"state":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"country":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"type":{"type":"string","enum":["home","work","other"]},"is_primary":{"type":"boolean"}},"required":["type"],"additionalProperties":false}},{"type":"null"}]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["first_name","last_name","is_favorite","id","workspace_id","created_at","updated_at"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}}}}},"/v1/contacts/contacts/duplicates":{"get":{"summary":"Mögliche Dubletten finden","description":"Liest bis zu 5000 Kontakte und gruppiert sie nach Übereinstimmung. Greift die Obergrenze, steht `truncated: true` in der Antwort — die Liste ist dann unvollständig und sagt es.","tags":["Kontakte"],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"reason":{"type":"string"},"score":{"type":"number"},"target_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"company":{"anyOf":[{"type":"string"},{"type":"null"}]},"fields_filled":{"type":"number"}},"required":["id","name","email","phone","company","fields_filled"],"additionalProperties":false}}},"required":["reason","score","target_id","contacts"],"additionalProperties":false}},"counts":{"type":"object","properties":{"groups":{"type":"number"},"shown":{"type":"number"},"contacts_scanned":{"type":"number"},"duplicates":{"type":"number"}},"required":["groups","shown","contacts_scanned","duplicates"],"additionalProperties":false},"truncated":{"type":"boolean"}},"required":["data","counts"],"additionalProperties":false}}}}}}},"/v1/contacts/contacts/merge":{"post":{"summary":"Kontakte zusammenführen","description":"Der Zielkontakt behält ALLES, was er hat; aus den Doppeln wird nur übernommen, was beim Ziel leer ist. Nummern, E-Mails, Anschriften, eigene Felder und Verknüpfungen hängen um, Dubletten darunter fallen weg. Die Doppel gehen in den Papierkorb. Ein aus einem verbundenen Konto (Google, Outlook) gespiegelter Kontakt wird mit 409 abgelehnt.","tags":["Kontakte"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"target_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"duplicate_ids":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["target_id","duplicate_ids"]}}}},"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"action":{"type":"string","const":"merge"},"target":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"merged_from":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"fields_filled":{"type":"array","items":{"type":"string"}},"moved":{"type":"object","properties":{"emails":{"type":"number"},"phones":{"type":"number"},"addresses":{"type":"number"},"social_media":{"type":"number"},"groups":{"type":"number"},"custom_fields":{"type":"number"},"relationships":{"type":"number"},"dropped_duplicates":{"type":"number"}},"required":["emails","phones","addresses","social_media","groups","custom_fields","relationships","dropped_duplicates"],"additionalProperties":false},"taken_from":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"reason":{"type":"string"}},"required":["id","reason"],"additionalProperties":false}}},"required":["action","target","merged_from","fields_filled","moved","taken_from","failed"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}}},"/v1/contacts/contacts/groups":{"post":{"summary":"Kontakte einer Gruppe zuordnen oder daraus entfernen","description":"Massen-Zuordnung über die Verknüpfungstabelle. `mode: \"remove\"` löst die Zuordnung und zieht dabei das Alt-Feld `group_id` mit.","tags":["Kontakte"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contact_ids":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"group_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"mode":{"default":"add","type":"string","enum":["add","remove"]}},"required":["contact_ids","group_id"]}}}},"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"action":{"type":"string","enum":["add_to_group","remove_from_group"]},"group":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"succeeded":{"type":"number"},"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"reason":{"type":"string"}},"required":["id","reason"],"additionalProperties":false}}},"required":["action","group","succeeded","contacts","failed"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}}},"/v1/contacts/groups":{"get":{"summary":"Gruppen auflisten","tags":["Gruppen"],"parameters":[{"name":"limit","in":"query","required":false,"description":"Max. Anzahl (Default 50)","schema":{"type":"integer"}},{"name":"offset","in":"query","required":false,"description":"Offset für Pagination","schema":{"type":"integer"}},{"name":"search","in":"query","required":false,"description":"Volltextsuche","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"color":{"default":"#6366f1","type":"string","maxLength":50},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"member_count":{"type":"number"}},"required":["name","color","id","workspace_id","created_at","updated_at"],"additionalProperties":false}},"total":{"type":"number"}},"required":["data","total"],"additionalProperties":false}}}}}},"post":{"summary":"Gruppe anlegen","tags":["Gruppen"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"color":{"default":"#6366f1","type":"string","maxLength":50}},"required":["name"]}}}},"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"color":{"default":"#6366f1","type":"string","maxLength":50},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"member_count":{"type":"number"}},"required":["name","color","id","workspace_id","created_at","updated_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}}},"/v1/contacts/groups/{id}":{"get":{"summary":"Gruppe abrufen","tags":["Gruppen"],"parameters":[{"name":"id","in":"path","required":true,"description":"Gruppen-UUID","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"color":{"default":"#6366f1","type":"string","maxLength":50},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"member_count":{"type":"number"}},"required":["name","color","id","workspace_id","created_at","updated_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}},"patch":{"summary":"Gruppe aktualisieren","tags":["Gruppen"],"parameters":[{"name":"id","in":"path","required":true,"description":"Gruppen-UUID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"color":{"type":"string","maxLength":50}}}}}},"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"color":{"default":"#6366f1","type":"string","maxLength":50},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"member_count":{"type":"number"}},"required":["name","color","id","workspace_id","created_at","updated_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}},"delete":{"summary":"Gruppe löschen","tags":["Gruppen"],"parameters":[{"name":"id","in":"path","required":true,"description":"Gruppen-UUID","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}}}}},"/v1/contacts/export":{"get":{"summary":"Kontakte exportieren (DSGVO Art. 20)","description":"Vollständiger Abzug aller Kontaktdaten des Arbeitsbereichs als JSON, inklusive Nummern, E-Mails, Anschriften, eigener Felder, Verknüpfungen, Gruppenzuordnungen und Aktivitätsverlauf.","tags":["Export"],"parameters":[{"name":"format","in":"query","required":false,"description":"json (derzeit einziges unterstütztes Format)","schema":{"type":"string","enum":["json"]}}],"responses":{"200":{"description":"Erfolg"}}}},"/v1/calendar/events":{"get":{"summary":"Termine auflisten","description":"Mit vollständigem `from`+`to` werden Serientermine serverseitig in den Zeitraum expandiert. `search_mode: \"einzelne_begriffe\"` in der Antwort heißt: nur EINZELNE Suchbegriffe trafen.","tags":["Termine"],"parameters":[{"name":"limit","in":"query","required":false,"description":"Max. Anzahl (Default 50)","schema":{"type":"integer"}},{"name":"offset","in":"query","required":false,"description":"Offset für Pagination","schema":{"type":"integer"}},{"name":"search","in":"query","required":false,"description":"Volltextsuche (Titel, Beschreibung, Ort)","schema":{"type":"string"}},{"name":"from","in":"query","required":false,"description":"Frühestes start_datetime (ISO-8601)","schema":{"type":"string"}},{"name":"to","in":"query","required":false,"description":"Spätestes end_datetime (ISO-8601)","schema":{"type":"string"}},{"name":"deleted","in":"query","required":false,"description":"`1` listet AUSSCHLIESSLICH Termine im Papierkorb","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"created_by":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"start_datetime":{"type":"string"},"end_datetime":{"type":"string"},"all_day":{"type":"boolean"},"location":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"calendar_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"recurrence":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["daily","weekly","monthly","yearly"]},"interval":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"days_of_week":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"week_index":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"week_start":{"type":"integer","minimum":0,"maximum":6},"end_date":{"type":"string"}},"required":["type","interval"],"additionalProperties":false},{"type":"null"}]},"attendees":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"email":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"role":{"type":"string"},"response":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["email"],"additionalProperties":false}},{"type":"null"}]},"reminder_minutes":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Aus der JSONB-Spalte `reminders` zurückgerechnet — eine Spalte `reminder_minutes` gibt es nicht."},"exception_dates":{"description":"Abgesagte Einzeltermine einer Serie (YYYY-MM-DD).","anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","workspace_id","created_by","title","start_datetime","end_datetime","all_day","reminder_minutes","created_at","updated_at"],"additionalProperties":false}},"total":{"type":"number"}},"required":["data","total"],"additionalProperties":false}}}}}},"post":{"summary":"Termin anlegen","description":"Zeitangaben: ISO-8601 mit Offset ('2026-07-26T14:00:00+02:00'), ohne Offset oder als reiner Kalendertag ('2026-07-26'); ein reiner Kalendertag wird auf Tagesbeginn bzw. Tagesende expandiert. `reminder_minutes` wird auf die JSONB-Spalte `reminders` abgebildet. Ein schreibgeschützter, aus einem verbundenen Konto gespiegelter Kalender (`is_readonly`) als `calendar_id` gibt 409.","tags":["Termine"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":500},"start_datetime":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z||([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}]},"end_datetime":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z||([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}]},"description":{"anyOf":[{"type":"string","maxLength":10000},{"type":"null"}]},"all_day":{"type":"boolean"},"location":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"color":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"calendar_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"recurrence":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["daily","weekly","monthly","yearly"]},"interval":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"days_of_week":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"week_index":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"week_start":{"type":"integer","minimum":0,"maximum":6},"end_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["type","interval"]},{"type":"null"}]},"reminder_minutes":{"anyOf":[{"type":"integer","minimum":0,"maximum":40320},{"type":"null"}]},"exception_dates":{"anyOf":[{"type":"array","items":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"type":"null"}]},"attendees":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"role":{"type":"string","enum":["required","optional"]},"response":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]}},"required":["email"]}},{"type":"null"}]},"import_uid":{"description":"UID der iCalendar-Quelle (z.B. einer Einladung). Je Kalender eindeutig — dieselbe UID ein zweites Mal ergibt 409.","type":"string","minLength":1,"maxLength":500}},"required":["title","start_datetime","end_datetime"]}}}},"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"created_by":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"start_datetime":{"type":"string"},"end_datetime":{"type":"string"},"all_day":{"type":"boolean"},"location":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"calendar_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"recurrence":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["daily","weekly","monthly","yearly"]},"interval":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"days_of_week":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"week_index":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"week_start":{"type":"integer","minimum":0,"maximum":6},"end_date":{"type":"string"}},"required":["type","interval"],"additionalProperties":false},{"type":"null"}]},"attendees":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"email":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"role":{"type":"string"},"response":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["email"],"additionalProperties":false}},{"type":"null"}]},"reminder_minutes":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Aus der JSONB-Spalte `reminders` zurückgerechnet — eine Spalte `reminder_minutes` gibt es nicht."},"exception_dates":{"description":"Abgesagte Einzeltermine einer Serie (YYYY-MM-DD).","anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","workspace_id","created_by","title","start_datetime","end_datetime","all_day","reminder_minutes","created_at","updated_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}}},"/v1/calendar/events/{id}":{"get":{"summary":"Termin abrufen","tags":["Termine"],"parameters":[{"name":"id","in":"path","required":true,"description":"Termin-UUID","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"created_by":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"start_datetime":{"type":"string"},"end_datetime":{"type":"string"},"all_day":{"type":"boolean"},"location":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"calendar_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"recurrence":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["daily","weekly","monthly","yearly"]},"interval":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"days_of_week":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"week_index":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"week_start":{"type":"integer","minimum":0,"maximum":6},"end_date":{"type":"string"}},"required":["type","interval"],"additionalProperties":false},{"type":"null"}]},"attendees":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"email":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"role":{"type":"string"},"response":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["email"],"additionalProperties":false}},{"type":"null"}]},"reminder_minutes":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Aus der JSONB-Spalte `reminders` zurückgerechnet — eine Spalte `reminder_minutes` gibt es nicht."},"exception_dates":{"description":"Abgesagte Einzeltermine einer Serie (YYYY-MM-DD).","anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","workspace_id","created_by","title","start_datetime","end_datetime","all_day","reminder_minutes","created_at","updated_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}},"patch":{"summary":"Termin aktualisieren","description":"Zeitangaben: ISO-8601 mit Offset ('2026-07-26T14:00:00+02:00'), ohne Offset oder als reiner Kalendertag ('2026-07-26'); ein reiner Kalendertag wird auf Tagesbeginn bzw. Tagesende expandiert. `reminder_minutes` wird auf die JSONB-Spalte `reminders` abgebildet. Ein schreibgeschützter, aus einem verbundenen Konto gespiegelter Kalender (`is_readonly`) als `calendar_id` gibt 409. Ein Termin im Papierkorb wird nicht bearbeitet, sondern erst zurückgeholt.","tags":["Termine"],"parameters":[{"name":"id","in":"path","required":true,"description":"Termin-UUID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":500},"start_datetime":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z||([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}]},"end_datetime":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z||([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}]},"description":{"anyOf":[{"type":"string","maxLength":10000},{"type":"null"}]},"all_day":{"type":"boolean"},"location":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"color":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"calendar_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"recurrence":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["daily","weekly","monthly","yearly"]},"interval":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"days_of_week":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"week_index":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"week_start":{"type":"integer","minimum":0,"maximum":6},"end_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["type","interval"]},{"type":"null"}]},"reminder_minutes":{"anyOf":[{"type":"integer","minimum":0,"maximum":40320},{"type":"null"}]},"exception_dates":{"anyOf":[{"type":"array","items":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"type":"null"}]},"attendees":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"role":{"type":"string","enum":["required","optional"]},"response":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]}},"required":["email"]}},{"type":"null"}]}}}}}},"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"created_by":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"start_datetime":{"type":"string"},"end_datetime":{"type":"string"},"all_day":{"type":"boolean"},"location":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"calendar_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"recurrence":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["daily","weekly","monthly","yearly"]},"interval":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"days_of_week":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"week_index":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"week_start":{"type":"integer","minimum":0,"maximum":6},"end_date":{"type":"string"}},"required":["type","interval"],"additionalProperties":false},{"type":"null"}]},"attendees":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"email":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"role":{"type":"string"},"response":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["email"],"additionalProperties":false}},{"type":"null"}]},"reminder_minutes":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Aus der JSONB-Spalte `reminders` zurückgerechnet — eine Spalte `reminder_minutes` gibt es nicht."},"exception_dates":{"description":"Abgesagte Einzeltermine einer Serie (YYYY-MM-DD).","anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","workspace_id","created_by","title","start_datetime","end_datetime","all_day","reminder_minutes","created_at","updated_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}},"delete":{"summary":"Termin in den Papierkorb legen","description":"Soft-Delete (`deleted_at`), NICHT endgültig — zurück über POST /api/v1/events/{id}/restore.","tags":["Termine"],"parameters":[{"name":"id","in":"path","required":true,"description":"Termin-UUID","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}}}}},"/v1/calendar/events/{id}/restore":{"post":{"summary":"Termin aus dem Papierkorb zurückholen","description":"Kein Request-Body. 404, wenn der Termin nicht existiert oder gar nicht im Papierkorb liegt.","tags":["Termine"],"parameters":[{"name":"id","in":"path","required":true,"description":"Termin-UUID","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"created_by":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"start_datetime":{"type":"string"},"end_datetime":{"type":"string"},"all_day":{"type":"boolean"},"location":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"calendar_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"recurrence":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["daily","weekly","monthly","yearly"]},"interval":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"days_of_week":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"week_index":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"week_start":{"type":"integer","minimum":0,"maximum":6},"end_date":{"type":"string"}},"required":["type","interval"],"additionalProperties":false},{"type":"null"}]},"attendees":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"email":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"role":{"type":"string"},"response":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["email"],"additionalProperties":false}},{"type":"null"}]},"reminder_minutes":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Aus der JSONB-Spalte `reminders` zurückgerechnet — eine Spalte `reminder_minutes` gibt es nicht."},"exception_dates":{"description":"Abgesagte Einzeltermine einer Serie (YYYY-MM-DD).","anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","workspace_id","created_by","title","start_datetime","end_datetime","all_day","reminder_minutes","created_at","updated_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}}},"/v1/calendar/calendars":{"get":{"summary":"Kalender auflisten","tags":["Kalender"],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"created_by":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"color":{"type":"string"},"is_system":{"type":"boolean"},"kind":{"type":"string","enum":["local","birthdays"],"description":"M381 — `birthdays` ist die abgeleitete Ansicht aus den Kontakten."},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","workspace_id","created_by","name","color","is_system","kind","created_at","updated_at"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}}}},"post":{"summary":"Kalender anlegen","description":"409 bei vergebenem Namen oder bereits vorhandener Geburtstags-Ansicht.","tags":["Kalender"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"color":{"type":"string","maxLength":50},"is_system":{"type":"boolean"},"kind":{"type":"string","enum":["local","birthdays"]},"gruppe":{"description":"Gruppe des Kalenders (z. B. „Demo“). Mit Gruppe steht er in der Liste unter „Mehr anzeigen“ und ist für jede Person ausgeblendet, bis sie ihn einblendet; null entfernt die Gruppe.","anyOf":[{"type":"string","minLength":1,"maxLength":40},{"type":"null"}]}},"required":["name","color"]}}}},"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"created_by":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"color":{"type":"string"},"is_system":{"type":"boolean"},"kind":{"type":"string","enum":["local","birthdays"],"description":"M381 — `birthdays` ist die abgeleitete Ansicht aus den Kontakten."},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","workspace_id","created_by","name","color","is_system","kind","created_at","updated_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}}},"/v1/calendar/calendars/{id}":{"patch":{"summary":"Kalender aktualisieren","tags":["Kalender"],"parameters":[{"name":"id","in":"path","required":true,"description":"Kalender-UUID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"color":{"type":"string","maxLength":50},"gruppe":{"description":"Gruppe des Kalenders (z. B. „Demo“). Mit Gruppe steht er in der Liste unter „Mehr anzeigen“ und ist für jede Person ausgeblendet, bis sie ihn einblendet; null entfernt die Gruppe.","anyOf":[{"type":"string","minLength":1,"maxLength":40},{"type":"null"}]}}}}}},"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"created_by":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"color":{"type":"string"},"is_system":{"type":"boolean"},"kind":{"type":"string","enum":["local","birthdays"],"description":"M381 — `birthdays` ist die abgeleitete Ansicht aus den Kontakten."},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","workspace_id","created_by","name","color","is_system","kind","created_at","updated_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}},"delete":{"summary":"Kalender löschen","tags":["Kalender"],"parameters":[{"name":"id","in":"path","required":true,"description":"Kalender-UUID","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}}}}},"/v1/calendar/availability":{"get":{"summary":"Freie Zeitfenster im Zeitraum","description":"Zusammenhängende freie Fenster (kein Slot-Raster). Berücksichtigt Arbeitszeit-Fenster, Abwesenheits-Blöcke und Serientermine. Höchstens 62 Tage, höchstens 50 Fenster in der Antwort.","tags":["Freie Zeit"],"parameters":[{"name":"from","in":"query","required":true,"description":"Erster Tag (YYYY-MM-DD)","schema":{"type":"string"}},{"name":"to","in":"query","required":true,"description":"Letzter Tag (YYYY-MM-DD), max. 62 Tage Spanne","schema":{"type":"string"}},{"name":"duration","in":"query","required":false,"description":"Gesuchte Mindestdauer in Minuten (Default 60)","schema":{"type":"integer"}},{"name":"timezone","in":"query","required":false,"description":"IANA-Zeitzone (Default aus den Buchungseinstellungen, sonst Europe/Berlin)","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"timezone":{"type":"string"},"duration_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"source":{"type":"string","enum":["booking_schedule","default"],"description":"`default` = Mo–Fr 09:00–18:00, weil kein Buchungs-Zeitplan hinterlegt ist."},"free":{"type":"array","items":{"type":"object","properties":{"start":{"type":"string"},"end":{"type":"string"},"minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"label":{"type":"string","description":"Fertiger deutscher Text — Zeitzonen- und Spannenrechnung gehört nicht zum Aufrufer."}},"required":["start","end","minutes","label"],"additionalProperties":false}}},"required":["timezone","duration_minutes","source","free"],"additionalProperties":false},"counts":{"type":"object","properties":{"windows":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"shown":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"busy_events":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["windows","shown","days","busy_events"],"additionalProperties":false},"truncated":{"description":"Gesetzt, wenn mehr als 50 Fenster gefunden wurden.","type":"boolean"}},"required":["data","counts"],"additionalProperties":false}}}}}}},"/v1/calendar/booking/links":{"get":{"summary":"Eigene Buchungslinks auflisten","description":"Nur die des angemeldeten Erstellers, nicht alle des Arbeitsbereichs.","tags":["Buchungslinks"],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"created_by":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"durations":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"slot_interval_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"location_type":{"type":"string","enum":["meet","phone","inperson","custom"]},"location_value":{"anyOf":[{"type":"string"},{"type":"null"}]},"schedule_mode":{"type":"string","enum":["central","individual"]},"buffer_before_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"buffer_after_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"min_notice_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max_horizon_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max_bookings_per_day":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"type":{"type":"string","enum":["text","textarea","select","checkbox"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string"}}},"required":["id","label","type","required"],"additionalProperties":false}},"confirmation_message":{"anyOf":[{"type":"string"},{"type":"null"}]},"redirect_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"is_active":{"type":"boolean"},"theme_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspace_id","created_by","slug","title","description","durations","slot_interval_minutes","location_type","location_value","schedule_mode","buffer_before_minutes","buffer_after_minutes","min_notice_minutes","max_horizon_days","max_bookings_per_day","questions","confirmation_message","redirect_url","is_active","theme_id","created_at","updated_at","url"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}}}},"post":{"summary":"Buchungslink anlegen","description":"Nicht in JSON-Schema ausdrückbar und deshalb als Satz: `slug` darf nicht 'manage' oder 'api' lauten, und `theme_id` muss eine ID aus dem Theme-Katalog von @janeway/gui-elements sein (es gibt bewusst kein CHECK-Constraint dafür, Migration 375). `window_end_date` darf nicht vor `window_start_date` liegen. Das Buchungsfenster (`window_start_date`/`window_end_date`, beide optional, YYYY-MM-DD) schränkt ZUSÄTZLICH zu `max_horizon_days` ein: es steht fest, während der Horizont relativ zu heute mitwandert. Es ersetzt die Wochenregeln nicht — welche Wochentage und Uhrzeiten buchbar sind, bleibt Sache der Verfügbarkeit.","tags":["Buchungslinks"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"slug":{"type":"string","pattern":"^[a-z0-9]([a-z0-9-]{0,62}[a-z0-9])?$"},"title":{"type":"string","minLength":1,"maxLength":200},"description":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"durations":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"integer","minimum":5,"maximum":480}},"slot_interval_minutes":{"type":"integer","minimum":5,"maximum":240},"location_type":{"type":"string","enum":["meet","phone","inperson","custom"]},"location_value":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"schedule_mode":{"type":"string","enum":["central","individual"]},"buffer_before_minutes":{"type":"integer","minimum":0,"maximum":240},"buffer_after_minutes":{"type":"integer","minimum":0,"maximum":240},"min_notice_minutes":{"type":"integer","minimum":0,"maximum":43200},"max_horizon_days":{"type":"integer","minimum":1,"maximum":365},"window_start_date":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"window_end_date":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"max_bookings_per_day":{"anyOf":[{"type":"integer","minimum":1,"maximum":100},{"type":"null"}]},"questions":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40},"label":{"type":"string","minLength":1,"maxLength":200},"type":{"type":"string","enum":["text","textarea","select","checkbox"]},"required":{"type":"boolean"},"options":{"maxItems":30,"type":"array","items":{"type":"string","maxLength":120}}},"required":["id","label","type","required"]}},"confirmation_message":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"redirect_url":{"anyOf":[{"type":"string","maxLength":500,"format":"uri"},{"type":"null"}]},"is_active":{"type":"boolean"},"theme_id":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["slug","title","durations","slot_interval_minutes","location_type","schedule_mode","buffer_before_minutes","buffer_after_minutes","min_notice_minutes","max_horizon_days","questions","is_active"]}}}},"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"created_by":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"durations":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"slot_interval_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"location_type":{"type":"string","enum":["meet","phone","inperson","custom"]},"location_value":{"anyOf":[{"type":"string"},{"type":"null"}]},"schedule_mode":{"type":"string","enum":["central","individual"]},"buffer_before_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"buffer_after_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"min_notice_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max_horizon_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max_bookings_per_day":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"type":{"type":"string","enum":["text","textarea","select","checkbox"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string"}}},"required":["id","label","type","required"],"additionalProperties":false}},"confirmation_message":{"anyOf":[{"type":"string"},{"type":"null"}]},"redirect_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"is_active":{"type":"boolean"},"theme_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspace_id","created_by","slug","title","description","durations","slot_interval_minutes","location_type","location_value","schedule_mode","buffer_before_minutes","buffer_after_minutes","min_notice_minutes","max_horizon_days","max_bookings_per_day","questions","confirmation_message","redirect_url","is_active","theme_id","created_at","updated_at","url"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}}},"/v1/calendar/booking/links/create":{"post":{"summary":"Buchungslink aus Titel oder Vorlage anlegen","description":"Kopie eines eigenen Links (`id` (der Vorlage), inkl. eines link-eigenen Zeitplans) oder Vorgaben des Editors (Wochenplan der Person, 30 Min, 4 h Vorlauf). Ohne `slug` wird die Adresse aus dem Titel gebildet und bei Kollision nummeriert; ein ausdrücklicher `slug` wird bei Kollision mit 409 abgelehnt. Die Antwort trägt die fertige `url`. Einmal-Links gibt es nicht.","tags":["Buchungslinks"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"id":{"description":"Vorlage: ID eines eigenen Buchungslinks, dessen Einstellungen kopiert werden","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"slug":{"type":"string","pattern":"^[a-z0-9]([a-z0-9-]{0,62}[a-z0-9])?$"},"duration":{"type":"integer","minimum":5,"maximum":480}},"required":["title"]}}}},"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"created_by":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"durations":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"slot_interval_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"location_type":{"type":"string","enum":["meet","phone","inperson","custom"]},"location_value":{"anyOf":[{"type":"string"},{"type":"null"}]},"schedule_mode":{"type":"string","enum":["central","individual"]},"buffer_before_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"buffer_after_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"min_notice_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max_horizon_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max_bookings_per_day":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"type":{"type":"string","enum":["text","textarea","select","checkbox"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string"}}},"required":["id","label","type","required"],"additionalProperties":false}},"confirmation_message":{"anyOf":[{"type":"string"},{"type":"null"}]},"redirect_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"is_active":{"type":"boolean"},"theme_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspace_id","created_by","slug","title","description","durations","slot_interval_minutes","location_type","location_value","schedule_mode","buffer_before_minutes","buffer_after_minutes","min_notice_minutes","max_horizon_days","max_bookings_per_day","questions","confirmation_message","redirect_url","is_active","theme_id","created_at","updated_at","url"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}}},"/v1/calendar/booking/bookings":{"get":{"summary":"Buchungen des Gastgebers auflisten","description":"Nur Buchungen des angemeldeten Gastgebers. `filter` upcoming (Vorgabe, bestätigte künftige), past, cancelled; `host_response` tentative = wartet auf Antwort. `limit` höchstens 100, Vorgabe 25; `total` zählt alle Treffer.","tags":["Buchungen"],"parameters":[{"name":"filter","in":"query","required":false,"description":"upcoming | past | cancelled","schema":{"type":"string","enum":["upcoming","past","cancelled"]}},{"name":"host_response","in":"query","required":false,"description":"tentative | accepted | declined","schema":{"type":"string","enum":["tentative","accepted","declined"]}},{"name":"limit","in":"query","required":false,"description":"1-100, Vorgabe 25","schema":{"type":"integer"}},{"name":"offset","in":"query","required":false,"description":"Ab dieser Zeile, Vorgabe 0","schema":{"type":"integer"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"guestName":{"type":"string"},"guestEmail":{"type":"string"},"startDatetime":{"type":"string"},"endDatetime":{"type":"string"},"durationMinutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"status":{"type":"string","enum":["confirmed","cancelled"]},"hostResponse":{"type":"string","enum":["tentative","accepted","declined"]},"eventId":{"anyOf":[{"type":"string"},{"type":"null"}]},"linkId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"linkTitle":{"type":"string"},"locationType":{"type":"string","enum":["meet","phone","inperson","custom"]},"locationValue":{"anyOf":[{"type":"string"},{"type":"null"}]},"meetUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancelReason":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","guestName","guestEmail","startDatetime","endDatetime","durationMinutes","status","hostResponse","eventId","linkId","linkTitle","locationType","locationValue","meetUrl","cancelledAt","cancelReason"],"additionalProperties":false}},"total":{"anyOf":[{"type":"number"},{"type":"null"}]},"limit":{"type":"number"},"offset":{"type":"number"}},"required":["data","total","limit","offset"],"additionalProperties":false}}}}}}},"/v1/calendar/booking/bookings/{id}/respond":{"post":{"summary":"Buchung zusagen oder ablehnen","description":"Verschickt eine Mail an den Gast. Eine Absage gibt den Zeitraum frei; vergangene oder bereits abgesagte Buchungen: 409.","tags":["Buchungen"],"parameters":[{"name":"id","in":"path","required":true,"description":"Buchungs-UUID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"type":"string","enum":["accepted","declined"]},"reason":{"type":"string","maxLength":500}},"required":["decision"]}}}},"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"host_response":{"type":"string","enum":["accepted","declined"]}},"required":["id","host_response"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}}},"/v1/calendar/booking/links/{id}":{"get":{"summary":"Buchungslink abrufen","tags":["Buchungslinks"],"parameters":[{"name":"id","in":"path","required":true,"description":"Buchungslink-UUID","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"created_by":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"durations":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"slot_interval_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"location_type":{"type":"string","enum":["meet","phone","inperson","custom"]},"location_value":{"anyOf":[{"type":"string"},{"type":"null"}]},"schedule_mode":{"type":"string","enum":["central","individual"]},"buffer_before_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"buffer_after_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"min_notice_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max_horizon_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max_bookings_per_day":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"type":{"type":"string","enum":["text","textarea","select","checkbox"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string"}}},"required":["id","label","type","required"],"additionalProperties":false}},"confirmation_message":{"anyOf":[{"type":"string"},{"type":"null"}]},"redirect_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"is_active":{"type":"boolean"},"theme_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspace_id","created_by","slug","title","description","durations","slot_interval_minutes","location_type","location_value","schedule_mode","buffer_before_minutes","buffer_after_minutes","min_notice_minutes","max_horizon_days","max_bookings_per_day","questions","confirmation_message","redirect_url","is_active","theme_id","created_at","updated_at","url"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}},"patch":{"summary":"Buchungslink aktualisieren","description":"Teiländerung — nur die gesendeten Felder werden ersetzt. Nicht in JSON-Schema ausdrückbar und deshalb als Satz: `slug` darf nicht 'manage' oder 'api' lauten, und `theme_id` muss eine ID aus dem Theme-Katalog von @janeway/gui-elements sein (es gibt bewusst kein CHECK-Constraint dafür, Migration 375). `window_end_date` darf nicht vor `window_start_date` liegen. Das Buchungsfenster (`window_start_date`/`window_end_date`, beide optional, YYYY-MM-DD) schränkt ZUSÄTZLICH zu `max_horizon_days` ein: es steht fest, während der Horizont relativ zu heute mitwandert. Es ersetzt die Wochenregeln nicht — welche Wochentage und Uhrzeiten buchbar sind, bleibt Sache der Verfügbarkeit.","tags":["Buchungslinks"],"parameters":[{"name":"id","in":"path","required":true,"description":"Buchungslink-UUID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"slug":{"type":"string","pattern":"^[a-z0-9]([a-z0-9-]{0,62}[a-z0-9])?$"},"title":{"type":"string","minLength":1,"maxLength":200},"description":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"durations":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"integer","minimum":5,"maximum":480}},"slot_interval_minutes":{"type":"integer","minimum":5,"maximum":240},"location_type":{"type":"string","enum":["meet","phone","inperson","custom"]},"location_value":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"schedule_mode":{"type":"string","enum":["central","individual"]},"buffer_before_minutes":{"type":"integer","minimum":0,"maximum":240},"buffer_after_minutes":{"type":"integer","minimum":0,"maximum":240},"min_notice_minutes":{"type":"integer","minimum":0,"maximum":43200},"max_horizon_days":{"type":"integer","minimum":1,"maximum":365},"window_start_date":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"window_end_date":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"max_bookings_per_day":{"anyOf":[{"type":"integer","minimum":1,"maximum":100},{"type":"null"}]},"questions":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40},"label":{"type":"string","minLength":1,"maxLength":200},"type":{"type":"string","enum":["text","textarea","select","checkbox"]},"required":{"type":"boolean"},"options":{"maxItems":30,"type":"array","items":{"type":"string","maxLength":120}}},"required":["id","label","type","required"]}},"confirmation_message":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"redirect_url":{"anyOf":[{"type":"string","maxLength":500,"format":"uri"},{"type":"null"}]},"is_active":{"type":"boolean"},"theme_id":{"anyOf":[{"type":"string"},{"type":"null"}]}}}}}},"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"created_by":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"durations":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"slot_interval_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"location_type":{"type":"string","enum":["meet","phone","inperson","custom"]},"location_value":{"anyOf":[{"type":"string"},{"type":"null"}]},"schedule_mode":{"type":"string","enum":["central","individual"]},"buffer_before_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"buffer_after_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"min_notice_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max_horizon_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max_bookings_per_day":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"type":{"type":"string","enum":["text","textarea","select","checkbox"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string"}}},"required":["id","label","type","required"],"additionalProperties":false}},"confirmation_message":{"anyOf":[{"type":"string"},{"type":"null"}]},"redirect_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"is_active":{"type":"boolean"},"theme_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspace_id","created_by","slug","title","description","durations","slot_interval_minutes","location_type","location_value","schedule_mode","buffer_before_minutes","buffer_after_minutes","min_notice_minutes","max_horizon_days","max_bookings_per_day","questions","confirmation_message","redirect_url","is_active","theme_id","created_at","updated_at","url"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}},"delete":{"summary":"Buchungslink löschen","tags":["Buchungslinks"],"parameters":[{"name":"id","in":"path","required":true,"description":"Buchungslink-UUID","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}}}}},"/v1/calendar/birthdays":{"get":{"summary":"Anstehende Geburtstage aus Kontakten","tags":["Geburtstage"],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"first_name":{"type":"string"},"last_name":{"type":"string"},"birthday":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspace_id","first_name","last_name"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}}}}},"/v1/calendar/export":{"get":{"summary":"Kalender exportieren (JSON/ICS)","tags":["Export"],"parameters":[{"name":"format","in":"query","required":false,"description":"json | ics","schema":{"type":"string","enum":["json","ics"]}},{"name":"calendar_id","in":"query","required":false,"description":"Optional — auf einen Kalender einschraenken","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg"}}}},"/v1/calendar/import":{"post":{"summary":"ICS-Datei in einen Ziel-Kalender importieren","description":"multipart/form-data mit `file` (Pflicht, .ics, max. 1 MB) und `calendar_id` (optional, UUID). Kein JSON-Body — deshalb steht hier kein `requestBody`-Schema. 409, wenn der Ziel-Kalender aktiv live-gesynct wird. Wiederholbar: ein VEVENT, dessen `UID` im Zielkalender schon als `import_uid` liegt, wird übersprungen. Die Antwort nennt `imported` und `uebersprungen` getrennt.","tags":["Export"],"responses":{"201":{"description":"Erfolg"}}}},"/v1/calendar/integrations/microsoft":{"get":{"summary":"Verbindungsstatus","tags":["Microsoft"],"parameters":[{"name":"anbieter","in":"query","required":false,"description":"Konto-Anbieter der Kalender-Verbindung; ohne Angabe `microsoft`. Unbekannt: 400.","schema":{"type":"string","enum":["microsoft","google"]}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"connected":{"type":"boolean"},"account_email":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_sync_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["connected"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}}},"/v1/calendar/integrations/microsoft/calendars":{"get":{"summary":"Microsoft-Kalender inkl. Auswahl","tags":["Microsoft"],"parameters":[{"name":"anbieter","in":"query","required":false,"description":"Konto-Anbieter der Kalender-Verbindung; ohne Angabe `microsoft`. Unbekannt: 400.","schema":{"type":"string","enum":["microsoft","google"]}}],"responses":{"200":{"description":"Erfolg"}}},"put":{"summary":"Kalender-Auswahl setzen","description":"Body: `{ selections: [{ external_calendar_id, enabled, name?, direction?, janeway_calendar_id? }] }` — von Hand geprüft (siehe Kommentar im Manifest), deshalb ohne Schema.","tags":["Microsoft"],"parameters":[{"name":"anbieter","in":"query","required":false,"description":"Konto-Anbieter der Kalender-Verbindung; ohne Angabe `microsoft`. Unbekannt: 400.","schema":{"type":"string","enum":["microsoft","google"]}}],"responses":{"200":{"description":"Erfolg"}}}},"/v1/calendar/integrations/microsoft/snapshot":{"get":{"summary":"Einmal-Import: Vorschau","tags":["Microsoft"],"parameters":[{"name":"anbieter","in":"query","required":false,"description":"Konto-Anbieter der Kalender-Verbindung; ohne Angabe `microsoft`. Unbekannt: 400.","schema":{"type":"string","enum":["microsoft","google"]}}],"responses":{"200":{"description":"Erfolg"}}},"post":{"summary":"Einmal-Import ausführen","description":"Body: `{ ms_calendar_id, ms_calendar_name }` — von Hand geprüft, deshalb ohne Schema.","tags":["Microsoft"],"parameters":[{"name":"anbieter","in":"query","required":false,"description":"Konto-Anbieter der Kalender-Verbindung; ohne Angabe `microsoft`. Unbekannt: 400.","schema":{"type":"string","enum":["microsoft","google"]}}],"responses":{"200":{"description":"Erfolg"}}}},"/v1/calendar/integrations/microsoft/sync":{"post":{"summary":"Sofort-Sync auslösen","description":"Kein Request-Body.","tags":["Microsoft"],"parameters":[{"name":"anbieter","in":"query","required":false,"description":"Konto-Anbieter der Kalender-Verbindung; ohne Angabe `microsoft`. Unbekannt: 400.","schema":{"type":"string","enum":["microsoft","google"]}}],"responses":{"200":{"description":"Erfolg"}}}},"/v1/tasks/tasks":{"get":{"summary":"Aufgaben auflisten (serverseitige Filter, optional mit Summen)","tags":["Aufgaben"],"parameters":[{"name":"limit","in":"query","required":false,"description":"Max. Anzahl (Default 50)","schema":{"type":"integer"}},{"name":"offset","in":"query","required":false,"description":"Offset für Pagination","schema":{"type":"integer"}},{"name":"search","in":"query","required":false,"description":"Volltextsuche (title, description)","schema":{"type":"string"}},{"name":"ids","in":"query","required":false,"description":"Kommagetrennte Aufgaben-UUIDs (Auflösung von IDs zu Titeln)","schema":{"type":"string"}},{"name":"status","in":"query","required":false,"description":"open | done","schema":{"type":"string","enum":["open","done"]}},{"name":"overdue","in":"query","required":false,"description":"1 = nur überfällige offene Aufgaben","schema":{"type":"string","enum":["1"]}},{"name":"due_before","in":"query","required":false,"description":"Fällig vor YYYY-MM-DD","schema":{"type":"string"}},{"name":"due_after","in":"query","required":false,"description":"Fällig ab YYYY-MM-DD","schema":{"type":"string"}},{"name":"list_id","in":"query","required":false,"description":"Nur Aufgaben dieser Liste","schema":{"type":"string","format":"uuid"}},{"name":"starred","in":"query","required":false,"description":"1 = nur markierte Aufgaben","schema":{"type":"string","enum":["1"]}},{"name":"deleted","in":"query","required":false,"description":"1 = nur Papierkorb","schema":{"type":"string","enum":["1"]}},{"name":"assigned","in":"query","required":false,"description":"me = mir zugewiesen (direkt oder über eine meiner Gruppen)","schema":{"type":"string","enum":["me"]}},{"name":"assignee_id","in":"query","required":false,"description":"Nur Aufgaben, die dieser Person direkt zugewiesen sind","schema":{"type":"string","format":"uuid"}},{"name":"group_id","in":"query","required":false,"description":"Nur Aufgaben, die dieser Gruppe zugewiesen sind","schema":{"type":"string","format":"uuid"}},{"name":"claimed","in":"query","required":false,"description":"true = in Bearbeitung, false = frei, me = von mir in Bearbeitung","schema":{"type":"string","enum":["true","false","me"]}},{"name":"sort","in":"query","required":false,"description":"due = nach Fälligkeit statt manueller Reihenfolge","schema":{"type":"string","enum":["due"]}},{"name":"counts","in":"query","required":false,"description":"1 = fertige Summen (matched/open/done/overdue/deleted) mitliefern","schema":{"type":"string","enum":["1"]}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"created_by":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"list_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"parent_task_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"due_date":{"anyOf":[{"type":"string"},{"type":"null"}]},"due_time":{"anyOf":[{"type":"string"},{"type":"null"}]},"priority":{"type":"string","enum":["low","medium","high","urgent"]},"status":{"type":"string","enum":["open","done"]},"is_starred":{"type":"boolean"},"sort_order":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"recurrence":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["daily","weekly","monthly","yearly","custom"]},"interval":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"days_of_week":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"end_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"anchor_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["type","interval"],"additionalProperties":false},{"type":"null"}]},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"assignee_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"group_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"claimed_by":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"claimed_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspace_id","created_by","list_id","parent_task_id","title","description","due_date","due_time","priority","status","is_starred","sort_order","recurrence","completed_at","deleted_at","created_at","updated_at","assignee_ids","group_ids"],"additionalProperties":false}},"total":{"type":"number"}},"required":["data","total"],"additionalProperties":false}}}}}},"post":{"summary":"Aufgabe anlegen","description":"`assignee_ids`/`group_ids` (je max. 50, IDs aus GET /api/v1/assignees): gesetzt = Menge ersetzen, `[]` = leeren, weggelassen = unverändert. Nicht zuweisbare Personen (kein Mitglied, nur Lesezugriff) oder fremde Gruppen: 422, nichts wird geschrieben. Eine schreibgeschützte, aus einem verbundenen Konto gespiegelte Liste (`is_readonly`) als `list_id` gibt 409.","tags":["Aufgaben"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":500},"description":{"anyOf":[{"type":"string","maxLength":10000},{"type":"null"}]},"list_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"due_date":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"due_time":{"anyOf":[{"type":"string","pattern":"^\\d{2}:\\d{2}(:\\d{2})?$"},{"type":"null"}]},"priority":{"default":"medium","type":"string","enum":["low","medium","high","urgent"]},"status":{"default":"open","type":"string","enum":["open","done"]},"parent_task_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"is_starred":{"default":false,"type":"boolean"},"recurrence":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["daily","weekly","monthly","yearly","custom"]},"interval":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"days_of_week":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"end_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"anchor_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["type","interval"]},{"type":"null"}]},"sort_order":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"assignee_ids":{"maxItems":50,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"group_ids":{"maxItems":50,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["title"]}}}},"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"created_by":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"list_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"parent_task_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"due_date":{"anyOf":[{"type":"string"},{"type":"null"}]},"due_time":{"anyOf":[{"type":"string"},{"type":"null"}]},"priority":{"type":"string","enum":["low","medium","high","urgent"]},"status":{"type":"string","enum":["open","done"]},"is_starred":{"type":"boolean"},"sort_order":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"recurrence":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["daily","weekly","monthly","yearly","custom"]},"interval":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"days_of_week":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"end_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"anchor_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["type","interval"],"additionalProperties":false},{"type":"null"}]},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"assignee_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"group_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"claimed_by":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"claimed_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspace_id","created_by","list_id","parent_task_id","title","description","due_date","due_time","priority","status","is_starred","sort_order","recurrence","completed_at","deleted_at","created_at","updated_at","assignee_ids","group_ids"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}},"patch":{"summary":"Bulk-Update mehrerer Aufgaben (ids + patch)","description":"`patch` muss mindestens ein Feld enthalten; ein leeres `patch` wird mit 400 abgewiesen. Titel, Beschreibung, Unteraufgabe, Wiederholung und Zuweisung fehlen absichtlich — sie gehören zu genau einer Aufgabe (PATCH /api/v1/tasks/{id}). Eine schreibgeschützte, aus einem verbundenen Konto gespiegelte Liste (`is_readonly`) als `list_id` gibt 409.","tags":["Aufgaben"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"string","minLength":1}},"patch":{"type":"object","properties":{"status":{"type":"string","enum":["open","done"]},"priority":{"type":"string","enum":["low","medium","high","urgent"]},"is_starred":{"type":"boolean"},"list_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"due_date":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"due_time":{"anyOf":[{"type":"string","pattern":"^\\d{2}:\\d{2}(:\\d{2})?$"},{"type":"null"}]}}}},"required":["ids","patch"]}}}},"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"action":{"type":"string"},"succeeded":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string"}},"required":["id","title"],"additionalProperties":false}},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"reason":{"type":"string"}},"required":["id","reason"],"additionalProperties":false}}},"required":["action","succeeded","items","failed"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}},"delete":{"summary":"Bulk-Löschen (Papierkorb; ?permanent=1 endgültig)","tags":["Aufgaben"],"parameters":[{"name":"ids","in":"query","required":true,"description":"Kommagetrennte Aufgaben-UUIDs (max. 200)","schema":{"type":"string"}},{"name":"permanent","in":"query","required":false,"description":"1 = endgültig löschen","schema":{"type":"string","enum":["1"]}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"action":{"type":"string"},"succeeded":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string"}},"required":["id","title"],"additionalProperties":false}},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"reason":{"type":"string"}},"required":["id","reason"],"additionalProperties":false}}},"required":["action","succeeded","items","failed"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}}},"/v1/tasks/tasks/{id}":{"get":{"summary":"Aufgabe abrufen","tags":["Aufgaben"],"parameters":[{"name":"id","in":"path","required":true,"description":"Aufgabe-UUID","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"created_by":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"list_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"parent_task_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"due_date":{"anyOf":[{"type":"string"},{"type":"null"}]},"due_time":{"anyOf":[{"type":"string"},{"type":"null"}]},"priority":{"type":"string","enum":["low","medium","high","urgent"]},"status":{"type":"string","enum":["open","done"]},"is_starred":{"type":"boolean"},"sort_order":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"recurrence":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["daily","weekly","monthly","yearly","custom"]},"interval":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"days_of_week":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"end_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"anchor_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["type","interval"],"additionalProperties":false},{"type":"null"}]},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"assignee_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"group_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"claimed_by":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"claimed_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspace_id","created_by","list_id","parent_task_id","title","description","due_date","due_time","priority","status","is_starred","sort_order","recurrence","completed_at","deleted_at","created_at","updated_at","assignee_ids","group_ids"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}},"patch":{"summary":"Aufgabe aktualisieren","description":"Beim Übergang `status` open → done wird für eine Aufgabe mit `recurrence` und `due_date` die nächste Aufgabe der Serie angelegt und als `folgeaufgabe` mitgeliefert. Ein zweiter Aufruf auf dieselbe Aufgabe legt keine zweite an. `assignee_ids`/`group_ids` (je max. 50, IDs aus GET /api/v1/assignees): gesetzt = Menge ersetzen, `[]` = leeren, weggelassen = unverändert. Nicht zuweisbare Personen (kein Mitglied, nur Lesezugriff) oder fremde Gruppen: 422, nichts wird geschrieben. Eine schreibgeschützte, aus einem verbundenen Konto gespiegelte Liste (`is_readonly`) als `list_id` gibt 409.","tags":["Aufgaben"],"parameters":[{"name":"id","in":"path","required":true,"description":"Aufgabe-UUID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":500},"description":{"anyOf":[{"type":"string","maxLength":10000},{"type":"null"}]},"list_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"due_date":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"due_time":{"anyOf":[{"type":"string","pattern":"^\\d{2}:\\d{2}(:\\d{2})?$"},{"type":"null"}]},"priority":{"type":"string","enum":["low","medium","high","urgent"]},"status":{"type":"string","enum":["open","done"]},"parent_task_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"is_starred":{"type":"boolean"},"recurrence":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["daily","weekly","monthly","yearly","custom"]},"interval":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"days_of_week":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"end_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"anchor_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["type","interval"]},{"type":"null"}]},"sort_order":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"assignee_ids":{"maxItems":50,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"group_ids":{"maxItems":50,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}}}}}},"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"created_by":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"list_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"parent_task_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"due_date":{"anyOf":[{"type":"string"},{"type":"null"}]},"due_time":{"anyOf":[{"type":"string"},{"type":"null"}]},"priority":{"type":"string","enum":["low","medium","high","urgent"]},"status":{"type":"string","enum":["open","done"]},"is_starred":{"type":"boolean"},"sort_order":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"recurrence":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["daily","weekly","monthly","yearly","custom"]},"interval":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"days_of_week":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"end_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"anchor_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["type","interval"],"additionalProperties":false},{"type":"null"}]},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"assignee_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"group_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"claimed_by":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"claimed_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspace_id","created_by","list_id","parent_task_id","title","description","due_date","due_time","priority","status","is_starred","sort_order","recurrence","completed_at","deleted_at","created_at","updated_at","assignee_ids","group_ids"],"additionalProperties":false},"folgeaufgabe":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"created_by":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"list_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"parent_task_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"due_date":{"anyOf":[{"type":"string"},{"type":"null"}]},"due_time":{"anyOf":[{"type":"string"},{"type":"null"}]},"priority":{"type":"string","enum":["low","medium","high","urgent"]},"status":{"type":"string","enum":["open","done"]},"is_starred":{"type":"boolean"},"sort_order":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"recurrence":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["daily","weekly","monthly","yearly","custom"]},"interval":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"days_of_week":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"end_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"anchor_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["type","interval"],"additionalProperties":false},{"type":"null"}]},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"assignee_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"group_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"claimed_by":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"claimed_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspace_id","created_by","list_id","parent_task_id","title","description","due_date","due_time","priority","status","is_starred","sort_order","recurrence","completed_at","deleted_at","created_at","updated_at","assignee_ids","group_ids"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}},"delete":{"summary":"Aufgabe löschen (Soft-Delete; ?permanent=1 für Hard-Delete)","tags":["Aufgaben"],"parameters":[{"name":"id","in":"path","required":true,"description":"Aufgabe-UUID","schema":{"type":"string"}},{"name":"permanent","in":"query","required":false,"description":"1 = Hard-Delete (endgültig)","schema":{"type":"string","enum":["1"]}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}}}}},"/v1/tasks/tasks/restore":{"post":{"summary":"Bulk-Wiederherstellen aus dem Papierkorb","tags":["Aufgaben"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"string","minLength":1}}},"required":["ids"]}}}},"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"action":{"type":"string"},"succeeded":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string"}},"required":["id","title"],"additionalProperties":false}},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"reason":{"type":"string"}},"required":["id","reason"],"additionalProperties":false}}},"required":["action","succeeded","items","failed"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}}},"/v1/tasks/tasks/{id}/tags":{"post":{"summary":"Tag an Aufgabe anhängen","tags":["Aufgaben"],"parameters":[{"name":"id","in":"path","required":true,"description":"Aufgabe-UUID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tag_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["tag_id"]}}}},"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}}}},"delete":{"summary":"Tag von Aufgabe entfernen","tags":["Aufgaben"],"parameters":[{"name":"id","in":"path","required":true,"description":"Aufgabe-UUID","schema":{"type":"string"}},{"name":"tag_id","in":"query","required":true,"description":"Tag-UUID","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}}}}},"/v1/tasks/tasks/{id}/restore":{"post":{"summary":"Aufgabe aus Papierkorb wiederherstellen","tags":["Aufgaben"],"parameters":[{"name":"id","in":"path","required":true,"description":"Aufgabe-UUID","schema":{"type":"string"}}],"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"created_by":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"list_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"parent_task_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"due_date":{"anyOf":[{"type":"string"},{"type":"null"}]},"due_time":{"anyOf":[{"type":"string"},{"type":"null"}]},"priority":{"type":"string","enum":["low","medium","high","urgent"]},"status":{"type":"string","enum":["open","done"]},"is_starred":{"type":"boolean"},"sort_order":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"recurrence":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["daily","weekly","monthly","yearly","custom"]},"interval":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"days_of_week":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"end_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"anchor_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["type","interval"],"additionalProperties":false},{"type":"null"}]},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"assignee_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"group_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"claimed_by":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"claimed_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspace_id","created_by","list_id","parent_task_id","title","description","due_date","due_time","priority","status","is_starred","sort_order","recurrence","completed_at","deleted_at","created_at","updated_at","assignee_ids","group_ids"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}}},"/v1/tasks/tasks/trash":{"delete":{"summary":"Papierkorb leeren (alle gelöschten Aufgaben dauerhaft löschen)","tags":["Aufgaben"],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"deleted":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["success","deleted"],"additionalProperties":false}}}}}}},"/v1/tasks/tasks/{id}/claim":{"post":{"summary":"Aufgabe in Bearbeitung nehmen (genau eine Person je Aufgabe)","description":"201 neu, 200 schon die eigene. 409, wenn jemand anderes sie bearbeitet (Meldung nennt die Person) oder sie erledigt/gelöscht ist; 403, wenn die Aufgabe anderen zugewiesen ist (owner/admin dürfen immer).","tags":["Zuweisung"],"parameters":[{"name":"id","in":"path","required":true,"description":"Aufgabe-UUID","schema":{"type":"string"}}],"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"claimed_by":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"claimed_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["claimed_by","claimed_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}},"delete":{"summary":"Bearbeitung freigeben (eigene; fremde nur owner/admin, sonst 403)","tags":["Zuweisung"],"parameters":[{"name":"id","in":"path","required":true,"description":"Aufgabe-UUID","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"claimed_by":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"claimed_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["claimed_by","claimed_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}}},"/v1/tasks/assignees":{"get":{"summary":"Zuweisbare Personen (owner/admin/member) und Gruppen des Arbeitsbereichs","description":"Erst die Kandidaten holen, dann ihre IDs als `assignee_ids`/`group_ids` übergeben — nie Namen in die Beschreibung schreiben.","tags":["Zuweisung"],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"members":{"type":"array","items":{"type":"object","properties":{"user_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"role":{"type":"string","enum":["owner","admin","member"]}},"required":["user_id","name","email","role"],"additionalProperties":false}},"groups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"beschreibung":{"anyOf":[{"type":"string"},{"type":"null"}]},"member_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["id","name","beschreibung","member_ids"],"additionalProperties":false}}},"required":["members","groups"],"additionalProperties":false}}}}}}},"/v1/tasks/groups":{"get":{"summary":"Gruppen auflisten","tags":["Zuweisung"],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"beschreibung":{"anyOf":[{"type":"string"},{"type":"null"}]},"member_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["id","name","beschreibung","member_ids"],"additionalProperties":false}},"total":{"type":"number"}},"required":["data","total"],"additionalProperties":false}}}}}},"post":{"summary":"Gruppe anlegen (nur owner/admin, sonst 403)","description":"`member_ids` müssen zuweisbare Mitglieder sein (sonst 422); ein schon vergebener Name gibt 409.","tags":["Zuweisung"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"beschreibung":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"member_ids":{"maxItems":200,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["name"]}}}},"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"beschreibung":{"anyOf":[{"type":"string"},{"type":"null"}]},"member_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["id","name","beschreibung","member_ids"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}}},"/v1/tasks/groups/{id}":{"patch":{"summary":"Gruppe ändern (nur owner/admin, sonst 403)","description":"`member_ids` ersetzt die Mitgliedermenge. Name schon vergeben: 409.","tags":["Zuweisung"],"parameters":[{"name":"id","in":"path","required":true,"description":"Gruppen-UUID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"beschreibung":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"member_ids":{"maxItems":200,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}}}}}},"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"beschreibung":{"anyOf":[{"type":"string"},{"type":"null"}]},"member_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["id","name","beschreibung","member_ids"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}},"delete":{"summary":"Gruppe löschen (nur owner/admin); ihre Zuweisungen entfallen","tags":["Zuweisung"],"parameters":[{"name":"id","in":"path","required":true,"description":"Gruppen-UUID","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}}}}},"/v1/tasks/lists":{"get":{"summary":"Listen auflisten","tags":["Listen"],"parameters":[{"name":"limit","in":"query","required":false,"description":"Max. Anzahl (Default 50)","schema":{"type":"integer"}},{"name":"offset","in":"query","required":false,"description":"Offset für Pagination","schema":{"type":"integer"}},{"name":"search","in":"query","required":false,"description":"Volltextsuche (title, description)","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"created_by":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"color":{"type":"string"},"created_at":{"type":"string"}},"required":["id","workspace_id","created_by","name","color","created_at"],"additionalProperties":false}},"total":{"type":"number"}},"required":["data","total"],"additionalProperties":false}}}}}},"post":{"summary":"Liste anlegen","tags":["Listen"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"color":{"default":"#6366f1","type":"string","maxLength":50}},"required":["name"]}}}},"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"created_by":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"color":{"type":"string"},"created_at":{"type":"string"}},"required":["id","workspace_id","created_by","name","color","created_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}}},"/v1/tasks/lists/{id}":{"get":{"summary":"Liste abrufen","tags":["Listen"],"parameters":[{"name":"id","in":"path","required":true,"description":"Listen-UUID","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"created_by":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"color":{"type":"string"},"created_at":{"type":"string"}},"required":["id","workspace_id","created_by","name","color","created_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}},"patch":{"summary":"Liste aktualisieren","tags":["Listen"],"parameters":[{"name":"id","in":"path","required":true,"description":"Listen-UUID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"color":{"type":"string","maxLength":50}}}}}},"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"created_by":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"color":{"type":"string"},"created_at":{"type":"string"}},"required":["id","workspace_id","created_by","name","color","created_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}},"delete":{"summary":"Liste löschen","tags":["Listen"],"parameters":[{"name":"id","in":"path","required":true,"description":"Listen-UUID","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}}}}},"/v1/tasks/export":{"get":{"summary":"Aufgaben und Listen exportieren (DSGVO Art. 20)","tags":["Export"],"parameters":[{"name":"format","in":"query","required":false,"description":"json (derzeit einziges unterstütztes Format)","schema":{"type":"string","enum":["json"]}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"format":{"type":"string","const":"json"},"exported_at":{"type":"string"},"user_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tasks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"created_by":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"list_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"parent_task_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"due_date":{"anyOf":[{"type":"string"},{"type":"null"}]},"due_time":{"anyOf":[{"type":"string"},{"type":"null"}]},"priority":{"type":"string","enum":["low","medium","high","urgent"]},"status":{"type":"string","enum":["open","done"]},"is_starred":{"type":"boolean"},"sort_order":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"recurrence":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["daily","weekly","monthly","yearly","custom"]},"interval":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"days_of_week":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"end_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"anchor_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["type","interval"],"additionalProperties":false},{"type":"null"}]},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"assignee_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"group_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"claimed_by":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"claimed_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspace_id","created_by","list_id","parent_task_id","title","description","due_date","due_time","priority","status","is_starred","sort_order","recurrence","completed_at","deleted_at","created_at","updated_at","assignee_ids","group_ids"],"additionalProperties":false}},"lists":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"created_by":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"color":{"type":"string"},"created_at":{"type":"string"}},"required":["id","workspace_id","created_by","name","color","created_at"],"additionalProperties":false}}},"required":["format","exported_at","user_id","workspace_id","tasks","lists"],"additionalProperties":false}}}}}}},"/v1/notes/notes":{"get":{"summary":"Notizen auflisten (Filter, optional mit Summen)","description":"Standardmäßig die Notizen des aktiven Arbeitsbereichs. `geteilt=1` listet stattdessen, was andere für mich freigegeben haben — arbeitsbereichsübergreifend, denn eine Freigabe geht an eine Person. Bei gesetztem `search` erscheinen freigegebene Treffer zusätzlich in der normalen Liste, markiert mit `geteilt: true`.","tags":["Notizen"],"parameters":[{"name":"limit","in":"query","required":false,"description":"Max. Anzahl (Default 50)","schema":{"type":"integer"}},{"name":"offset","in":"query","required":false,"description":"Offset für Pagination","schema":{"type":"integer"}},{"name":"search","in":"query","required":false,"description":"Volltextsuche in Titel und Inhalt","schema":{"type":"string"}},{"name":"ids","in":"query","required":false,"description":"Kommagetrennte Notiz-UUIDs (Auflösung von IDs zu Titeln)","schema":{"type":"string"}},{"name":"favorite","in":"query","required":false,"description":"1 = nur Favoriten","schema":{"type":"string","enum":["1"]}},{"name":"deleted","in":"query","required":false,"description":"1 = nur Papierkorb","schema":{"type":"string","enum":["1"]}},{"name":"ordner_id","in":"query","required":false,"description":"Nur Notizen direkt in diesem Ordner (nicht rekursiv). Unbekannter oder fremder Ordner: 404","schema":{"type":"string","format":"uuid"}},{"name":"ohne_ordner","in":"query","required":false,"description":"1 = nur Notizen auf der obersten Ebene (ohne Ordner); schließt `ordner_id` aus","schema":{"type":"string","enum":["1"]}},{"name":"counts","in":"query","required":false,"description":"1 = fertige Summen (matched/notes/favorites/deleted) mitliefern","schema":{"type":"string","enum":["1"]}},{"name":"geteilt","in":"query","required":false,"description":"1 = stattdessen die Notizen auflisten, die ANDERE für mich freigegeben haben (arbeitsbereichsübergreifend)","schema":{"type":"string","enum":["1"]}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"created_by":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string"},"content":{"type":"string"},"art":{"type":"string"},"ordner_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"is_favorite":{"type":"boolean"},"is_deleted":{"type":"boolean"},"deleted_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","workspace_id","created_by","title","content","art","ordner_id","color","is_favorite","is_deleted","deleted_at","created_at","updated_at"],"additionalProperties":false}},"total":{"type":"number"}},"required":["data","total"],"additionalProperties":false}}}}}},"post":{"summary":"Notiz anlegen","description":"Alle Felder sind freiwillig — ein leerer Körper legt eine leere »Neue Notiz« an. Titel sind je Arbeitsbereich eindeutig; bei Namensgleichheit ergänzt Notes ' (2)'.","tags":["Notizen"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"description":"Titel; ohne Angabe oder leer entsteht »Neue Notiz«. Bei Namensgleichheit im Arbeitsbereich haengt Notes ' (2)' an.","type":"string","maxLength":500},"content":{"description":"Inhalt als Markdown (GFM, `[[Wiki-Links]]`), hoechstens 1 MB.","type":"string","maxLength":1000000},"color":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"description":"Farbmarkierung der Notizkarte; `null` nimmt sie zurueck."},"is_favorite":{"description":"Als Favorit anlegen.","type":"boolean"},"is_deleted":{"description":"Direkt im Papierkorb anlegen.","type":"boolean"},"ordner_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"Legt die Notiz in diesem Ordner an; ohne Angabe oder `null` auf der obersten Ebene."},"art":{"description":"Art der Notiz; ohne Angabe `markdown`. Bei `canvas` MUSS `content` ein JSON-Canvas-1.0-Dokument sein (`{\"nodes\":[],\"edges\":[]}`) — sonst 400. Nicht nachtraeglich aenderbar.","type":"string","enum":["markdown","canvas"]}}}}}},"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"created_by":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string"},"content":{"type":"string"},"art":{"type":"string"},"ordner_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"is_favorite":{"type":"boolean"},"is_deleted":{"type":"boolean"},"deleted_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","workspace_id","created_by","title","content","art","ordner_id","color","is_favorite","is_deleted","deleted_at","created_at","updated_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}},"patch":{"summary":"Bulk-Update mehrerer Notizen (ids + patch)","description":"`patch` braucht mindestens ein Feld. Teilfehler kippen den Auftrag nicht — nicht änderbare Notizen stehen mit Grund in `failed`.","tags":["Notizen"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"string","minLength":1},"description":"Notiz-IDs — mindestens eine, hoechstens 200 je Aufruf."},"patch":{"type":"object","properties":{"is_favorite":{"type":"boolean"},"color":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"ordner_id":{"description":"Verschiebt alle genannten Notizen in diesen Ordner; `null` legt sie auf die oberste Ebene.","anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"description":"Zu setzende Felder — mindestens eines. Titel und Inhalt gehoeren zu genau einer Notiz und fehlen hier absichtlich."}},"required":["ids","patch"]}}}},"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"action":{"type":"string"},"succeeded":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string"}},"required":["id","title"],"additionalProperties":false}},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"reason":{"type":"string"}},"required":["id","reason"],"additionalProperties":false}}},"required":["action","succeeded","items","failed"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}},"delete":{"summary":"Bulk-Löschen (Papierkorb)","description":"Umkehrbar über `POST /api/v1/notes/restore`. `ids` als Query, weil ein DELETE mit Body nicht jeden Proxy überlebt.","tags":["Notizen"],"parameters":[{"name":"ids","in":"query","required":true,"description":"Kommagetrennte Notiz-UUIDs (max. 200)","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"action":{"type":"string"},"succeeded":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string"}},"required":["id","title"],"additionalProperties":false}},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"reason":{"type":"string"}},"required":["id","reason"],"additionalProperties":false}}},"required":["action","succeeded","items","failed"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}}},"/v1/notes/notes/{id}":{"get":{"summary":"Notiz abrufen","tags":["Notizen"],"parameters":[{"name":"id","in":"path","required":true,"description":"Notiz-UUID","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"created_by":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string"},"content":{"type":"string"},"art":{"type":"string"},"ordner_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"is_favorite":{"type":"boolean"},"is_deleted":{"type":"boolean"},"deleted_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","workspace_id","created_by","title","content","art","ordner_id","color","is_favorite","is_deleted","deleted_at","created_at","updated_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}},"patch":{"summary":"Notiz aktualisieren (`append` ergänzt, `content` ersetzt)","description":"`content` und `append` schließen sich aus — beides zusammen wird mit 400 abgelehnt. `append` ist der sichere Weg, wenn nur ein Ausschnitt der Notiz bekannt ist: der bestehende Inhalt wird serverseitig gelesen und ergänzt.","tags":["Notizen"],"parameters":[{"name":"id","in":"path","required":true,"description":"Notiz-UUID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"description":"Neuer Titel; bei Namensgleichheit haengt Notes ' (2)' an.","type":"string","maxLength":500},"content":{"description":"ERSETZT den gesamten Inhalt. Nur benutzen, wenn der volle Text vorliegt.","type":"string"},"append":{"description":"Haengt Text an den bestehenden Inhalt an (durch eine Leerzeile getrennt). Schliesst `content` aus — beides zusammen wird mit 400 abgelehnt. Auf einer Canvas-Notiz nicht zulaessig (400): angehaengter Text stuende hinter der schliessenden Klammer und machte das Dokument unlesbar.","type":"string","maxLength":1000000},"color":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"description":"Farbmarkierung; `null` nimmt sie zurueck."},"is_favorite":{"description":"Favoritenstatus setzen.","type":"boolean"},"is_deleted":{"description":"true legt die Notiz in den Papierkorb, false holt sie zurueck.","type":"boolean"},"ordner_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"Verschiebt die Notiz in diesen Ordner; `null` legt sie auf die oberste Ebene. Der TITEL bleibt davon unberuehrt — er ist im ganzen Arbeitsbereich eindeutig, Ordner sind Ablage und kein Namensraum."}}}}}},"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"created_by":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string"},"content":{"type":"string"},"art":{"type":"string"},"ordner_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"is_favorite":{"type":"boolean"},"is_deleted":{"type":"boolean"},"deleted_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","workspace_id","created_by","title","content","art","ordner_id","color","is_favorite","is_deleted","deleted_at","created_at","updated_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}},"delete":{"summary":"Notiz löschen (Soft-Delete)","tags":["Notizen"],"parameters":[{"name":"id","in":"path","required":true,"description":"Notiz-UUID","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}}}}},"/v1/notes/notes/restore":{"post":{"summary":"Bulk-Wiederherstellen aus dem Papierkorb","description":"Je Notiz wird der Titel neu eindeutig gemacht — in der Zwischenzeit kann derselbe Titel neu vergeben worden sein.","tags":["Notizen"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"string","minLength":1},"description":"Notiz-IDs aus dem Papierkorb — mindestens eine, hoechstens 200 je Aufruf."}},"required":["ids"]}}}},"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"action":{"type":"string"},"succeeded":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string"}},"required":["id","title"],"additionalProperties":false}},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"reason":{"type":"string"}},"required":["id","reason"],"additionalProperties":false}}},"required":["action","succeeded","items","failed"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}}},"/v1/notes/ordner":{"get":{"summary":"Ordner des Arbeitsbereichs auflisten (flach)","description":"Die Liste kommt flach und vollständig; `parent_id` trägt die Struktur, `null` ist die oberste Ebene. Ordner im Papierkorb sind nur mit `deleted=1` enthalten — dann ausschließlich sie.","tags":["Ordner"],"parameters":[{"name":"deleted","in":"query","required":false,"description":"1 = nur Ordner im Papierkorb (für die Wiederherstellung)","schema":{"type":"string","enum":["1"]}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"parent_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"name":{"type":"string"},"created_by":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"deleted_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspace_id","parent_id","name","created_by","created_at","updated_at","deleted_at"],"additionalProperties":false}},"total":{"type":"number"}},"required":["data","total"],"additionalProperties":false}}}}}},"post":{"summary":"Ordner anlegen","description":"Namen sind je Ebene eindeutig; bei Namensgleichheit ergänzt Notes ' (2)'. Notiz-TITEL bleiben davon unberührt — sie sind weiterhin im ganzen Arbeitsbereich eindeutig, Ordner sind Ablage und kein Namensraum.","tags":["Ordner"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"description":"Name des Ordners. Bei Namensgleichheit auf derselben Ebene haengt Notes ' (2)' an."},"parent_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"UUID des uebergeordneten Ordners; ohne Angabe oder `null` entsteht er auf der obersten Ebene."}},"required":["name"]}}}},"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"parent_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"name":{"type":"string"},"created_by":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"deleted_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspace_id","parent_id","name","created_by","created_at","updated_at","deleted_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}}},"/v1/notes/ordner/{id}":{"patch":{"summary":"Ordner umbenennen und/oder verschieben","description":"Mindestens eines der beiden Felder muss gesetzt sein. `parent_id` darf nicht in den eigenen Teilbaum zeigen (auch nicht auf den Ordner selbst) — das wird mit 409 abgelehnt.","tags":["Ordner"],"parameters":[{"name":"id","in":"path","required":true,"description":"Ordner-UUID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"Neuer Name; bei Namensgleichheit auf der Zielebene haengt Notes ' (2)' an.","type":"string","minLength":1,"maxLength":120},"parent_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"Neuer uebergeordneter Ordner; `null` hebt den Ordner auf die oberste Ebene."}}}}}},"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"parent_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"name":{"type":"string"},"created_by":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"deleted_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspace_id","parent_id","name","created_by","created_at","updated_at","deleted_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}},"delete":{"summary":"Ordner mit Inhalt in den Papierkorb legen","description":"Wirkt rekursiv: Unterordner und alle enthaltenen Notizen wandern mit. Die Antwort nennt, wie viele Ordner und Notizen betroffen waren.","tags":["Ordner"],"parameters":[{"name":"id","in":"path","required":true,"description":"Ordner-UUID","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ordner":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"notizen":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["ordner","notizen"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}}},"/v1/notes/ordner/{id}/restore":{"post":{"summary":"Ordner aus dem Papierkorb wiederherstellen","description":"Holt den Ordner mit allem zurück, was mit ihm in den Papierkorb ging (Unterordner und Notizen); vorher einzeln Gelöschtes bleibt liegen. Liegt der alte Elternordner selbst im Papierkorb, kommt er auf die oberste Ebene.","tags":["Ordner"],"parameters":[{"name":"id","in":"path","required":true,"description":"Ordner-UUID (aus `GET /api/v1/ordner?deleted=1`)","schema":{"type":"string"}}],"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ordner":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"notizen":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["ordner","notizen"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}}},"/v1/notes/kommentare":{"get":{"summary":"Kommentare einer Notiz auflisten","tags":["Kommentare"],"parameters":[{"name":"note_id","in":"query","required":false,"description":"Notiz-UUID (Pflicht)","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"note_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"parent_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"autor_user_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"text":{"type":"string"},"anker_exakt":{"anyOf":[{"type":"string"},{"type":"null"}]},"anker_davor":{"anyOf":[{"type":"string"},{"type":"null"}]},"anker_danach":{"anyOf":[{"type":"string"},{"type":"null"}]},"anker_von":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"anker_bis":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"erledigt_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"erledigt_von":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","note_id","parent_id","autor_user_id","text","anker_exakt","anker_davor","anker_danach","anker_von","anker_bis","erledigt_at","erledigt_von","created_at","updated_at"],"additionalProperties":false}},"total":{"type":"number"}},"required":["data","total"],"additionalProperties":false}}}}}},"post":{"summary":"Kommentar an einer Textstelle anlegen oder auf einen antworten","description":"Ein Fadenanfang braucht `anker_exakt` — den kommentierten Ausschnitt wörtlich. Eine Antwort (`parent_id` gesetzt) erbt die Textstelle des Fadens und darf keine eigene tragen; beides zusammen wird mit 400 abgelehnt. Der Anker ist ein Textzitat, keine Position: `anker_von`/`anker_bis` sind nur ein Hinweis, wo die Suche beginnt.","tags":["Kommentare"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"note_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Notiz, an der der Kommentar haengt."},"text":{"type":"string","minLength":1,"maxLength":10000,"description":"Der Kommentartext."},"parent_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"Antwort auf diesen Kommentar. Antworten erben den Anker des Fadenanfangs und tragen selbst keinen."},"anker_exakt":{"description":"Der kommentierte Textausschnitt, woertlich. Pflicht am Fadenanfang, verboten bei einer Antwort.","type":"string","minLength":1,"maxLength":2000},"anker_davor":{"description":"Bis zu 32 Zeichen Text unmittelbar VOR der Stelle.","type":"string","maxLength":200},"anker_danach":{"description":"Bis zu 32 Zeichen Text unmittelbar NACH der Stelle.","type":"string","maxLength":200},"anker_von":{"description":"Zeichenposition des Ausschnitts (UTF-16), nur ein Hinweis fuer die Suche.","type":"integer","minimum":0,"maximum":9007199254740991},"anker_bis":{"description":"Endposition des Ausschnitts (UTF-16).","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["note_id","text"]}}}},"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"note_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"parent_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"autor_user_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"text":{"type":"string"},"anker_exakt":{"anyOf":[{"type":"string"},{"type":"null"}]},"anker_davor":{"anyOf":[{"type":"string"},{"type":"null"}]},"anker_danach":{"anyOf":[{"type":"string"},{"type":"null"}]},"anker_von":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"anker_bis":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"erledigt_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"erledigt_von":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","note_id","parent_id","autor_user_id","text","anker_exakt","anker_davor","anker_danach","anker_von","anker_bis","erledigt_at","erledigt_von","created_at","updated_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}}},"/v1/notes/kommentare/{id}":{"patch":{"summary":"Kommentartext ändern oder Faden erledigen","description":"Den Text darf nur der Autor ändern. Erledigt setzen darf jeder, der die Notiz besitzt oder kommentieren darf — ein Faden ist erledigt, wenn die Sache erledigt ist.","tags":["Kommentare"],"parameters":[{"name":"id","in":"path","required":true,"description":"Kommentar-UUID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"description":"Neuer Kommentartext — nur der Autor darf das.","type":"string","minLength":1,"maxLength":10000},"erledigt":{"description":"true hakt den Faden ab, false holt ihn zurueck.","type":"boolean"}}}}}},"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"note_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"parent_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"autor_user_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"text":{"type":"string"},"anker_exakt":{"anyOf":[{"type":"string"},{"type":"null"}]},"anker_davor":{"anyOf":[{"type":"string"},{"type":"null"}]},"anker_danach":{"anyOf":[{"type":"string"},{"type":"null"}]},"anker_von":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"anker_bis":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"erledigt_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"erledigt_von":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","note_id","parent_id","autor_user_id","text","anker_exakt","anker_davor","anker_danach","anker_von","anker_bis","erledigt_at","erledigt_von","created_at","updated_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}},"delete":{"summary":"Kommentar löschen (nur der Autor; Antworten gehen mit)","tags":["Kommentare"],"parameters":[{"name":"id","in":"path","required":true,"description":"Kommentar-UUID","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}}}}},"/v1/notes/export":{"get":{"summary":"Alle Notizen exportieren (JSON, inkl. gelöschte — DSGVO Art. 20)","description":"Notizen, Fassungen, Verknüpfungen und Graph-Einstellungen des aktiven Arbeitsbereichs. Bilder im Objektspeicher (`note-images`) sind nicht enthalten. Der Handler kennt keinen Formatparameter — die Antwort ist immer JSON.","tags":["Export"],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"format":{"type":"string","const":"json"},"bereich":{"type":"string","const":"notizen"},"exportiert_am":{"type":"string"},"user_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"notizen":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"created_by":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string"},"content":{"type":"string"},"art":{"type":"string"},"ordner_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"is_favorite":{"type":"boolean"},"is_deleted":{"type":"boolean"},"deleted_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","workspace_id","created_by","title","content","art","ordner_id","color","is_favorite","is_deleted","deleted_at","created_at","updated_at"],"additionalProperties":false}},"fassungen":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"verknuepfungen":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"graph_einstellungen":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"required":["format","bereich","exportiert_am","user_id","workspace_id","notizen","fassungen","verknuepfungen","graph_einstellungen"],"additionalProperties":false}}}}}}},"/v1/chat/export":{"get":{"summary":"Chat-Verlauf exportieren (DSGVO)","description":"Exportiert alle Konversationen + Nachrichten des aktiven Workspace als JSON.","tags":["Export"],"parameters":[{"name":"format","in":"query","required":false,"description":"Exportformat (nur json)","schema":{"type":"string","enum":["json"]}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"format":{"type":"string","const":"json"},"exported_at":{"type":"string"},"user_id":{"type":"string"},"workspace_id":{"type":"string"},"conversations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","workspace_id","created_at","updated_at"],"additionalProperties":false}},"messages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"conversation_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"role":{"type":"string"},"content":{"type":"string"},"created_at":{"type":"string"}},"required":["id","conversation_id","role","content","created_at"],"additionalProperties":false}}},"required":["format","exported_at","user_id","workspace_id","conversations","messages"],"additionalProperties":false}}}}}}},"/v1/agents/{id}":{"get":{"summary":"Agent abrufen","description":"Liest einen Agenten des Workspace. Service-zu-Service: Bearer-Service-Token + Header `X-Workspace-Id`.","tags":["Agents"],"parameters":[{"name":"id","in":"path","required":true,"description":"Agent-UUID","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"status":{"type":"string"},"system_prompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"model":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"}},"required":["name","status","system_prompt","model","created_at"],"additionalProperties":false}}}}}},"patch":{"summary":"Agent-System-Prompt aktualisieren","description":"Aktualisiert den System-Prompt. Service-zu-Service: Bearer-Service-Token + Header `X-Workspace-Id`.","tags":["Agents"],"parameters":[{"name":"id","in":"path","required":true,"description":"Agent-UUID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"system_prompt":{"type":"string"}},"required":["system_prompt"]}}}},"responses":{"204":{"description":"Aktualisiert (kein Inhalt)"}}}},"/v1/datenbanken":{"get":{"summary":"Datenbanken auflisten","description":"Alle Datenbanken des Arbeitsbereichs, alle fünf Arten (Tabelle, Sheet, SQLite, PostgreSQL, Vektor). Scope: `datenbanken:read`.","tags":["Datenbanken"],"parameters":[{"name":"art","in":"query","required":false,"description":"Nur diese Art: tabelle, sheet, sqlite, postgres oder vektor","schema":{"type":"string","enum":["tabelle","sheet","sqlite","postgres","vektor"]}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"art":{"type":"string","enum":["tabelle","sheet","sqlite","postgres","vektor"]},"name":{"type":"string"},"anzahl":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Einträge, Zeilen oder Tabellen; bei Sheet `null`"},"einheit":{"type":"string","description":"z. B. „Zeilen“, „Einträge“, „Tabellen“"},"groesse_bytes":{"anyOf":[{"type":"number"},{"type":"null"}]},"geaendert_am":{"anyOf":[{"type":"string"},{"type":"null"}]},"drive_file_id":{"description":"Nur Sheet: die Datei in Drive","type":"string"},"modell":{"description":"Nur Vektor: Einbettungsmodell","type":"string"},"dimension":{"type":"number"},"namespace":{"type":"string"},"spalten":{"description":"Nur Tabelle: Zahl der Spalten","type":"number"}},"required":["id","art","name","anzahl","einheit","groesse_bytes","geaendert_am"],"additionalProperties":false,"example":{"id":"550e8400-e29b-41d4-a716-446655440000","art":"tabelle","name":"Anfragen","anzahl":42,"einheit":"Zeilen","groesse_bytes":16384,"geaendert_am":"2026-11-05T09:30:00Z","spalten":3}}},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["data","total"],"additionalProperties":false}}}}}},"post":{"summary":"Datenbank anlegen","description":"`art` entscheidet über die Felder: `tabelle` mit `spalten`, `vektor` mit `modell`, `sheet` legt eine neue xlsx in Drive an oder verknüpft `drive_file_id`, `sqlite`/`postgres` legen eine leere Datenbank an. Ein neues Sheet braucht zusätzlich `drive:write`. Scope: `datenbanken:write`.","tags":["Datenbanken"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"art":{"type":"string","const":"vektor"},"name":{"type":"string","minLength":1,"maxLength":128},"modell":{"type":"string","maxLength":100},"beschreibung":{"type":"string","maxLength":2000}},"required":["art","name"]},{"type":"object","properties":{"art":{"type":"string","const":"tabelle"},"name":{"type":"string","minLength":1,"maxLength":128},"spalten":{"default":[],"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,62}$"},"type":{"type":"string","enum":["string","number","boolean","date"]},"titel":{"type":"string","maxLength":128}},"required":["name","type"]}}},"required":["art","name"]},{"type":"object","properties":{"art":{"type":"string","const":"sheet"},"name":{"type":"string","minLength":1,"maxLength":128},"drive_file_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["art","name"]},{"type":"object","properties":{"art":{"type":"string","const":"sqlite"},"name":{"type":"string","minLength":1,"maxLength":128}},"required":["art","name"]},{"type":"object","properties":{"art":{"type":"string","const":"postgres"},"name":{"type":"string","minLength":1,"maxLength":128}},"required":["art","name"]}],"example":{"art":"tabelle","name":"Anfragen","spalten":[{"name":"email","type":"string","titel":"E-Mail"},{"name":"nachricht","type":"string","titel":"Nachricht"},{"name":"eingang","type":"date","titel":"Eingang"}]}}}}},"responses":{"201":{"description":"Angelegt","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"art":{"type":"string","enum":["tabelle","sheet","sqlite","postgres","vektor"]},"name":{"type":"string"},"anzahl":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Einträge, Zeilen oder Tabellen; bei Sheet `null`"},"einheit":{"type":"string","description":"z. B. „Zeilen“, „Einträge“, „Tabellen“"},"groesse_bytes":{"anyOf":[{"type":"number"},{"type":"null"}]},"geaendert_am":{"anyOf":[{"type":"string"},{"type":"null"}]},"drive_file_id":{"description":"Nur Sheet: die Datei in Drive","type":"string"},"modell":{"description":"Nur Vektor: Einbettungsmodell","type":"string"},"dimension":{"type":"number"},"namespace":{"type":"string"},"spalten":{"description":"Nur Tabelle: Zahl der Spalten","type":"number"}},"required":["id","art","name","anzahl","einheit","groesse_bytes","geaendert_am"],"additionalProperties":false,"example":{"id":"550e8400-e29b-41d4-a716-446655440000","art":"tabelle","name":"Anfragen","anzahl":42,"einheit":"Zeilen","groesse_bytes":16384,"geaendert_am":"2026-11-05T09:30:00Z","spalten":3}}},"required":["id"],"additionalProperties":false}}}}}}},"/v1/datenbanken/{id}":{"get":{"summary":"Datenbank abrufen","description":"Eine Datenbank samt Art und Kennzahlen. Scope: `datenbanken:read`.","tags":["Datenbanken"],"parameters":[{"name":"id","in":"path","required":true,"description":"ID der Datenbank (UUID, aus der Liste)","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"art":{"type":"string","enum":["tabelle","sheet","sqlite","postgres","vektor"]},"name":{"type":"string"},"anzahl":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Einträge, Zeilen oder Tabellen; bei Sheet `null`"},"einheit":{"type":"string","description":"z. B. „Zeilen“, „Einträge“, „Tabellen“"},"groesse_bytes":{"anyOf":[{"type":"number"},{"type":"null"}]},"geaendert_am":{"anyOf":[{"type":"string"},{"type":"null"}]},"drive_file_id":{"description":"Nur Sheet: die Datei in Drive","type":"string"},"modell":{"description":"Nur Vektor: Einbettungsmodell","type":"string"},"dimension":{"type":"number"},"namespace":{"type":"string"},"spalten":{"description":"Nur Tabelle: Zahl der Spalten","type":"number"}},"required":["id","art","name","anzahl","einheit","groesse_bytes","geaendert_am"],"additionalProperties":false,"example":{"id":"550e8400-e29b-41d4-a716-446655440000","art":"tabelle","name":"Anfragen","anzahl":42,"einheit":"Zeilen","groesse_bytes":16384,"geaendert_am":"2026-11-05T09:30:00Z","spalten":3}}},"required":["data"],"additionalProperties":false}}}}}},"patch":{"summary":"Datenbank umbenennen","description":"Ändert den Namen. Scope: `datenbanken:write`.","tags":["Datenbanken"],"parameters":[{"name":"id","in":"path","required":true,"description":"ID der Datenbank (UUID, aus der Liste)","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128}},"required":["name"],"example":{"name":"Kundenanfragen"}}}}},"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"art":{"type":"string","enum":["tabelle","sheet","sqlite","postgres","vektor"]},"name":{"type":"string"},"anzahl":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Einträge, Zeilen oder Tabellen; bei Sheet `null`"},"einheit":{"type":"string","description":"z. B. „Zeilen“, „Einträge“, „Tabellen“"},"groesse_bytes":{"anyOf":[{"type":"number"},{"type":"null"}]},"geaendert_am":{"anyOf":[{"type":"string"},{"type":"null"}]},"drive_file_id":{"description":"Nur Sheet: die Datei in Drive","type":"string"},"modell":{"description":"Nur Vektor: Einbettungsmodell","type":"string"},"dimension":{"type":"number"},"namespace":{"type":"string"},"spalten":{"description":"Nur Tabelle: Zahl der Spalten","type":"number"}},"required":["id","art","name","anzahl","einheit","groesse_bytes","geaendert_am"],"additionalProperties":false,"example":{"id":"550e8400-e29b-41d4-a716-446655440000","art":"tabelle","name":"Anfragen","anzahl":42,"einheit":"Zeilen","groesse_bytes":16384,"geaendert_am":"2026-11-05T09:30:00Z","spalten":3}}},"additionalProperties":false}}}}}},"delete":{"summary":"Datenbank löschen","description":"Löscht die Datenbank samt Inhalt. Bei einem Sheet wird nur die Verknüpfung gelöst — die Datei bleibt in Drive. Scope: `datenbanken:delete`.","tags":["Datenbanken"],"parameters":[{"name":"id","in":"path","required":true,"description":"ID der Datenbank (UUID, aus der Liste)","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"geloescht":{"type":"boolean","const":true},"art":{"type":"string","enum":["tabelle","sheet","sqlite","postgres","vektor"]},"hinweis":{"type":"string"}},"required":["geloescht","art"],"additionalProperties":false}}}}}}},"/v1/datenbanken/{id}/tabellen":{"get":{"summary":"Tabellen auflisten (SQLite, PostgreSQL)","description":"Tabellen samt Spalten einer SQLite- oder PostgreSQL-Datenbank. Scope: `datenbanken:read`.","tags":["Datenbanken"],"parameters":[{"name":"id","in":"path","required":true,"description":"ID der Datenbank (UUID, aus der Liste)","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"spalten":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"typ":{"type":"string"},"nullable":{"type":"boolean"},"primaerschluessel":{"type":"boolean"}},"required":["name","typ","nullable"],"additionalProperties":false}}},"required":["name","spalten"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false,"example":{"data":[{"name":"anfragen","spalten":[{"name":"id","typ":"ganzzahl","nullable":false,"primaerschluessel":true},{"name":"email","typ":"text","nullable":true}]}]}}}}}}},"post":{"summary":"Tabelle anlegen (SQLite, PostgreSQL)","description":"Legt eine Tabelle an; Name und Spaltennamen nur aus Buchstaben, Ziffern und _. Scope: `datenbanken:write`.","tags":["Datenbanken"],"parameters":[{"name":"id","in":"path","required":true,"description":"ID der Datenbank (UUID, aus der Liste)","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,62}$"},"spalten":{"default":[],"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":63},"type":{"type":"string","enum":["string","number","boolean","date"]}},"required":["name","type"]}}},"required":["name"],"example":{"name":"anfragen","spalten":[{"name":"email","type":"string"},{"name":"eingang","type":"date"}]}}}}},"responses":{"201":{"description":"Angelegt"}}}},"/v1/datenbanken/{id}/zeilen":{"get":{"summary":"Zeilen lesen","description":"Zeilen einer Tabelle (Art „Tabelle“) oder einer Tabelle in SQLite/PostgreSQL (dann mit `tabelle`). Sheet-Zeilen gehen über `/v1/drive/sheets/{fileId}/rows`, Vektor-Einträge über `/eintraege`. Scope: `datenbanken:read`.","tags":["Datenbanken"],"parameters":[{"name":"id","in":"path","required":true,"description":"ID der Datenbank (UUID, aus der Liste)","schema":{"type":"string"}},{"name":"tabelle","in":"query","required":false,"description":"Pflicht bei SQLite/PostgreSQL: Name der Tabelle","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Seite (Art „Tabelle“), ab 1","schema":{"type":"integer"}},{"name":"offset","in":"query","required":false,"description":"Versatz (SQLite/PostgreSQL)","schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"description":"Zeilen je Seite","schema":{"type":"integer"}},{"name":"sort","in":"query","required":false,"description":"Sortierspalte (Art „Tabelle“)","schema":{"type":"string"}},{"name":"sortierung","in":"query","required":false,"description":"Sortierspalte (SQLite/PostgreSQL)","schema":{"type":"string"}},{"name":"richtung","in":"query","required":false,"description":"asc oder desc","schema":{"type":"string","enum":["asc","desc"]}},{"name":"filter","in":"query","required":false,"description":"Bedingungen als JSON-Liste, z. B. [{\"spalte\":\"email\",\"bedingung\":\"ilike\",\"wert\":\"%@example.com\"}]; Bedingungen eq, neq, like, ilike, gt, gte, lt, lte, isEmpty, isNotEmpty, isTrue, isFalse","schema":{"type":"string"}},{"name":"und","in":"query","required":false,"description":"true: alle Bedingungen müssen gelten, false: eine genügt","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"type":"string"},{"type":"number"}]},"daten":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","daten"],"additionalProperties":false}},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["data","total"],"additionalProperties":false}}}}}},"post":{"summary":"Zeilen einfügen","description":"Höchstens 100 Zeilen je Aufruf; Schlüssel sind die Spaltennamen. Bei SQLite/PostgreSQL `tabelle` im Rumpf. Scope: `datenbanken:write`.","tags":["Datenbanken"],"parameters":[{"name":"id","in":"path","required":true,"description":"ID der Datenbank (UUID, aus der Liste)","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"zeilen":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"tabelle":{"type":"string","maxLength":128}},"required":["zeilen"],"example":{"zeilen":[{"email":"max.mustermann@example.com","nachricht":"Bitte um Rückruf","eingang":"2026-11-05"}]}}}}},"responses":{"201":{"description":"Eingefügt","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"type":"string"},{"type":"number"}]},"daten":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","daten"],"additionalProperties":false}}},"additionalProperties":false}}}}}},"patch":{"summary":"Zeilen ändern","description":"Setzt `werte` in allen Zeilen mit den genannten `ids`. Scope: `datenbanken:write`.","tags":["Datenbanken"],"parameters":[{"name":"id","in":"path","required":true,"description":"ID der Datenbank (UUID, aus der Liste)","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"minItems":1,"maxItems":1000,"type":"array","items":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"number"}]}},"werte":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}},"tabelle":{"type":"string","maxLength":128}},"required":["ids","werte"],"example":{"ids":[17],"werte":{"nachricht":"Erledigt"}}}}}},"responses":{"200":{"description":"Erfolg"}}},"delete":{"summary":"Zeilen löschen","description":"Löscht die Zeilen mit den genannten `ids` (höchstens 1000). Scope: `datenbanken:delete`.","tags":["Datenbanken"],"parameters":[{"name":"id","in":"path","required":true,"description":"ID der Datenbank (UUID, aus der Liste)","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"minItems":1,"maxItems":1000,"type":"array","items":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"number"}]}},"tabelle":{"type":"string","maxLength":128}},"required":["ids"],"example":{"ids":[17,18]}}}}},"responses":{"200":{"description":"Erfolg"}}}},"/v1/datenbanken/{id}/sql":{"post":{"summary":"SQL ausführen (SQLite, PostgreSQL)","description":"Lesendes SQL läuft sofort. Ändernde Anweisungen nur mit `schreiben: true`; ohne `probe: false` werden die betroffenen Zeilen nur gezählt, nichts ändert sich. Platzhalter `?` (SQLite) bzw. `$1` (PostgreSQL) über `params`. Scope: mit API-Schlüssel verlangt das Gateway für jeden POST `datenbanken:write`. Ausführen (`schreiben: true`, `probe: false`) braucht zusätzlich `datenbanken:delete`, weil SQL auch löschen kann.","tags":["Datenbanken"],"parameters":[{"name":"id","in":"path","required":true,"description":"ID der Datenbank (UUID, aus der Liste)","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sql":{"type":"string","minLength":1,"maxLength":100000},"params":{"default":[],"maxItems":1000,"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}},"schreiben":{"default":false,"type":"boolean"},"probe":{"default":true,"type":"boolean"}},"required":["sql"],"example":{"sql":"SELECT id, email FROM anfragen WHERE eingang >= ? ORDER BY eingang DESC LIMIT 20","params":["2026-11-01"]}}}}},"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"spalten":{"type":"array","items":{"type":"string"}},"zeilen":{"type":"array","items":{"type":"array","items":{}},"description":"Je Zeile die Werte in der Reihenfolge von `spalten`"},"betroffen":{"anyOf":[{"type":"number"},{"type":"null"}]},"dauer_ms":{"type":"number"},"probe":{"type":"boolean"},"abgeschnitten":{"type":"boolean"}},"required":["spalten","zeilen"],"additionalProperties":false}},"required":["data"],"additionalProperties":false,"example":{"data":{"spalten":["id","email"],"zeilen":[[1,"max.mustermann@example.com"]],"dauer_ms":3}}}}}}}}},"/v1/datenbanken/{id}/export":{"get":{"summary":"Exportieren","description":"Liefert eine Datei: SQLite `format=sqlite|sql|csv`, PostgreSQL `format=sql|csv` (CSV mit `tabelle`), Tabelle als CSV (UTF-8 mit BOM), Vektor als JSON `{data:[…]}`. Ein Sheet ist eine Drive-Datei: Download über `/v1/drive/file/{drive_file_id}?download=1`. Scope: `datenbanken:read`.","tags":["Datenbanken"],"parameters":[{"name":"id","in":"path","required":true,"description":"ID der Datenbank (UUID, aus der Liste)","schema":{"type":"string"}},{"name":"format","in":"query","required":false,"description":"sqlite, sql oder csv (nur SQLite/PostgreSQL)","schema":{"type":"string","enum":["sqlite","sql","csv"]}},{"name":"tabelle","in":"query","required":false,"description":"Bei CSV aus SQLite/PostgreSQL: welche Tabelle","schema":{"type":"string"}}],"responses":{"200":{"description":"Datei (text/csv, application/sql, application/vnd.sqlite3) bzw. JSON bei Vektor"}}}},"/v1/datenbanken/{id}/eintraege":{"get":{"summary":"Vektor-Einträge lesen","description":"Einträge einer Vektor-Datenbank, seitenweise. Scope: `datenbanken:read`.","tags":["Datenbanken"],"parameters":[{"name":"id","in":"path","required":true,"description":"ID der Datenbank (UUID, aus der Liste)","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Seite, ab 1","schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"description":"Einträge je Seite, 1–100 (Vorgabe 50)","schema":{"type":"integer"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["data","total"],"additionalProperties":false}}}}}},"post":{"summary":"Vektor-Einträge hinzufügen","description":"Höchstens 100 Texte je Aufruf. Jeder Text wird über Janeway eingebettet (verbraucht Credits). Scope: `datenbanken:write`.","tags":["Datenbanken"],"parameters":[{"name":"id","in":"path","required":true,"description":"ID der Datenbank (UUID, aus der Liste)","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"texte":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"inhalt":{"type":"string","minLength":1,"maxLength":32000},"kategorie":{"type":"string","maxLength":200},"metadaten":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["inhalt"]}}},"required":["texte"],"example":{"texte":[{"inhalt":"Unsere Hotline ist werktags von 8 bis 18 Uhr erreichbar.","kategorie":"Kontakt","metadaten":{"quelle":"faq"}}]}}}}},"responses":{"201":{"description":"Hinzugefügt"}}},"delete":{"summary":"Vektor-Einträge löschen","description":"Löscht die Einträge mit den genannten `ids` (höchstens 100). Scope: `datenbanken:delete`.","tags":["Datenbanken"],"parameters":[{"name":"id","in":"path","required":true,"description":"ID der Datenbank (UUID, aus der Liste)","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["ids"],"example":{"ids":["550e8400-e29b-41d4-a716-446655440000"]}}}}},"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"geloescht":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["geloescht"],"additionalProperties":false}}}}}}},"/v1/datenbanken/{id}/suche":{"get":{"summary":"Vektor-Suche nach Bedeutung","description":"Findet die Einträge, die dem Suchtext inhaltlich am nächsten sind. Scope: `datenbanken:read`.","tags":["Datenbanken"],"parameters":[{"name":"id","in":"path","required":true,"description":"ID der Datenbank (UUID, aus der Liste)","schema":{"type":"string"}},{"name":"q","in":"query","required":true,"description":"Suchtext, höchstens 5000 Zeichen","schema":{"type":"string"}},{"name":"schwelle","in":"query","required":false,"description":"Mindestähnlichkeit 0,1–1 (Vorgabe 0,5)","schema":{"type":"number"}},{"name":"anzahl","in":"query","required":false,"description":"Höchstzahl Treffer 1–50 (Vorgabe 10)","schema":{"type":"integer"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"required":["data"],"additionalProperties":false}}}}}}},"/v1/immo/objects":{"get":{"summary":"Objekte auflisten","tags":["Objects"],"parameters":[{"name":"limit","in":"query","required":false,"description":"Max. Anzahl (Default 50)","schema":{"type":"integer"}},{"name":"offset","in":"query","required":false,"description":"Offset","schema":{"type":"integer"}},{"name":"search","in":"query","required":false,"description":"Volltextsuche (Titel/Ort)","schema":{"type":"string"}},{"name":"felder","in":"query","required":false,"description":"Bei Wert \"kompakt\": nur die telefonrelevanten Kernfelder statt aller Spalten (Freitextfelder entfallen). Default liefert unveraendert alle Spalten.","schema":{"type":"string"}},{"name":"preis_ab","in":"query","required":false,"description":"Nur Objekte mit Kaufpreis ab dieser Grenze in EUR (inklusive)","schema":{"type":"number"}},{"name":"preis_bis","in":"query","required":false,"description":"Nur Objekte mit Kaufpreis bis zu dieser Grenze in EUR (inklusive)","schema":{"type":"number"}},{"name":"gebaeude","in":"query","required":false,"description":"Nur Einheiten dieses uebergeordneten Objekts (dessen id) — beantwortet, was dieses Haus noch hat","schema":{"type":"string"}},{"name":"nur","in":"query","required":false,"description":"Wert gebaeude = nur uebergeordnete Objekte und Einzelobjekte, also die Liste der Haeuser statt aller Wohnungen","schema":{"type":"string","enum":["gebaeude"]}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"titel":{"type":"string","minLength":1,"maxLength":255},"status":{"default":"draft","type":"string","enum":["draft","active","archived"]},"vermarktungsart":{"type":"string","enum":["KAUF","MIETE_PACHT"]},"nutzungsart":{"type":"string","enum":["WOHNEN","GEWERBE","ANLAGE","WAZ"]},"objektart":{"type":"string","enum":["haus","wohnung","grundstueck","gewerbe","ferien","tiny_house","sonstige"]},"objektart_subtype":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"objekt_nr":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"strasse":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"hausnummer":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"plz":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"ort":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"land":{"type":"string","maxLength":3},"etage":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"anzahl_etagen":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"geo_lat":{"anyOf":[{"type":"number"},{"type":"null"}]},"geo_lng":{"anyOf":[{"type":"number"},{"type":"null"}]},"adresse_sichtbar":{"type":"boolean"},"wohnflaeche":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"nutzflaeche":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"grundstuecksflaeche":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"anzahl_zimmer":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"anzahl_schlafzimmer":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"anzahl_badezimmer":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"max_personen":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":200},{"type":"null"}]},"parent_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"gruppen_kennung":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"master_sichtbar":{"type":"boolean"},"baujahr":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"kaufpreis":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"kaltmiete":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"warmmiete":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"nebenkosten":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"heizkosten":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"kaution":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"provision":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"waehrung":{"type":"string","maxLength":3},"preis_pro_m2":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"preis_pro_m2_ab":{"type":"boolean"},"preis_zeiteinheit":{"anyOf":[{"type":"string","enum":["TAG","WOCHE","MONAT","JAHR"]},{"type":"null"}]},"preis_ab":{"type":"boolean"},"preis_auf_anfrage":{"type":"boolean"},"mieteinnahmen_ist":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"x_fache":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"hausgeld":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"energieausweistyp":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"energiekennwert":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"energieeffizienzklasse":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"befeuerungsart":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"verkaufstatus":{"anyOf":[{"type":"string","enum":["offen","reserviert","verkauft"]},{"type":"null"}]},"vermietet":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"kontakt_firma":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"kontakt_anrede":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"kontakt_vorname":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"kontakt_name":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"kontakt_email":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"kontakt_tel":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"kontakt_url":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"eigentuemer_name":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"eigentuemer_email":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"eigentuemer_tel":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"openimmo_obid":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"stand_vom":{"anyOf":[{"type":"string"},{"type":"null"}]},"openimmo_roh":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"beschreibung":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"ausstattung_text":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"lage_text":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"sonstiges_text":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"openimmo_extra":{"type":"object","properties":{"balkon":{"type":"boolean"},"terrasse":{"type":"boolean"},"garten":{"type":"boolean"},"keller":{"type":"boolean"},"dachboden":{"type":"boolean"},"aufzug":{"type":"boolean"},"einbaukueche":{"type":"boolean"},"gaeste_wc":{"type":"boolean"},"kamin":{"type":"boolean"},"klimatisiert":{"type":"boolean"},"sauna":{"type":"boolean"},"swimmingpool":{"type":"boolean"},"wintergarten":{"type":"boolean"},"barrierefrei":{"type":"boolean"},"rollstuhlgerecht":{"type":"boolean"},"moebliert":{"type":"string","enum":["nein","teil","voll"]},"stellplatz_art":{"type":"string","enum":["garage","tiefgarage","carport","aussen","parkhaus","keiner"]},"anzahl_stellplaetze":{"type":"integer","minimum":0,"maximum":9007199254740991},"objektzustand":{"type":"string","enum":["ERSTBEZUG","NEUWERTIG","GEPFLEGT","MODERNISIERT","RENOVIERUNGSBEDUERFTIG","SANIERUNGSBEDUERFTIG","NACH_VEREINBARUNG"]},"heizungsart":{"type":"string","enum":["zentral","fussboden","etage","fern","ofen","waermepumpe"]},"energietraeger":{"type":"string","enum":["gas","oel","fernwaerme","elektro","solar","erdwaerme","pellet","luftwp"]},"energie_ausstelldatum":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"energie_gueltig_bis":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"energie_mit_warmwasser":{"type":"boolean"},"energie_baujahr":{"type":"integer","minimum":0,"maximum":9007199254740991},"verfuegbar_ab":{"type":"string","maxLength":255},"als_ferien":{"type":"boolean"},"anzahl_betten":{"type":"integer","minimum":0,"maximum":9007199254740991},"min_mietdauer":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"min_mietdauer_einheit":{"type":"string","enum":["TAG","WOCHE","MONAT","JAHR"]},"max_mietdauer":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"max_mietdauer_einheit":{"type":"string","enum":["TAG","WOCHE","MONAT","JAHR"]},"nichtraucher":{"type":"boolean"},"haustiere":{"type":"string","enum":["ja","nein","auf_anfrage"]},"wlan":{"type":"boolean"},"tv":{"type":"boolean"},"waschmaschine":{"type":"boolean"},"geschirrspueler":{"type":"boolean"},"endreinigung":{"type":"number","minimum":0},"kurtaxe_text":{"type":"string","maxLength":2000},"check_in_ab":{"type":"string","maxLength":255},"check_out_bis":{"type":"string","maxLength":255},"zusatzleistungen":{"type":"string","maxLength":2000},"hausgeld":{"type":"number","minimum":0},"courtage_text":{"type":"string","maxLength":2000},"erschliessungskosten":{"type":"string","maxLength":2000},"kennung_ursprung":{"type":"string","maxLength":255},"dreizeiler":{"type":"string","maxLength":2000},"distanzen":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number","minimum":0}},"weitergabe_generell":{"type":"boolean"},"weitergabe_positiv":{"type":"string","maxLength":2000},"weitergabe_negativ":{"type":"string","maxLength":2000}},"additionalProperties":{}},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"kind":{"type":"string"},"category":{"anyOf":[{"type":"string"},{"type":"null"}]},"sort_order":{"type":"number"}},"required":["url","kind","category","sort_order"],"additionalProperties":false}},"titelbild_url":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["titel","status","vermarktungsart","nutzungsart","objektart","id","workspace_id","created_at","updated_at"],"additionalProperties":false}},"total":{"type":"number"}},"required":["data","total"],"additionalProperties":false}}}}}},"post":{"summary":"Objekt anlegen","tags":["Objects"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"titel":{"type":"string","minLength":1,"maxLength":255},"status":{"default":"draft","type":"string","enum":["draft","active","archived"]},"vermarktungsart":{"type":"string","enum":["KAUF","MIETE_PACHT"]},"nutzungsart":{"type":"string","enum":["WOHNEN","GEWERBE","ANLAGE","WAZ"]},"objektart":{"type":"string","enum":["haus","wohnung","grundstueck","gewerbe","ferien","tiny_house","sonstige"]},"objektart_subtype":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"objekt_nr":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"strasse":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"hausnummer":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"plz":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"ort":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"land":{"type":"string","maxLength":3},"etage":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"anzahl_etagen":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"geo_lat":{"anyOf":[{"type":"number"},{"type":"null"}]},"geo_lng":{"anyOf":[{"type":"number"},{"type":"null"}]},"adresse_sichtbar":{"type":"boolean"},"wohnflaeche":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"nutzflaeche":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"grundstuecksflaeche":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"anzahl_zimmer":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"anzahl_schlafzimmer":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"anzahl_badezimmer":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"max_personen":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":200},{"type":"null"}]},"parent_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"gruppen_kennung":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"master_sichtbar":{"type":"boolean"},"baujahr":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"kaufpreis":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"kaltmiete":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"warmmiete":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"nebenkosten":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"heizkosten":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"kaution":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"provision":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"waehrung":{"type":"string","maxLength":3},"preis_pro_m2":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"preis_pro_m2_ab":{"type":"boolean"},"preis_zeiteinheit":{"anyOf":[{"type":"string","enum":["TAG","WOCHE","MONAT","JAHR"]},{"type":"null"}]},"preis_ab":{"type":"boolean"},"preis_auf_anfrage":{"type":"boolean"},"mieteinnahmen_ist":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"x_fache":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"hausgeld":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"energieausweistyp":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"energiekennwert":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"energieeffizienzklasse":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"befeuerungsart":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"verkaufstatus":{"anyOf":[{"type":"string","enum":["offen","reserviert","verkauft"]},{"type":"null"}]},"vermietet":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"kontakt_firma":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"kontakt_anrede":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"kontakt_vorname":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"kontakt_name":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"kontakt_email":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"kontakt_tel":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"kontakt_url":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"eigentuemer_name":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"eigentuemer_email":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"eigentuemer_tel":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"openimmo_obid":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"stand_vom":{"anyOf":[{"type":"string"},{"type":"null"}]},"openimmo_roh":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"beschreibung":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"ausstattung_text":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"lage_text":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"sonstiges_text":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"openimmo_extra":{"type":"object","properties":{"balkon":{"type":"boolean"},"terrasse":{"type":"boolean"},"garten":{"type":"boolean"},"keller":{"type":"boolean"},"dachboden":{"type":"boolean"},"aufzug":{"type":"boolean"},"einbaukueche":{"type":"boolean"},"gaeste_wc":{"type":"boolean"},"kamin":{"type":"boolean"},"klimatisiert":{"type":"boolean"},"sauna":{"type":"boolean"},"swimmingpool":{"type":"boolean"},"wintergarten":{"type":"boolean"},"barrierefrei":{"type":"boolean"},"rollstuhlgerecht":{"type":"boolean"},"moebliert":{"type":"string","enum":["nein","teil","voll"]},"stellplatz_art":{"type":"string","enum":["garage","tiefgarage","carport","aussen","parkhaus","keiner"]},"anzahl_stellplaetze":{"type":"integer","minimum":0,"maximum":9007199254740991},"objektzustand":{"type":"string","enum":["ERSTBEZUG","NEUWERTIG","GEPFLEGT","MODERNISIERT","RENOVIERUNGSBEDUERFTIG","SANIERUNGSBEDUERFTIG","NACH_VEREINBARUNG"]},"heizungsart":{"type":"string","enum":["zentral","fussboden","etage","fern","ofen","waermepumpe"]},"energietraeger":{"type":"string","enum":["gas","oel","fernwaerme","elektro","solar","erdwaerme","pellet","luftwp"]},"energie_ausstelldatum":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"energie_gueltig_bis":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"energie_mit_warmwasser":{"type":"boolean"},"energie_baujahr":{"type":"integer","minimum":0,"maximum":9007199254740991},"verfuegbar_ab":{"type":"string","maxLength":255},"als_ferien":{"type":"boolean"},"anzahl_betten":{"type":"integer","minimum":0,"maximum":9007199254740991},"min_mietdauer":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"min_mietdauer_einheit":{"type":"string","enum":["TAG","WOCHE","MONAT","JAHR"]},"max_mietdauer":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"max_mietdauer_einheit":{"type":"string","enum":["TAG","WOCHE","MONAT","JAHR"]},"nichtraucher":{"type":"boolean"},"haustiere":{"type":"string","enum":["ja","nein","auf_anfrage"]},"wlan":{"type":"boolean"},"tv":{"type":"boolean"},"waschmaschine":{"type":"boolean"},"geschirrspueler":{"type":"boolean"},"endreinigung":{"type":"number","minimum":0},"kurtaxe_text":{"type":"string","maxLength":2000},"check_in_ab":{"type":"string","maxLength":255},"check_out_bis":{"type":"string","maxLength":255},"zusatzleistungen":{"type":"string","maxLength":2000},"hausgeld":{"type":"number","minimum":0},"courtage_text":{"type":"string","maxLength":2000},"erschliessungskosten":{"type":"string","maxLength":2000},"kennung_ursprung":{"type":"string","maxLength":255},"dreizeiler":{"type":"string","maxLength":2000},"distanzen":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number","minimum":0}},"weitergabe_generell":{"type":"boolean"},"weitergabe_positiv":{"type":"string","maxLength":2000},"weitergabe_negativ":{"type":"string","maxLength":2000}},"additionalProperties":{}}},"required":["titel","vermarktungsart","nutzungsart","objektart"]}}}},"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"titel":{"type":"string","minLength":1,"maxLength":255},"status":{"default":"draft","type":"string","enum":["draft","active","archived"]},"vermarktungsart":{"type":"string","enum":["KAUF","MIETE_PACHT"]},"nutzungsart":{"type":"string","enum":["WOHNEN","GEWERBE","ANLAGE","WAZ"]},"objektart":{"type":"string","enum":["haus","wohnung","grundstueck","gewerbe","ferien","tiny_house","sonstige"]},"objektart_subtype":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"objekt_nr":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"strasse":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"hausnummer":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"plz":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"ort":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"land":{"type":"string","maxLength":3},"etage":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"anzahl_etagen":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"geo_lat":{"anyOf":[{"type":"number"},{"type":"null"}]},"geo_lng":{"anyOf":[{"type":"number"},{"type":"null"}]},"adresse_sichtbar":{"type":"boolean"},"wohnflaeche":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"nutzflaeche":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"grundstuecksflaeche":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"anzahl_zimmer":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"anzahl_schlafzimmer":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"anzahl_badezimmer":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"max_personen":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":200},{"type":"null"}]},"parent_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"gruppen_kennung":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"master_sichtbar":{"type":"boolean"},"baujahr":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"kaufpreis":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"kaltmiete":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"warmmiete":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"nebenkosten":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"heizkosten":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"kaution":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"provision":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"waehrung":{"type":"string","maxLength":3},"preis_pro_m2":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"preis_pro_m2_ab":{"type":"boolean"},"preis_zeiteinheit":{"anyOf":[{"type":"string","enum":["TAG","WOCHE","MONAT","JAHR"]},{"type":"null"}]},"preis_ab":{"type":"boolean"},"preis_auf_anfrage":{"type":"boolean"},"mieteinnahmen_ist":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"x_fache":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"hausgeld":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"energieausweistyp":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"energiekennwert":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"energieeffizienzklasse":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"befeuerungsart":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"verkaufstatus":{"anyOf":[{"type":"string","enum":["offen","reserviert","verkauft"]},{"type":"null"}]},"vermietet":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"kontakt_firma":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"kontakt_anrede":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"kontakt_vorname":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"kontakt_name":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"kontakt_email":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"kontakt_tel":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"kontakt_url":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"eigentuemer_name":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"eigentuemer_email":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"eigentuemer_tel":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"openimmo_obid":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"stand_vom":{"anyOf":[{"type":"string"},{"type":"null"}]},"openimmo_roh":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"beschreibung":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"ausstattung_text":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"lage_text":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"sonstiges_text":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"openimmo_extra":{"type":"object","properties":{"balkon":{"type":"boolean"},"terrasse":{"type":"boolean"},"garten":{"type":"boolean"},"keller":{"type":"boolean"},"dachboden":{"type":"boolean"},"aufzug":{"type":"boolean"},"einbaukueche":{"type":"boolean"},"gaeste_wc":{"type":"boolean"},"kamin":{"type":"boolean"},"klimatisiert":{"type":"boolean"},"sauna":{"type":"boolean"},"swimmingpool":{"type":"boolean"},"wintergarten":{"type":"boolean"},"barrierefrei":{"type":"boolean"},"rollstuhlgerecht":{"type":"boolean"},"moebliert":{"type":"string","enum":["nein","teil","voll"]},"stellplatz_art":{"type":"string","enum":["garage","tiefgarage","carport","aussen","parkhaus","keiner"]},"anzahl_stellplaetze":{"type":"integer","minimum":0,"maximum":9007199254740991},"objektzustand":{"type":"string","enum":["ERSTBEZUG","NEUWERTIG","GEPFLEGT","MODERNISIERT","RENOVIERUNGSBEDUERFTIG","SANIERUNGSBEDUERFTIG","NACH_VEREINBARUNG"]},"heizungsart":{"type":"string","enum":["zentral","fussboden","etage","fern","ofen","waermepumpe"]},"energietraeger":{"type":"string","enum":["gas","oel","fernwaerme","elektro","solar","erdwaerme","pellet","luftwp"]},"energie_ausstelldatum":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"energie_gueltig_bis":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"energie_mit_warmwasser":{"type":"boolean"},"energie_baujahr":{"type":"integer","minimum":0,"maximum":9007199254740991},"verfuegbar_ab":{"type":"string","maxLength":255},"als_ferien":{"type":"boolean"},"anzahl_betten":{"type":"integer","minimum":0,"maximum":9007199254740991},"min_mietdauer":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"min_mietdauer_einheit":{"type":"string","enum":["TAG","WOCHE","MONAT","JAHR"]},"max_mietdauer":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"max_mietdauer_einheit":{"type":"string","enum":["TAG","WOCHE","MONAT","JAHR"]},"nichtraucher":{"type":"boolean"},"haustiere":{"type":"string","enum":["ja","nein","auf_anfrage"]},"wlan":{"type":"boolean"},"tv":{"type":"boolean"},"waschmaschine":{"type":"boolean"},"geschirrspueler":{"type":"boolean"},"endreinigung":{"type":"number","minimum":0},"kurtaxe_text":{"type":"string","maxLength":2000},"check_in_ab":{"type":"string","maxLength":255},"check_out_bis":{"type":"string","maxLength":255},"zusatzleistungen":{"type":"string","maxLength":2000},"hausgeld":{"type":"number","minimum":0},"courtage_text":{"type":"string","maxLength":2000},"erschliessungskosten":{"type":"string","maxLength":2000},"kennung_ursprung":{"type":"string","maxLength":255},"dreizeiler":{"type":"string","maxLength":2000},"distanzen":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number","minimum":0}},"weitergabe_generell":{"type":"boolean"},"weitergabe_positiv":{"type":"string","maxLength":2000},"weitergabe_negativ":{"type":"string","maxLength":2000}},"additionalProperties":{}},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"kind":{"type":"string"},"category":{"anyOf":[{"type":"string"},{"type":"null"}]},"sort_order":{"type":"number"}},"required":["url","kind","category","sort_order"],"additionalProperties":false}},"titelbild_url":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["titel","status","vermarktungsart","nutzungsart","objektart","id","workspace_id","created_at","updated_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}}},"/v1/immo/objects/{id}":{"get":{"summary":"Objekt abrufen","tags":["Objects"],"parameters":[{"name":"id","in":"path","required":true,"description":"Objekt-UUID","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"titel":{"type":"string","minLength":1,"maxLength":255},"status":{"default":"draft","type":"string","enum":["draft","active","archived"]},"vermarktungsart":{"type":"string","enum":["KAUF","MIETE_PACHT"]},"nutzungsart":{"type":"string","enum":["WOHNEN","GEWERBE","ANLAGE","WAZ"]},"objektart":{"type":"string","enum":["haus","wohnung","grundstueck","gewerbe","ferien","tiny_house","sonstige"]},"objektart_subtype":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"objekt_nr":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"strasse":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"hausnummer":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"plz":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"ort":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"land":{"type":"string","maxLength":3},"etage":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"anzahl_etagen":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"geo_lat":{"anyOf":[{"type":"number"},{"type":"null"}]},"geo_lng":{"anyOf":[{"type":"number"},{"type":"null"}]},"adresse_sichtbar":{"type":"boolean"},"wohnflaeche":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"nutzflaeche":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"grundstuecksflaeche":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"anzahl_zimmer":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"anzahl_schlafzimmer":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"anzahl_badezimmer":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"max_personen":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":200},{"type":"null"}]},"parent_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"gruppen_kennung":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"master_sichtbar":{"type":"boolean"},"baujahr":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"kaufpreis":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"kaltmiete":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"warmmiete":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"nebenkosten":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"heizkosten":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"kaution":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"provision":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"waehrung":{"type":"string","maxLength":3},"preis_pro_m2":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"preis_pro_m2_ab":{"type":"boolean"},"preis_zeiteinheit":{"anyOf":[{"type":"string","enum":["TAG","WOCHE","MONAT","JAHR"]},{"type":"null"}]},"preis_ab":{"type":"boolean"},"preis_auf_anfrage":{"type":"boolean"},"mieteinnahmen_ist":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"x_fache":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"hausgeld":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"energieausweistyp":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"energiekennwert":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"energieeffizienzklasse":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"befeuerungsart":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"verkaufstatus":{"anyOf":[{"type":"string","enum":["offen","reserviert","verkauft"]},{"type":"null"}]},"vermietet":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"kontakt_firma":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"kontakt_anrede":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"kontakt_vorname":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"kontakt_name":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"kontakt_email":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"kontakt_tel":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"kontakt_url":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"eigentuemer_name":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"eigentuemer_email":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"eigentuemer_tel":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"openimmo_obid":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"stand_vom":{"anyOf":[{"type":"string"},{"type":"null"}]},"openimmo_roh":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"beschreibung":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"ausstattung_text":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"lage_text":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"sonstiges_text":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"openimmo_extra":{"type":"object","properties":{"balkon":{"type":"boolean"},"terrasse":{"type":"boolean"},"garten":{"type":"boolean"},"keller":{"type":"boolean"},"dachboden":{"type":"boolean"},"aufzug":{"type":"boolean"},"einbaukueche":{"type":"boolean"},"gaeste_wc":{"type":"boolean"},"kamin":{"type":"boolean"},"klimatisiert":{"type":"boolean"},"sauna":{"type":"boolean"},"swimmingpool":{"type":"boolean"},"wintergarten":{"type":"boolean"},"barrierefrei":{"type":"boolean"},"rollstuhlgerecht":{"type":"boolean"},"moebliert":{"type":"string","enum":["nein","teil","voll"]},"stellplatz_art":{"type":"string","enum":["garage","tiefgarage","carport","aussen","parkhaus","keiner"]},"anzahl_stellplaetze":{"type":"integer","minimum":0,"maximum":9007199254740991},"objektzustand":{"type":"string","enum":["ERSTBEZUG","NEUWERTIG","GEPFLEGT","MODERNISIERT","RENOVIERUNGSBEDUERFTIG","SANIERUNGSBEDUERFTIG","NACH_VEREINBARUNG"]},"heizungsart":{"type":"string","enum":["zentral","fussboden","etage","fern","ofen","waermepumpe"]},"energietraeger":{"type":"string","enum":["gas","oel","fernwaerme","elektro","solar","erdwaerme","pellet","luftwp"]},"energie_ausstelldatum":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"energie_gueltig_bis":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"energie_mit_warmwasser":{"type":"boolean"},"energie_baujahr":{"type":"integer","minimum":0,"maximum":9007199254740991},"verfuegbar_ab":{"type":"string","maxLength":255},"als_ferien":{"type":"boolean"},"anzahl_betten":{"type":"integer","minimum":0,"maximum":9007199254740991},"min_mietdauer":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"min_mietdauer_einheit":{"type":"string","enum":["TAG","WOCHE","MONAT","JAHR"]},"max_mietdauer":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"max_mietdauer_einheit":{"type":"string","enum":["TAG","WOCHE","MONAT","JAHR"]},"nichtraucher":{"type":"boolean"},"haustiere":{"type":"string","enum":["ja","nein","auf_anfrage"]},"wlan":{"type":"boolean"},"tv":{"type":"boolean"},"waschmaschine":{"type":"boolean"},"geschirrspueler":{"type":"boolean"},"endreinigung":{"type":"number","minimum":0},"kurtaxe_text":{"type":"string","maxLength":2000},"check_in_ab":{"type":"string","maxLength":255},"check_out_bis":{"type":"string","maxLength":255},"zusatzleistungen":{"type":"string","maxLength":2000},"hausgeld":{"type":"number","minimum":0},"courtage_text":{"type":"string","maxLength":2000},"erschliessungskosten":{"type":"string","maxLength":2000},"kennung_ursprung":{"type":"string","maxLength":255},"dreizeiler":{"type":"string","maxLength":2000},"distanzen":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number","minimum":0}},"weitergabe_generell":{"type":"boolean"},"weitergabe_positiv":{"type":"string","maxLength":2000},"weitergabe_negativ":{"type":"string","maxLength":2000}},"additionalProperties":{}},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"kind":{"type":"string"},"category":{"anyOf":[{"type":"string"},{"type":"null"}]},"sort_order":{"type":"number"}},"required":["url","kind","category","sort_order"],"additionalProperties":false}},"titelbild_url":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["titel","status","vermarktungsart","nutzungsart","objektart","id","workspace_id","created_at","updated_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}},"patch":{"summary":"Objekt aktualisieren","tags":["Objects"],"parameters":[{"name":"id","in":"path","required":true,"description":"Objekt-UUID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"titel":{"type":"string","minLength":1,"maxLength":255},"status":{"default":"draft","type":"string","enum":["draft","active","archived"]},"vermarktungsart":{"type":"string","enum":["KAUF","MIETE_PACHT"]},"nutzungsart":{"type":"string","enum":["WOHNEN","GEWERBE","ANLAGE","WAZ"]},"objektart":{"type":"string","enum":["haus","wohnung","grundstueck","gewerbe","ferien","tiny_house","sonstige"]},"objektart_subtype":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"objekt_nr":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"strasse":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"hausnummer":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"plz":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"ort":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"land":{"type":"string","maxLength":3},"etage":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"anzahl_etagen":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"geo_lat":{"anyOf":[{"type":"number"},{"type":"null"}]},"geo_lng":{"anyOf":[{"type":"number"},{"type":"null"}]},"adresse_sichtbar":{"type":"boolean"},"wohnflaeche":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"nutzflaeche":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"grundstuecksflaeche":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"anzahl_zimmer":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"anzahl_schlafzimmer":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"anzahl_badezimmer":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"max_personen":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":200},{"type":"null"}]},"parent_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"gruppen_kennung":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"master_sichtbar":{"type":"boolean"},"baujahr":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"kaufpreis":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"kaltmiete":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"warmmiete":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"nebenkosten":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"heizkosten":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"kaution":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"provision":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"waehrung":{"type":"string","maxLength":3},"preis_pro_m2":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"preis_pro_m2_ab":{"type":"boolean"},"preis_zeiteinheit":{"anyOf":[{"type":"string","enum":["TAG","WOCHE","MONAT","JAHR"]},{"type":"null"}]},"preis_ab":{"type":"boolean"},"preis_auf_anfrage":{"type":"boolean"},"mieteinnahmen_ist":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"x_fache":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"hausgeld":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"energieausweistyp":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"energiekennwert":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"energieeffizienzklasse":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"befeuerungsart":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"verkaufstatus":{"anyOf":[{"type":"string","enum":["offen","reserviert","verkauft"]},{"type":"null"}]},"vermietet":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"kontakt_firma":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"kontakt_anrede":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"kontakt_vorname":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"kontakt_name":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"kontakt_email":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"kontakt_tel":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"kontakt_url":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"eigentuemer_name":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"eigentuemer_email":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"eigentuemer_tel":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"openimmo_obid":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"stand_vom":{"anyOf":[{"type":"string"},{"type":"null"}]},"openimmo_roh":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"beschreibung":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"ausstattung_text":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"lage_text":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"sonstiges_text":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"openimmo_extra":{"type":"object","properties":{"balkon":{"type":"boolean"},"terrasse":{"type":"boolean"},"garten":{"type":"boolean"},"keller":{"type":"boolean"},"dachboden":{"type":"boolean"},"aufzug":{"type":"boolean"},"einbaukueche":{"type":"boolean"},"gaeste_wc":{"type":"boolean"},"kamin":{"type":"boolean"},"klimatisiert":{"type":"boolean"},"sauna":{"type":"boolean"},"swimmingpool":{"type":"boolean"},"wintergarten":{"type":"boolean"},"barrierefrei":{"type":"boolean"},"rollstuhlgerecht":{"type":"boolean"},"moebliert":{"type":"string","enum":["nein","teil","voll"]},"stellplatz_art":{"type":"string","enum":["garage","tiefgarage","carport","aussen","parkhaus","keiner"]},"anzahl_stellplaetze":{"type":"integer","minimum":0,"maximum":9007199254740991},"objektzustand":{"type":"string","enum":["ERSTBEZUG","NEUWERTIG","GEPFLEGT","MODERNISIERT","RENOVIERUNGSBEDUERFTIG","SANIERUNGSBEDUERFTIG","NACH_VEREINBARUNG"]},"heizungsart":{"type":"string","enum":["zentral","fussboden","etage","fern","ofen","waermepumpe"]},"energietraeger":{"type":"string","enum":["gas","oel","fernwaerme","elektro","solar","erdwaerme","pellet","luftwp"]},"energie_ausstelldatum":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"energie_gueltig_bis":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"energie_mit_warmwasser":{"type":"boolean"},"energie_baujahr":{"type":"integer","minimum":0,"maximum":9007199254740991},"verfuegbar_ab":{"type":"string","maxLength":255},"als_ferien":{"type":"boolean"},"anzahl_betten":{"type":"integer","minimum":0,"maximum":9007199254740991},"min_mietdauer":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"min_mietdauer_einheit":{"type":"string","enum":["TAG","WOCHE","MONAT","JAHR"]},"max_mietdauer":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"max_mietdauer_einheit":{"type":"string","enum":["TAG","WOCHE","MONAT","JAHR"]},"nichtraucher":{"type":"boolean"},"haustiere":{"type":"string","enum":["ja","nein","auf_anfrage"]},"wlan":{"type":"boolean"},"tv":{"type":"boolean"},"waschmaschine":{"type":"boolean"},"geschirrspueler":{"type":"boolean"},"endreinigung":{"type":"number","minimum":0},"kurtaxe_text":{"type":"string","maxLength":2000},"check_in_ab":{"type":"string","maxLength":255},"check_out_bis":{"type":"string","maxLength":255},"zusatzleistungen":{"type":"string","maxLength":2000},"hausgeld":{"type":"number","minimum":0},"courtage_text":{"type":"string","maxLength":2000},"erschliessungskosten":{"type":"string","maxLength":2000},"kennung_ursprung":{"type":"string","maxLength":255},"dreizeiler":{"type":"string","maxLength":2000},"distanzen":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number","minimum":0}},"weitergabe_generell":{"type":"boolean"},"weitergabe_positiv":{"type":"string","maxLength":2000},"weitergabe_negativ":{"type":"string","maxLength":2000}},"additionalProperties":{}}}}}}},"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"titel":{"type":"string","minLength":1,"maxLength":255},"status":{"default":"draft","type":"string","enum":["draft","active","archived"]},"vermarktungsart":{"type":"string","enum":["KAUF","MIETE_PACHT"]},"nutzungsart":{"type":"string","enum":["WOHNEN","GEWERBE","ANLAGE","WAZ"]},"objektart":{"type":"string","enum":["haus","wohnung","grundstueck","gewerbe","ferien","tiny_house","sonstige"]},"objektart_subtype":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"objekt_nr":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"strasse":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"hausnummer":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"plz":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"ort":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"land":{"type":"string","maxLength":3},"etage":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"anzahl_etagen":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"geo_lat":{"anyOf":[{"type":"number"},{"type":"null"}]},"geo_lng":{"anyOf":[{"type":"number"},{"type":"null"}]},"adresse_sichtbar":{"type":"boolean"},"wohnflaeche":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"nutzflaeche":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"grundstuecksflaeche":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"anzahl_zimmer":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"anzahl_schlafzimmer":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"anzahl_badezimmer":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"max_personen":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":200},{"type":"null"}]},"parent_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"gruppen_kennung":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"master_sichtbar":{"type":"boolean"},"baujahr":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"kaufpreis":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"kaltmiete":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"warmmiete":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"nebenkosten":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"heizkosten":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"kaution":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"provision":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"waehrung":{"type":"string","maxLength":3},"preis_pro_m2":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"preis_pro_m2_ab":{"type":"boolean"},"preis_zeiteinheit":{"anyOf":[{"type":"string","enum":["TAG","WOCHE","MONAT","JAHR"]},{"type":"null"}]},"preis_ab":{"type":"boolean"},"preis_auf_anfrage":{"type":"boolean"},"mieteinnahmen_ist":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"x_fache":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"hausgeld":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"energieausweistyp":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"energiekennwert":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"energieeffizienzklasse":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"befeuerungsart":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"verkaufstatus":{"anyOf":[{"type":"string","enum":["offen","reserviert","verkauft"]},{"type":"null"}]},"vermietet":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"kontakt_firma":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"kontakt_anrede":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"kontakt_vorname":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"kontakt_name":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"kontakt_email":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"kontakt_tel":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"kontakt_url":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"eigentuemer_name":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"eigentuemer_email":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"eigentuemer_tel":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"openimmo_obid":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"stand_vom":{"anyOf":[{"type":"string"},{"type":"null"}]},"openimmo_roh":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"beschreibung":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"ausstattung_text":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"lage_text":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"sonstiges_text":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"openimmo_extra":{"type":"object","properties":{"balkon":{"type":"boolean"},"terrasse":{"type":"boolean"},"garten":{"type":"boolean"},"keller":{"type":"boolean"},"dachboden":{"type":"boolean"},"aufzug":{"type":"boolean"},"einbaukueche":{"type":"boolean"},"gaeste_wc":{"type":"boolean"},"kamin":{"type":"boolean"},"klimatisiert":{"type":"boolean"},"sauna":{"type":"boolean"},"swimmingpool":{"type":"boolean"},"wintergarten":{"type":"boolean"},"barrierefrei":{"type":"boolean"},"rollstuhlgerecht":{"type":"boolean"},"moebliert":{"type":"string","enum":["nein","teil","voll"]},"stellplatz_art":{"type":"string","enum":["garage","tiefgarage","carport","aussen","parkhaus","keiner"]},"anzahl_stellplaetze":{"type":"integer","minimum":0,"maximum":9007199254740991},"objektzustand":{"type":"string","enum":["ERSTBEZUG","NEUWERTIG","GEPFLEGT","MODERNISIERT","RENOVIERUNGSBEDUERFTIG","SANIERUNGSBEDUERFTIG","NACH_VEREINBARUNG"]},"heizungsart":{"type":"string","enum":["zentral","fussboden","etage","fern","ofen","waermepumpe"]},"energietraeger":{"type":"string","enum":["gas","oel","fernwaerme","elektro","solar","erdwaerme","pellet","luftwp"]},"energie_ausstelldatum":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"energie_gueltig_bis":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"energie_mit_warmwasser":{"type":"boolean"},"energie_baujahr":{"type":"integer","minimum":0,"maximum":9007199254740991},"verfuegbar_ab":{"type":"string","maxLength":255},"als_ferien":{"type":"boolean"},"anzahl_betten":{"type":"integer","minimum":0,"maximum":9007199254740991},"min_mietdauer":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"min_mietdauer_einheit":{"type":"string","enum":["TAG","WOCHE","MONAT","JAHR"]},"max_mietdauer":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"max_mietdauer_einheit":{"type":"string","enum":["TAG","WOCHE","MONAT","JAHR"]},"nichtraucher":{"type":"boolean"},"haustiere":{"type":"string","enum":["ja","nein","auf_anfrage"]},"wlan":{"type":"boolean"},"tv":{"type":"boolean"},"waschmaschine":{"type":"boolean"},"geschirrspueler":{"type":"boolean"},"endreinigung":{"type":"number","minimum":0},"kurtaxe_text":{"type":"string","maxLength":2000},"check_in_ab":{"type":"string","maxLength":255},"check_out_bis":{"type":"string","maxLength":255},"zusatzleistungen":{"type":"string","maxLength":2000},"hausgeld":{"type":"number","minimum":0},"courtage_text":{"type":"string","maxLength":2000},"erschliessungskosten":{"type":"string","maxLength":2000},"kennung_ursprung":{"type":"string","maxLength":255},"dreizeiler":{"type":"string","maxLength":2000},"distanzen":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number","minimum":0}},"weitergabe_generell":{"type":"boolean"},"weitergabe_positiv":{"type":"string","maxLength":2000},"weitergabe_negativ":{"type":"string","maxLength":2000}},"additionalProperties":{}},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"kind":{"type":"string"},"category":{"anyOf":[{"type":"string"},{"type":"null"}]},"sort_order":{"type":"number"}},"required":["url","kind","category","sort_order"],"additionalProperties":false}},"titelbild_url":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["titel","status","vermarktungsart","nutzungsart","objektart","id","workspace_id","created_at","updated_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}},"delete":{"summary":"Objekt endgültig löschen (mit allen Bildern und Dokumenten)","tags":["Objects"],"parameters":[{"name":"id","in":"path","required":true,"description":"Objekt-UUID","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}}}}},"/v1/immo/suchprofile":{"get":{"summary":"Suchprofile auflisten","tags":["Suchprofile"],"parameters":[{"name":"limit","in":"query","required":false,"description":"Max. Anzahl (Default 50)","schema":{"type":"integer"}},{"name":"offset","in":"query","required":false,"description":"Offset","schema":{"type":"integer"}},{"name":"aktiv","in":"query","required":false,"description":"Nur aktive (true) oder stillgelegte (false) Profile","schema":{"type":"boolean"}},{"name":"kontakt_ref","in":"query","required":false,"description":"Nur Profile mit diesem Personenverweis (UUID, Migration 617)","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"email":{"anyOf":[{"anyOf":[{"type":"string","const":""},{"type":"string","maxLength":255,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}]},{"type":"null"}]},"telefon":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"notiz":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"vermarktungsart":{"anyOf":[{"type":"string","enum":["KAUF","MIETE_PACHT"]},{"type":"null"}]},"objektarten":{"anyOf":[{"type":"array","items":{"type":"string","enum":["haus","wohnung","grundstueck","gewerbe","ferien","tiny_house","sonstige"]}},{"type":"null"}]},"ort":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"plz_praefix":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}]},"preis_von":{"anyOf":[{"anyOf":[{"type":"string","const":""},{"type":"number","minimum":0}]},{"type":"null"}]},"preis_bis":{"anyOf":[{"anyOf":[{"type":"string","const":""},{"type":"number","minimum":0}]},{"type":"null"}]},"flaeche_von":{"anyOf":[{"anyOf":[{"type":"string","const":""},{"type":"number","minimum":0}]},{"type":"null"}]},"zimmer_von":{"anyOf":[{"anyOf":[{"type":"string","const":""},{"type":"number","minimum":0}]},{"type":"null"}]},"aktiv":{"default":true,"type":"boolean"},"kontakt_ref":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"kontakt_quelle":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"created_by":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"created_at":{"type":"string"}},"required":["name","id","workspace_id","created_by","created_at"]}},"total":{"type":"number"}},"required":["data","total"]}}}}}},"post":{"summary":"Suchprofil anlegen","tags":["Suchprofile"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"email":{"anyOf":[{"anyOf":[{"type":"string","const":""},{"type":"string","maxLength":255,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}]},{"type":"null"}]},"telefon":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"notiz":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"vermarktungsart":{"anyOf":[{"type":"string","enum":["KAUF","MIETE_PACHT"]},{"type":"null"}]},"objektarten":{"anyOf":[{"type":"array","items":{"type":"string","enum":["haus","wohnung","grundstueck","gewerbe","ferien","tiny_house","sonstige"]}},{"type":"null"}]},"ort":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"plz_praefix":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}]},"preis_von":{"anyOf":[{"anyOf":[{"type":"string","const":""},{"type":"number","minimum":0}]},{"type":"null"}]},"preis_bis":{"anyOf":[{"anyOf":[{"type":"string","const":""},{"type":"number","minimum":0}]},{"type":"null"}]},"flaeche_von":{"anyOf":[{"anyOf":[{"type":"string","const":""},{"type":"number","minimum":0}]},{"type":"null"}]},"zimmer_von":{"anyOf":[{"anyOf":[{"type":"string","const":""},{"type":"number","minimum":0}]},{"type":"null"}]},"aktiv":{"default":true,"type":"boolean"},"kontakt_ref":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"kontakt_quelle":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]}},"required":["name"]}}}},"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"email":{"anyOf":[{"anyOf":[{"type":"string","const":""},{"type":"string","maxLength":255,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}]},{"type":"null"}]},"telefon":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"notiz":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"vermarktungsart":{"anyOf":[{"type":"string","enum":["KAUF","MIETE_PACHT"]},{"type":"null"}]},"objektarten":{"anyOf":[{"type":"array","items":{"type":"string","enum":["haus","wohnung","grundstueck","gewerbe","ferien","tiny_house","sonstige"]}},{"type":"null"}]},"ort":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"plz_praefix":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}]},"preis_von":{"anyOf":[{"anyOf":[{"type":"string","const":""},{"type":"number","minimum":0}]},{"type":"null"}]},"preis_bis":{"anyOf":[{"anyOf":[{"type":"string","const":""},{"type":"number","minimum":0}]},{"type":"null"}]},"flaeche_von":{"anyOf":[{"anyOf":[{"type":"string","const":""},{"type":"number","minimum":0}]},{"type":"null"}]},"zimmer_von":{"anyOf":[{"anyOf":[{"type":"string","const":""},{"type":"number","minimum":0}]},{"type":"null"}]},"aktiv":{"default":true,"type":"boolean"},"kontakt_ref":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"kontakt_quelle":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"created_by":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"created_at":{"type":"string"}},"required":["name","id","workspace_id","created_by","created_at"]}},"required":["data"]}}}}}}},"/v1/immo/suchprofile/{id}":{"get":{"summary":"Suchprofil abrufen","tags":["Suchprofile"],"parameters":[{"name":"id","in":"path","required":true,"description":"Suchprofil-UUID","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"email":{"anyOf":[{"anyOf":[{"type":"string","const":""},{"type":"string","maxLength":255,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}]},{"type":"null"}]},"telefon":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"notiz":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"vermarktungsart":{"anyOf":[{"type":"string","enum":["KAUF","MIETE_PACHT"]},{"type":"null"}]},"objektarten":{"anyOf":[{"type":"array","items":{"type":"string","enum":["haus","wohnung","grundstueck","gewerbe","ferien","tiny_house","sonstige"]}},{"type":"null"}]},"ort":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"plz_praefix":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}]},"preis_von":{"anyOf":[{"anyOf":[{"type":"string","const":""},{"type":"number","minimum":0}]},{"type":"null"}]},"preis_bis":{"anyOf":[{"anyOf":[{"type":"string","const":""},{"type":"number","minimum":0}]},{"type":"null"}]},"flaeche_von":{"anyOf":[{"anyOf":[{"type":"string","const":""},{"type":"number","minimum":0}]},{"type":"null"}]},"zimmer_von":{"anyOf":[{"anyOf":[{"type":"string","const":""},{"type":"number","minimum":0}]},{"type":"null"}]},"aktiv":{"default":true,"type":"boolean"},"kontakt_ref":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"kontakt_quelle":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"created_by":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"created_at":{"type":"string"}},"required":["name","id","workspace_id","created_by","created_at"]}},"required":["data"]}}}}}},"patch":{"summary":"Suchprofil vollständig ersetzen (kein Teil-Update)","tags":["Suchprofile"],"parameters":[{"name":"id","in":"path","required":true,"description":"Suchprofil-UUID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"email":{"anyOf":[{"anyOf":[{"type":"string","const":""},{"type":"string","maxLength":255,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}]},{"type":"null"}]},"telefon":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"notiz":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"vermarktungsart":{"anyOf":[{"type":"string","enum":["KAUF","MIETE_PACHT"]},{"type":"null"}]},"objektarten":{"anyOf":[{"type":"array","items":{"type":"string","enum":["haus","wohnung","grundstueck","gewerbe","ferien","tiny_house","sonstige"]}},{"type":"null"}]},"ort":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"plz_praefix":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}]},"preis_von":{"anyOf":[{"anyOf":[{"type":"string","const":""},{"type":"number","minimum":0}]},{"type":"null"}]},"preis_bis":{"anyOf":[{"anyOf":[{"type":"string","const":""},{"type":"number","minimum":0}]},{"type":"null"}]},"flaeche_von":{"anyOf":[{"anyOf":[{"type":"string","const":""},{"type":"number","minimum":0}]},{"type":"null"}]},"zimmer_von":{"anyOf":[{"anyOf":[{"type":"string","const":""},{"type":"number","minimum":0}]},{"type":"null"}]},"aktiv":{"default":true,"type":"boolean"},"kontakt_ref":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"kontakt_quelle":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]}},"required":["name"]}}}},"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"email":{"anyOf":[{"anyOf":[{"type":"string","const":""},{"type":"string","maxLength":255,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}]},{"type":"null"}]},"telefon":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"notiz":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"vermarktungsart":{"anyOf":[{"type":"string","enum":["KAUF","MIETE_PACHT"]},{"type":"null"}]},"objektarten":{"anyOf":[{"type":"array","items":{"type":"string","enum":["haus","wohnung","grundstueck","gewerbe","ferien","tiny_house","sonstige"]}},{"type":"null"}]},"ort":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"plz_praefix":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}]},"preis_von":{"anyOf":[{"anyOf":[{"type":"string","const":""},{"type":"number","minimum":0}]},{"type":"null"}]},"preis_bis":{"anyOf":[{"anyOf":[{"type":"string","const":""},{"type":"number","minimum":0}]},{"type":"null"}]},"flaeche_von":{"anyOf":[{"anyOf":[{"type":"string","const":""},{"type":"number","minimum":0}]},{"type":"null"}]},"zimmer_von":{"anyOf":[{"anyOf":[{"type":"string","const":""},{"type":"number","minimum":0}]},{"type":"null"}]},"aktiv":{"default":true,"type":"boolean"},"kontakt_ref":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"kontakt_quelle":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"created_by":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"created_at":{"type":"string"}},"required":["name","id","workspace_id","created_by","created_at"]}},"required":["data"]}}}}}},"delete":{"summary":"Suchprofil endgültig löschen (kein Papierkorb)","tags":["Suchprofile"],"parameters":[{"name":"id","in":"path","required":true,"description":"Suchprofil-UUID","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}}}}},"/v1/immo/aktivitaeten":{"get":{"summary":"Aktivitäten auflisten","tags":["Aktivitäten"],"parameters":[{"name":"limit","in":"query","required":false,"description":"Max. Anzahl (Default 50)","schema":{"type":"integer"}},{"name":"offset","in":"query","required":false,"description":"Offset","schema":{"type":"integer"}},{"name":"object_id","in":"query","required":false,"description":"Nur Aktivitäten dieses Objekts (UUID)","schema":{"type":"string"}},{"name":"profile_id","in":"query","required":false,"description":"Nur Aktivitäten dieses Suchprofils (UUID)","schema":{"type":"string"}},{"name":"art","in":"query","required":false,"description":"Nur diese Art (besichtigung, anruf, email, notiz, angebot, reservierung, abschluss, absage, sonstiges)","schema":{"type":"string"}},{"name":"faellig_bis","in":"query","required":false,"description":"Nur fällig bis zu diesem Zeitpunkt (ISO)","schema":{"type":"string"}},{"name":"kontakt_ref","in":"query","required":false,"description":"Nur Aktivitäten mit diesem Personenverweis (UUID, Migration 617)","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"object_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"search_profile_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"art":{"type":"string","enum":["besichtigung","anruf","email","notiz","angebot","reservierung","abschluss","absage","sonstiges"]},"titel":{"type":"string","minLength":1,"maxLength":255},"notiz":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"faellig_am":{"anyOf":[{"anyOf":[{"type":"string","const":""},{"type":"string"}]},{"type":"null"}]},"kontakt_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"kontakt_email":{"anyOf":[{"anyOf":[{"type":"string","const":""},{"type":"string","maxLength":255,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}]},{"type":"null"}]},"kontakt_telefon":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"kontakt_ref":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"kontakt_quelle":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"created_by":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"erledigt_am":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["art","titel","id","workspace_id","created_by","created_at","updated_at","erledigt_am"]}},"total":{"type":"number"}},"required":["data","total"]}}}}}},"post":{"summary":"Aktivität anlegen","tags":["Aktivitäten"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"object_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"search_profile_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"art":{"type":"string","enum":["besichtigung","anruf","email","notiz","angebot","reservierung","abschluss","absage","sonstiges"]},"titel":{"type":"string","minLength":1,"maxLength":255},"notiz":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"faellig_am":{"anyOf":[{"anyOf":[{"type":"string","const":""},{"type":"string"}]},{"type":"null"}]},"kontakt_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"kontakt_email":{"anyOf":[{"anyOf":[{"type":"string","const":""},{"type":"string","maxLength":255,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}]},{"type":"null"}]},"kontakt_telefon":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"kontakt_ref":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"kontakt_quelle":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]}},"required":["art","titel"]}}}},"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"object_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"search_profile_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"art":{"type":"string","enum":["besichtigung","anruf","email","notiz","angebot","reservierung","abschluss","absage","sonstiges"]},"titel":{"type":"string","minLength":1,"maxLength":255},"notiz":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"faellig_am":{"anyOf":[{"anyOf":[{"type":"string","const":""},{"type":"string"}]},{"type":"null"}]},"kontakt_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"kontakt_email":{"anyOf":[{"anyOf":[{"type":"string","const":""},{"type":"string","maxLength":255,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}]},{"type":"null"}]},"kontakt_telefon":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"kontakt_ref":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"kontakt_quelle":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"created_by":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"erledigt_am":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["art","titel","id","workspace_id","created_by","created_at","updated_at","erledigt_am"]}},"required":["data"]}}}}}}},"/v1/immo/aktivitaeten/{id}":{"get":{"summary":"Aktivität abrufen","tags":["Aktivitäten"],"parameters":[{"name":"id","in":"path","required":true,"description":"Aktivitäts-UUID","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"object_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"search_profile_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"art":{"type":"string","enum":["besichtigung","anruf","email","notiz","angebot","reservierung","abschluss","absage","sonstiges"]},"titel":{"type":"string","minLength":1,"maxLength":255},"notiz":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"faellig_am":{"anyOf":[{"anyOf":[{"type":"string","const":""},{"type":"string"}]},{"type":"null"}]},"kontakt_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"kontakt_email":{"anyOf":[{"anyOf":[{"type":"string","const":""},{"type":"string","maxLength":255,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}]},{"type":"null"}]},"kontakt_telefon":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"kontakt_ref":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"kontakt_quelle":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"created_by":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"erledigt_am":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["art","titel","id","workspace_id","created_by","created_at","updated_at","erledigt_am"]}},"required":["data"]}}}}}},"patch":{"summary":"Aktivität vollständig ersetzen (kein Teil-Update)","tags":["Aktivitäten"],"parameters":[{"name":"id","in":"path","required":true,"description":"Aktivitäts-UUID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"object_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"search_profile_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"art":{"type":"string","enum":["besichtigung","anruf","email","notiz","angebot","reservierung","abschluss","absage","sonstiges"]},"titel":{"type":"string","minLength":1,"maxLength":255},"notiz":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"faellig_am":{"anyOf":[{"anyOf":[{"type":"string","const":""},{"type":"string"}]},{"type":"null"}]},"kontakt_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"kontakt_email":{"anyOf":[{"anyOf":[{"type":"string","const":""},{"type":"string","maxLength":255,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}]},{"type":"null"}]},"kontakt_telefon":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"kontakt_ref":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"kontakt_quelle":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]}},"required":["art","titel"]}}}},"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"object_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"search_profile_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"art":{"type":"string","enum":["besichtigung","anruf","email","notiz","angebot","reservierung","abschluss","absage","sonstiges"]},"titel":{"type":"string","minLength":1,"maxLength":255},"notiz":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"faellig_am":{"anyOf":[{"anyOf":[{"type":"string","const":""},{"type":"string"}]},{"type":"null"}]},"kontakt_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"kontakt_email":{"anyOf":[{"anyOf":[{"type":"string","const":""},{"type":"string","maxLength":255,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}]},{"type":"null"}]},"kontakt_telefon":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"kontakt_ref":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"kontakt_quelle":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"created_by":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"erledigt_am":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["art","titel","id","workspace_id","created_by","created_at","updated_at","erledigt_am"]}},"required":["data"]}}}}}},"delete":{"summary":"Aktivität endgültig löschen (kein Papierkorb)","tags":["Aktivitäten"],"parameters":[{"name":"id","in":"path","required":true,"description":"Aktivitäts-UUID","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}}}}},"/v1/immo/freigaben":{"get":{"summary":"Exposé-Freigaben auflisten (Token nur bei aktivem Zustand)","tags":["Freigaben"],"parameters":[{"name":"limit","in":"query","required":false,"description":"Max. Anzahl (Default 50)","schema":{"type":"integer"}},{"name":"offset","in":"query","required":false,"description":"Offset","schema":{"type":"integer"}},{"name":"object_id","in":"query","required":false,"description":"Nur Freigaben dieses Objekts (UUID)","schema":{"type":"string"}},{"name":"aktiv","in":"query","required":false,"description":"Nur widerrufene/abgelaufene (false) oder aktive (true) Freigaben","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"object_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"label":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"ablauf_am":{"anyOf":[{"anyOf":[{"type":"string","const":""},{"type":"string"}]},{"type":"null"}]},"adresse_sichtbar":{"default":false,"type":"boolean"},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"created_by":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"token":{"type":"string"},"zustand":{"type":"string","enum":["aktiv","widerrufen","abgelaufen"]},"aufrufe":{"type":"number"},"zuletzt_gesehen_am":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["object_id","id","workspace_id","created_by","zustand","aufrufe","zuletzt_gesehen_am","created_at","updated_at"]}},"total":{"type":"number"}},"required":["data","total"]}}}}}},"post":{"summary":"Exposé-Freigabe anlegen (Token wird serverseitig erzeugt)","tags":["Freigaben"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"object_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"label":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"ablauf_am":{"anyOf":[{"anyOf":[{"type":"string","const":""},{"type":"string"}]},{"type":"null"}]},"adresse_sichtbar":{"default":false,"type":"boolean"}},"required":["object_id"]}}}},"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"object_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"label":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"ablauf_am":{"anyOf":[{"anyOf":[{"type":"string","const":""},{"type":"string"}]},{"type":"null"}]},"adresse_sichtbar":{"default":false,"type":"boolean"},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"created_by":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"token":{"type":"string"},"zustand":{"type":"string","enum":["aktiv","widerrufen","abgelaufen"]},"aufrufe":{"type":"number"},"zuletzt_gesehen_am":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["object_id","id","workspace_id","created_by","zustand","aufrufe","zuletzt_gesehen_am","created_at","updated_at"]}},"required":["data"]}}}}}}},"/v1/immo/freigaben/{id}":{"get":{"summary":"Exposé-Freigabe abrufen (Token nur bei aktivem Zustand)","tags":["Freigaben"],"parameters":[{"name":"id","in":"path","required":true,"description":"Freigabe-UUID","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"object_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"label":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"ablauf_am":{"anyOf":[{"anyOf":[{"type":"string","const":""},{"type":"string"}]},{"type":"null"}]},"adresse_sichtbar":{"default":false,"type":"boolean"},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"created_by":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"token":{"type":"string"},"zustand":{"type":"string","enum":["aktiv","widerrufen","abgelaufen"]},"aufrufe":{"type":"number"},"zuletzt_gesehen_am":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["object_id","id","workspace_id","created_by","zustand","aufrufe","zuletzt_gesehen_am","created_at","updated_at"]}},"required":["data"]}}}}}},"patch":{"summary":"Exposé-Freigabe ändern, u.a. widerrufen mit {aktiv:false}","tags":["Freigaben"],"parameters":[{"name":"id","in":"path","required":true,"description":"Freigabe-UUID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"ablauf_am":{"anyOf":[{"anyOf":[{"type":"string","const":""},{"type":"string"}]},{"type":"null"}]},"adresse_sichtbar":{"type":"boolean"},"aktiv":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"object_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"label":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"ablauf_am":{"anyOf":[{"anyOf":[{"type":"string","const":""},{"type":"string"}]},{"type":"null"}]},"adresse_sichtbar":{"default":false,"type":"boolean"},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"created_by":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"token":{"type":"string"},"zustand":{"type":"string","enum":["aktiv","widerrufen","abgelaufen"]},"aufrufe":{"type":"number"},"zuletzt_gesehen_am":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["object_id","id","workspace_id","created_by","zustand","aufrufe","zuletzt_gesehen_am","created_at","updated_at"]}},"required":["data"]}}}}}},"delete":{"summary":"Exposé-Freigabe endgültig löschen (fürs Widerrufen: PATCH {aktiv:false})","tags":["Freigaben"],"parameters":[{"name":"id","in":"path","required":true,"description":"Freigabe-UUID","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}}}}},"/v1/mail/messages":{"get":{"summary":"Nachrichten auflisten oder durchsuchen","description":"Drei Wege in einem Aufruf: `search` (Betreff/Absender/Text, mit den Operatoren `from:`, `to:`, `subject:`, `has:attachment`), `folder` (ein Ordner) und — ohne beides — die neuesten Mails aller Ordner aller Postfächer. `_shown`/`_total` nennen den Ausschnitt.","tags":["Nachrichten"],"parameters":[{"name":"search","in":"query","required":false,"description":"Suchbegriff; Operatoren from:, to:, subject:, has:attachment","schema":{"type":"string"}},{"name":"folder","in":"query","required":false,"description":"Ordner: UUID ODER Name (wird gegen die Ordner des Kontos aufgelöst). Ohne `account` gilt derselbe Ordner in mehreren Postfächern (gleiche Rolle oder gleicher Name) für alle, siehe `_ordner_vereint`","schema":{"type":"string"}},{"name":"account","in":"query","required":false,"description":"Postfach: Konto-UUID ODER E-Mail-Adresse. Ohne Angabe alle Postfächer des Arbeitsbereichs.","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Anzahl Zeilen (Vorgabe 100, max. 200; mit include_body Vorgabe 50, max. 100)","schema":{"type":"integer"}},{"name":"offset","in":"query","required":false,"description":"Zeilen überspringen (Sortierung Datum absteigend, dann id)","schema":{"type":"integer"}},{"name":"include_body","in":"query","required":false,"description":"Für Workflows: je Zeile to, cc, text, html, attachments (Text bis 50.000 Zeichen)","schema":{"type":"boolean"}},{"name":"include_spam_trash","in":"query","required":false,"description":"Spam und Papierkorb einbeziehen (Vorgabe true)","schema":{"type":"boolean"}},{"name":"since","in":"query","required":false,"description":"Nur Mails ab diesem Zeitpunkt (2026-07-26 = Tagesbeginn in der Zone der Person, sonst Europe/Berlin; oder 2026-07-26T08:00:00Z)","schema":{"type":"string"}},{"name":"before","in":"query","required":false,"description":"Nur Mails vor diesem Zeitpunkt","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"subject":{"type":"string"},"from":{"type":"string"},"senderEmail":{"type":"string"},"date":{"anyOf":[{"type":"string"},{"type":"null"}]},"seen":{"type":"boolean"},"starred":{"type":"boolean"},"folderId":{"type":"string"},"folder":{"anyOf":[{"type":"string"},{"type":"null"}]},"account":{"anyOf":[{"type":"string"},{"type":"null"}]},"snippet":{"type":"string"},"to":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"}},"required":["email"]}},"cc":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"}},"required":["email"]}},"text":{"anyOf":[{"type":"string"},{"type":"null"}]},"html":{"anyOf":[{"type":"string"},{"type":"null"}]},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"filename":{"anyOf":[{"type":"string"},{"type":"null"}]},"contentType":{"anyOf":[{"type":"string"},{"type":"null"}]},"size":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","filename","contentType","size"]}},"text_gekuerzt":{"type":"boolean"},"text_fehler":{"type":"string"}},"required":["id","subject","from","date","seen","starred","folderId","folder","account","snippet"]}},"_shown":{"type":"number"},"_total":{"type":"number"},"counts":{"type":"object","properties":{"accounts":{"type":"number"},"folders":{"type":"number"},"messages":{"type":"number"},"shown":{"type":"number"}},"required":["accounts","folders","messages","shown"]},"_hint":{"type":"string"},"_folder":{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name"]},"_ordner_vereint":{"type":"object","properties":{"name":{"type":"string"},"anzahl":{"type":"number"},"postfaecher":{"type":"array","items":{"type":"string"}}},"required":["name","anzahl","postfaecher"]},"_range":{"type":"object","properties":{"since":{"anyOf":[{"type":"string"},{"type":"null"}]},"before":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["since","before"]},"_offset":{"type":"number"},"_text_fehler":{"type":"number"},"_nicht_durchsucht":{"type":"object","properties":{"anzahl":{"anyOf":[{"type":"number"},{"type":"null"}]},"postfaecher":{"type":"array","items":{"type":"string"}},"hinweis":{"type":"string"}},"required":["anzahl","postfaecher","hinweis"]},"zustand":{"const":"kein_postfach"},"_total_mindestens":{"type":"boolean"}},"required":["data","_shown","_total"]}}}}}},"patch":{"summary":"Mehrere Nachrichten markieren, verschieben oder mit einem Label versehen","description":"Bewusst ohne `delete` — Löschen läuft über DELETE (eigener Scope). Max. 200 ids je Aufruf. Ziel beim Verschieben: `targetFolderId`, ODER `targetFolder` (Name/Pfad) bzw. `targetRole` (`archive`, `inbox`) — beides je Postfach der Mails aufgelöst, mehrdeutig → 409 mit Kandidaten. `label`/`unlabel` verlangen `label` (Name, Groß/Klein egal, oder id): ein unbekannter Name wird bei `label` angelegt (403 ohne aktives Abo), unbekannt bei `unlabel` → 404 mit `details.labels`. Die Antwort nennt dann `label: {id, name, angelegt}`.","tags":["Nachrichten"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"maxItems":200},"action":{"type":"string","enum":["read","unread","star","unstar","move","label","unlabel"]},"targetFolderId":{"type":"string","minLength":1},"targetFolder":{"type":"string","minLength":1},"targetRole":{"type":"string","enum":["archive","inbox"]},"label":{"type":"string","minLength":1,"maxLength":60}},"required":["ids","action"]}}}},"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"action":{"type":"string"},"succeeded":{"type":"number"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"reason":{"type":"string"}},"required":["id","reason"]}},"ziele":{"type":"array","items":{"type":"object","properties":{"account":{"type":"string"},"folder_id":{"type":"string"},"folder":{"type":"string"}},"required":["account","folder_id","folder"]}},"label":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"angelegt":{"type":"boolean"}},"required":["id","name","angelegt"]}},"required":["action","succeeded","failed"]}},"required":["data"]}}}}}},"delete":{"summary":"Mehrere Nachrichten löschen (Papierkorb)","tags":["Nachrichten"],"parameters":[{"name":"ids","in":"query","required":true,"description":"Kommagetrennte Nachrichten-IDs (1 bis 200)","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"action":{"type":"string"},"succeeded":{"type":"number"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"reason":{"type":"string"}},"required":["id","reason"]}},"ziele":{"type":"array","items":{"type":"object","properties":{"account":{"type":"string"},"folder_id":{"type":"string"},"folder":{"type":"string"}},"required":["account","folder_id","folder"]}},"label":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"angelegt":{"type":"boolean"}},"required":["id","name","angelegt"]}},"required":["action","succeeded","failed"]}},"required":["data"]}}}}}}},"/v1/mail/messages/uebergeben":{"post":{"summary":"Mails an ein anderes Postfach übergeben","description":"Für Mails im falschen Postfach desselben Arbeitsbereichs: die Originalmail geht unverändert in den Posteingang von `target_account` (Konto-UUID oder Adresse), das Original wandert im Quellpostfach nach „Weitergeleitet“ — nie in den Papierkorb (Aufbewahrungspflicht). Braucht Bearbeiten an beiden Postfächern.","tags":["Nachrichten"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"maxItems":200},"target_account":{"type":"string","minLength":1}},"required":["ids","target_account"]}}}},"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"uebergeben":{"type":"number"},"ziel":{"type":"string"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"reason":{"type":"string"}},"required":["id","reason"]}}},"required":["uebergeben","ziel","failed"]}},"required":["data"]}}}}}}},"/v1/mail/messages/{id}/einladung":{"post":{"summary":"Kalendereinladung beantworten","description":"Zusagen (`accepted`), absagen (`declined`) oder unter Vorbehalt (`tentative`). Die Antwort geht an den Organisator (iTIP-Mail oder über das verbundene Kalenderkonto) und lässt sich nicht zurückholen; die Zusage trägt den Termin in den Kalender ein. Braucht Senden im Postfach. 422: Einladung abgesagt oder ohne Organisator.","tags":["Nachrichten"],"parameters":[{"name":"id","in":"path","required":true,"description":"Nachrichten-UUID der Einladungsmail","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"antwort":{"type":"string","enum":["accepted","declined","tentative"]}},"required":["antwort"]}}}},"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"antwort":{"type":"string","enum":["accepted","declined","tentative"]},"meldung":{"type":"string"},"hinweis":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","antwort","meldung","hinweis"]}},"required":["data"]}}}}}}},"/v1/mail/messages/{id}":{"get":{"summary":"Nachricht mit Text und Anhang-Metadaten abrufen","tags":["Nachrichten"],"parameters":[{"name":"id","in":"path","required":true,"description":"Nachrichten-UUID","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"subject":{"anyOf":[{"type":"string"},{"type":"null"}]},"from":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"}},"required":["email"]},{"type":"null"}]},"to":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"}},"required":["email"]}},{"type":"null"}]},"cc":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"}},"required":["email"]}},{"type":"null"}]},"date":{"anyOf":[{"type":"string"},{"type":"null"}]},"seen":{"type":"boolean"},"starred":{"type":"boolean"},"text":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"filename":{"anyOf":[{"type":"string"},{"type":"null"}]},"contentType":{"anyOf":[{"type":"string"},{"type":"null"}]},"size":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","filename","contentType","size"]}}},"required":["id","subject","from","to","cc","date","seen","starred","text","attachments"]}},"required":["data"]}}}}}},"patch":{"summary":"Nachricht markieren oder verschieben","tags":["Nachrichten"],"parameters":[{"name":"id","in":"path","required":true,"description":"Nachrichten-UUID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["read","unread","star","unstar","move"]},"targetFolderId":{"type":"string","minLength":1}},"required":["action"]}}}},"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"required":["ok"]}}}}}},"delete":{"summary":"Nachricht löschen (Papierkorb)","tags":["Nachrichten"],"parameters":[{"name":"id","in":"path","required":true,"description":"Nachrichten-UUID","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"required":["ok"]}}}}}}},"/v1/mail/attachments/{id}/uebergabe":{"get":{"summary":"Empfangenen Anhang an einen Workflow-Lauf übergeben (nur Workflow-Bausteine)","description":"Signierter Pfad zu den Bytes eines Anhangs, 60 s gültig, relativ zur Speicher-Wurzel. Nur mit Nachweis der Workflow-Engine (sonst 403); höchstens 50 MB je Datei (sonst 413). Anhang-IDs liefert `GET /api/v1/mail/messages/{id}` unter `attachments`.","tags":["Nachrichten"],"parameters":[{"name":"id","in":"path","required":true,"description":"Anhang-UUID","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"size_bytes":{"anyOf":[{"type":"number"},{"type":"null"}]},"pfad":{"type":"string"},"gueltig_sekunden":{"type":"number"},"gueltig_bis":{"type":"string"}},"required":["id","name","mime_type","size_bytes","pfad","gueltig_sekunden","gueltig_bis"]}},"required":["data"]}}}}}}},"/v1/mail/folders":{"get":{"summary":"Postfächer mit ihren Ordnern auflisten","description":"`total` zählt live aus den Nachrichten, nicht aus dem Ordner-Snapshot. Die Ordner kommen sortiert: Posteingang, dann die nicht-leeren nach Anzahl absteigend. `nachrichtenziel: false` (`art` gmailwurzel/gmailsicht/sammel/…) = Behälter oder Sicht des Mailservers, kein Ziel zum Verschieben. Hat das Postfach einen `ordner_basis` (Wurzelordner), sind seine Ordner die darunter; `ausserhalb_basis: true` gehört anderen Adressen desselben Proton-Kontos oder ist Altbestand und fehlt in der Oberfläche des Postfachs.","tags":["Ordner"],"parameters":[{"name":"account","in":"query","required":false,"description":"Postfach: Konto-UUID ODER E-Mail-Adresse. Ohne Angabe alle Postfächer des Arbeitsbereichs.","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"sync_status":{"type":"string"},"ordner_basis":{"type":"string"},"folder_summary":{"type":"object","properties":{"system":{"type":"number"},"custom":{"type":"number"},"custom_with_messages":{"type":"number"},"custom_empty":{"type":"number"},"custom_empty_nur_hier":{"type":"number"},"custom_never_synced":{"type":"number"},"server_views":{"type":"number"}},"required":["system","custom","custom_with_messages","custom_empty","custom_empty_nur_hier","custom_never_synced","server_views"]},"folders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"role":{"anyOf":[{"type":"string"},{"type":"null"}]},"art":{"type":"string","enum":["eigen","sonder","sammel","ordnerwurzel","labelwurzel","label","sicht","gmailwurzel","gmailsicht"]},"nachrichtenziel":{"type":"boolean"},"unread_count":{"type":"number"},"total":{"type":"number"},"synced":{"type":"boolean"},"nebenan_total":{"type":"number"},"ausserhalb_basis":{"const":true},"basisordner":{"const":true}},"required":["id","name","role","art","nachrichtenziel","unread_count","total","synced"]}}},"required":["id","email","sync_status","folder_summary","folders"]}},"_nicht_durchsucht":{"type":"object","properties":{"anzahl":{"anyOf":[{"type":"number"},{"type":"null"}]},"postfaecher":{"type":"array","items":{"type":"string"}},"hinweis":{"type":"string"}},"required":["anzahl","postfaecher","hinweis"]}},"required":["data"]}}}}}},"post":{"summary":"Ordner anlegen","description":"`accountId` darf die Konto-UUID ODER die E-Mail-Adresse sein.","tags":["Ordner"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"accountId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"parentPath":{"type":"string","minLength":1}},"required":["accountId","name"]}}}},"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"path":{"type":"string"},"role":{"anyOf":[{"type":"string"},{"type":"null"}]},"pending_sync":{"type":"boolean"}},"required":["id","name","role"]}},"required":["data"]}}}}}},"delete":{"summary":"Mehrere Ordner löschen — nur nach Live-Zählung am Mailserver","description":"Jeder Ordner wird im Moment des Löschens per IMAP STATUS gezählt, samt Unterordnern und demselben Pfad in Postfächern am selben Server. Gelöscht wird bei 0 oder wenn `bestaetigt` für diesen Ordner genau die gemessene Zahl nennt; sonst steht er unter `nicht_leer`. Antwort immer 200, sortiert nach Ergebnis.","tags":["Ordner"],"parameters":[{"name":"ids","in":"path","required":true,"description":"Ordner-UUIDs, kommagetrennt (1 bis 50)","schema":{"type":"string"}},{"name":"bestaetigt","in":"path","required":true,"description":"`<ordner-id>:<anzahl>,…` — die zuvor gemessene und bestätigte Anzahl","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"action":{"const":"delete_folder"},"geloescht":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"nachrichten":{"type":"number"}},"required":["id","name","nachrichten"]}},"nicht_leer":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"nachrichten":{"type":"number"},"unterordner":{"type":"number"},"je_postfach":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string"},"nachrichten":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["email","nachrichten"]}}},"required":["id","name","nachrichten"]}},"ungeprueft":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"grund":{"type":"string"},"unterordner":{"type":"number"},"je_postfach":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string"},"nachrichten":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["email","nachrichten"]}}},"required":["id","name","grund"]}},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"reason":{"type":"string"}},"required":["id","reason"]}},"auch_betroffen":{"type":"array","items":{"type":"string"}}},"required":["action","geloescht","nicht_leer","ungeprueft","failed","auch_betroffen"]}},"required":["data"]}}}}}}},"/v1/mail/folders/{id}":{"patch":{"summary":"Ordner umbenennen","description":"Systemordner (Posteingang, Gesendet, Entwürfe, Papierkorb, Spam, Archiv) sind geschützt.","tags":["Ordner"],"parameters":[{"name":"id","in":"path","required":true,"description":"Ordner-UUID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1}},"required":["name"]}}}},"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]}},"required":["data"]}}}}}},"delete":{"summary":"Ordner löschen — nur nach Live-Zählung am Mailserver","description":"Leer am Server → gelöscht. Sonst 409 mit der gemessenen Zahl (`details.nachrichten`); mit `bestaetigt=<genau diese Zahl>` erneut aufrufen. Ohne Auskunft des Servers 503.","tags":["Ordner"],"parameters":[{"name":"id","in":"path","required":true,"description":"Ordner-UUID","schema":{"type":"string"}},{"name":"bestaetigt","in":"path","required":true,"description":"Die zuvor gemessene und bestätigte Anzahl Nachrichten","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"deleted_messages":{"type":"number"},"auch_betroffen":{"type":"array","items":{"type":"string"}}},"required":["id","name","deleted_messages","auch_betroffen"]}},"required":["data"]}}}}}}},"/v1/mail/filters":{"get":{"summary":"Regeln auflisten","tags":["Regeln"],"parameters":[{"name":"account","in":"query","required":false,"description":"Postfach: Konto-UUID ODER E-Mail-Adresse. Ohne Angabe alle Postfächer des Arbeitsbereichs.","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"account":{"anyOf":[{"type":"string"},{"type":"null"}]},"account_id":{"type":"string"},"enabled":{"type":"boolean"},"sort_order":{"type":"number"},"match_type":{"type":"string","enum":["all","any"]},"conditions":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"op":{"type":"string"},"value":{"type":"string"}},"required":["field","op","value"]}},"actions":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"folder_id":{"type":"string"},"folder":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["type"]}},"summary":{"type":"string"}},"required":["id","name","account","account_id","enabled","sort_order","match_type","conditions","actions","summary"]}},"_shown":{"type":"number"},"_total":{"type":"number"},"counts":{"type":"object","properties":{"filters":{"type":"number"},"enabled":{"type":"number"},"accounts":{"type":"number"}},"required":["filters","enabled","accounts"]}},"required":["data","_shown","_total","counts"]}}}}}},"post":{"summary":"Regel anlegen","description":"Der Zielordner einer `move`-Aktion darf ein NAME sein und wird gegen die Ordner desselben Kontos aufgelöst. Die Regel greift ab dann für NEU eintreffende Mails; Bestandsmails sortiert erst `POST /api/v1/mail/filters/apply`.","tags":["Regeln"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"account":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":120},"match_type":{"type":"string","enum":["all","any"],"default":"all"},"conditions":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["from","to","cc","subject","body","has_attachment","to_me"]},"op":{"type":"string","enum":["contains","equals","startswith"],"default":"contains"},"value":{"type":"string","minLength":1}},"required":["field","value"]},"minItems":1,"maxItems":10},"actions":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["move","mark_read","star","mark_spam","delete","set_label","uebergeben","stop"]},"folder":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"account":{"type":"string","minLength":1}},"required":["type"]},"minItems":1,"maxItems":5},"enabled":{"type":"boolean","default":true},"stop_processing":{"type":"boolean","default":false}},"required":["name","conditions","actions"]}}}},"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"account":{"anyOf":[{"type":"string"},{"type":"null"}]},"account_id":{"type":"string"},"enabled":{"type":"boolean"},"sort_order":{"type":"number"},"match_type":{"type":"string","enum":["all","any"]},"conditions":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"op":{"type":"string"},"value":{"type":"string"}},"required":["field","op","value"]}},"actions":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"folder_id":{"type":"string"},"folder":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["type"]}},"summary":{"type":"string"}},"required":["id","name","account","account_id","enabled","sort_order","match_type","conditions","actions","summary"]},"_hint":{"type":"string"}},"required":["data","_hint"]}}}}}},"delete":{"summary":"Regeln löschen","tags":["Regeln"],"parameters":[{"name":"ids","in":"query","required":true,"description":"Kommagetrennte Regel-IDs (1 bis 200)","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"action":{"type":"string"},"succeeded":{"type":"number"},"filters":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"account":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","account"]}},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"reason":{"type":"string"}},"required":["id","reason"]}}},"required":["action","succeeded","filters","failed"]}},"required":["data"]}}}}}}},"/v1/mail/filters/apply":{"post":{"summary":"Regeln auf Bestandsmails anwenden","description":"Ohne `folder` auf den Posteingang des Kontos. Geprüft werden die 300 neuesten Mails; ein Kappen meldet `_hint`.","tags":["Regeln"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"account":{"type":"string","minLength":1},"folder":{"type":"string","minLength":1}}}}}},"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"action":{"type":"string"},"account":{"type":"string"},"folder":{"type":"string"},"rules":{"type":"number"},"checked":{"type":"number"},"matched":{"type":"number"},"moved":{"type":"array","items":{"type":"object","properties":{"folder":{"anyOf":[{"type":"string"},{"type":"null"}]},"count":{"type":"number"}},"required":["folder","count"]}},"uebergeben":{"type":"array","items":{"type":"object","properties":{"account":{"anyOf":[{"type":"string"},{"type":"null"}]},"count":{"type":"number"}},"required":["account","count"]}},"marked":{"type":"number"},"starred":{"type":"number"},"deleted":{"type":"number"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"reason":{"type":"string"}},"required":["id","reason"]}}},"required":["action","account","folder","matched","moved","marked","starred","deleted","failed"]},"_hint":{"type":"string"}},"required":["data"]}}}}}}},"/v1/mail/send":{"post":{"summary":"Nachricht senden","description":"`accountId` darf die Konto-UUID ODER die Adresse sein; bei mehreren Postfächern ist sie Pflicht. Nur der Besitzer des Kontos darf in seinem Namen senden. `drive_datei_ids`: Dateien aus Janeway Drive als Anhang (Leserecht der Person, nur dieser Arbeitsbereich, zusammen höchstens 25 MB; ein Schlüssel braucht dazu `drive:read`, im Workflow-Lauf nie). Scheitert SMTP, sagt der Status den Fall (`error.details.failure`): 422 Adresse abgelehnt, 413 Nachricht zu groß, 503 Anbieter bremst vorübergehend, 502 Anmeldung oder unklar — bei 502 `unknown` kann die Mail schon draußen sein, also nicht blind wiederholen.","tags":["Senden"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"type":"array","items":{"anyOf":[{"type":"string","format":"email"},{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string","format":"email"}},"required":["email"]}]},"minItems":1,"maxItems":50},"cc":{"type":"array","items":{"anyOf":[{"type":"string","format":"email"},{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string","format":"email"}},"required":["email"]}]},"maxItems":50},"bcc":{"type":"array","items":{"anyOf":[{"type":"string","format":"email"},{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string","format":"email"}},"required":["email"]}]},"maxItems":50},"subject":{"type":"string"},"body_html":{"type":"string"},"body_text":{"type":"string"},"inReplyTo":{"type":"string"},"accountId":{"type":"string","minLength":1},"workflow_anhaenge":{"type":"array","items":{"type":"object","properties":{"pfad":{"type":"string","minLength":1,"maxLength":200,"description":"Speicherpfad des Binärteils: <Arbeitsbereich>/<Lauf>/<Kennung>"},"name":{"type":"string","minLength":1,"maxLength":255,"description":"Dateiname im Anhang; ohne Angabe der Name aus dem Lauf"}},"required":["pfad"]},"minItems":1,"maxItems":10,"description":"Dateien aus einem Workflow-Lauf als Anhang (nur für Workflow-Bausteine, ohne Nachweis der Engine 403). Höchstens 50 MB je Datei und 25 MB zusammen; jeder Pfad muss zu einer noch nicht abgelaufenen Datei eines Laufs dieses Arbeitsbereichs gehören."},"drive_datei_ids":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"maxItems":10,"description":"IDs von Dateien aus Janeway Drive als Anhang (höchstens 10, zusammen 25 MB). Nur Dateien des Arbeitsbereichs, die die Person sehen darf; Ordner und Papierkorb nicht."}},"required":["to","subject"]}}}},"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"required":["ok"]}}}}}}},"/v1/mail/senders/block":{"post":{"summary":"Absender sperren","description":"Legt die Filterregel „Blockiert: <adresse>“ an (künftige Post dieser Adresse landet im Spam-Ordner). Gilt für EIN Postfach (`account`, bei genau einem Postfach darf es fehlen). Idempotent, jederzeit umkehrbar mit `senders/unblock`. Braucht Verwalten (nur der Besitzer des Postfachs).","tags":["Absender"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","maxLength":320},"account":{"type":"string","minLength":1}},"required":["email"]}}}},"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"email":{"type":"string"},"account":{"type":"string"},"gesperrt":{"type":"boolean"},"neu":{"type":"boolean"}},"required":["email","account","gesperrt"]}},"required":["data"]}}}}}}},"/v1/mail/senders/unblock":{"post":{"summary":"Absender-Sperre aufheben","description":"Löscht die Sperr-Regel dieser Adresse im Postfach. War sie nicht gesperrt, ist das derselbe Endzustand (kein Fehler).","tags":["Absender"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","maxLength":320},"account":{"type":"string","minLength":1}},"required":["email"]}}}},"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"email":{"type":"string"},"account":{"type":"string"},"gesperrt":{"type":"boolean"},"neu":{"type":"boolean"}},"required":["email","account","gesperrt"]}},"required":["data"]}}}}}}},"/v1/mail/reply":{"post":{"summary":"Auf eine Nachricht antworten oder sie weiterleiten","description":"Betreff, Empfänger, Zitat und In-Reply-To kommen aus der Datenbank — übergeben wird nur die id der Originalnachricht und der EIGENE neue Text. `mode`: reply | reply_all | forward. `to` überschreibt die Empfänger und ist beim Weiterleiten faktisch Pflicht. SMTP-Fehler wie bei `POST /api/v1/mail/send` (422/413/503/502, `error.details.failure`).","tags":["Senden"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"mode":{"type":"string"},"body_text":{"type":"string"},"to":{"type":"array","items":{"anyOf":[{"type":"string","format":"email"},{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string","format":"email"}},"required":["email"]}]},"maxItems":50},"cc":{"type":"array","items":{"anyOf":[{"type":"string","format":"email"},{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string","format":"email"}},"required":["email"]}]},"maxItems":50}},"required":["id"]}}}},"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"action":{"type":"string","enum":["reply","forward"]},"from":{"type":"string"},"to":{"type":"array","items":{"type":"string"}},"cc":{"type":"array","items":{"type":"string"}},"subject":{"type":"string"},"original_subject":{"type":"string"},"quoted_chars":{"type":"number","description":"Zeichen des zitierten Originaltexts, ohne Zitatkopf und ohne '> '-Präfixe. 0 heißt: die Originalnachricht hatte keinen Text — es wurde nichts zitiert."},"attachments":{"type":"array","items":{"type":"string"}},"threaded":{"type":"boolean"}},"required":["action","from","to","cc","subject","original_subject","quoted_chars","attachments","threaded"]}},"required":["data"]}}}}}}},"/v1/mail/drafts":{"get":{"summary":"Lokale Entwürfe auflisten","description":"Nur die Entwürfe, die im Mail-Client gespeichert sind — der Entwurfsordner des Servers ist über `GET /api/v1/mail/messages?folder=` erreichbar. Neueste zuerst; `_shown`/`_total` nennen den Ausschnitt.","tags":["Entwürfe"],"parameters":[{"name":"account","in":"query","required":false,"description":"Postfach: Konto-UUID ODER E-Mail-Adresse. Ohne Angabe alle Postfächer des Arbeitsbereichs.","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Anzahl Zeilen (Vorgabe 100, max. 200)","schema":{"type":"integer"}},{"name":"offset","in":"query","required":false,"description":"Zeilen überspringen (Sortierung: zuletzt geändert zuerst)","schema":{"type":"integer"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"account_id":{"type":"string"},"account":{"anyOf":[{"type":"string"},{"type":"null"}]},"to":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"}},"required":["email"]}},"cc":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"}},"required":["email"]}},"bcc":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"}},"required":["email"]}},"subject":{"type":"string"},"attachments":{"type":"number"},"designkit":{"type":"boolean"},"updated_at":{"type":"string"}},"required":["id","account_id","account","to","cc","bcc","subject","attachments","designkit","updated_at"]}},"_shown":{"type":"number"},"_total":{"type":"number"},"_offset":{"type":"number"},"_hint":{"type":"string"}},"required":["data","_shown","_total"]}}}}}},"post":{"summary":"Entwurf anlegen","description":"Rumpf wie `POST /api/v1/mail/send`, aber nichts ist Pflicht. `accountId` darf die Konto-UUID ODER die Adresse sein; bei mehreren Postfächern ist sie Pflicht. `drive_datei_ids` legt Dateien aus Janeway Drive als Anhänge ab (Kontingent wie ein Upload).","tags":["Entwürfe"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"type":"array","items":{"anyOf":[{"type":"string","format":"email"},{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string","format":"email"}},"required":["email"]}]},"maxItems":50},"cc":{"type":"array","items":{"anyOf":[{"type":"string","format":"email"},{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string","format":"email"}},"required":["email"]}]},"maxItems":50},"bcc":{"type":"array","items":{"anyOf":[{"type":"string","format":"email"},{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string","format":"email"}},"required":["email"]}]},"maxItems":50},"subject":{"type":"string"},"body_html":{"type":"string"},"body_text":{"type":"string"},"inReplyTo":{"type":"string"},"accountId":{"type":"string","minLength":1},"drive_datei_ids":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"maxItems":10,"description":"IDs von Dateien aus Janeway Drive als Anhang (höchstens 10, zusammen 25 MB). Nur Dateien des Arbeitsbereichs, die die Person sehen darf; Ordner und Papierkorb nicht."}}}}}},"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"account_id":{"type":"string"},"account":{"type":"string"}},"required":["id","account_id","account"]}},"required":["data"]}}}}}},"delete":{"summary":"Entwürfe löschen","tags":["Entwürfe"],"parameters":[{"name":"ids","in":"query","required":true,"description":"Kommagetrennte Entwurfs-IDs (1 bis 200)","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"action":{"type":"string"},"succeeded":{"type":"number"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"reason":{"type":"string"}},"required":["id","reason"]}},"ziele":{"type":"array","items":{"type":"object","properties":{"account":{"type":"string"},"folder_id":{"type":"string"},"folder":{"type":"string"}},"required":["account","folder_id","folder"]}},"label":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"angelegt":{"type":"boolean"}},"required":["id","name","angelegt"]}},"required":["action","succeeded","failed"]}},"required":["data"]}}}}}}},"/v1/mail/drafts/{id}":{"get":{"summary":"Entwurf mit Text abrufen","tags":["Entwürfe"],"parameters":[{"name":"id","in":"path","required":true,"description":"Entwurfs-UUID","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"account_id":{"type":"string"},"account":{"anyOf":[{"type":"string"},{"type":"null"}]},"to":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"}},"required":["email"]}},"cc":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"}},"required":["email"]}},"bcc":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"}},"required":["email"]}},"subject":{"type":"string"},"text":{"type":"string"},"body_html":{"anyOf":[{"type":"string"},{"type":"null"}]},"attachments":{"type":"array","items":{"type":"object","properties":{"filename":{"type":"string"},"contentType":{"anyOf":[{"type":"string"},{"type":"null"}]},"size":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["filename","contentType","size"]}},"designkit":{"type":"boolean"}},"required":["id","account_id","account","to","cc","bcc","subject","text","body_html","attachments","designkit"]}},"required":["data"]}}}}}},"patch":{"summary":"Entwurf ändern","description":"Nur die genannten Felder ändern sich; Listen ersetzen die alten (`cc: []` leert die Kopie). Postfach, Designkit und Blöcke ändert dieser Weg nicht; Text an einem Designkit-Entwurf ist 409. `drive_datei_ids` hängt Dateien aus Janeway Drive an, `anhaenge_entfernen` nimmt Anhänge nach Dateinamen heraus. Wurde der Entwurf seit dem Lesen geändert oder wird er gerade gesendet: 409, nichts geändert.","tags":["Entwürfe"],"parameters":[{"name":"id","in":"path","required":true,"description":"Entwurfs-UUID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"type":"array","items":{"anyOf":[{"type":"string","format":"email"},{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string","format":"email"}},"required":["email"]}]},"maxItems":50},"cc":{"type":"array","items":{"anyOf":[{"type":"string","format":"email"},{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string","format":"email"}},"required":["email"]}]},"maxItems":50},"bcc":{"type":"array","items":{"anyOf":[{"type":"string","format":"email"},{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string","format":"email"}},"required":["email"]}]},"maxItems":50},"subject":{"type":"string"},"body_text":{"type":"string"},"body_html":{"type":"string"},"drive_datei_ids":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"maxItems":10,"description":"IDs von Dateien aus Janeway Drive als Anhang (höchstens 10, zusammen 25 MB). Nur Dateien des Arbeitsbereichs, die die Person sehen darf; Ordner und Papierkorb nicht."},"anhaenge_entfernen":{"type":"array","items":{"type":"string","minLength":1,"maxLength":255},"minItems":1,"maxItems":20,"description":"Dateinamen von Anhängen des Entwurfs, die herausfallen (wie `GET /drafts/{id}` sie nennt)."}}}}}},"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"account_id":{"type":"string"},"to":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"}},"required":["email"]}},"cc":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"}},"required":["email"]}},"bcc":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"}},"required":["email"]}},"subject":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"filename":{"type":"string"},"contentType":{"anyOf":[{"type":"string"},{"type":"null"}]},"size":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["filename","contentType","size"]}},"updated_at":{"type":"string"}},"required":["id","account_id","to","cc","bcc","subject","attachments","updated_at"]}},"required":["data"]}}}}}}},"/v1/mail/drafts/{id}/send":{"post":{"summary":"Entwurf senden (danach gelöscht)","description":"Sendet über denselben Weg wie `POST /api/v1/mail/send`; der Entwurf ist danach weg. Rumpf `{}`, aus einem Workflow-Baustein auch `{workflow_anhaenge}`. Gestagte Anhänge (auch Drive-Dateien aus `POST`/`PATCH /drafts`) gehen mit; fehlt eine Datei, 422 statt einer Mail ohne sie. Ein Entwurf mit Designkit wird abgelehnt (409) — er ist nur im Mail-Client sendbar. Der Entwurf wird vor dem Versand gesperrt: ein zweiter gleichzeitiger Aufruf bekommt 409 und sendet nicht; scheitert der Versand, bleibt der Entwurf unverändert stehen. Bricht ein Lauf ganz ab, ist er höchstens 15 Minuten gesperrt (409). `draft_deleted: false` heißt: gesendet, aber der Entwurf steht noch — nicht erneut senden.","tags":["Entwürfe"],"parameters":[{"name":"id","in":"path","required":true,"description":"Entwurfs-UUID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workflow_anhaenge":{"type":"array","items":{"type":"object","properties":{"pfad":{"type":"string","minLength":1,"maxLength":200,"description":"Speicherpfad des Binärteils: <Arbeitsbereich>/<Lauf>/<Kennung>"},"name":{"type":"string","minLength":1,"maxLength":255,"description":"Dateiname im Anhang; ohne Angabe der Name aus dem Lauf"}},"required":["pfad"]},"minItems":1,"maxItems":10,"description":"Dateien aus einem Workflow-Lauf als Anhang (nur für Workflow-Bausteine, ohne Nachweis der Engine 403). Höchstens 50 MB je Datei und 25 MB zusammen; jeder Pfad muss zu einer noch nicht abgelaufenen Datei eines Laufs dieses Arbeitsbereichs gehören."}}}}}},"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"draft_deleted":{"type":"boolean"}},"required":["ok","draft_deleted"]}}}}}}},"/v1/mail/accounts/{id}/einstellungen":{"get":{"summary":"Absendername, Signatur und Abwesenheitsnotiz eines Postfachs","description":"Die Abwesenheitsnotiz sieht nur der Besitzer (`verwalten`); sonst steht dort `nur_besitzer`, ohne Notiz `null`.","tags":["Postfach"],"parameters":[{"name":"id","in":"path","required":true,"description":"Postfach-UUID","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"account_id":{"type":"string"},"email":{"type":"string"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"signature":{"anyOf":[{"type":"string"},{"type":"null"}]},"abwesenheit":{"anyOf":[{"anyOf":[{"type":"object","properties":{"aktiv":{"type":"boolean"},"von":{"type":"string"},"bis":{"type":"string"},"betreff":{"type":"string"},"nachricht":{"type":"string"},"nur_kontakte":{"type":"boolean"}},"required":["aktiv","von","bis","betreff","nachricht","nur_kontakte"]},{"const":"nur_besitzer"}]},{"type":"null"}]}},"required":["account_id","email","display_name","signature","abwesenheit"]}},"required":["data"]}}}}}},"put":{"summary":"Absendername, Signatur und/oder Abwesenheitsnotiz ändern (nur Besitzer)","description":"Nur die genannten Teile ändern sich; `abwesenheit` ersetzt die Notiz ganz. Eine aktive Notiz antwortet danach selbsttätig auf eingehende Post (RFC 3834: höchstens einmal je Absender und Zeitraum). Ohne `verwalten` oder ohne aktives Abo 403 mit Satz.","tags":["Postfach"],"parameters":[{"name":"id","in":"path","required":true,"description":"Postfach-UUID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"display_name":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"signature":{"anyOf":[{"type":"string","maxLength":20000},{"type":"null"}]},"abwesenheit":{"type":"object","properties":{"aktiv":{"type":"boolean"},"von":{"type":"string","format":"date-time"},"bis":{"type":"string","format":"date-time"},"betreff":{"type":"string","minLength":1,"maxLength":200},"nachricht":{"type":"string","minLength":1,"maxLength":5000},"nur_kontakte":{"type":"boolean"}},"required":["aktiv","von","bis","betreff","nachricht","nur_kontakte"]}}}}}},"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"account_id":{"type":"string"},"email":{"type":"string"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"signature":{"anyOf":[{"type":"string"},{"type":"null"}]},"abwesenheit":{"anyOf":[{"anyOf":[{"type":"object","properties":{"aktiv":{"type":"boolean"},"von":{"type":"string"},"bis":{"type":"string"},"betreff":{"type":"string"},"nachricht":{"type":"string"},"nur_kontakte":{"type":"boolean"}},"required":["aktiv","von","bis","betreff","nachricht","nur_kontakte"]},{"const":"nur_besitzer"}]},{"type":"null"}]}},"required":["account_id","email","display_name","signature","abwesenheit"]}},"required":["data"]}}}}}}},"/v1/mail/recipients":{"get":{"summary":"Bekannte Empfänger-Adressen (Kontakte + Postfach-Verlauf)","tags":["Senden"],"parameters":[{"name":"q","in":"query","required":false,"description":"Filter auf Name oder Adresse","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Anzahl Vorschläge (Vorgabe 10, max. 50)","schema":{"type":"integer"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string"},"name":{"type":"string"}},"required":["email"]}}},"required":["data"]}}}}}}},"/v1/drive/files":{"get":{"summary":"Dateien und Ordner auflisten oder suchen","description":"Ohne `q` und `type`: direkte Kinder von `folder_id` (ohne ihn die oberste Ebene). Mit `q` oder `type` begrenzt `folder_id` die Suche auf den ganzen Unterbaum des Ordners; ohne `folder_id` läuft sie über den ganzen Arbeitsbereich.","tags":["Dateien"],"parameters":[{"name":"q","in":"query","required":false,"description":"Namenssuche (mit `folder_id` nur in dessen Unterbaum).","schema":{"type":"string"}},{"name":"type","in":"query","required":false,"description":"docs | sheets | slides | photo | pdf | vector | layout | sound | cad | video | canvas | motion | light — Typfilter über Endung und Office-MIME (photo: Bilder, die Janeway Photo bearbeitet; pdf, vector, layout, sound: Dateien der jeweiligen Janeway-App).","schema":{"type":"string","enum":["docs","sheets","slides","photo","pdf","vector","layout","sound","cad","video","canvas","motion","light"]}},{"name":"folder_id","in":"query","required":false,"description":"Ohne q/type: direkte Kinder dieses Ordners. Mit q/type: sein ganzer Unterbaum.","schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","required":false,"description":"1-100, Default 25.","schema":{"type":"integer"}},{"name":"offset","in":"query","required":false,"description":"Offset für Blättern.","schema":{"type":"integer"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"files":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"type":{"type":"string","description":"folder, doc, sheet, slide, pdf, image, … (Anzeige-Typ des DTO)"},"kind":{"type":"string","enum":["file","folder"]},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"size_bytes":{"anyOf":[{"type":"number"},{"type":"null"}]},"updated_at":{"type":"string"},"download_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"open_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"editor_url":{"description":"Nur Dateien, die ein Craft-Editor öffnet: dessen Seite `/craft/<id>` auf dem Host des Gesichts.","type":"string"}},"required":["id","name","type","kind","mime_type","size_bytes","updated_at","download_url","open_url"],"additionalProperties":false}},"_shown":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"_total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"counts":{"type":"object","properties":{"folders":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"files":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["folders","files","total"],"additionalProperties":false},"search_mode":{"description":"Gesetzt, wenn nur EINZELNE Suchbegriffe trafen — Teiltreffer, keine Volltreffer.","type":"string","const":"einzelne_begriffe"},"_hint":{"type":"string"}},"required":["files","_shown","_total","counts"],"additionalProperties":false}}}}}},"patch":{"summary":"Dateien/Ordner in EINEN Zielordner verschieben","description":"Teilfehler kippen den Auftrag nicht: nicht verschiebbare Elemente stehen mit Grund in `failed`.","tags":["Dateien"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string"},"description":"Node-IDs aus drive_search/drive_tree — mindestens eine, hoechstens 100."},"action":{"description":"Nur 'move'. Loeschen laeuft ueber DELETE (eigener Scope drive:delete).","type":"string","const":"move"},"target_folder_id":{"description":"Zielordner (MUSS ein Ordner sein); null oder weglassen = oberste Ebene.","anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ids"]}}}},"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"action":{"type":"string","enum":["move","copy","trash","delete_permanent","restore"]},"succeeded":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"target":{"type":"object","properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"nodes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string","enum":["file","folder"]},"descendants":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Mitbetroffene Unterelemente."},"source_id":{"description":"Nur bei copy: ID des Originals; `id` ist die der Kopie.","type":"string"}},"required":["id","name","kind","descendants"],"additionalProperties":false}},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"reason":{"type":"string","description":"Deutscher Satz — landet wörtlich im Chat."}},"required":["id","reason"],"additionalProperties":false}}},"required":["action","succeeded","nodes","failed"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}},"post":{"summary":"Dateien/Ordner kopieren (Ordner samt Inhalt)","description":"Ohne `target_folder_id` entsteht jede Kopie neben ihrem Original, `null` ist die oberste Ebene. `name` nur bei genau einer ID. `nodes` trägt die NEUEN IDs samt `source_id`; Teilfehler stehen mit Grund in `failed`.","tags":["Dateien"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string"},"description":"Node-IDs aus drive_search/drive_tree — mindestens eine, hoechstens 100."},"action":{"description":"Nur 'copy'.","type":"string","const":"copy"},"target_folder_id":{"description":"Zielordner (MUSS ein Ordner sein). Weglassen = neben das Original; null = oberste Ebene.","anyOf":[{"type":"string"},{"type":"null"}]},"name":{"description":"Name der Kopie — nur bei genau EINER ID. Ohne ihn behaelt die Kopie den Namen des Originals.","type":"string","minLength":1,"maxLength":200}},"required":["ids"]}}}},"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"action":{"type":"string","enum":["move","copy","trash","delete_permanent","restore"]},"succeeded":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"target":{"type":"object","properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"nodes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string","enum":["file","folder"]},"descendants":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Mitbetroffene Unterelemente."},"source_id":{"description":"Nur bei copy: ID des Originals; `id` ist die der Kopie.","type":"string"}},"required":["id","name","kind","descendants"],"additionalProperties":false}},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"reason":{"type":"string","description":"Deutscher Satz — landet wörtlich im Chat."}},"required":["id","reason"],"additionalProperties":false}}},"required":["action","succeeded","nodes","failed"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}},"delete":{"summary":"Dateien/Ordner in den Papierkorb legen (oder endgültig löschen)","description":"Ein Ordner nimmt seinen Inhalt mit. `permanent=1` geht NUR für Elemente, die bereits im Papierkorb liegen — alles andere wird mit Begründung abgelehnt. Scope: drive:delete.","tags":["Dateien"],"parameters":[{"name":"ids","in":"query","required":true,"description":"Kommagetrennte Node-UUIDs (max. 100).","schema":{"type":"string"}},{"name":"permanent","in":"query","required":false,"description":"1 = endgültig löschen (nicht umkehrbar).","schema":{"type":"string","enum":["1","true","yes"]}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"action":{"type":"string","enum":["move","copy","trash","delete_permanent","restore"]},"succeeded":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"target":{"type":"object","properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"nodes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string","enum":["file","folder"]},"descendants":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Mitbetroffene Unterelemente."},"source_id":{"description":"Nur bei copy: ID des Originals; `id` ist die der Kopie.","type":"string"}},"required":["id","name","kind","descendants"],"additionalProperties":false}},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"reason":{"type":"string","description":"Deutscher Satz — landet wörtlich im Chat."}},"required":["id","reason"],"additionalProperties":false}}},"required":["action","succeeded","nodes","failed"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}}},"/v1/drive/files/tree":{"get":{"summary":"Ordnerbaum lesen","tags":["Dateien"],"parameters":[{"name":"root_id","in":"query","required":false,"description":"Wurzel des Baums (MUSS ein Ordner sein); ohne ihn die oberste Ebene.","schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","required":false,"description":"Knoten insgesamt, 1-150, Default 100.","schema":{"type":"integer"}},{"name":"depth","in":"query","required":false,"description":"Tiefe, 1-6, Default 4.","schema":{"type":"integer"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"files":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"type":{"type":"string","description":"folder, doc, sheet, slide, pdf, image, … (Anzeige-Typ des DTO)"},"kind":{"type":"string","enum":["file","folder"]},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"size_bytes":{"anyOf":[{"type":"number"},{"type":"null"}]},"updated_at":{"type":"string"},"download_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"open_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"editor_url":{"description":"Nur Dateien, die ein Craft-Editor öffnet: dessen Seite `/craft/<id>` auf dem Host des Gesichts.","type":"string"}},"required":["id","name","type","kind","mime_type","size_bytes","updated_at","download_url","open_url"],"additionalProperties":false},"description":"Wie files, zusätzlich mit `children` je Ordner."},"more":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Nicht enthaltene Einträge jenseits von depth/limit."},"_shown":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"_total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"_hint":{"type":"string"}},"required":["files","more","_shown","_total"],"additionalProperties":false}}}}}}},"/v1/drive/files/{nodeId}":{"patch":{"summary":"Datei oder Ordner umbenennen","description":"Verschieben läuft über `PATCH /api/v1/files`. Bei Namenskollision ergänzt Drive ' (2)'.","tags":["Dateien"],"parameters":[{"name":"nodeId","in":"path","required":true,"description":"Node-UUID.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Neuer Name; bei Dateien mit Endung."}},"required":["name"]}}}},"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","description":"TATSÄCHLICHER Name — bei Kollision mit ' (2)' ergänzt."},"previous_name":{"type":"string"},"kind":{"type":"string","enum":["file","folder"]},"updated_at":{"type":"string","description":"Neuer Stand der Zeile (ISO) — Umbenennen setzt ihn; Grundlage für `erwartet` beim Übernehmen."}},"required":["id","name","previous_name","kind","updated_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}}},"/v1/drive/files/{nodeId}/content":{"get":{"summary":"Textinhalt einer Datei lesen","description":"Extrahierter Text (kein Byte-Download). Ordner, Papierkorb, zu große Dateien und Formate ohne Text werden mit deutschem Satz abgelehnt (422).","tags":["Dateien"],"parameters":[{"name":"nodeId","in":"path","required":true,"description":"Node-UUID.","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"size_bytes":{"anyOf":[{"type":"number"},{"type":"null"}]},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"format":{"type":"string","description":"Erkanntes Quellformat der Textextraktion."},"pages":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"chars":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"truncated":{"type":"boolean"},"text":{"type":"string"}},"required":["id","name","mime_type","size_bytes","updated_at","format","pages","chars","truncated","text"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}},"put":{"summary":"Inhalt einer Textdatei ersetzen","description":"Ersetzt den gesamten Inhalt. Nur Text-, Markdown-, CSV-, JSON- und Code-Dateien — Office-Dateien, PDF und Bilder werden mit deutschem Satz abgelehnt (422). Legt keine Fassung an.","tags":["Dateien"],"parameters":[{"name":"nodeId","in":"path","required":true,"description":"Node-UUID.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","description":"Vollstaendiger neuer Text der Datei; ersetzt den bisherigen Inhalt (hoechstens 2 MB)."}},"required":["content"]}}}},"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"size_bytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"updated_at":{"type":"string"}},"required":["id","name","size_bytes","updated_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}}},"/v1/drive/files/{nodeId}/uebergabe":{"get":{"summary":"Datei an einen Workflow übergeben: signierter Pfad, 60 s gültig","description":"Nur für Workflow-Bausteine: die Workflow-Engine lädt die Bytes über `pfad` selbst und legt sie als Binärteil ab — der Inhalt kommt nie in die Antwort. Leserecht auf die Datei nötig, dazu der Nachweis der Engine (ohne ihn 403). nodeId keine UUID: 400. Ordner, Papierkorb und unvollständige Uploads: 422; über 50 MB: 413.","tags":["Dateien"],"parameters":[{"name":"nodeId","in":"path","required":true,"description":"Node-UUID einer Datei.","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"size_bytes":{"anyOf":[{"type":"number"},{"type":"null"}]},"pfad":{"type":"string","description":"Signierter Pfad relativ zur Supabase-Wurzel (`/storage/v1/object/sign/…?token=…`)."},"gueltig_sekunden":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"gueltig_bis":{"type":"string"}},"required":["id","name","mime_type","size_bytes","pfad","gueltig_sekunden","gueltig_bis"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}}},"/v1/drive/files/{nodeId}/arbeitskopie":{"get":{"summary":"Eigene Arbeitskopie eines externen Editors finden (404, wenn keine)","description":"Für Janeway Photo: unsichtbarer Zwischenstand je Person und Datei, nie ein Drive-Eintrag.","tags":["Editor"],"parameters":[{"name":"nodeId","in":"path","required":true,"description":"Node-UUID der Originaldatei.","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"download_url":{"type":"string","description":"Signierte Download-URL, 10 Minuten gültig."},"aktualisiert_am":{"type":"string"},"groesse":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"original_aktualisiert_am":{"type":"string","description":"`updated_at` des Originals, als die Kopie angelegt wurde."},"stand":{"type":"string","description":"`updated_at` der Zeile; `DELETE ?stand=` verwirft nur, solange sie so steht."},"name":{"description":"Name des Knotens — ein nie gespeichertes Dokument hat kein Original, das ihn nennt.","type":"string"}},"required":["download_url","aktualisiert_am","groesse","original_aktualisiert_am","stand"],"additionalProperties":false}}}}}},"post":{"summary":"Upload-URL für den nächsten Stand der Arbeitskopie","description":"Prüft das Kontingent gegen den Zuwachs (413), Schreibrecht und Abo (403/402).","tags":["Editor"],"parameters":[{"name":"nodeId","in":"path","required":true,"description":"Node-UUID der Originaldatei.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"groesse":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Groesse der hochzuladenden Datei in Bytes; die hochgeladene Datei muss genau so gross sein."},"original_aktualisiert_am":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}[T ]\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?(Z|[+-]\\d{2}(:?\\d{2})?)$","description":"`updated_at` des Originals beim Oeffnen, unveraendert durchgereicht."},"probe":{"description":"Nur pruefen, ob geschrieben werden darf (Recht, Abo, Kontingent) — schreibt nichts, liefert keine URL.","type":"boolean"},"ersetzen":{"description":"Der Stand ersetzt eine liegengebliebene Kopie auf anderem Original-Stand (nach „Original öffnen“). Ohne bleibt deren Stand stehen.","type":"boolean"}},"required":["groesse","original_aktualisiert_am"]}}}},"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"upload_url":{"type":"string","description":"Signierte Upload-URL für einen PUT der Bytes."},"vorschau_upload_url":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Signierte Upload-URL für ein WebP ≤ 480 px der zusammengesetzten Ebenen (Wiederherstellen-Dialog)."}},"required":["upload_url","vorschau_upload_url"],"additionalProperties":false},{"type":"object","properties":{"schreibbar":{"type":"boolean","const":true,"description":"Antwort auf `probe: true`."}},"required":["schreibbar"],"additionalProperties":false}]}}}}}},"delete":{"summary":"Arbeitskopie verwerfen","description":"Mit `?stand=<zeilenStand>` nur, wenn die Kopie seither nicht neu geschrieben wurde.","tags":["Editor"],"parameters":[{"name":"nodeId","in":"path","required":true,"description":"Node-UUID der Originaldatei.","schema":{"type":"string"}}],"responses":{"204":{"description":"Erfolg"}}}},"/v1/drive/files/{nodeId}/uebernehmen":{"post":{"summary":"Neuen Inhalt prüfen und die Datei in einem Schritt umhängen","description":"Zwei Phasen: `url` liefert Upload-URL und `pfad`, `abschluss` prüft Magic-Byte, Größe und Kontingent und hängt nur um, wenn `erwartet` noch dem Stand der Datei gleicht — sonst 409 `{fehler:\"konflikt\"}`. Legt keine Fassung an.","tags":["Editor"],"parameters":[{"name":"nodeId","in":"path","required":true,"description":"Node-UUID der Datei.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"phase":{"type":"string","const":"url"},"mime":{"type":"string","minLength":1,"description":"MIME-Typ der Datei."},"groesse":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Groesse der hochzuladenden Datei in Bytes; die hochgeladene Datei muss genau so gross sein."}},"required":["phase","mime","groesse"]},{"type":"object","properties":{"phase":{"type":"string","const":"abschluss"},"pfad":{"type":"string","minLength":1,"description":"Der `pfad` aus der Antwort von `phase: url`."},"mime":{"type":"string","minLength":1,"description":"MIME-Typ der Datei."},"erwartet":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}[T ]\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?(Z|[+-]\\d{2}(:?\\d{2})?)$","description":"`updated_at` des Originals beim Oeffnen; weicht es ab, antwortet die Route 409."}},"required":["phase","pfad","mime","erwartet"]}]}}}},"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"upload_url":{"type":"string"},"pfad":{"type":"string","description":"Für `phase: abschluss` zurückgeben."}},"required":["upload_url","pfad"],"additionalProperties":false},{"type":"object","properties":{"aktualisiert_am":{"type":"string"}},"required":["aktualisiert_am"],"additionalProperties":false}]}}}}}}},"/v1/drive/files/{nodeId}/kopie":{"post":{"summary":"Bearbeiteten Stand als neue Datei neben dem Original speichern","description":"Dieselben zwei Phasen wie `uebernehmen`; das Original bleibt unverändert.","tags":["Editor"],"parameters":[{"name":"nodeId","in":"path","required":true,"description":"Node-UUID der Originaldatei.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"phase":{"type":"string","const":"url"},"mime":{"type":"string","minLength":1,"description":"MIME-Typ der Datei."},"groesse":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Groesse der hochzuladenden Datei in Bytes; die hochgeladene Datei muss genau so gross sein."},"name":{"type":"string","minLength":1,"description":"Dateiname der neuen Datei samt Endung; belegte Namen werden durchnummeriert."}},"required":["phase","mime","groesse","name"]},{"type":"object","properties":{"phase":{"type":"string","const":"abschluss"},"pfad":{"type":"string","minLength":1,"description":"Der `pfad` aus der Antwort von `phase: url`."},"mime":{"type":"string","minLength":1,"description":"MIME-Typ der Datei."},"name":{"type":"string","minLength":1,"description":"Dateiname der neuen Datei samt Endung; belegte Namen werden durchnummeriert."}},"required":["phase","pfad","mime","name"]}]}}}},"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"upload_url":{"type":"string"},"pfad":{"type":"string"}},"required":["upload_url","pfad"],"additionalProperties":false},{"type":"object","properties":{"datei":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"required":["datei"],"additionalProperties":false}]}}}}}}},"/v1/drive/files/{nodeId}/craft-neu":{"post":{"summary":"Im Craft-Editor neu erstelltes Dokument als Drive-Knoten anlegen","description":"Legt neben der geöffneten Datei (`nodeId`) einen leeren Knoten im Arbeitsformat der App an (Photo: PSD; Endung aus dem Host des Gesichts oder `app`) und liefert die Upload-URL für dessen erste Arbeitskopie; der Inhalt kommt per `arbeitskopie`-PUT und wird mit `uebernehmen` ins Original gesetzt. Gleiche Prüfungen wie `kopie`: Zugriff, Schreibrolle im Bereich, Abo, Kontingent.","tags":["Editor"],"parameters":[{"name":"nodeId","in":"path","required":true,"description":"Node-UUID der geöffneten Datei; das neue Dokument liegt in deren Ordner.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"Dateiname des neuen Dokuments; die Endung des Arbeitsformats der App (Photo: .psd) wird erzwungen, ohne Angabe „Unbenannt“. Belegte Namen werden durchnummeriert.","type":"string","maxLength":200},"app":{"description":"Gesicht, dessen Arbeitsformat gilt (`photo`, …), wenn der Aufruf nicht von dessen Host kommt. Auf `photo.<domain>` genügt der Host.","type":"string","maxLength":32},"groesse":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Groesse der hochzuladenden Datei in Bytes; die hochgeladene Datei muss genau so gross sein."}},"required":["groesse"]}}}},"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"knoten_id":{"type":"string","description":"Node-UUID des neuen Dokuments (Ordner wie die Datei in der URL)."},"name":{"type":"string","description":"Tatsächlicher Name samt Endung des Arbeitsformats, nach Auflösung von Namenskonflikten."},"aktualisiert_am":{"type":"string","description":"`updated_at` des neuen Knotens: `original_aktualisiert_am` der ersten Arbeitskopie."},"upload_url":{"type":"string","description":"Signierte Upload-URL für einen PUT der ersten Arbeitskopie (genau `groesse` Bytes)."},"vorschau_upload_url":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Signierte Upload-URL für das WebP ≤ 480 px der Arbeitskopie."}},"required":["knoten_id","name","aktualisiert_am","upload_url","vorschau_upload_url"],"additionalProperties":false}}}}}}},"/v1/drive/files/verarbeiten":{"post":{"summary":"PDF oder Bild serverseitig verarbeiten (zusammenführen, teilen, komprimieren, drehen, Seiten löschen, Wasserzeichen, Bilder zu PDF, konvertieren, zuschneiden, skalieren, filtern)","description":"Datei rein, Operation, NEUE Datei raus — ohne offenen Editor; die Quellen bleiben unverändert. Das Ergebnis liegt im Ordner `parent_id` (ohne Angabe: Ordner der ersten Quelle), Namenskonflikte werden durchnummeriert. 422 bei falschem Dateityp, verschlüsselter oder kaputter PDF, Seitenbereich außerhalb, pdf_delete_pages ohne verbleibende Seite, pdf_watermark mit nicht-lateinischen Zeichen oder Quelle über 200 MB; 404, wenn eine Quelle fehlt. Optionaler Kopf `Idempotency-Key` (höchstens 200 Zeichen): gleiche Person, gleicher Bereich und gleicher Schlüssel binnen 24 h liefern das erste Ergebnis (Kopf `Idempotent-Replayed: true`) statt eine zweite Datei anzulegen; 409, solange der erste Aufruf noch läuft.","tags":["Dateien"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"type":"string","enum":["pdf_merge","pdf_split","pdf_compress","pdf_to_image","pdf_rotate","pdf_delete_pages","pdf_watermark","images_to_pdf","image_convert","image_crop","image_resize","image_rotate","image_watermark","image_filter"],"description":"pdf_merge: PDFs zusammenführen · pdf_split: Seiten auswählen/aufteilen · pdf_compress: verkleinern · pdf_to_image: Seiten als Bild · pdf_rotate: Seiten drehen (verlustfrei) · pdf_delete_pages: Seiten löschen · pdf_watermark: Text-Wasserzeichen auf jede Seite · images_to_pdf: Bilder zu einer PDF · image_convert: Format wechseln oder (nur mit quality) komprimieren · image_crop: Ausschnitt · image_resize: Größe ändern · image_rotate: drehen/spiegeln · image_watermark: Text-Wasserzeichen · image_filter: Filter."},"ids":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"description":"Quelldateien. pdf_merge: 2–20, die Reihenfolge ist die Seitenreihenfolge; images_to_pdf: 1–50 Bilder, Reihenfolge = Seitenfolge; alle anderen Operationen: genau 1."},"name":{"description":"Name der Ergebnisdatei; die Endung passt sich dem Format an. Ohne Angabe wird er aus der Quelle abgeleitet. Mehrere Ergebnisse bekommen -1, -2 …","type":"string","maxLength":200},"parent_id":{"description":"Zielordner; ohne Angabe der Ordner der ersten Quelle.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"pages":{"description":"Seitenbereich wie „1-3,5“ (nur Ziffern, Komma, Bindestrich). pdf_split: genau diese Seiten als EINE neue PDF, ohne Angabe jede Seite eine eigene Datei (höchstens 50). pdf_to_image: Vorgabe „1“, höchstens 20 Seiten. pdf_rotate: nur diese Seiten drehen, Vorgabe alle. pdf_delete_pages: Pflicht, die zu löschenden Seiten (mindestens eine Seite muss bleiben).","type":"string","maxLength":200},"stufe":{"description":"pdf_compress: stark (kleinste Datei, Bildschirmqualität), mittel (Vorgabe), leicht (Druckqualität).","type":"string","enum":["stark","mittel","leicht"]},"format":{"description":"pdf_to_image: png (Vorgabe) oder jpeg. Alle Bild-Operationen: optional, sonst das Quellformat (SVG und GIF werden png).","type":"string","enum":["png","jpeg","webp","avif","tiff"]},"quality":{"description":"Qualität 1–100 für jpeg/webp/avif/tiff.","type":"integer","minimum":1,"maximum":100},"left":{"description":"image_crop: linke Kante in Pixeln (im Bild, wie es angezeigt wird). Mit top, width, height Pflicht.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"top":{"description":"image_crop: obere Kante in Pixeln.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"width":{"description":"image_crop: Breite des Ausschnitts. image_resize: Zielbreite, höchstens 10000 px.","type":"integer","minimum":1,"maximum":100000},"height":{"description":"image_crop: Höhe des Ausschnitts. image_resize: Zielhöhe, höchstens 10000 px.","type":"integer","minimum":1,"maximum":100000},"fit":{"description":"image_resize: inside (Vorgabe, passt hinein, Seitenverhältnis bleibt), cover (füllt, schneidet über), fill (streckt).","type":"string","enum":["inside","cover","fill"]},"angle":{"description":"pdf_rotate: Pflicht, Drehung im Uhrzeigersinn in Grad. image_rotate: Drehung im Uhrzeigersinn.","anyOf":[{"type":"number","const":90},{"type":"number","const":180},{"type":"number","const":270}]},"flip_horizontal":{"description":"image_rotate: links/rechts spiegeln.","type":"boolean"},"flip_vertical":{"description":"image_rotate: oben/unten spiegeln. image_rotate braucht angle, flip_horizontal oder flip_vertical.","type":"boolean"},"text":{"description":"pdf_watermark/image_watermark: Pflicht, Text des Wasserzeichens (1–100 Zeichen), diagonal mittig. In PDFs nur lateinische Zeichen (Latin-1, mit Umlauten), sonst 422; im Bild beliebiger Text.","type":"string","minLength":1,"maxLength":100},"opacity":{"description":"Wasserzeichen: Deckkraft 0.05–1 (Vorgabe 0.15).","type":"number","minimum":0.05,"maximum":1},"filter":{"description":"image_filter: Pflicht. grayscale (Graustufen), sepia, blur (weichzeichnen), sharpen (schärfen), negate (Farben umkehren).","type":"string","enum":["grayscale","sepia","blur","sharpen","negate"]}},"required":["operation","ids"]}}}},"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"dateien":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"mime":{"type":"string"},"groesse":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"open_url":{"type":"string"},"download_url":{"type":"string"},"editor_url":{"description":"Nur bei Dateien, die ein Craft-Editor öffnet.","type":"string"}},"required":["id","name","mime","groesse","open_url","download_url"],"additionalProperties":false}},"groesse_vorher":{"description":"Nur pdf_compress: Bytes der Quelle.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"groesse_nachher":{"description":"Nur pdf_compress: Bytes des Ergebnisses.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"hinweis":{"description":"Z. B. wenn das Komprimieren nichts gebracht hat.","type":"string"}},"required":["dateien"],"additionalProperties":false}}}}}}},"/v1/drive/files/craft-neu":{"post":{"summary":"Leeres Dokument im Arbeitsformat einer Craft-App in einem Ordner anlegen","description":"„Neu“ im Gesicht einer Craft-App (Layout, PDF …), ohne Nachbardatei: legt im Ordner `ordner_id` (ohne Angabe: oberste Ebene des aktiven Arbeitsbereichs) einen leeren Knoten an, Name „Unbenannt <Datum>“ mit der Endung des Arbeitsformats. Der Editor füllt ihn beim Öffnen (`/craft/<id>?neu=1`) und übernimmt sofort; bis dahin ist der Knoten in Listen unsichtbar. Gleiche Prüfungen wie `craft-neu` neben einer Datei: Schreibrolle im Bereich, Abo, Drossel offener leerer Dokumente.","tags":["Editor"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ordner_id":{"description":"Zielordner im aktiven Arbeitsbereich; null oder weglassen = oberste Ebene („Meine Dateien“).","anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"name":{"description":"Dateiname; ohne Angabe „Unbenannt <Datum>“. Die Endung des Arbeitsformats wird erzwungen, belegte Namen werden durchnummeriert.","type":"string","maxLength":200},"app":{"description":"Gesicht, dessen Arbeitsformat gilt (`layout`, `pdf`, …), wenn der Aufruf nicht von dessen Host kommt.","type":"string","maxLength":32}}}}}},"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"knoten_id":{"type":"string","description":"Node-UUID des leeren Knotens; `/craft/<id>?neu=1` öffnet ihn im Editor."},"name":{"type":"string","description":"Tatsächlicher Name samt Endung des Arbeitsformats."},"aktualisiert_am":{"type":"string","description":"`updated_at` des neuen Knotens."},"editor_url":{"description":"Editor-Seite des Gesichts mit `?neu=1`; fehlt, wenn die Adresse des Gesichts nicht gesetzt ist.","type":"string"}},"required":["knoten_id","name","aktualisiert_am"],"additionalProperties":false}}}}}}},"/v1/drive/craft/{nodeId}":{"get":{"summary":"Editor-Link einer Datei: welches Craft-Gesicht sie öffnet und unter welcher Adresse","description":"Nur Dateien des aktiven Arbeitsbereichs, nicht im Papierkorb. 422, wenn kein Craft-Editor die Datei öffnet. Auflisten je Format: `GET /files?type=<app>`; anlegen: `POST /files/craft-neu`; duplizieren: `POST /files`; umbenennen: `PATCH /files/{nodeId}`.","tags":["Editor"],"parameters":[{"name":"nodeId","in":"path","required":true,"description":"Node-UUID der Datei.","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"app":{"type":"string","description":"Craft-Gesicht, das die Datei öffnet (photo, pdf, vector, layout, sound, video, motion, light, cad, canvas)."},"app_name":{"type":"string"},"editor_url":{"type":"string","description":"Absolute Editor-Seite `/craft/<id>` auf dem Host des Gesichts; `?neu=1` bei einem nie gespeicherten Dokument."}},"required":["id","name","app","app_name","editor_url"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}}},"/v1/drive/files/{nodeId}/share":{"post":{"summary":"Öffentlichen Freigabe-Link erzeugen","tags":["Freigaben"],"parameters":[{"name":"nodeId","in":"path","required":true,"description":"Node-UUID (Datei ODER Ordner — für Ordner liefert der Einlöser Listing und ZIP).","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"permission":{"description":"Was der Empfaenger darf. Ohne Angabe: view.","type":"string","enum":["view","download"]},"expires_in_days":{"description":"Nach so vielen Tagen verfaellt der Link. Ohne Angabe gilt er unbefristet.","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"password":{"description":"Optionales Passwort fuer den Link.","type":"string","minLength":1}}}}}},"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"share_url":{"type":"string"}},"required":["share_url"],"additionalProperties":false}}}}}},"get":{"summary":"Link-Freigaben einer Datei/eines Ordners auflisten","description":"Auch widerrufene und abgelaufene (`is_active`). `url` ist der fertige Link; das Passwort kommt nie zurück, nur `has_password`.","tags":["Freigaben"],"parameters":[{"name":"nodeId","in":"path","required":true,"description":"Node-UUID.","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"1-200, Default 50.","schema":{"type":"integer"}},{"name":"offset","in":"query","required":false,"description":"Offset für Blättern.","schema":{"type":"integer"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Freigabe-Kennung (für DELETE …/share/{shareId})."},"url":{"type":"string","description":"Fertiger Freigabe-Link."},"permission":{"type":"string","enum":["view","download"]},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"has_password":{"type":"boolean"},"is_active":{"type":"boolean","description":"false = widerrufen oder abgelaufen."},"created_at":{"type":"string"}},"required":["id","url","permission","expires_at","has_password","is_active","created_at"],"additionalProperties":false}},"_shown":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"_total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"_hint":{"type":"string"}},"required":["data","_shown","_total"],"additionalProperties":false}}}}}}},"/v1/drive/files/{nodeId}/share/{shareId}":{"delete":{"summary":"Freigabe-Link widerrufen","description":"Der Link ist sofort tot und nicht wiederherstellbar (neu erzeugen ergibt eine andere Adresse). Ein schon widerrufener bleibt widerrufen.","tags":["Freigaben"],"parameters":[{"name":"nodeId","in":"path","required":true,"description":"Node-UUID.","schema":{"type":"string"}},{"name":"shareId","in":"path","required":true,"description":"Freigabe-Kennung aus `GET …/share`.","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"revoked":{"type":"boolean"},"already_revoked":{"type":"boolean"}},"required":["id","revoked","already_revoked"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}}},"/v1/drive/files/{nodeId}/members":{"get":{"summary":"Personen auflisten, denen eine Datei/ein Ordner freigegeben ist","tags":["Freigaben"],"parameters":[{"name":"nodeId","in":"path","required":true,"description":"Node-UUID.","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"1-200, Default 50.","schema":{"type":"integer"}},{"name":"offset","in":"query","required":false,"description":"Offset für Blättern.","schema":{"type":"integer"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Freigabe-Kennung (für DELETE …/members/{shareId})."},"user_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"email":{"type":"string"},"permission":{"type":"string","enum":["read","write"]},"created_at":{"type":"string"}},"required":["id","user_id","name","email","permission","created_at"],"additionalProperties":false}},"_shown":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"_total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"_hint":{"type":"string"}},"required":["data","_shown","_total"],"additionalProperties":false}}}}}},"post":{"summary":"Datei/Ordner einer Person freigeben","description":"Per `email` (jeder Janeway-Nutzer) oder `user_id` (Mitglied dieses Arbeitsbereichs). Erneutes Teilen ändert das Recht. Die Person erhält eine Einladungs-Mail.","tags":["Freigaben"],"parameters":[{"name":"nodeId","in":"path","required":true,"description":"Node-UUID (Datei ODER Ordner).","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"description":"E-Mail eines Janeway-Nutzers. Entweder email ODER user_id.","type":"string","minLength":1},"user_id":{"description":"ID eines Mitglieds dieses Arbeitsbereichs. Entweder email ODER user_id.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"permission":{"description":"read = nur lesen, write = darf im Editor speichern. Ohne Angabe: read.","type":"string","enum":["read","write"]}}}}}},"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"user_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"email":{"type":"string"},"permission":{"type":"string","enum":["read","write"]}},"required":["id","user_id","name","email","permission"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}}},"/v1/drive/files/{nodeId}/members/{shareId}":{"delete":{"summary":"Einer Person den Zugriff nehmen","tags":["Freigaben"],"parameters":[{"name":"nodeId","in":"path","required":true,"description":"Node-UUID.","schema":{"type":"string"}},{"name":"shareId","in":"path","required":true,"description":"Freigabe-Kennung aus `GET …/members`.","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"removed":{"type":"boolean"}},"required":["id","removed"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}}},"/v1/drive/files/{nodeId}/versions":{"get":{"summary":"Fassungen einer Datei auflisten (nur lesend)","description":"Neueste zuerst. `is_current` = die lebende Fassung; die übrigen sind angeheftete Stände.","tags":["Dateien"],"parameters":[{"name":"nodeId","in":"path","required":true,"description":"Node-UUID der Datei.","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"1-200, Default 50.","schema":{"type":"integer"}},{"name":"offset","in":"query","required":false,"description":"Offset für Blättern.","schema":{"type":"integer"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"version_no":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"size_bytes":{"type":"number"},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Name, den der Nutzer der angehefteten Fassung gab; null bei der lebenden."},"is_current":{"type":"boolean","description":"true = die lebende Fassung (die Datei, wie sie jetzt liegt)."},"created_at":{"type":"string"}},"required":["id","version_no","size_bytes","mime_type","label","is_current","created_at"],"additionalProperties":false}},"_shown":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"_total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"_hint":{"type":"string"}},"required":["data","_shown","_total"],"additionalProperties":false}}}}}}},"/v1/drive/file/{nodeId}":{"get":{"summary":"Datei-Bytes ausliefern (Browser-Proxy, Session-Cookie statt API-Schlüssel)","description":"Same-Origin-Proxy für Vorschau und Download im Browser; unterstützt Range-Requests. Als EINZIGE `/api/v1`-Route über die Supabase-Session authentifiziert, nicht über den Gateway-Schlüssel.","tags":["Dateien"],"parameters":[{"name":"nodeId","in":"path","required":true,"description":"Node-UUID.","schema":{"type":"string"}},{"name":"download","in":"query","required":false,"description":"1 = als Anhang statt inline.","schema":{"type":"string","enum":["1"]}}],"responses":{"200":{"description":"Datei-Bytes (Content-Type der Datei), 206 bei Range-Request."}}}},"/v1/drive/folders":{"post":{"summary":"Ordner oder ganzen Pfad anlegen","description":"Idempotent je Ebene: ein vorhandener Ordner gleichen Namens wird wiederverwendet, es entsteht kein 'Kunden (2)'. Mit `if_exists: new` entsteht die LETZTE Ebene immer neu ('Angebote (2)'), die Elternebenen werden weiter verwendet. `created` je Ebene sagt, was wirklich neu ist.","tags":["Dateien"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"Ordnername ohne '/'.","type":"string"},"path":{"description":"Ordnername oder ganzer Pfad ('Kunden/2026/Angebote'); fehlende Ebenen entstehen mit.","type":"string"},"parent_id":{"description":"Elternordner; ohne Angabe ab der obersten Ebene.","anyOf":[{"type":"string"},{"type":"null"}]},"if_exists":{"description":"reuse (Vorgabe): gleichnamige Ordner werden wiederverwendet. new: die LETZTE Ebene entsteht immer neu, bei Namensgleichheit als 'Name (2)'; Elternebenen werden weiter verwendet.","type":"string","enum":["reuse","new"]}}}}}},"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"path":{"type":"string"},"levels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"created":{"type":"boolean","description":"false = vorhandener Ordner wiederverwendet."}},"required":["id","name","created"],"additionalProperties":false}},"created_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"existing_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","name","path","levels","created_count","existing_count"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}}},"/v1/drive/documents":{"post":{"summary":"Office-Dokument anlegen (docx/xlsx/pptx), optional aus Markdown","description":"xlsx: jede Markdown-Tabelle wird ein Blatt, Zeile 1 ist der Header. pptx: '---' trennt Folien, '#' ist der Folientitel.","tags":["Dokumente"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["docx","xlsx","pptx"]},"name":{"type":"string","minLength":1,"description":"Dateiname ohne Endung — die Endung ergibt sich aus `type`."},"folder_id":{"description":"Zielordner; ohne Angabe entsteht das Dokument auf der obersten Ebene.","anyOf":[{"type":"string"},{"type":"null"}]},"content":{"description":"Optionaler Inhalt als Markdown; ohne ihn entsteht eine leere Vorlage.","type":"string","maxLength":1000000}},"required":["type","name"]}}}},"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"file":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"type":{"type":"string","description":"folder, doc, sheet, slide, pdf, image, … (Anzeige-Typ des DTO)"},"kind":{"type":"string","enum":["file","folder"]},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"size_bytes":{"anyOf":[{"type":"number"},{"type":"null"}]},"updated_at":{"type":"string"},"download_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"open_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"editor_url":{"description":"Nur Dateien, die ein Craft-Editor öffnet: dessen Seite `/craft/<id>` auf dem Host des Gesichts.","type":"string"}},"required":["id","name","type","kind","mime_type","size_bytes","updated_at","download_url","open_url"],"additionalProperties":false}},"required":["file"],"additionalProperties":false}}}}}}},"/v1/drive/upload":{"post":{"summary":"Datei anlegen: Textdatei aus Text, Bild aus „Bild erzeugen“ oder Datei aus einem Workflow-Lauf","description":"Genau eines von `content` (legt eine Textdatei an, Vorgabe .txt), `url` (Link eines Bildes aus „Bild erzeugen“ dieses Arbeitsbereichs) oder `workflow_binaer` (Datei aus einem Workflow-Lauf dieses Arbeitsbereichs, nur für Workflow-Bausteine). Andere Adressen lädt Drive nicht. `workflow_binaer`: ohne Nachweis der Engine 403, unbekannter oder fremder Pfad 404, verborgene Ausgabe 403, Frist abgelaufen 410, über 50 MB 413, Typ nicht erlaubt oder Kontingent voll 422.","tags":["Dateien"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200,"description":"Dateiname, z. B. 'Artikel.txt' oder 'Bild Website'. Fehlt die Endung, ergibt sie sich aus dem Inhalt."},"folder_id":{"description":"Zielordner; ohne Angabe entsteht die Datei auf der obersten Ebene.","anyOf":[{"type":"string"},{"type":"null"}]},"content":{"description":"Text der Datei (legt eine Textdatei an, Vorgabe .txt).","type":"string","maxLength":1000000},"url":{"description":"Link eines Bildes aus „Bild erzeugen“ (Feld url) — nur Bilder dieses Arbeitsbereichs.","type":"string"},"content_base64":{"description":"Beliebige Datei als Base64 (hoechstens 5 MB). Typ und Endung bestimmt der Inhalt; Programme und HTML nimmt Drive nicht an.","type":"string","maxLength":7056044},"workflow_binaer":{"description":"Datei aus einem Workflow-Lauf (nur für Workflow-Bausteine, ohne Nachweis der Engine 403). Höchstens 50 MB; der Pfad muss zu einer noch nicht abgelaufenen Datei eines Laufs dieses Arbeitsbereichs gehören.","type":"object","properties":{"pfad":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\\/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\\/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$","description":"Speicherpfad des Binärteils, den die Workflow-Engine übergibt (<Arbeitsbereich>/<Lauf>/<Kennung>)."}},"required":["pfad"]}},"required":["name"]}}}},"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"file":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"type":{"type":"string","description":"folder, doc, sheet, slide, pdf, image, … (Anzeige-Typ des DTO)"},"kind":{"type":"string","enum":["file","folder"]},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"size_bytes":{"anyOf":[{"type":"number"},{"type":"null"}]},"updated_at":{"type":"string"},"download_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"open_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"editor_url":{"description":"Nur Dateien, die ein Craft-Editor öffnet: dessen Seite `/craft/<id>` auf dem Host des Gesichts.","type":"string"}},"required":["id","name","type","kind","mime_type","size_bytes","updated_at","download_url","open_url"],"additionalProperties":false}},"required":["file"],"additionalProperties":false}}}}}}},"/v1/drive/sheets/{fileId}":{"get":{"summary":"Blätter einer Tabelle (xlsx) mit Spaltennamen auflisten","tags":["Tabellen"],"parameters":[{"name":"fileId","in":"path","required":true,"description":"Node-UUID einer .xlsx-Datei.","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"file":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"size_bytes":{"anyOf":[{"type":"number"},{"type":"null"}]},"updated_at":{"type":"string","description":"Stand der Datei; ändert sich mit jedem Schreiben."}},"required":["id","name","size_bytes","updated_at"],"additionalProperties":false},"sheets":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"index":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"row_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Letzte Zeile mit Inhalt (inkl. Kopfzeile)."},"column_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"columns":{"type":"array","items":{"type":"string"},"description":"Spaltennamen aus Zeile 1."}},"required":["name","index","row_count","column_count","columns"],"additionalProperties":false}}},"required":["file","sheets"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}}},"/v1/drive/sheets/{fileId}/rows":{"get":{"summary":"Zeilen einer Tabelle als Objekte lesen","description":"Kopfzeile = Spaltennamen, ein Objekt je Zeile mit `row_number` (echte Excel-Zeile, für PATCH/DELETE). Leere Zeilen fallen weg. Filter vergleicht als Text und exakt.","tags":["Tabellen"],"parameters":[{"name":"fileId","in":"path","required":true,"description":"Node-UUID einer .xlsx-Datei.","schema":{"type":"string"}},{"name":"sheet","in":"query","required":false,"description":"Name des Blatts; ohne Angabe das erste.","schema":{"type":"string"}},{"name":"header_row","in":"query","required":false,"description":"Zeile mit den Spaltennamen (Vorgabe 1).","schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"description":"1-5000, Default 100.","schema":{"type":"integer"}},{"name":"offset","in":"query","required":false,"description":"Offset für Blättern.","schema":{"type":"integer"}},{"name":"filter_column","in":"query","required":false,"description":"Spaltenname für den Filter.","schema":{"type":"string"}},{"name":"filter_value","in":"query","required":false,"description":"Gesuchter Wert in filter_column.","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"file":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"updated_at":{"type":"string","description":"Stand der Datei; ändert sich mit jedem Schreiben."}},"required":["id","name","updated_at"],"additionalProperties":false},"sheet":{"type":"string"},"header_row":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"columns":{"type":"array","items":{"type":"string"}},"rows":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"description":"Ein Objekt je Zeile: { row_number, <Spalte>: Wert }. Zahlen bleiben Zahlen, Datum als ISO-Text, leere Zelle = null."}},"required":["file","sheet","header_row","columns","rows"],"additionalProperties":false},"_shown":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"_total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Alle (gefilterten) Zeilen, nicht nur die gezeigten."},"_hint":{"type":"string"}},"required":["data","_shown","_total"],"additionalProperties":false}}}}}},"post":{"summary":"Zeilen an eine Tabelle anhängen","description":"Hängt unter die letzte Zeile mit Inhalt an. Schreibt einen neuen Stand der Datei (keine Fassung). Hat zwischendurch jemand anderes geschrieben, wird der Auftrag auf dem frischen Stand wiederholt; kollidiert es dauerhaft: 409. Dateien mit Diagrammen, Pivot-Tabellen oder Makros sind nur lesbar (422).","tags":["Tabellen"],"parameters":[{"name":"fileId","in":"path","required":true,"description":"Node-UUID einer .xlsx-Datei.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sheet":{"description":"Name des Blatts; ohne Angabe das erste.","type":"string","minLength":1},"header_row":{"description":"Zeile mit den Spaltennamen (Vorgabe 1). Daten beginnen in der Zeile darunter.","type":"integer","minimum":1,"maximum":1000},"rows":{"minItems":1,"maxItems":5000,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"description":"Zeilen als Objekte { Spaltenname: Wert } — Schluessel sind die Namen der Kopfzeile. Zahlen bleiben Zahlen, Text bleibt Text (\"42\" wird NICHT zur Zahl), null leert die Zelle. row_number wird ignoriert, gelesene Zeilen lassen sich also direkt zurueckschicken."},"add_missing_columns":{"description":"true: unbekannte Spalten rechts an die Kopfzeile anfuegen. Ohne: unbekannte Spalte = Fehler. Ein leeres Blatt bekommt seine Kopfzeile immer aus den Daten.","type":"boolean"}},"required":["rows"]}}}},"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"file":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"size_bytes":{"anyOf":[{"type":"number"},{"type":"null"}]},"updated_at":{"type":"string","description":"Stand der Datei; ändert sich mit jedem Schreiben."}},"required":["id","name","size_bytes","updated_at"],"additionalProperties":false},"sheet":{"type":"string"},"appended":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"updated":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"row_numbers":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"description":"Geänderte, dann angehängte Zeilen."},"added_columns":{"type":"array","items":{"type":"string"}},"not_found":{"type":"array","items":{},"description":"Werte aus match_column ohne Treffer (nur ohne upsert)."}},"required":["file","sheet","appended","updated","row_numbers","added_columns","not_found"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}},"patch":{"summary":"Zeilen über eine Schlüsselspalte aktualisieren (upsert: anhängen, wenn nicht gefunden)","description":"Nur die mitgeschickten Spalten ändern sich, alle Treffer werden geändert. Schreibt einen neuen Stand der Datei (keine Fassung). Hat zwischendurch jemand anderes geschrieben, wird der Auftrag auf dem frischen Stand wiederholt; kollidiert es dauerhaft: 409. Dateien mit Diagrammen, Pivot-Tabellen oder Makros sind nur lesbar (422).","tags":["Tabellen"],"parameters":[{"name":"fileId","in":"path","required":true,"description":"Node-UUID einer .xlsx-Datei.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sheet":{"description":"Name des Blatts; ohne Angabe das erste.","type":"string","minLength":1},"header_row":{"description":"Zeile mit den Spaltennamen (Vorgabe 1). Daten beginnen in der Zeile darunter.","type":"integer","minimum":1,"maximum":1000},"match_column":{"type":"string","minLength":1,"description":"Spaltenname, dessen Wert die Zeile bestimmt (Vergleich als Text). Jede Zeile in rows MUSS ihn enthalten. Alle passenden Zeilen werden geaendert, nur die mitgeschickten Spalten. 'row_number' adressiert direkt ueber die Zeilennummer aus dem Lesen."},"rows":{"minItems":1,"maxItems":5000,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"description":"Zeilen als Objekte { Spaltenname: Wert } — Schluessel sind die Namen der Kopfzeile. Zahlen bleiben Zahlen, Text bleibt Text (\"42\" wird NICHT zur Zahl), null leert die Zelle. row_number wird ignoriert, gelesene Zeilen lassen sich also direkt zurueckschicken."},"upsert":{"description":"true: Zeilen ohne Treffer werden angehaengt (Append or Update). Ohne: sie stehen in not_found.","type":"boolean"},"add_missing_columns":{"description":"true: unbekannte Spalten rechts an die Kopfzeile anfuegen. Ohne: unbekannte Spalte = Fehler. Ein leeres Blatt bekommt seine Kopfzeile immer aus den Daten.","type":"boolean"}},"required":["match_column","rows"]}}}},"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"file":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"size_bytes":{"anyOf":[{"type":"number"},{"type":"null"}]},"updated_at":{"type":"string","description":"Stand der Datei; ändert sich mit jedem Schreiben."}},"required":["id","name","size_bytes","updated_at"],"additionalProperties":false},"sheet":{"type":"string"},"appended":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"updated":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"row_numbers":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"description":"Geänderte, dann angehängte Zeilen."},"added_columns":{"type":"array","items":{"type":"string"}},"not_found":{"type":"array","items":{},"description":"Werte aus match_column ohne Treffer (nur ohne upsert)."}},"required":["file","sheet","appended","updated","row_numbers","added_columns","not_found"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}},"delete":{"summary":"Zeilen einer Tabelle löschen (die darunter rücken nach)","description":"Zeilennummern wie `row_number` beim Lesen. Schreibt einen neuen Stand der Datei (keine Fassung). Hat zwischendurch jemand anderes geschrieben, wird der Auftrag auf dem frischen Stand wiederholt; kollidiert es dauerhaft: 409. Dateien mit Diagrammen, Pivot-Tabellen oder Makros sind nur lesbar (422).","tags":["Tabellen"],"parameters":[{"name":"fileId","in":"path","required":true,"description":"Node-UUID einer .xlsx-Datei.","schema":{"type":"string"}},{"name":"sheet","in":"query","required":false,"description":"Name des Blatts; ohne Angabe das erste.","schema":{"type":"string"}},{"name":"header_row","in":"query","required":false,"description":"Zeile mit den Spaltennamen (Vorgabe 1).","schema":{"type":"integer"}},{"name":"rows","in":"query","required":true,"description":"Kommagetrennte Zeilennummern (max. 5000).","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"file":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"size_bytes":{"anyOf":[{"type":"number"},{"type":"null"}]},"updated_at":{"type":"string","description":"Stand der Datei; ändert sich mit jedem Schreiben."}},"required":["id","name","size_bytes","updated_at"],"additionalProperties":false},"sheet":{"type":"string"},"deleted":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"row_numbers":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}},"required":["file","sheet","deleted","row_numbers"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}}},"/v1/drive/sheets/{fileId}/clear":{"post":{"summary":"Inhalte eines Blatts leeren (Formatierung bleibt)","description":"Schreibt einen neuen Stand der Datei (keine Fassung). Hat zwischendurch jemand anderes geschrieben, wird der Auftrag auf dem frischen Stand wiederholt; kollidiert es dauerhaft: 409. Dateien mit Diagrammen, Pivot-Tabellen oder Makros sind nur lesbar (422).","tags":["Tabellen"],"parameters":[{"name":"fileId","in":"path","required":true,"description":"Node-UUID einer .xlsx-Datei.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sheet":{"description":"Name des Blatts; ohne Angabe das erste.","type":"string","minLength":1},"header_row":{"description":"Zeile mit den Spaltennamen (Vorgabe 1). Daten beginnen in der Zeile darunter.","type":"integer","minimum":1,"maximum":1000},"keep_header":{"description":"Vorgabe true: Kopfzeile (und alles darueber) bleibt stehen. false: das ganze Blatt wird geleert.","type":"boolean"}}}}}},"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"file":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"size_bytes":{"anyOf":[{"type":"number"},{"type":"null"}]},"updated_at":{"type":"string","description":"Stand der Datei; ändert sich mit jedem Schreiben."}},"required":["id","name","size_bytes","updated_at"],"additionalProperties":false},"sheet":{"type":"string"},"cleared_rows":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["file","sheet","cleared_rows"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}}},"/v1/drive/sheets/{fileId}/sheets":{"post":{"summary":"Blatt in einer Tabelle anlegen","description":"Neue Tabellen-DATEIEN entstehen über POST /api/v1/documents (type xlsx). Schreibt einen neuen Stand der Datei (keine Fassung). Hat zwischendurch jemand anderes geschrieben, wird der Auftrag auf dem frischen Stand wiederholt; kollidiert es dauerhaft: 409. Dateien mit Diagrammen, Pivot-Tabellen oder Makros sind nur lesbar (422).","tags":["Tabellen"],"parameters":[{"name":"fileId","in":"path","required":true,"description":"Node-UUID einer .xlsx-Datei.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":31,"description":"Name des neuen Blatts, hoechstens 31 Zeichen, ohne [ ] : * ? / \\."},"columns":{"description":"Optionale Kopfzeile (Spaltennamen) fuer Zeile 1.","maxItems":1000,"type":"array","items":{"type":"string"}}},"required":["name"]}}}},"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"file":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"size_bytes":{"anyOf":[{"type":"number"},{"type":"null"}]},"updated_at":{"type":"string","description":"Stand der Datei; ändert sich mit jedem Schreiben."}},"required":["id","name","size_bytes","updated_at"],"additionalProperties":false},"sheet":{"description":"Angelegtes Blatt.","type":"string"},"deleted_sheet":{"description":"Entferntes Blatt.","type":"string"},"sheets":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"index":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"row_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Letzte Zeile mit Inhalt (inkl. Kopfzeile)."},"column_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"columns":{"type":"array","items":{"type":"string"},"description":"Spaltennamen aus Zeile 1."}},"required":["name","index","row_count","column_count","columns"],"additionalProperties":false}}},"required":["file","sheets"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}},"delete":{"summary":"Blatt aus einer Tabelle entfernen (nie das letzte)","description":"Schreibt einen neuen Stand der Datei (keine Fassung). Hat zwischendurch jemand anderes geschrieben, wird der Auftrag auf dem frischen Stand wiederholt; kollidiert es dauerhaft: 409. Dateien mit Diagrammen, Pivot-Tabellen oder Makros sind nur lesbar (422).","tags":["Tabellen"],"parameters":[{"name":"fileId","in":"path","required":true,"description":"Node-UUID einer .xlsx-Datei.","schema":{"type":"string"}},{"name":"name","in":"query","required":true,"description":"Name des Blatts.","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"file":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"size_bytes":{"anyOf":[{"type":"number"},{"type":"null"}]},"updated_at":{"type":"string","description":"Stand der Datei; ändert sich mit jedem Schreiben."}},"required":["id","name","size_bytes","updated_at"],"additionalProperties":false},"sheet":{"description":"Angelegtes Blatt.","type":"string"},"deleted_sheet":{"description":"Entferntes Blatt.","type":"string"},"sheets":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"index":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"row_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Letzte Zeile mit Inhalt (inkl. Kopfzeile)."},"column_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"columns":{"type":"array","items":{"type":"string"},"description":"Spaltennamen aus Zeile 1."}},"required":["name","index","row_count","column_count","columns"],"additionalProperties":false}}},"required":["file","sheets"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}}},"/v1/drive/sheets/{fileId}/cells":{"get":{"summary":"Zellbereich einer Tabelle lesen (A1-Schreibweise)","description":"Werte als Liste von Zeilen. Höchstens 10000 Zellen je Aufruf.","tags":["Tabellen"],"parameters":[{"name":"fileId","in":"path","required":true,"description":"Node-UUID einer .xlsx-Datei.","schema":{"type":"string"}},{"name":"sheet","in":"query","required":false,"description":"Name des Blatts; ohne Angabe das erste.","schema":{"type":"string"}},{"name":"range","in":"query","required":true,"description":"Bereich wie A1:C10 oder A1.","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"file":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"updated_at":{"type":"string","description":"Stand der Datei; ändert sich mit jedem Schreiben."}},"required":["id","name","updated_at"],"additionalProperties":false},"sheet":{"type":"string"},"range":{"type":"string"},"values":{"type":"array","items":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}},"description":"Zeilen mal Spalten; Formeln liefern ihr zuletzt berechnetes Ergebnis, leere Zelle = null."}},"required":["file","sheet","range","values"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}},"put":{"summary":"Zellbereich einer Tabelle setzen (Formatierung bleibt, `=…` wird Formel)","description":"Schreibt einen neuen Stand der Datei (keine Fassung). Hat zwischendurch jemand anderes geschrieben, wird der Auftrag auf dem frischen Stand wiederholt; kollidiert es dauerhaft: 409. Dateien mit Diagrammen, Pivot-Tabellen oder Makros sind nur lesbar (422).","tags":["Tabellen"],"parameters":[{"name":"fileId","in":"path","required":true,"description":"Node-UUID einer .xlsx-Datei.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sheet":{"description":"Name des Blatts; ohne Angabe das erste.","type":"string","minLength":1},"range":{"type":"string","minLength":1,"description":"Zielbereich in A1-Schreibweise; values beginnt in der linken oberen Zelle und darf den Bereich nicht ueberschreiten (hoechstens 10000 Zellen)."},"values":{"minItems":1,"type":"array","items":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}},"description":"Zeilen mit Zellwerten. Text mit `=` vorn wird als Formel gesetzt; null leert die Zelle. Formatierung der Zellen bleibt."}},"required":["range","values"]}}}},"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"file":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"size_bytes":{"anyOf":[{"type":"number"},{"type":"null"}]},"updated_at":{"type":"string","description":"Stand der Datei; ändert sich mit jedem Schreiben."}},"required":["id","name","size_bytes","updated_at"],"additionalProperties":false},"sheet":{"type":"string"},"range":{"type":"string"},"cells_set":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["file","sheet","range","cells_set"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}}},"/v1/drive/files/{nodeId}/docx/placeholders":{"get":{"summary":"`{{…}}`-Platzhalter einer docx auflisten","tags":["Dokumente"],"parameters":[{"name":"nodeId","in":"path","required":true,"description":"Node-UUID einer .docx-Datei.","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"file":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"placeholders":{"type":"array","items":{"type":"object","properties":{"placeholder":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["placeholder","count"],"additionalProperties":false},"description":"Gefundene `{{…}}`-Platzhalter in Text, Kopf- und Fußzeilen."}},"required":["file","placeholders"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}}},"/v1/drive/files/{nodeId}/docx/replace":{"post":{"summary":"Platzhalter in einer docx ersetzen (auch über mehrere Textläufe verteilte)","description":"Sucht in Haupttext, Kopf- und Fußzeilen; Formatierung des ersten beteiligten Laufs bleibt. Schreibt einen neuen Stand der Datei (keine Fassung); der Editor öffnet danach diesen Stand. Vorlage zuerst duplizieren (`POST /files`), dann hier füllen.","tags":["Dokumente"],"parameters":[{"name":"nodeId","in":"path","required":true,"description":"Node-UUID einer .docx-Datei.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ersetzungen":{"type":"object","propertyNames":{"type":"string","minLength":1},"additionalProperties":{"type":"string"},"description":"Platzhalter → Ersatztext, Schluessel woertlich wie im Dokument (z. B. `{{kunde}}`). Zeilenumbrueche im Wert werden Umbrueche im Dokument."}},"required":["ersetzungen"]}}}},"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"file":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"size_bytes":{"type":"number"},"updated_at":{"type":"string","description":"Neuer Stand; OnlyOffice öffnet danach diesen Stand."}},"required":["id","name","size_bytes","updated_at"],"additionalProperties":false},"replaced":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"description":"Anzahl Ersetzungen je Platzhalter."},"not_found":{"type":"array","items":{"type":"string"},"description":"Platzhalter ohne Treffer."},"zugeordnet":{"description":"Abweichend geschriebene Schluessel → im Dokument gefundener Platzhalter (Gross-/Kleinschreibung, ohne {{ }}).","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"hinweis":{"description":"Bei mehrdeutiger Zuordnung: was nicht ersetzt wurde und warum.","type":"string"}},"required":["file","replaced","not_found"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}}},"/v1/drive/files/{nodeId}/docx/append":{"post":{"summary":"Absätze am Ende einer docx anhängen","tags":["Dokumente"],"parameters":[{"name":"nodeId","in":"path","required":true,"description":"Node-UUID einer .docx-Datei.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":100000,"description":"Text, der am Ende angehaengt wird; jede Zeile wird ein Absatz in der Formatierung des letzten Absatzes."}},"required":["text"]}}}},"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"file":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"size_bytes":{"type":"number"},"updated_at":{"type":"string","description":"Neuer Stand; OnlyOffice öffnet danach diesen Stand."}},"required":["id","name","size_bytes","updated_at"],"additionalProperties":false},"paragraphs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["file","paragraphs"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}}},"/v1/drive/trash":{"get":{"summary":"Papierkorb auflisten","description":"Liefert die echten IDs und Namen für Wiederherstellen und endgültiges Löschen.","tags":["Papierkorb"],"parameters":[{"name":"limit","in":"query","required":false,"description":"1-200, Default 50.","schema":{"type":"integer"}},{"name":"offset","in":"query","required":false,"description":"Offset für Blättern.","schema":{"type":"integer"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"kind":{"type":"string","enum":["file","folder"]},"size_bytes":{"anyOf":[{"type":"number"},{"type":"null"}]},"trashed_at":{"type":"string"}},"required":["id","name","kind","size_bytes","trashed_at"],"additionalProperties":false}},"_shown":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"_total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"counts":{"type":"object","properties":{"folders":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"files":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["folders","files","total"],"additionalProperties":false},"_hint":{"type":"string"}},"required":["data","_shown","_total","counts"],"additionalProperties":false}}}}}}},"/v1/drive/trash/restore":{"post":{"summary":"Dateien/Ordner aus dem Papierkorb zurückholen","tags":["Papierkorb"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string"},"description":"Node-IDs aus drive_search/drive_tree — mindestens eine, hoechstens 100."}},"required":["ids"]}}}},"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"action":{"type":"string","enum":["move","copy","trash","delete_permanent","restore"]},"succeeded":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"target":{"type":"object","properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"nodes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string","enum":["file","folder"]},"descendants":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Mitbetroffene Unterelemente."},"source_id":{"description":"Nur bei copy: ID des Originals; `id` ist die der Kopie.","type":"string"}},"required":["id","name","kind","descendants"],"additionalProperties":false}},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"reason":{"type":"string","description":"Deutscher Satz — landet wörtlich im Chat."}},"required":["id","reason"],"additionalProperties":false}}},"required":["action","succeeded","nodes","failed"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}}}},"/v1/drive/public/{token}":{"get":{"summary":"Freigabe-Link einlösen (anonym)","description":"Datei-Freigabe: Bytes. Ordner-Freigabe: Listing (`?list=1`) oder ZIP. Passwortgeschützte Links verlangen vorher den POST unten (HMAC-Cookie). 404 = unbekannt oder widerrufen, 410 = abgelaufen, 401 = Passwort fehlt.","tags":["Freigaben"],"parameters":[{"name":"token","in":"path","required":true,"description":"Freigabe-Token aus der Share-URL.","schema":{"type":"string"}},{"name":"list","in":"query","required":false,"description":"1 = Ordnerinhalt als JSON statt ZIP.","schema":{"type":"string","enum":["1"]}},{"name":"download","in":"query","required":false,"description":"1 = als Anhang statt inline.","schema":{"type":"string","enum":["1"]}}],"responses":{"200":{"description":"Datei-Bytes, ZIP oder JSON-Listing."}}},"post":{"summary":"Passwort eines Freigabe-Links prüfen (anonym, Formular)","description":"Body ist `multipart/form-data` mit `password` (bewusst kein JSON und kein `?pw=` — ein Query-Parameter landete in nginx-Logs und Referer-Headern). Antwort ist immer ein 303-Redirect auf die Landingpage; bei Erfolg mit kurzlebigem HMAC-Cookie.","tags":["Freigaben"],"parameters":[{"name":"token","in":"path","required":true,"description":"Freigabe-Token aus der Share-URL.","schema":{"type":"string"}}],"responses":{"303":{"description":"303 Redirect auf /s/{token}."}}}},"/v1/drive/export":{"get":{"summary":"Dateiablage exportieren (DSGVO Art. 20)","description":"Knoten, Freigaben, interne Freigaben und Einstellungen des Arbeitsbereichs.","tags":["Export"],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"bereich":{"type":"string","const":"dateiablage"},"erstellt_am":{"type":"string"},"bestaende":{"type":"object","properties":{"knoten":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"freigaben":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"knoten_freigaben":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"einstellungen":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"required":["knoten","freigaben","knoten_freigaben","einstellungen"],"additionalProperties":false}},"required":["bereich","erstellt_am","bestaende"],"additionalProperties":false}}}}}}},"/v1/weather/orte":{"get":{"summary":"Orte suchen","tags":["orte"],"parameters":[{"name":"q","in":"query","required":true,"description":"Suchbegriff, 2 bis 100 Zeichen","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Hoechstzahl Treffer (Vorgabe 8)","schema":{"type":"integer"}}],"responses":{"200":{"description":"Erfolg"}}}},"/v1/weather/orte/{slug}":{"get":{"summary":"Ein Ort per Slug","tags":["orte"],"responses":{"200":{"description":"Erfolg"}}}},"/v1/weather/bericht":{"get":{"summary":"Wetterbericht fuer einen Ort","description":"`ort` ODER `lat`+`lon`; `teile` (Komma-Liste) waehlt Abschnitte aus, Vorgabe: alle. Seit 2026-10-03 additiv: `regen2h` (Radar-Nowcast je 5 min, `mm` null = keine Radardaten), `luft` (UBA-Luftqualitaetsindex 0 sehr gut … 4 sehr schlecht, naechste Station ≤ 25 km), `mond`, `stunden[].druck`/`feuchte`, `jetzt.sicht` (km) und `zusammenfassung` (ein Satz, nur mit `stunden`).","tags":["bericht"],"parameters":[{"name":"ort","in":"query","required":false,"description":"Orts-Slug (z.B. `berlin`)","schema":{"type":"string"}},{"name":"lat","in":"query","required":false,"description":"Breitengrad, zusammen mit `lon` statt `ort`","schema":{"type":"number"}},{"name":"lon","in":"query","required":false,"description":"Laengengrad, zusammen mit `lat` statt `ort`","schema":{"type":"number"}},{"name":"teile","in":"query","required":false,"description":"Komma-Liste aus `jetzt`, `stunden`, `tage`, `warnungen`, `pollen`, `uv`, `sonne`, `regen2h`, `luft`, `mond`; `zusammenfassung` kommt mit `stunden` mit. Beispiel `jetzt,stunden`","schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg"}}}},"/v1/weather/warnungen":{"get":{"summary":"Aktive Warnungen fuer einen Ort","tags":["warnungen"],"parameters":[{"name":"ort","in":"query","required":false,"description":"Orts-Slug (z.B. `berlin`)","schema":{"type":"string"}},{"name":"lat","in":"query","required":false,"description":"Breitengrad, zusammen mit `lon` statt `ort`","schema":{"type":"number"}},{"name":"lon","in":"query","required":false,"description":"Laengengrad, zusammen mit `lat` statt `ort`","schema":{"type":"number"}}],"responses":{"200":{"description":"Erfolg"}}}},"/v1/weather/warnungen/deutschland":{"get":{"summary":"Alle aktiven Warnungen deutschlandweit, gruppiert nach Kreis","tags":["warnungen"],"responses":{"200":{"description":"Erfolg"}}}},"/v1/weather/radar/zeiten":{"get":{"summary":"Verfuegbare Radar-Zeitpunkte (letzte 2h + Nowcast)","tags":["radar"],"responses":{"200":{"description":"Erfolg"}}}},"/v1/weather/widget":{"get":{"summary":"Widget-Daten (gui-elements-Vertrag WeatherWidgetData)","tags":["widget"],"parameters":[{"name":"ort","in":"query","required":false,"description":"Orts-Slug (z.B. `berlin`)","schema":{"type":"string"}},{"name":"lat","in":"query","required":false,"description":"Breitengrad, zusammen mit `lon` statt `ort`","schema":{"type":"number"}},{"name":"lon","in":"query","required":false,"description":"Laengengrad, zusammen mit `lat` statt `ort`","schema":{"type":"number"}},{"name":"modus","in":"query","required":false,"description":"`day` oder `week`","schema":{"type":"string","enum":["day","week"]}}],"responses":{"200":{"description":"Erfolg"}}}}},"components":{"schemas":{},"responses":{},"parameters":{},"requestBodies":{},"headers":{},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"`jw_*`-API-Schluessel (Scope `weather:read`) oder Sitzungstoken."}},"examples":{}}}