{"openapi":"3.1.0","info":{"title":"CrewIO Developer API","version":"1.3.0","description":"Production-grade API für Events, Helfer, Schichten, Nachrichten, Automationen und Webhooks. Zugriff erfordert ProPass oder das API-Access-Add-on. Webhooks zusätzlich: ProPass oder api_access_plus + webhooks_access.","contact":{"name":"CrewIO Support","url":"https://crewio.co/support"}},"servers":[{"url":"https://api.crewio.co/api/developer/v1","description":"Production API"}],"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"tags":[{"name":"Events","description":"Anlegen, lesen, aktualisieren und synchronisieren von Events."},{"name":"Rollen","description":"Rollenkatalog je Event (z. B. Bar, Kasse, Aufbau)."},{"name":"Schichten","description":"Zeitfenster je Rolle, gegen das Plan-Limit für Schichten pro Event abgesichert."},{"name":"Helfer","description":"Helfer-Stammdaten verein- und event-scoped lesen oder synchronisieren."},{"name":"Zuweisungen","description":"Schichtbesetzung lesen und schreiben. Neue aktive Zuweisungen zählen auf das Helfer-Limit."},{"name":"Nachrichten & Broadcasts","description":"Event-Nachrichten erstellen. Channel-Gates: SMS, WhatsApp und Broadcast prüfen Plan oder Add-on."},{"name":"Verfügbarkeits-Umfragen","description":"Zeitfenster anfragen und Antworten erfassen (z. B. für Tagespläne)."},{"name":"Webhooks","description":"Webhooks erfordern ProPass ODER beide Add-ons (API-Access + Webhooks). Endpoints liefern signierte Events mit Retry und Delivery-Log."},{"name":"Automationen","description":"Workflows für availability_request_created, no_show_detected und event_created."}],"x-scopes":["events:read","events:write","events:create","events:delete","roles:read","roles:write","shifts:read","shifts:write","helpers:read","helpers:write","messages:read","messages:write","assignments:read","assignments:write","availability:read","availability:write","webhooks:read","webhooks:write","automation:read","automation:write"],"x-webhook-events":["event.created","event.updated","event.deleted","role.created","role.updated","role.deleted","shift.created","shift.updated","shift.deleted","helper.granted","helper.revoked","helper.registered","helper.confirmed","helper.cancelled","message.created","message.updated","message.deleted","assignment.updated","shift.changed","event.started","event.ended","automation.triggered","availability.request.created","availability.response.upserted"],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"Crewio API Key"},"apiKeyAuth":{"type":"apiKey","name":"x-crewio-api-key","in":"header"}},"schemas":{"ErrorResponse":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"code":{"type":"string"},"upgrade_hint":{"type":"string"},"upgrade_cta":{"type":"string"},"recommended_add_ons":{"type":"array","items":{"type":"string"}}}},"Event":{"type":"object","required":["id","verein_id","name","start_date","end_date","status"],"properties":{"id":{"type":"string","format":"uuid"},"verein_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"start_date":{"type":"string","format":"date"},"end_date":{"type":"string","format":"date"},"location":{"type":"string","nullable":true},"location_coordinates":{"type":"string","nullable":true},"status":{"type":"string","enum":["draft","active","archived","cancelled"]},"auto_confirm_assignments":{"type":"boolean"},"created_by":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"Helper":{"type":"object","required":["id","verein_id"],"properties":{"id":{"type":"string","format":"uuid"},"verein_id":{"type":"string","format":"uuid"},"user_id":{"type":"string","format":"uuid","nullable":true},"full_name":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"tags":{"type":"array","items":{"type":"string"},"nullable":true},"notes":{"type":"string","nullable":true}}},"Role":{"type":"object","required":["id","event_id","name"],"properties":{"id":{"type":"string","format":"uuid"},"event_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"color":{"type":"string","nullable":true},"display_order":{"type":"integer"},"created_at":{"type":"string","format":"date-time"}}},"Shift":{"type":"object","required":["id","event_id","role_id","start_time","end_time","required_count"],"properties":{"id":{"type":"string","format":"uuid"},"event_id":{"type":"string","format":"uuid"},"role_id":{"type":"string","format":"uuid"},"start_time":{"type":"string","format":"date-time"},"end_time":{"type":"string","format":"date-time"},"required_count":{"type":"integer"},"allow_overbooking":{"type":"boolean"},"notes":{"type":"string","nullable":true}}},"Assignment":{"type":"object","required":["shift_id","user_id","state"],"properties":{"id":{"type":"string","format":"uuid"},"shift_id":{"type":"string","format":"uuid"},"user_id":{"type":"string","format":"uuid"},"state":{"type":"string","enum":["requested","confirmed","cancelled","no_show","checked_in","checked_out","completed"]},"notes":{"type":"string","nullable":true}}},"Message":{"type":"object","required":["id","event_id","body"],"properties":{"id":{"type":"string","format":"uuid"},"event_id":{"type":"string","format":"uuid"},"subject":{"type":"string","nullable":true},"body":{"type":"string"},"audience_type":{"type":"string","enum":["all","selected","role","shift"]},"audience_filter":{"type":"object"},"send_email":{"type":"boolean"},"send_sms":{"type":"boolean"},"send_whatsapp":{"type":"boolean"}}},"Webhook":{"type":"object","required":["id","name","endpoint_url","subscribed_events","is_active"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"endpoint_url":{"type":"string","format":"uri"},"subscribed_events":{"type":"array","items":{"type":"string"}},"is_active":{"type":"boolean"},"failure_count":{"type":"integer"},"last_status_code":{"type":"integer","nullable":true},"last_error":{"type":"string","nullable":true},"last_sent_at":{"type":"string","format":"date-time","nullable":true}}},"WebhookDelivery":{"type":"object","required":["id","webhook_id","event_name"],"properties":{"id":{"type":"string","format":"uuid"},"webhook_id":{"type":"string","format":"uuid"},"event_name":{"type":"string"},"status":{"type":"string"},"response_status":{"type":"integer","nullable":true},"attempt":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"delivered_at":{"type":"string","format":"date-time","nullable":true}}},"AvailabilityRequest":{"type":"object","required":["id","event_id"],"properties":{"id":{"type":"string","format":"uuid"},"event_id":{"type":"string","format":"uuid"},"time_slots":{"type":"array","items":{"type":"object"}},"created_at":{"type":"string","format":"date-time"}}},"AvailabilityResponse":{"type":"object","required":["id","request_id","user_id"],"properties":{"id":{"type":"string","format":"uuid"},"request_id":{"type":"string","format":"uuid"},"user_id":{"type":"string","format":"uuid"},"responses":{"type":"array","items":{"type":"object","properties":{"time_slot_id":{"type":"string"},"available":{"type":"boolean"}},"required":["time_slot_id","available"]}}}},"AutomationWorkflow":{"type":"object","required":["id","name","trigger_type"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"trigger_type":{"type":"string","enum":["availability_request_created","no_show_detected","event_created"]},"channel":{"type":"string","enum":["email","sms","whatsapp","mixed"]},"is_active":{"type":"boolean"},"config":{"type":"object"}}}}},"paths":{"/events":{"get":{"operationId":"events.list","summary":"Events listen","description":"Listet Events des aktuellen Vereins. Gefiltert nach Status, sortiert nach Startdatum.\n\nScope: `events:read`. Gate: ProPass oder API-Access-Add-on.","tags":["Events"],"parameters":[{"name":"vereinId","in":"query","required":false,"description":"Optionaler Override. Muss zum API-Key passen.","schema":{"type":"string","format":"uuid"}},{"name":"status","in":"query","required":false,"description":"draft, active, archived oder cancelled.","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Standard 50.","schema":{"type":"integer"}}],"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","description":"{ \"events\": [Event] }"}}}},"403":{"description":"Plan oder Add-on fehlt.","content":{"application/json":{"schema":{"type":"object","description":"{\n  \"error\": \"Human-readable message\",\n  \"upgrade_hint\": \"pro_or_developer_addon\"\n}"}}}}}},"post":{"operationId":"events.create","summary":"Event anlegen","description":"Legt ein Event im Verein des API-Keys an. Aktive/Draft-Events prüfen das Event-Limit des Plans.\n\nScope: `events:create`. Gate: Plan-/Capacity-Gate (Limit pro Plan/Add-on).","tags":["Events"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","start_date","end_date"],"properties":{"name":{"type":"string","description":"2–140 Zeichen."},"description":{"type":"string","description":"Bis 4 000 Zeichen.","nullable":true},"start_date":{"type":"string","format":"date","description":"Startdatum."},"end_date":{"type":"string","format":"date","description":"Enddatum."},"location":{"type":"string","description":"Bis 240 Zeichen.","nullable":true},"location_coordinates":{"type":"string","description":"Koordinaten z. B. \"52.5200,13.4050\".","nullable":true},"status":{"type":"string","enum":["draft","active","archived","cancelled"],"description":"Standard \"draft\"."},"auto_confirm_assignments":{"type":"boolean","description":"Helfer automatisch bestätigen."}}}}}},"responses":{"201":{"description":"Erstellt","content":{"application/json":{"schema":{"type":"object","description":"{\n  \"event\": {\n    \"id\": \"11111111-1111-1111-1111-111111111111\",\n    \"verein_id\": \"00000000-0000-0000-0000-000000000000\",\n    \"name\": \"Sommerfest 2026\",\n    \"description\": null,\n    \"start_date\": \"2026-08-20\",\n    \"end_date\": \"2026-08-21\",\n    \"location\": \"Vereinsheim\",\n    \"status\": \"draft\",\n    \"auto_confirm_assignments\": false,\n    \"created_by\": \"user-uuid\",\n    \"created_at\": \"2026-05-13T18:21:42.317Z\",\n    \"updated_at\": \"2026-05-13T18:21:42.317Z\"\n  }\n}"}}}},"400":{"description":"Validation-Fehler","content":{"application/json":{"schema":{"type":"object","description":"{\n  \"error\": \"Human-readable message\",\n  \"upgrade_hint\": \"pro_or_developer_addon\"\n}"}}}},"403":{"description":"Plan- oder Capacity-Limit erreicht.","content":{"application/json":{"schema":{"type":"object","description":"{\n  \"error\": \"Human-readable message\",\n  \"upgrade_hint\": \"pro_or_developer_addon\"\n}"}}}}},"x-emits-webhook-events":["event.created","event.started"]}},"/events/{eventId}":{"get":{"operationId":"events.get","summary":"Event laden","description":"Liest ein einzelnes Event des aktuellen Vereins.\n\nScope: `events:read`. Gate: ProPass oder API-Access-Add-on.","tags":["Events"],"parameters":[{"name":"eventId","in":"path","required":true,"description":"Event-ID.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","description":"{\n  \"event\": {\n    \"id\": \"11111111-1111-1111-1111-111111111111\",\n    \"verein_id\": \"00000000-0000-0000-0000-000000000000\",\n    \"name\": \"Sommerfest 2026\",\n    \"description\": null,\n    \"start_date\": \"2026-08-20\",\n    \"end_date\": \"2026-08-21\",\n    \"location\": \"Vereinsheim\",\n    \"status\": \"draft\",\n    \"auto_confirm_assignments\": false,\n    \"created_by\": \"user-uuid\",\n    \"created_at\": \"2026-05-13T18:21:42.317Z\",\n    \"updated_at\": \"2026-05-13T18:21:42.317Z\"\n  }\n}"}}}},"404":{"description":"Nicht gefunden","content":{"application/json":{"schema":{"type":"object","description":"{\n  \"error\": \"Human-readable message\",\n  \"upgrade_hint\": \"pro_or_developer_addon\"\n}"}}}}}},"patch":{"operationId":"events.update","summary":"Event ändern","description":"Aktualisiert ausgewählte Felder eines Events.\n\nScope: `events:write`. Gate: ProPass oder API-Access-Add-on.","tags":["Events"],"parameters":[{"name":"eventId","in":"path","required":true,"description":"Event-ID.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"2–140 Zeichen."},"description":{"type":"string","description":"Bis 4 000 Zeichen.","nullable":true},"location":{"type":"string","description":"Bis 240 Zeichen.","nullable":true},"start_date":{"type":"string","format":"date","description":"Startdatum."},"end_date":{"type":"string","format":"date","description":"Enddatum."},"status":{"type":"string","enum":["draft","active","archived","cancelled"],"description":"Lifecycle-Status."}}}}}},"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","description":"{\n  \"event\": {\n    \"id\": \"11111111-1111-1111-1111-111111111111\",\n    \"verein_id\": \"00000000-0000-0000-0000-000000000000\",\n    \"name\": \"Sommerfest 2026\",\n    \"description\": null,\n    \"start_date\": \"2026-08-20\",\n    \"end_date\": \"2026-08-21\",\n    \"location\": \"Vereinsheim\",\n    \"status\": \"draft\",\n    \"auto_confirm_assignments\": false,\n    \"created_by\": \"user-uuid\",\n    \"created_at\": \"2026-05-13T18:21:42.317Z\",\n    \"updated_at\": \"2026-05-13T18:21:42.317Z\"\n  }\n}"}}}},"400":{"description":"Validation-Fehler","content":{"application/json":{"schema":{"type":"object","description":"{\n  \"error\": \"Human-readable message\",\n  \"upgrade_hint\": \"pro_or_developer_addon\"\n}"}}}},"404":{"description":"Nicht gefunden","content":{"application/json":{"schema":{"type":"object","description":"{\n  \"error\": \"Human-readable message\",\n  \"upgrade_hint\": \"pro_or_developer_addon\"\n}"}}}}},"x-emits-webhook-events":["event.updated","event.started","event.ended"]},"delete":{"operationId":"events.delete","summary":"Event löschen","description":"Soft-Delete des Events. Helfer- und Schichtdaten bleiben für Audit erhalten.\n\nScope: `events:delete`. Gate: ProPass oder API-Access-Add-on.","tags":["Events"],"parameters":[{"name":"eventId","in":"path","required":true,"description":"Event-ID.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","description":"{ \"ok\": true }"}}}},"404":{"description":"Nicht gefunden","content":{"application/json":{"schema":{"type":"object","description":"{\n  \"error\": \"Human-readable message\",\n  \"upgrade_hint\": \"pro_or_developer_addon\"\n}"}}}}},"x-emits-webhook-events":["event.deleted"]}},"/events/sync":{"post":{"operationId":"events.sync","summary":"Events synchronisieren","description":"Bulk-Create/Update von bis zu 100 Events in einer Anfrage. Zeilen mit \"id\" werden aktualisiert, sonst angelegt.\n\nScope: `events:write`. Gate: Plan-/Capacity-Gate (Limit pro Plan/Add-on).","tags":["Events"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"type":"object"},"description":"1–100 Events."}}}}}},"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","description":"{ \"created\": [Event], \"updated\": [Event] }"}}}},"400":{"description":"Validation-Fehler","content":{"application/json":{"schema":{"type":"object","description":"{\n  \"error\": \"Human-readable message\",\n  \"upgrade_hint\": \"pro_or_developer_addon\"\n}"}}}},"403":{"description":"Limit erreicht","content":{"application/json":{"schema":{"type":"object","description":"{\n  \"error\": \"Human-readable message\",\n  \"upgrade_hint\": \"pro_or_developer_addon\"\n}"}}}}}}},"/events/{eventId}/roles":{"get":{"operationId":"roles.list","summary":"Rollen listen","description":"Listet alle Rollen für ein Event.\n\nScope: `roles:read`. Gate: ProPass oder API-Access-Add-on.","tags":["Rollen"],"parameters":[{"name":"eventId","in":"path","required":true,"description":"Event-ID.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","description":"{ \"roles\": [Role] }"}}}}}},"post":{"operationId":"roles.create","summary":"Rolle anlegen","description":"Erzeugt eine neue Rolle für das Event.\n\nScope: `roles:write`. Gate: ProPass oder API-Access-Add-on.","tags":["Rollen"],"parameters":[{"name":"eventId","in":"path","required":true,"description":"Event-ID.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","description":"1–80 Zeichen."},"description":{"type":"string","description":"Bis 1 000 Zeichen.","nullable":true},"color":{"type":"string","description":"HEX/Token, bis 20 Zeichen.","nullable":true},"display_order":{"type":"integer","description":"Sortier-Index."}}}}}},"responses":{"201":{"description":"Erstellt","content":{"application/json":{"schema":{"type":"object","description":"{ \"role\": Role }"}}}},"400":{"description":"Validation-Fehler","content":{"application/json":{"schema":{"type":"object","description":"{\n  \"error\": \"Human-readable message\",\n  \"upgrade_hint\": \"pro_or_developer_addon\"\n}"}}}}},"x-emits-webhook-events":["role.created"]}},"/events/{eventId}/roles/{roleId}":{"patch":{"operationId":"roles.update","summary":"Rolle ändern","description":"Aktualisiert eine bestehende Rolle.\n\nScope: `roles:write`. Gate: ProPass oder API-Access-Add-on.","tags":["Rollen"],"parameters":[{"name":"eventId","in":"path","required":true,"description":"Event-ID.","schema":{"type":"string","format":"uuid"}},{"name":"roleId","in":"path","required":true,"description":"Rolle-ID.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"1–80 Zeichen."},"description":{"type":"string","description":"Bis 1 000 Zeichen.","nullable":true},"color":{"type":"string","description":"Bis 20 Zeichen.","nullable":true},"display_order":{"type":"integer","description":"Sortier-Index."}}}}}},"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","description":"{ \"role\": Role }"}}}},"404":{"description":"Nicht gefunden","content":{"application/json":{"schema":{"type":"object","description":"{\n  \"error\": \"Human-readable message\",\n  \"upgrade_hint\": \"pro_or_developer_addon\"\n}"}}}}},"x-emits-webhook-events":["role.updated"]},"delete":{"operationId":"roles.delete","summary":"Rolle löschen","description":"Löscht eine Rolle. Schichten mit dieser Rolle bleiben erhalten, verlieren aber die Zuordnung.\n\nScope: `roles:write`. Gate: ProPass oder API-Access-Add-on.","tags":["Rollen"],"parameters":[{"name":"eventId","in":"path","required":true,"description":"Event-ID.","schema":{"type":"string","format":"uuid"}},{"name":"roleId","in":"path","required":true,"description":"Rolle-ID.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","description":"{ \"ok\": true }"}}}}},"x-emits-webhook-events":["role.deleted"]}},"/events/{eventId}/shifts":{"get":{"operationId":"shifts.list","summary":"Schichten listen","description":"Listet alle Schichten eines Events nach Startzeit.\n\nScope: `shifts:read`. Gate: ProPass oder API-Access-Add-on.","tags":["Schichten"],"parameters":[{"name":"eventId","in":"path","required":true,"description":"Event-ID.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","description":"{ \"shifts\": [Shift] }"}}}}}},"post":{"operationId":"shifts.create","summary":"Schicht anlegen","description":"Erzeugt eine Schicht. Capacity-Limit (Schichten pro Event) wird geprüft.\n\nScope: `shifts:write`. Gate: Plan-/Capacity-Gate (Limit pro Plan/Add-on).","tags":["Schichten"],"parameters":[{"name":"eventId","in":"path","required":true,"description":"Event-ID.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["role_id","start_time","end_time"],"properties":{"role_id":{"type":"string","format":"uuid","description":"Existierende Rolle des Events."},"start_time":{"type":"string","format":"date","description":"Schichtbeginn."},"end_time":{"type":"string","format":"date","description":"Schichtende."},"required_count":{"type":"integer","description":"Standard 1."},"allow_overbooking":{"type":"boolean","description":"Mehrfachbesetzung erlauben."},"notes":{"type":"string","description":"Bis 1 000 Zeichen.","nullable":true}}}}}},"responses":{"201":{"description":"Erstellt","content":{"application/json":{"schema":{"type":"object","description":"{ \"shift\": Shift }"}}}},"403":{"description":"Schicht-Limit erreicht","content":{"application/json":{"schema":{"type":"object","description":"{\n  \"error\": \"Human-readable message\",\n  \"upgrade_hint\": \"pro_or_developer_addon\"\n}"}}}}},"x-emits-webhook-events":["shift.created"]}},"/events/{eventId}/shifts/{shiftId}":{"patch":{"operationId":"shifts.update","summary":"Schicht ändern","description":"Aktualisiert Felder einer Schicht.\n\nScope: `shifts:write`. Gate: ProPass oder API-Access-Add-on.","tags":["Schichten"],"parameters":[{"name":"eventId","in":"path","required":true,"description":"Event-ID.","schema":{"type":"string","format":"uuid"}},{"name":"shiftId","in":"path","required":true,"description":"Schicht-ID.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","description":"{ \"shift\": Shift }"}}}}},"x-emits-webhook-events":["shift.updated","shift.changed"]},"delete":{"operationId":"shifts.delete","summary":"Schicht löschen","description":"Schicht entfernen. Zugewiesene Helfer werden archiviert.\n\nScope: `shifts:write`. Gate: ProPass oder API-Access-Add-on.","tags":["Schichten"],"parameters":[{"name":"eventId","in":"path","required":true,"description":"Event-ID.","schema":{"type":"string","format":"uuid"}},{"name":"shiftId","in":"path","required":true,"description":"Schicht-ID.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","description":"{ \"ok\": true }"}}}}},"x-emits-webhook-events":["shift.deleted"]}},"/helpers":{"get":{"operationId":"helpers.list","summary":"Helfer listen","description":"Listet Helfer im Verein, optional gefiltert nach Event oder Suchstring.\n\nScope: `helpers:read`. Gate: ProPass oder API-Access-Add-on.","tags":["Helfer"],"parameters":[{"name":"vereinId","in":"query","required":false,"description":"Muss zum API-Key passen.","schema":{"type":"string","format":"uuid"}},{"name":"eventId","in":"query","required":false,"description":"Nur Helfer mit Event-Zugriff.","schema":{"type":"string","format":"uuid"}},{"name":"search","in":"query","required":false,"description":"Trifft Name, E-Mail oder Telefon.","schema":{"type":"string","description":"string"}},{"name":"limit","in":"query","required":false,"description":"Standard 100.","schema":{"type":"integer"}},{"name":"offset","in":"query","required":false,"description":"Standard 0.","schema":{"type":"integer"}}],"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","description":"{ \"helpers\": [Helper], \"limit\": 100, \"offset\": 0 }"}}}}}},"post":{"operationId":"helpers.upsert","summary":"Helfer bulk anlegen oder synchronisieren","description":"Bis zu 200 Helfer per Identity-Match (user_id, email, phone) upserten. Optional Event-Zugriff setzen.\n\nScope: `helpers:write`. Gate: Plan-/Capacity-Gate (Limit pro Plan/Add-on).","tags":["Helfer"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["helpers"],"properties":{"mode":{"type":"string","description":"\"upsert\" (Default) oder \"import\" (lege nur fehlende an)."},"helpers":{"type":"array","items":{"type":"object"},"description":"1–200 Helfer-Datensätze."},"sync_to_event_id":{"type":"string","format":"uuid","description":"Setzt Event-Zugriff für die übergebenen Helfer."},"replace_event_helpers":{"type":"boolean","description":"Mit sync_to_event_id: bestehende Zugriffe ersetzen."}}}}}},"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","description":"{ \"helpers\": [Helper], \"created\": n, \"updated\": n }"}}}},"400":{"description":"Validation-Fehler","content":{"application/json":{"schema":{"type":"object","description":"{\n  \"error\": \"Human-readable message\",\n  \"upgrade_hint\": \"pro_or_developer_addon\"\n}"}}}}},"x-emits-webhook-events":["helper.granted","helper.registered"]}},"/events/{eventId}/helpers":{"post":{"operationId":"helpers.eventAccess","summary":"Helfer einem Event zuweisen","description":"Granted Helfer den Zugriff auf das Event. Bestehender Zugriff bleibt idempotent erhalten.\n\nScope: `helpers:write`. Gate: ProPass oder API-Access-Add-on.","tags":["Helfer"],"parameters":[{"name":"eventId","in":"path","required":true,"description":"Event-ID.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["user_id"],"properties":{"user_id":{"type":"string","format":"uuid","description":"User-ID des Helfers."},"invite_id":{"type":"string","format":"uuid","nullable":true,"description":"Optionaler Bezug zur ursprünglichen Einladung."}}}}}},"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","description":"{ \"ok\": true }"}}}}},"x-emits-webhook-events":["helper.granted"]}},"/events/{eventId}/assignments":{"get":{"operationId":"assignments.list","summary":"Zuweisungen listen","description":"Listet alle Assignments eines Events inkl. Status.\n\nScope: `assignments:read`. Gate: ProPass oder API-Access-Add-on.","tags":["Zuweisungen"],"parameters":[{"name":"eventId","in":"path","required":true,"description":"Event-ID.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","description":"{ \"assignments\": [Assignment] }"}}}}}},"post":{"operationId":"assignments.upsert","summary":"Zuweisung anlegen oder Status setzen","description":"Upsert eines Assignments. Aktivierungen prüfen das Helfer-Limit des Plans.\n\nScope: `assignments:write`. Gate: Plan-/Capacity-Gate (Limit pro Plan/Add-on).","tags":["Zuweisungen"],"parameters":[{"name":"eventId","in":"path","required":true,"description":"Event-ID.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["shift_id","user_id","state"],"properties":{"shift_id":{"type":"string","format":"uuid","description":"Existierende Schicht des Events."},"user_id":{"type":"string","format":"uuid","description":"Helfer-ID."},"state":{"type":"string","enum":["requested","confirmed","cancelled","no_show","checked_in","checked_out","completed"],"description":"Assignment-Status."},"notes":{"type":"string","description":"Bis 1 000 Zeichen.","nullable":true}}}}}},"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","description":"{ \"assignment\": Assignment }"}}}},"403":{"description":"Helfer-Limit erreicht","content":{"application/json":{"schema":{"type":"object","description":"{\n  \"error\": \"Human-readable message\",\n  \"upgrade_hint\": \"pro_or_developer_addon\"\n}"}}}}},"x-emits-webhook-events":["assignment.updated","helper.confirmed","helper.cancelled"]}},"/events/{eventId}/messages":{"get":{"operationId":"messages.list","summary":"Nachrichten listen","description":"Listet Nachrichten eines Events, neueste zuerst.\n\nScope: `messages:read`. Gate: ProPass oder API-Access-Add-on.","tags":["Nachrichten & Broadcasts"],"parameters":[{"name":"eventId","in":"path","required":true,"description":"Event-ID.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","description":"{ \"messages\": [Message] }"}}}}}},"post":{"operationId":"messages.create","summary":"Nachricht erstellen / Broadcast auslösen","description":"Erstellt eine Nachricht im Event. Channel- und Zielgruppen-Auswahl gegen Plan-/Add-on-Gates. SMS/WhatsApp/Broadcast erfordern passende Freischaltung.\n\nScope: `messages:write`. Gate: ProPass oder API-Access-Add-on.","tags":["Nachrichten & Broadcasts"],"parameters":[{"name":"eventId","in":"path","required":true,"description":"Event-ID.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["body"],"properties":{"subject":{"type":"string","description":"Bis 200 Zeichen.","nullable":true},"body":{"type":"string","description":"1–6 000 Zeichen."},"audience_type":{"type":"string","enum":["all","selected","role","shift"],"description":"Standard \"all\"."},"audience_filter":{"type":"object","description":"Bei \"selected\"/\"role\"/\"shift\": user_ids[], role_id, shift_id."},"send_email":{"type":"boolean","description":"Standard false."},"send_sms":{"type":"boolean","description":"Erfordert SMS-Add-on."},"send_whatsapp":{"type":"boolean","description":"Erfordert WhatsApp-Add-on, EventPass oder ProPass."}}}}}},"responses":{"201":{"description":"Erstellt","content":{"application/json":{"schema":{"type":"object","description":"{ \"message\": Message }"}}}},"403":{"description":"Channel-Add-on fehlt","content":{"application/json":{"schema":{"type":"object","description":"{\n  \"error\": \"Human-readable message\",\n  \"upgrade_hint\": \"pro_or_developer_addon\"\n}"}}}}},"x-emits-webhook-events":["message.created"]}},"/events/{eventId}/messages/{messageId}":{"patch":{"operationId":"messages.update","summary":"Nachricht aktualisieren","description":"Aktualisiert Subject/Body/Zielgruppe einer noch nicht versendeten Nachricht.\n\nScope: `messages:write`. Gate: ProPass oder API-Access-Add-on.","tags":["Nachrichten & Broadcasts"],"parameters":[{"name":"eventId","in":"path","required":true,"description":"Event-ID.","schema":{"type":"string","format":"uuid"}},{"name":"messageId","in":"path","required":true,"description":"Message-ID.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","description":"{ \"message\": Message }"}}}}},"x-emits-webhook-events":["message.updated"]},"delete":{"operationId":"messages.delete","summary":"Nachricht löschen","description":"Entfernt eine Nachricht.\n\nScope: `messages:write`. Gate: ProPass oder API-Access-Add-on.","tags":["Nachrichten & Broadcasts"],"parameters":[{"name":"eventId","in":"path","required":true,"description":"Event-ID.","schema":{"type":"string","format":"uuid"}},{"name":"messageId","in":"path","required":true,"description":"Message-ID.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","description":"{ \"ok\": true }"}}}}},"x-emits-webhook-events":["message.deleted"]}},"/events/{eventId}/availability/requests":{"get":{"operationId":"availability.requests.list","summary":"Verfügbarkeits-Requests listen","description":"Listet alle Verfügbarkeits-Anfragen eines Events.\n\nScope: `availability:read`. Gate: ProPass oder API-Access-Add-on.","tags":["Verfügbarkeits-Umfragen"],"parameters":[{"name":"eventId","in":"path","required":true,"description":"Event-ID.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","description":"{ \"requests\": [AvailabilityRequest] }"}}}}}},"post":{"operationId":"availability.requests.create","summary":"Verfügbarkeits-Request erstellen","description":"Erstellt einen neuen Verfügbarkeits-Request mit Zeitfenstern.\n\nScope: `availability:write`. Gate: ProPass oder API-Access-Add-on.","tags":["Verfügbarkeits-Umfragen"],"parameters":[{"name":"eventId","in":"path","required":true,"description":"Event-ID.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["time_slots"],"properties":{"time_slots":{"type":"array","items":{"type":"object"},"description":"1–60 Slots. id ist beliebig, muss in Antworten passen."}}}}}},"responses":{"201":{"description":"Erstellt","content":{"application/json":{"schema":{"type":"object","description":"{ \"request\": AvailabilityRequest }"}}}},"400":{"description":"Validation-Fehler","content":{"application/json":{"schema":{"type":"object","description":"{\n  \"error\": \"Human-readable message\",\n  \"upgrade_hint\": \"pro_or_developer_addon\"\n}"}}}}},"x-emits-webhook-events":["availability.request.created"]}},"/events/{eventId}/availability/responses":{"get":{"operationId":"availability.responses.list","summary":"Antworten listen","description":"Listet Antworten, optional gefiltert nach requestId.\n\nScope: `availability:read`. Gate: ProPass oder API-Access-Add-on.","tags":["Verfügbarkeits-Umfragen"],"parameters":[{"name":"eventId","in":"path","required":true,"description":"Event-ID.","schema":{"type":"string","format":"uuid"}},{"name":"requestId","in":"query","required":false,"description":"Filter auf einzelne Anfrage.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","description":"{ \"responses\": [AvailabilityResponse] }"}}}}}},"post":{"operationId":"availability.responses.upsert","summary":"Antwort upsert","description":"Schreibt die Antwort eines Users auf eine Verfügbarkeits-Anfrage.\n\nScope: `availability:write`. Gate: ProPass oder API-Access-Add-on.","tags":["Verfügbarkeits-Umfragen"],"parameters":[{"name":"eventId","in":"path","required":true,"description":"Event-ID.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["request_id","user_id","responses"],"properties":{"request_id":{"type":"string","format":"uuid","description":"Existierender Request."},"user_id":{"type":"string","format":"uuid","description":"Antwortender User."},"responses":{"type":"array","items":{"type":"object"},"description":"1–120 Slots."}}}}}},"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","description":"{ \"response\": AvailabilityResponse }"}}}},"404":{"description":"Request nicht gefunden","content":{"application/json":{"schema":{"type":"object","description":"{\n  \"error\": \"Human-readable message\",\n  \"upgrade_hint\": \"pro_or_developer_addon\"\n}"}}}}},"x-emits-webhook-events":["availability.response.upserted"]}},"/webhooks":{"get":{"operationId":"webhooks.list","summary":"Webhook-Endpoints listen","description":"Listet alle Webhook-Endpoints der aktuellen Integration mit Status, Fehlerzahl und letztem Send-Zeitpunkt.\n\nScope: `webhooks:read`. Gate: ProPass oder API-Access + Webhooks Add-ons.","tags":["Webhooks"],"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","description":"{ \"webhooks\": [Webhook] }"}}}}}},"post":{"operationId":"webhooks.create","summary":"Webhook erstellen","description":"Legt einen neuen Webhook-Endpoint an. Das Signing-Secret wird nur einmal ausgegeben und muss sicher abgelegt werden.\n\nScope: `webhooks:write`. Gate: ProPass oder API-Access + Webhooks Add-ons.","tags":["Webhooks"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","endpoint_url","events"],"properties":{"name":{"type":"string","description":"2–80 Zeichen."},"endpoint_url":{"type":"string","format":"uri","description":"HTTPS-Pflicht."},"events":{"type":"array","items":{"type":"object"},"description":"1–20 Events."}}}}}},"responses":{"201":{"description":"Erstellt – Signing-Secret nur einmal sichtbar.","content":{"application/json":{"schema":{"type":"object","description":"{ \"webhook\": Webhook, \"signing_secret\": \"whsec_...\", \"warning\": \"...\" }"}}}},"400":{"description":"Validation-Fehler oder kein HTTPS","content":{"application/json":{"schema":{"type":"object","description":"{\n  \"error\": \"Human-readable message\",\n  \"upgrade_hint\": \"pro_or_developer_addon\"\n}"}}}},"403":{"description":"Plan/Add-ons fehlen","content":{"application/json":{"schema":{"type":"object","description":"{\n  \"error\": \"Human-readable message\",\n  \"upgrade_hint\": \"pro_or_developer_addon\"\n}"}}}}}},"delete":{"operationId":"webhooks.delete","summary":"Webhook deaktivieren","description":"Setzt einen Webhook auf is_active=false. Delivery-Logs bleiben erhalten.\n\nScope: `webhooks:write`. Gate: ProPass oder API-Access + Webhooks Add-ons.","tags":["Webhooks"],"parameters":[{"name":"webhookId","in":"query","required":true,"description":"Webhook-ID.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","description":"{ \"ok\": true, \"webhook_id\": \"...\" }"}}}}}}},"/webhooks/deliveries":{"get":{"operationId":"webhooks.deliveries","summary":"Delivery-Logs lesen","description":"Liefert Versuche, Statuscodes, Response-Body und Dauer. Ideal für Retry-Diagnose.\n\nScope: `webhooks:read`. Gate: ProPass oder API-Access + Webhooks Add-ons.","tags":["Webhooks"],"parameters":[{"name":"webhookId","in":"query","required":false,"description":"Filter auf einzelnen Webhook.","schema":{"type":"string","format":"uuid"}},{"name":"eventName","in":"query","required":false,"description":"Filter auf konkretes Event.","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Standard 100.","schema":{"type":"integer"}}],"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","description":"{ \"webhooks\": [Webhook], \"deliveries\": [WebhookDelivery] }"}}}}}}},"/automations/workflows":{"get":{"operationId":"automations.workflows.list","summary":"Workflows listen","description":"Listet alle Automation-Workflows der Integration.\n\nScope: `automation:read`. Gate: ProPass oder API-Access-Add-on.","tags":["Automationen"],"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","description":"{ \"workflows\": [AutomationWorkflow] }"}}}}}},"post":{"operationId":"automations.workflows.create","summary":"Workflow anlegen","description":"Erstellt einen neuen Workflow mit Trigger und Channel-Definition.\n\nScope: `automation:write`. Gate: ProPass oder API-Access-Add-on.","tags":["Automationen"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","trigger_type"],"properties":{"name":{"type":"string","description":"2–120 Zeichen."},"trigger_type":{"type":"string","enum":["availability_request_created","no_show_detected","event_created"],"description":"Trigger."},"channel":{"type":"string","enum":["email","sms","whatsapp","mixed"],"description":"Standard \"mixed\"."},"is_active":{"type":"boolean","description":"Standard true."},"config":{"type":"object","description":"Freie Konfiguration (z. B. Templates)."}}}}}},"responses":{"201":{"description":"Erstellt","content":{"application/json":{"schema":{"type":"object","description":"{ \"workflow\": AutomationWorkflow }"}}}},"400":{"description":"Validation-Fehler","content":{"application/json":{"schema":{"type":"object","description":"{\n  \"error\": \"Human-readable message\",\n  \"upgrade_hint\": \"pro_or_developer_addon\"\n}"}}}}}}},"/automations/workflows/{workflowId}":{"patch":{"operationId":"automations.workflows.update","summary":"Workflow ändern","description":"Aktualisiert ausgewählte Felder eines Workflows.\n\nScope: `automation:write`. Gate: ProPass oder API-Access-Add-on.","tags":["Automationen"],"parameters":[{"name":"workflowId","in":"path","required":true,"description":"Workflow-ID.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","description":"{ \"workflow\": AutomationWorkflow }"}}}}}},"delete":{"operationId":"automations.workflows.delete","summary":"Workflow löschen","description":"Entfernt einen Workflow vollständig.\n\nScope: `automation:write`. Gate: ProPass oder API-Access-Add-on.","tags":["Automationen"],"parameters":[{"name":"workflowId","in":"path","required":true,"description":"Workflow-ID.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","description":"{ \"ok\": true }"}}}}}}},"/automations/trigger":{"post":{"operationId":"automations.trigger","summary":"Automation manuell auslösen","description":"Findet passende aktive Workflows und stößt das Automation-Webhook-Event an.\n\nScope: `automation:write`. Gate: ProPass oder API-Access-Add-on.","tags":["Automationen"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["trigger_type"],"properties":{"trigger_type":{"type":"string","enum":["availability_request_created","no_show_detected","event_created"],"description":"Trigger."},"event_id":{"type":"string","format":"uuid","description":"Optionaler Event-Kontext."},"payload":{"type":"object","description":"Freie Trigger-Payload."}}}}}},"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","description":"{ \"ok\": true, \"dispatched\": n }"}}}}},"x-emits-webhook-events":["automation.triggered"]}}}}