{"openapi":"3.1.0","info":{"title":"AM CRM — öffentliche API","version":"1.0.0","description":"Rechtegesteuerter Zugriff auf die Daten EINER Organisation.\n\nAnmeldung mit `Authorization: Bearer amk_…`. Den Schlüssel legst du in den\nEinstellungen unter Integrationen an; dort hakst du auch an, was er darf.\n\nFehler kommen als `application/problem+json` nach RFC 9457. Jede Antwort trägt\n`X-Request-Id` — nenne die Kennung, wenn etwas klemmt.","contact":{"name":"AM CRM","url":"https://am-crm.com/docs/api"}},"servers":[{"url":"https://am-crm.com","description":"Produktion"},{"url":"https://crm.airmastery.de","description":"Alias, gleicher Stand"}],"tags":[{"name":"Konto"},{"name":"Kontakte"},{"name":"Deals"},{"name":"Termine"},{"name":"Anrufe"},{"name":"Stammdaten"},{"name":"Ereignis-Abos"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Der Schlüssel aus den Einstellungen. NUR als Kopfzeile — im Adressfeld würde er in Server-Protokollen landen."}},"responses":{"Problem":{"description":"Fehler nach RFC 9457","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"},"code":{"type":"string","enum":["unauthorized","forbidden_scope","not_found","validation_failed","invalid_json","idempotency_conflict","quota_exceeded","method_not_allowed","unsupported_media_type","payload_too_large","conflict","server_error","service_unavailable"]},"request_id":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}}}}},"required":["type","title","status","code"]}}}}},"schemas":{"Umfang":{"type":"string","enum":["contacts.read","contacts.write","deals.read","deals.write","appointments.read","appointments.write","activities.read","activities.write","calls.read","pipelines.read","users.read","webhooks.manage"],"description":"Rechte-Umfang eines Schlüssels."},"Ereignis":{"type":"string","enum":["contact.created","contact.updated","contact.status_changed","deal.created","deal.updated","deal.won","deal.lost","deal.stage_changed","appointment.booked","appointment.rescheduled","appointment.cancelled","call.completed"],"description":"Ereignis, das ein Webhook melden kann."}}},"security":[{"bearerAuth":[]}],"paths":{"/api/v1/me":{"get":{"summary":"Wer bin ich?","description":"Zeigt Organisation, Rechte und Grenzen des benutzten Schlüssels. Der erste Aufruf, mit dem man eine Anbindung prüft.","tags":["Konto"],"operationId":"get_v_me","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Kennung dieser Anfrage."},"RateLimit":{"schema":{"type":"string"},"description":"Aktueller Stand des Kontingents."}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/api/v1/contacts":{"get":{"summary":"Kontakte auflisten","description":"Neueste zuerst. `updated_since` holt nur, was sich geändert hat — ohne diesen Filter zieht jeder Abgleich den ganzen Bestand.","tags":["Kontakte"],"operationId":"get_v_contacts","security":[{"bearerAuth":["contacts.read"]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer"},"description":"1 bis 100, Standard 25."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Der Wert aus next_cursor der vorigen Antwort."},{"name":"status","in":"query","required":false,"schema":{"type":"string"},"description":"Lead-Status, genau. Mögliche Werte über /v1/lead-statuses."},{"name":"owner_id","in":"query","required":false,"schema":{"type":"string","format":"uuid"},"description":"Nur Kontakte dieses Besitzers."},{"name":"email","in":"query","required":false,"schema":{"type":"string"},"description":"Genaue E-Mail-Adresse."},{"name":"phone","in":"query","required":false,"schema":{"type":"string"},"description":"Genaue Telefonnummer."},{"name":"query","in":"query","required":false,"schema":{"type":"string"},"description":"Teiltreffer in Name, E-Mail, Telefon oder Firma."},{"name":"updated_since","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Nur seitdem Geänderte."},{"name":"created_since","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Nur seitdem Angelegte."}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object"}},"next_cursor":{"type":"string","nullable":true}},"required":["data","next_cursor"]}}},"headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Kennung dieser Anfrage."},"RateLimit":{"schema":{"type":"string"},"description":"Aktueller Stand des Kontingents."}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}},"post":{"summary":"Kontakt anlegen","description":"Gibt es die Person schon (E-Mail, Telefon oder Firmenname), kommt der BESTEHENDE Kontakt zurück — mit `duplicate: true` und Status 200 statt 201.","tags":["Kontakte"],"operationId":"post_v_contacts","security":[{"bearerAuth":["contacts.write"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Frei gewählt. Derselbe Schlüssel innerhalb von 24 Stunden gibt die gespeicherte erste Antwort zurück, ohne etwas anzulegen."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"first_name":{"type":"string","minLength":1,"maxLength":120},"last_name":{"nullable":true,"type":"string","maxLength":120},"email":{"nullable":true,"type":"string","format":"email","maxLength":254},"phone":{"nullable":true,"type":"string","maxLength":60},"company":{"nullable":true,"type":"string","maxLength":200},"status":{"nullable":true,"type":"string","maxLength":80},"source":{"type":"string","enum":["facebook","free_video_course","referral","manual","other"]},"tags":{"type":"array","items":{"type":"string","minLength":1,"maxLength":60},"maxItems":50},"notes":{"nullable":true,"type":"string","maxLength":5000},"owner_id":{"nullable":true,"type":"string","format":"uuid"},"assigned_to":{"nullable":true,"type":"string","format":"uuid"},"external_id":{"nullable":true,"type":"string","maxLength":200},"street":{"nullable":true,"type":"string","maxLength":200},"postal_code":{"nullable":true,"type":"string","maxLength":20},"city":{"nullable":true,"type":"string","maxLength":120},"country":{"nullable":true,"type":"string","maxLength":120},"website":{"nullable":true,"type":"string","maxLength":300},"custom_data":{"type":"object","additionalProperties":true}},"required":["first_name"],"additionalProperties":false},"example":{"first_name":"Max","last_name":"Mustermann","email":"max@example.com","phone":"+49 170 1234567","company":"Acme GmbH"}}}},"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Kennung dieser Anfrage."},"RateLimit":{"schema":{"type":"string"},"description":"Aktueller Stand des Kontingents."}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/api/v1/contacts/{id}":{"get":{"summary":"Einen Kontakt lesen","description":"Ein Kontakt aus einer fremden Organisation antwortet mit 404, nicht 403.","tags":["Kontakte"],"operationId":"get_v_contacts_id_","security":[{"bearerAuth":["contacts.read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Kennung des Datensatzes."}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Kennung dieser Anfrage."},"RateLimit":{"schema":{"type":"string"},"description":"Aktueller Stand des Kontingents."}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}},"patch":{"summary":"Kontakt ändern","description":"Nur die mitgeschickten Felder. `source` und `external_id` sind nachträglich nicht änderbar — beides beantwortet, woher der Kontakt kam.","tags":["Kontakte"],"operationId":"patch_v_contacts_id_","security":[{"bearerAuth":["contacts.write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Kennung des Datensatzes."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"first_name":{"type":"string","minLength":1,"maxLength":120},"last_name":{"nullable":true,"type":"string","maxLength":120},"email":{"nullable":true,"type":"string","format":"email","maxLength":254},"phone":{"nullable":true,"type":"string","maxLength":60},"company":{"nullable":true,"type":"string","maxLength":200},"status":{"nullable":true,"type":"string","maxLength":80},"tags":{"type":"array","items":{"type":"string","minLength":1,"maxLength":60},"maxItems":50},"notes":{"nullable":true,"type":"string","maxLength":5000},"owner_id":{"nullable":true,"type":"string","format":"uuid"},"assigned_to":{"nullable":true,"type":"string","format":"uuid"},"street":{"nullable":true,"type":"string","maxLength":200},"postal_code":{"nullable":true,"type":"string","maxLength":20},"city":{"nullable":true,"type":"string","maxLength":120},"country":{"nullable":true,"type":"string","maxLength":120},"website":{"nullable":true,"type":"string","maxLength":300},"custom_data":{"type":"object","additionalProperties":true}},"additionalProperties":false},"example":{"status":"Termin vereinbart","notes":"Ruft nächste Woche zurück."}}}},"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Kennung dieser Anfrage."},"RateLimit":{"schema":{"type":"string"},"description":"Aktueller Stand des Kontingents."}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/api/v1/contacts/{id}/persons":{"get":{"summary":"Ansprechpartner auflisten","description":"Der Hauptansprechpartner steht oben.","tags":["Kontakte"],"operationId":"get_v_contacts_id_persons","security":[{"bearerAuth":["contacts.read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Kennung des Datensatzes."}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object"}},"next_cursor":{"type":"string","nullable":true}},"required":["data","next_cursor"]}}},"headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Kennung dieser Anfrage."},"RateLimit":{"schema":{"type":"string"},"description":"Aktueller Stand des Kontingents."}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}},"post":{"summary":"Ansprechpartner anlegen","description":"`is_primary: true` nimmt dem bisherigen Hauptansprechpartner die Rolle — es gibt genau einen.","tags":["Kontakte"],"operationId":"post_v_contacts_id_persons","security":[{"bearerAuth":["contacts.write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Kennung des Datensatzes."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"first_name":{"type":"string","minLength":1,"maxLength":120},"last_name":{"nullable":true,"type":"string","maxLength":120},"salutation":{"nullable":true,"type":"string","maxLength":40},"title":{"nullable":true,"type":"string","maxLength":60},"email":{"nullable":true,"type":"string","format":"email","maxLength":254},"phone":{"nullable":true,"type":"string","maxLength":60},"job_title":{"nullable":true,"type":"string","maxLength":160},"role":{"nullable":true,"type":"string","maxLength":80},"seniority":{"nullable":true,"type":"string","maxLength":60},"is_primary":{"type":"boolean"},"sort":{"type":"integer","minimum":0,"maximum":9999}},"required":["first_name"],"additionalProperties":false},"example":{"first_name":"Erika","last_name":"Musterfrau","job_title":"Einkauf","is_primary":true}}}},"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Kennung dieser Anfrage."},"RateLimit":{"schema":{"type":"string"},"description":"Aktueller Stand des Kontingents."}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/api/v1/persons/{id}":{"patch":{"summary":"Ansprechpartner ändern","description":"Die Zugehörigkeit zum Kontakt steht in der Zeile und ändert sich nicht.","tags":["Kontakte"],"operationId":"patch_v_persons_id_","security":[{"bearerAuth":["contacts.write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Kennung des Datensatzes."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"first_name":{"type":"string","minLength":1,"maxLength":120},"last_name":{"nullable":true,"type":"string","maxLength":120},"salutation":{"nullable":true,"type":"string","maxLength":40},"title":{"nullable":true,"type":"string","maxLength":60},"email":{"nullable":true,"type":"string","format":"email","maxLength":254},"phone":{"nullable":true,"type":"string","maxLength":60},"job_title":{"nullable":true,"type":"string","maxLength":160},"role":{"nullable":true,"type":"string","maxLength":80},"seniority":{"nullable":true,"type":"string","maxLength":60},"is_primary":{"type":"boolean"},"sort":{"type":"integer","minimum":0,"maximum":9999}},"additionalProperties":false}}}},"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Kennung dieser Anfrage."},"RateLimit":{"schema":{"type":"string"},"description":"Aktueller Stand des Kontingents."}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/api/v1/contacts/{id}/activities":{"get":{"summary":"Verlauf lesen","description":"Alle Arten, auch die, die nur das CRM selbst schreibt (`stage_change`, `call`, …).","tags":["Kontakte"],"operationId":"get_v_contacts_id_activities","security":[{"bearerAuth":["activities.read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Kennung des Datensatzes."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer"},"description":"1 bis 100, Standard 25."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Der Wert aus next_cursor der vorigen Antwort."},{"name":"type","in":"query","required":false,"schema":{"type":"string"},"description":"Nur diese Art."}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object"}},"next_cursor":{"type":"string","nullable":true}},"required":["data","next_cursor"]}}},"headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Kennung dieser Anfrage."},"RateLimit":{"schema":{"type":"string"},"description":"Aktueller Stand des Kontingents."}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}},"post":{"summary":"Notiz anhängen","description":"Schreibbar sind `note`, `email`, `call`, `appointment`, `task`. `stage_change` und `lead_claim` schreibt nur das CRM selbst — sonst wäre der Verlauf keine Tatsachenaufzeichnung mehr.","tags":["Kontakte"],"operationId":"post_v_contacts_id_activities","security":[{"bearerAuth":["activities.write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Kennung des Datensatzes."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["note","email","call","appointment","task"]},"body":{"type":"string","minLength":1,"maxLength":10000},"occurred_at":{"type":"string","format":"date-time"},"external_id":{"nullable":true,"type":"string","maxLength":200}},"required":["body"],"additionalProperties":false},"example":{"type":"note","body":"Angebot per Post verschickt."}}}},"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Kennung dieser Anfrage."},"RateLimit":{"schema":{"type":"string"},"description":"Aktueller Stand des Kontingents."}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/api/v1/deals":{"get":{"summary":"Deals auflisten","description":"Neueste zuerst.","tags":["Deals"],"operationId":"get_v_deals","security":[{"bearerAuth":["deals.read"]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer"},"description":"1 bis 100, Standard 25."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Der Wert aus next_cursor der vorigen Antwort."},{"name":"status","in":"query","required":false,"schema":{"type":"string"},"description":"open, won, lost oder refunded."},{"name":"pipeline_id","in":"query","required":false,"schema":{"type":"string","format":"uuid"},"description":"Nur diese Pipeline."},{"name":"stage_id","in":"query","required":false,"schema":{"type":"string","format":"uuid"},"description":"Nur diese Phase."},{"name":"contact_id","in":"query","required":false,"schema":{"type":"string","format":"uuid"},"description":"Nur zu diesem Kontakt."},{"name":"owner_id","in":"query","required":false,"schema":{"type":"string","format":"uuid"},"description":"Nur dieses Besitzers."},{"name":"updated_since","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Nur seitdem Geänderte."}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object"}},"next_cursor":{"type":"string","nullable":true}},"required":["data","next_cursor"]}}},"headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Kennung dieser Anfrage."},"RateLimit":{"schema":{"type":"string"},"description":"Aktueller Stand des Kontingents."}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}},"post":{"summary":"Deal anlegen","description":"Beträge in CENT. Wird `stage_id` gesetzt, leitet das CRM den Status aus der Phase ab — ein mitgeschickter `status` wird dann überschrieben, und der Kontakt wandert in diese Phase.","tags":["Deals"],"operationId":"post_v_deals","security":[{"bearerAuth":["deals.write"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Frei gewählt. Derselbe Schlüssel innerhalb von 24 Stunden gibt die gespeicherte erste Antwort zurück, ohne etwas anzulegen."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"contact_id":{"nullable":true,"type":"string","format":"uuid"},"pipeline_id":{"nullable":true,"type":"string","format":"uuid"},"stage_id":{"nullable":true,"type":"string","format":"uuid"},"value_cents":{"type":"integer","minimum":0,"maximum":2000000000},"currency":{"type":"string","minLength":3,"maxLength":3},"status":{"type":"string","enum":["open","won","lost","refunded"]},"owner_id":{"nullable":true,"type":"string","format":"uuid"},"assigned_to":{"nullable":true,"type":"string","format":"uuid"},"product_id":{"nullable":true,"type":"string","format":"uuid"},"close_date":{"nullable":true,"type":"string","format":"date"},"confidence":{"nullable":true,"type":"integer","minimum":0,"maximum":100},"note":{"nullable":true,"type":"string","maxLength":5000},"lost_reason":{"nullable":true,"type":"string","maxLength":500},"external_id":{"nullable":true,"type":"string","maxLength":200},"custom_data":{"type":"object","additionalProperties":true}},"required":["title"],"additionalProperties":false},"example":{"title":"Jahreslizenz","contact_id":"…","value_cents":199900,"currency":"EUR"}}}},"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Kennung dieser Anfrage."},"RateLimit":{"schema":{"type":"string"},"description":"Aktueller Stand des Kontingents."}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/api/v1/deals/{id}":{"get":{"summary":"Einen Deal lesen","tags":["Deals"],"operationId":"get_v_deals_id_","security":[{"bearerAuth":["deals.read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Kennung des Datensatzes."}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Kennung dieser Anfrage."},"RateLimit":{"schema":{"type":"string"},"description":"Aktueller Stand des Kontingents."}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}},"patch":{"summary":"Deal ändern","description":"Auch hier: die Phase bestimmt den Status.","tags":["Deals"],"operationId":"patch_v_deals_id_","security":[{"bearerAuth":["deals.write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Kennung des Datensatzes."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"contact_id":{"nullable":true,"type":"string","format":"uuid"},"pipeline_id":{"nullable":true,"type":"string","format":"uuid"},"stage_id":{"nullable":true,"type":"string","format":"uuid"},"value_cents":{"type":"integer","minimum":0,"maximum":2000000000},"currency":{"type":"string","minLength":3,"maxLength":3},"status":{"type":"string","enum":["open","won","lost","refunded"]},"owner_id":{"nullable":true,"type":"string","format":"uuid"},"assigned_to":{"nullable":true,"type":"string","format":"uuid"},"product_id":{"nullable":true,"type":"string","format":"uuid"},"close_date":{"nullable":true,"type":"string","format":"date"},"confidence":{"nullable":true,"type":"integer","minimum":0,"maximum":100},"note":{"nullable":true,"type":"string","maxLength":5000},"lost_reason":{"nullable":true,"type":"string","maxLength":500},"custom_data":{"type":"object","additionalProperties":true}},"additionalProperties":false},"example":{"stage_id":"…"}}}},"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Kennung dieser Anfrage."},"RateLimit":{"schema":{"type":"string"},"description":"Aktueller Stand des Kontingents."}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/api/v1/appointments":{"get":{"summary":"Termine auflisten","description":"`from` und `to` grenzen über den Beginn ein.","tags":["Termine"],"operationId":"get_v_appointments","security":[{"bearerAuth":["appointments.read"]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer"},"description":"1 bis 100, Standard 25."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Der Wert aus next_cursor der vorigen Antwort."},{"name":"contact_id","in":"query","required":false,"schema":{"type":"string","format":"uuid"},"description":"Nur zu diesem Kontakt."},{"name":"host_id","in":"query","required":false,"schema":{"type":"string","format":"uuid"},"description":"Nur dieses Gastgebers."},{"name":"status","in":"query","required":false,"schema":{"type":"string"},"description":"booked, confirmed oder cancelled."},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Beginn ab."},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Beginn bis."}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object"}},"next_cursor":{"type":"string","nullable":true}},"required":["data","next_cursor"]}}},"headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Kennung dieser Anfrage."},"RateLimit":{"schema":{"type":"string"},"description":"Aktueller Stand des Kontingents."}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}},"post":{"summary":"Termin eintragen","description":"Trägt ein, was anderswo vereinbart wurde. Prüft KEINE freie Zeit und verschickt KEINE Einladung — dafür gibt es die Buchungsseite.","tags":["Termine"],"operationId":"post_v_appointments","security":[{"bearerAuth":["appointments.write"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Frei gewählt. Derselbe Schlüssel innerhalb von 24 Stunden gibt die gespeicherte erste Antwort zurück, ohne etwas anzulegen."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"contact_id":{"nullable":true,"type":"string","format":"uuid"},"host_id":{"nullable":true,"type":"string","format":"uuid"},"event_type_id":{"nullable":true,"type":"string","format":"uuid"},"starts_at":{"type":"string","format":"date-time"},"ends_at":{"type":"string","format":"date-time"},"timezone":{"type":"string","maxLength":60},"location":{"nullable":true,"type":"string","maxLength":300},"meeting_type":{"nullable":true,"type":"string","maxLength":60},"notes":{"nullable":true,"type":"string","maxLength":5000},"guest_email":{"nullable":true,"type":"string","format":"email","maxLength":254},"guest_phone":{"nullable":true,"type":"string","maxLength":60},"external_id":{"nullable":true,"type":"string","maxLength":200}},"required":["title","starts_at","ends_at"],"additionalProperties":false},"example":{"title":"Erstgespräch","starts_at":"2026-09-10T10:00:00Z","ends_at":"2026-09-10T10:30:00Z"}}}},"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Kennung dieser Anfrage."},"RateLimit":{"schema":{"type":"string"},"description":"Aktueller Stand des Kontingents."}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/api/v1/appointments/{id}":{"get":{"summary":"Einen Termin lesen","tags":["Termine"],"operationId":"get_v_appointments_id_","security":[{"bearerAuth":["appointments.read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Kennung des Datensatzes."}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Kennung dieser Anfrage."},"RateLimit":{"schema":{"type":"string"},"description":"Aktueller Stand des Kontingents."}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}},"patch":{"summary":"Termin verlegen oder absagen","description":"`{\"cancel\": true}` sagt ab — das setzt Status und Zeitpunkt zusammen. Eine Absage lässt sich nicht zurücknehmen: die Gegenseite hat sie längst bekommen.","tags":["Termine"],"operationId":"patch_v_appointments_id_","security":[{"bearerAuth":["appointments.write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Kennung des Datensatzes."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"starts_at":{"type":"string","format":"date-time"},"ends_at":{"type":"string","format":"date-time"},"timezone":{"type":"string","maxLength":60},"location":{"nullable":true,"type":"string","maxLength":300},"meeting_type":{"nullable":true,"type":"string","maxLength":60},"notes":{"nullable":true,"type":"string","maxLength":5000},"host_id":{"nullable":true,"type":"string","format":"uuid"},"cancel":{"enum":[true],"type":"boolean"}},"additionalProperties":false},"example":{"starts_at":"2026-09-11T14:00:00Z","ends_at":"2026-09-11T14:30:00Z"}}}},"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Kennung dieser Anfrage."},"RateLimit":{"schema":{"type":"string"},"description":"Aktueller Stand des Kontingents."}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/api/v1/calls":{"get":{"summary":"Anrufe auflisten","description":"Ohne Aufnahme, Abschrift und Rufnummern. Anrufe lassen sich nicht über die API anlegen — sie entstehen aus echten Gesprächen.","tags":["Anrufe"],"operationId":"get_v_calls","security":[{"bearerAuth":["calls.read"]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer"},"description":"1 bis 100, Standard 25."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Der Wert aus next_cursor der vorigen Antwort."},{"name":"contact_id","in":"query","required":false,"schema":{"type":"string","format":"uuid"},"description":"Nur zu diesem Kontakt."},{"name":"agent_id","in":"query","required":false,"schema":{"type":"string","format":"uuid"},"description":"Nur dieses Mitarbeiters."},{"name":"direction","in":"query","required":false,"schema":{"type":"string"},"description":"inbound oder outbound."},{"name":"status","in":"query","required":false,"schema":{"type":"string"},"description":"completed, no_answer, busy, failed, voicemail …"},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Beginn ab."},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Beginn bis."}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object"}},"next_cursor":{"type":"string","nullable":true}},"required":["data","next_cursor"]}}},"headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Kennung dieser Anfrage."},"RateLimit":{"schema":{"type":"string"},"description":"Aktueller Stand des Kontingents."}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/api/v1/calls/{id}":{"get":{"summary":"Einen Anruf lesen","tags":["Anrufe"],"operationId":"get_v_calls_id_","security":[{"bearerAuth":["calls.read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Kennung des Datensatzes."}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Kennung dieser Anfrage."},"RateLimit":{"schema":{"type":"string"},"description":"Aktueller Stand des Kontingents."}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/api/v1/pipelines":{"get":{"summary":"Pipelines","description":"Ohne diese Listen kennt ein fremdes System keine einzige Kennung.","tags":["Stammdaten"],"operationId":"get_v_pipelines","security":[{"bearerAuth":["pipelines.read"]}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object"}},"next_cursor":{"type":"string","nullable":true}},"required":["data","next_cursor"]}}},"headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Kennung dieser Anfrage."},"RateLimit":{"schema":{"type":"string"},"description":"Aktueller Stand des Kontingents."}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/api/v1/pipelines/{id}/stages":{"get":{"summary":"Phasen einer Pipeline","description":"`is_won` und `is_lost` bestimmen, was ein Deal in dieser Phase bedeutet.","tags":["Stammdaten"],"operationId":"get_v_pipelines_id_stages","security":[{"bearerAuth":["pipelines.read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Kennung des Datensatzes."}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object"}},"next_cursor":{"type":"string","nullable":true}},"required":["data","next_cursor"]}}},"headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Kennung dieser Anfrage."},"RateLimit":{"schema":{"type":"string"},"description":"Aktueller Stand des Kontingents."}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/api/v1/lead-statuses":{"get":{"summary":"Lead-Status","description":"Die Werte, die `contacts.status` annehmen kann. Je Organisation anders.","tags":["Stammdaten"],"operationId":"get_v_lead_statuses","security":[{"bearerAuth":["pipelines.read"]}],"parameters":[{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean"},"description":"Auch archivierte zeigen."}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object"}},"next_cursor":{"type":"string","nullable":true}},"required":["data","next_cursor"]}}},"headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Kennung dieser Anfrage."},"RateLimit":{"schema":{"type":"string"},"description":"Aktueller Stand des Kontingents."}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/api/v1/custom-fields":{"get":{"summary":"Eigene Felder","description":"Welche Schlüssel in `custom_data` erlaubt sind, welchen Typ sie haben.","tags":["Stammdaten"],"operationId":"get_v_custom_fields","security":[{"bearerAuth":["pipelines.read"]}],"parameters":[{"name":"entity","in":"query","required":false,"schema":{"type":"string"},"description":"contact oder deal."}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object"}},"next_cursor":{"type":"string","nullable":true}},"required":["data","next_cursor"]}}},"headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Kennung dieser Anfrage."},"RateLimit":{"schema":{"type":"string"},"description":"Aktueller Stand des Kontingents."}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/api/v1/users":{"get":{"summary":"Nutzer","description":"Kennung, Name, Rolle — für die Frage „wem gehört dieser Lead\".","tags":["Stammdaten"],"operationId":"get_v_users","security":[{"bearerAuth":["users.read"]}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object"}},"next_cursor":{"type":"string","nullable":true}},"required":["data","next_cursor"]}}},"headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Kennung dieser Anfrage."},"RateLimit":{"schema":{"type":"string"},"description":"Aktueller Stand des Kontingents."}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/api/v1/webhooks":{"get":{"summary":"Abos auflisten","description":"Liefert auch die Liste aller möglichen Ereignisse mit.","tags":["Ereignis-Abos"],"operationId":"get_v_webhooks","security":[{"bearerAuth":["webhooks.manage"]}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object"}},"next_cursor":{"type":"string","nullable":true}},"required":["data","next_cursor"]}}},"headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Kennung dieser Anfrage."},"RateLimit":{"schema":{"type":"string"},"description":"Aktueller Stand des Kontingents."}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}},"post":{"summary":"Abo anlegen","description":"Antwortet EINMAL mit dem Geheimnis. Damit prüfst du die Unterschrift jeder Zustellung.","tags":["Ereignis-Abos"],"operationId":"post_v_webhooks","security":[{"bearerAuth":["webhooks.manage"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri","maxLength":500},"events":{"type":"array","items":{"type":"string","enum":["contact.created","contact.updated","contact.status_changed","deal.created","deal.updated","deal.won","deal.lost","deal.stage_changed","appointment.booked","appointment.rescheduled","appointment.cancelled","call.completed"]},"minItems":1,"maxItems":20},"name":{"type":"string","minLength":1,"maxLength":120},"description":{"nullable":true,"type":"string","maxLength":500}},"required":["url","events"],"additionalProperties":false},"example":{"url":"https://example.com/hooks/am-crm","events":["contact.created","deal.won"]}}}},"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Kennung dieser Anfrage."},"RateLimit":{"schema":{"type":"string"},"description":"Aktueller Stand des Kontingents."}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/api/v1/webhooks/{id}":{"patch":{"summary":"Abo ändern","description":"`enabled: true` weckt ein stillgelegtes Abo und setzt den Fehlerzähler zurück.","tags":["Ereignis-Abos"],"operationId":"patch_v_webhooks_id_","security":[{"bearerAuth":["webhooks.manage"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Kennung des Datensatzes."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri","maxLength":500},"events":{"type":"array","items":{"type":"string","enum":["contact.created","contact.updated","contact.status_changed","deal.created","deal.updated","deal.won","deal.lost","deal.stage_changed","appointment.booked","appointment.rescheduled","appointment.cancelled","call.completed"]},"minItems":1,"maxItems":20},"name":{"type":"string","minLength":1,"maxLength":120},"description":{"nullable":true,"type":"string","maxLength":500},"enabled":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Kennung dieser Anfrage."},"RateLimit":{"schema":{"type":"string"},"description":"Aktueller Stand des Kontingents."}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}},"delete":{"summary":"Abo entfernen","description":"Die Zustellprotokolle bleiben stehen.","tags":["Ereignis-Abos"],"operationId":"delete_v_webhooks_id_","security":[{"bearerAuth":["webhooks.manage"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Kennung des Datensatzes."}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Kennung dieser Anfrage."},"RateLimit":{"schema":{"type":"string"},"description":"Aktueller Stand des Kontingents."}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/api/v1/webhooks/{id}/test":{"post":{"summary":"Probezustellung","description":"Schickt ein `webhook.test`-Ereignis und gibt die Antwort deines Servers zurück.","tags":["Ereignis-Abos"],"operationId":"post_v_webhooks_id_test","security":[{"bearerAuth":["webhooks.manage"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Kennung des Datensatzes."}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Kennung dieser Anfrage."},"RateLimit":{"schema":{"type":"string"},"description":"Aktueller Stand des Kontingents."}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}}},"webhooks":{"contact.created":{"post":{"summary":"Ein Kontakt wurde angelegt.","description":"Zustellung nach „Standard Webhooks\": die Kopfzeilen webhook-id, webhook-timestamp und webhook-signature prüfen Echtheit und Alter.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["contact.created"]},"timestamp":{"type":"string","format":"date-time"},"data":{"type":"object"}},"required":["type","timestamp","data"]}}}},"responses":{"200":{"description":"Angenommen. Alles ausser 2xx gilt als Fehlschlag."}}}},"contact.updated":{"post":{"summary":"Ein Kontakt wurde geändert.","description":"Zustellung nach „Standard Webhooks\": die Kopfzeilen webhook-id, webhook-timestamp und webhook-signature prüfen Echtheit und Alter.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["contact.updated"]},"timestamp":{"type":"string","format":"date-time"},"data":{"type":"object"}},"required":["type","timestamp","data"]}}}},"responses":{"200":{"description":"Angenommen. Alles ausser 2xx gilt als Fehlschlag."}}}},"contact.status_changed":{"post":{"summary":"Der Lead-Status eines Kontakts hat sich geändert.","description":"Zustellung nach „Standard Webhooks\": die Kopfzeilen webhook-id, webhook-timestamp und webhook-signature prüfen Echtheit und Alter.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["contact.status_changed"]},"timestamp":{"type":"string","format":"date-time"},"data":{"type":"object"}},"required":["type","timestamp","data"]}}}},"responses":{"200":{"description":"Angenommen. Alles ausser 2xx gilt als Fehlschlag."}}}},"deal.created":{"post":{"summary":"Ein Deal wurde angelegt.","description":"Zustellung nach „Standard Webhooks\": die Kopfzeilen webhook-id, webhook-timestamp und webhook-signature prüfen Echtheit und Alter.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["deal.created"]},"timestamp":{"type":"string","format":"date-time"},"data":{"type":"object"}},"required":["type","timestamp","data"]}}}},"responses":{"200":{"description":"Angenommen. Alles ausser 2xx gilt als Fehlschlag."}}}},"deal.updated":{"post":{"summary":"Ein Deal wurde geändert.","description":"Zustellung nach „Standard Webhooks\": die Kopfzeilen webhook-id, webhook-timestamp und webhook-signature prüfen Echtheit und Alter.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["deal.updated"]},"timestamp":{"type":"string","format":"date-time"},"data":{"type":"object"}},"required":["type","timestamp","data"]}}}},"responses":{"200":{"description":"Angenommen. Alles ausser 2xx gilt als Fehlschlag."}}}},"deal.won":{"post":{"summary":"Ein Deal wurde gewonnen.","description":"Zustellung nach „Standard Webhooks\": die Kopfzeilen webhook-id, webhook-timestamp und webhook-signature prüfen Echtheit und Alter.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["deal.won"]},"timestamp":{"type":"string","format":"date-time"},"data":{"type":"object"}},"required":["type","timestamp","data"]}}}},"responses":{"200":{"description":"Angenommen. Alles ausser 2xx gilt als Fehlschlag."}}}},"deal.lost":{"post":{"summary":"Ein Deal wurde verloren.","description":"Zustellung nach „Standard Webhooks\": die Kopfzeilen webhook-id, webhook-timestamp und webhook-signature prüfen Echtheit und Alter.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["deal.lost"]},"timestamp":{"type":"string","format":"date-time"},"data":{"type":"object"}},"required":["type","timestamp","data"]}}}},"responses":{"200":{"description":"Angenommen. Alles ausser 2xx gilt als Fehlschlag."}}}},"deal.stage_changed":{"post":{"summary":"Ein Deal ist in eine andere Phase gewandert.","description":"Zustellung nach „Standard Webhooks\": die Kopfzeilen webhook-id, webhook-timestamp und webhook-signature prüfen Echtheit und Alter.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["deal.stage_changed"]},"timestamp":{"type":"string","format":"date-time"},"data":{"type":"object"}},"required":["type","timestamp","data"]}}}},"responses":{"200":{"description":"Angenommen. Alles ausser 2xx gilt als Fehlschlag."}}}},"appointment.booked":{"post":{"summary":"Ein Termin wurde gebucht.","description":"Zustellung nach „Standard Webhooks\": die Kopfzeilen webhook-id, webhook-timestamp und webhook-signature prüfen Echtheit und Alter.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["appointment.booked"]},"timestamp":{"type":"string","format":"date-time"},"data":{"type":"object"}},"required":["type","timestamp","data"]}}}},"responses":{"200":{"description":"Angenommen. Alles ausser 2xx gilt als Fehlschlag."}}}},"appointment.rescheduled":{"post":{"summary":"Ein Termin wurde verlegt.","description":"Zustellung nach „Standard Webhooks\": die Kopfzeilen webhook-id, webhook-timestamp und webhook-signature prüfen Echtheit und Alter.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["appointment.rescheduled"]},"timestamp":{"type":"string","format":"date-time"},"data":{"type":"object"}},"required":["type","timestamp","data"]}}}},"responses":{"200":{"description":"Angenommen. Alles ausser 2xx gilt als Fehlschlag."}}}},"appointment.cancelled":{"post":{"summary":"Ein Termin wurde abgesagt.","description":"Zustellung nach „Standard Webhooks\": die Kopfzeilen webhook-id, webhook-timestamp und webhook-signature prüfen Echtheit und Alter.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["appointment.cancelled"]},"timestamp":{"type":"string","format":"date-time"},"data":{"type":"object"}},"required":["type","timestamp","data"]}}}},"responses":{"200":{"description":"Angenommen. Alles ausser 2xx gilt als Fehlschlag."}}}},"call.completed":{"post":{"summary":"Ein Anruf ist beendet.","description":"Zustellung nach „Standard Webhooks\": die Kopfzeilen webhook-id, webhook-timestamp und webhook-signature prüfen Echtheit und Alter.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["call.completed"]},"timestamp":{"type":"string","format":"date-time"},"data":{"type":"object"}},"required":["type","timestamp","data"]}}}},"responses":{"200":{"description":"Angenommen. Alles ausser 2xx gilt als Fehlschlag."}}}}}}