{"openapi":"3.1.0","info":{"title":"Morsantral Müşteri API'si","version":"1.0.0","description":"Santralinizin çağrı geçmişini, dahililerini ve numaralarını okumak, tek tıkla arama başlatmak ve olayları (webhook) almak için makine arayüzü. Kimlik: `Authorization: Bearer msk_…` (panelde Ayarlar → API ve entegrasyonlar). Hata biçimi her uçta `{ \"error\": { \"code\", \"message\" } }`. Kayıt dosyası indirme yoktur (KVKK)."},"servers":[{"url":"https://panel.morsantral.com/api/v1"}],"security":[{"bearerAuth":[]}],"tags":[{"name":"Çağrılar"},{"name":"Santral"},{"name":"Webhook'lar"}],"paths":{"/calls":{"get":{"tags":["Çağrılar"],"summary":"Çağrı geçmişi","description":"Yeniden eskiye, sayfalı (imleç). `from`/`to` verilmezse son 7 gün; aralık en çok 92 gün. Gerekli kapsam: `calls:read`.","parameters":[{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"direction","in":"query","required":false,"schema":{"type":"string","enum":["inbound","outbound","internal"]}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["answered","unanswered","busy","failed","rejected","in_progress","blocked"]}},{"name":"number","in":"query","required":false,"schema":{"type":"string","pattern":"^\\+?[0-9*#]{2,32}$"}},{"name":"extensionId","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":200}}],"responses":{"200":{"description":"Çağrı listesi.","content":{"application/json":{"schema":{"type":"object","required":["data","nextCursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/V1Call"}},"nextCursor":{"type":["string","null"]}}}}}},"400":{"$ref":"#/components/responses/Error","description":"Geçersiz sorgu (`E_VALIDATION`)."},"401":{"$ref":"#/components/responses/Error","description":"API anahtarı yok, geçersiz, iptal edilmiş ya da süresi dolmuş (`E_API_KEY_INVALID`)."},"403":{"$ref":"#/components/responses/Error","description":"Kapsam yok (`E_API_SCOPE`), IP kısıtı (`E_API_KEY_IP`) ya da pakette API erişimi yok (`E_PLAN_FEATURE`)."},"429":{"$ref":"#/components/responses/Error","description":"Hız sınırı aşıldı (`E_RATE_LIMITED`); `Retry-After` başlığı saniye cinsinden bekleme süresini verir."},"503":{"$ref":"#/components/responses/Error","description":"Sunucu meşgul (`E_BUSY`) ya da sorgu zaman aşımı (`E_QUERY_TIMEOUT`); `Retry-After` ile yeniden deneyin."}}}},"/calls/{id}":{"get":{"tags":["Çağrılar"],"summary":"Tek çağrı","description":"Gerekli kapsam: `calls:read`.","parameters":[{"name":"id","in":"path","required":true,"description":"Çağrı kimliği.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Çağrı.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/V1Call"}}}}}},"401":{"$ref":"#/components/responses/Error","description":"API anahtarı yok, geçersiz, iptal edilmiş ya da süresi dolmuş (`E_API_KEY_INVALID`)."},"403":{"$ref":"#/components/responses/Error","description":"Kapsam yok (`E_API_SCOPE`), IP kısıtı (`E_API_KEY_IP`) ya da pakette API erişimi yok (`E_PLAN_FEATURE`)."},"404":{"$ref":"#/components/responses/Error","description":"Çağrı yok."},"429":{"$ref":"#/components/responses/Error","description":"Hız sınırı aşıldı (`E_RATE_LIMITED`); `Retry-After` başlığı saniye cinsinden bekleme süresini verir."}}}},"/calls/originate":{"post":{"tags":["Çağrılar"],"summary":"Tıkla-ara","description":"Önce `extension` (dahili) çalar; cevaplayınca `to` aranır. Giden arama kuralları, uluslararası/katma değerli ret, günlük dakika, kredi ve eşzamanlı sınır çağrı anında aynen uygulanır; API ayrıca aynı politikayı önceden denetleyip açık nedenle reddedebilir. Yanıt çağrının kabul edildiği anlamına gelmez: sonuç `call.*` olaylarında/çağrı geçmişinde görünür. Dakikada en çok 10 istek. Gerekli kapsam: `calls:originate`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OriginateRequest"}}}},"responses":{"202":{"description":"İstek alındı (dahili aranıyor).","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/OriginateResult"}}}}}},"400":{"$ref":"#/components/responses/Error","description":"Geçersiz gövde."},"401":{"$ref":"#/components/responses/Error","description":"API anahtarı yok, geçersiz, iptal edilmiş ya da süresi dolmuş (`E_API_KEY_INVALID`)."},"403":{"$ref":"#/components/responses/Error","description":"Kapsam yok (`E_API_SCOPE`), IP kısıtı (`E_API_KEY_IP`) ya da pakette API erişimi yok (`E_PLAN_FEATURE`)."},"404":{"$ref":"#/components/responses/Error","description":"Dahili yok."},"409":{"$ref":"#/components/responses/Error","description":"Dahili şu an aranamıyor (`E_EXTENSION_OFFLINE`)."},"422":{"$ref":"#/components/responses/Error","description":"Arama politikası reddetti (`E_ORIGINATE_REJECTED`; ileti nedeni söyler) ya da numara acil numara (`E_EMERGENCY_NOT_ALLOWED`)."},"429":{"$ref":"#/components/responses/Error","description":"Hız sınırı aşıldı (`E_RATE_LIMITED`); `Retry-After` başlığı saniye cinsinden bekleme süresini verir."},"503":{"$ref":"#/components/responses/Error","description":"Santral motoruna ulaşılamıyor."}}}},"/extensions":{"get":{"tags":["Santral"],"summary":"Dahililer","description":"Gerekli kapsam: `extensions:read`.","responses":{"200":{"description":"Dahili listesi.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/V1Extension"}}}}}}},"401":{"$ref":"#/components/responses/Error","description":"API anahtarı yok, geçersiz, iptal edilmiş ya da süresi dolmuş (`E_API_KEY_INVALID`)."},"403":{"$ref":"#/components/responses/Error","description":"Kapsam yok (`E_API_SCOPE`), IP kısıtı (`E_API_KEY_IP`) ya da pakette API erişimi yok (`E_PLAN_FEATURE`)."},"429":{"$ref":"#/components/responses/Error","description":"Hız sınırı aşıldı (`E_RATE_LIMITED`); `Retry-After` başlığı saniye cinsinden bekleme süresini verir."}}}},"/numbers":{"get":{"tags":["Santral"],"summary":"Numaralar","description":"Gerekli kapsam: `numbers:read`.","responses":{"200":{"description":"Numara listesi.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/V1Number"}}}}}}},"401":{"$ref":"#/components/responses/Error","description":"API anahtarı yok, geçersiz, iptal edilmiş ya da süresi dolmuş (`E_API_KEY_INVALID`)."},"403":{"$ref":"#/components/responses/Error","description":"Kapsam yok (`E_API_SCOPE`), IP kısıtı (`E_API_KEY_IP`) ya da pakette API erişimi yok (`E_PLAN_FEATURE`)."},"429":{"$ref":"#/components/responses/Error","description":"Hız sınırı aşıldı (`E_RATE_LIMITED`); `Retry-After` başlığı saniye cinsinden bekleme süresini verir."}}}},"/webhooks":{"get":{"tags":["Webhook'lar"],"summary":"Webhook uçlarını listele","description":"Gerekli kapsam: `webhooks:manage`.","responses":{"200":{"description":"Uç listesi.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Webhook"}}}}}}},"401":{"$ref":"#/components/responses/Error","description":"API anahtarı yok, geçersiz, iptal edilmiş ya da süresi dolmuş (`E_API_KEY_INVALID`)."},"403":{"$ref":"#/components/responses/Error","description":"Kapsam yok (`E_API_SCOPE`), IP kısıtı (`E_API_KEY_IP`) ya da pakette API erişimi yok (`E_PLAN_FEATURE`)."},"429":{"$ref":"#/components/responses/Error","description":"Hız sınırı aşıldı (`E_RATE_LIMITED`); `Retry-After` başlığı saniye cinsinden bekleme süresini verir."}}},"post":{"tags":["Webhook'lar"],"summary":"Webhook ucu oluştur","description":"Adres `https://` olmalı; özel/yerel ağlara, localhost'a ve bunlara çözülen adlara teslim yapılmaz. Gizli anahtar (`secret`) YALNIZ bu yanıtta döner. En çok 10 uç. Gerekli kapsam: `webhooks:manage`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookRequest"}}}},"responses":{"201":{"description":"Oluşturuldu (gizli anahtar bir kez).","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/WebhookWithSecret"}}}}}},"400":{"$ref":"#/components/responses/Error","description":"Geçersiz adres/olay."},"401":{"$ref":"#/components/responses/Error","description":"API anahtarı yok, geçersiz, iptal edilmiş ya da süresi dolmuş (`E_API_KEY_INVALID`)."},"403":{"$ref":"#/components/responses/Error","description":"Kapsam yok (`E_API_SCOPE`), IP kısıtı (`E_API_KEY_IP`) ya da pakette API erişimi yok (`E_PLAN_FEATURE`)."},"409":{"$ref":"#/components/responses/Error","description":"Uç sınırına ulaşıldı (`E_LIMIT_REACHED`)."},"429":{"$ref":"#/components/responses/Error","description":"Hız sınırı aşıldı (`E_RATE_LIMITED`); `Retry-After` başlığı saniye cinsinden bekleme süresini verir."}}}},"/webhooks/{id}":{"get":{"tags":["Webhook'lar"],"summary":"Webhook ucunu getir","description":"Gerekli kapsam: `webhooks:manage`.","parameters":[{"name":"id","in":"path","required":true,"description":"Webhook ucunun kimliği.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Uç.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Webhook"}}}}}},"401":{"$ref":"#/components/responses/Error","description":"API anahtarı yok, geçersiz, iptal edilmiş ya da süresi dolmuş (`E_API_KEY_INVALID`)."},"403":{"$ref":"#/components/responses/Error","description":"Kapsam yok (`E_API_SCOPE`), IP kısıtı (`E_API_KEY_IP`) ya da pakette API erişimi yok (`E_PLAN_FEATURE`)."},"404":{"$ref":"#/components/responses/Error","description":"Uç yok."},"429":{"$ref":"#/components/responses/Error","description":"Hız sınırı aşıldı (`E_RATE_LIMITED`); `Retry-After` başlığı saniye cinsinden bekleme süresini verir."}}},"patch":{"tags":["Webhook'lar"],"summary":"Webhook ucunu güncelle","description":"Adres, açıklama, olaylar, etkin bayrağı. Otomatik devre dışı kalan ucu `enabled: true` ile yeniden etkinleştirebilirsiniz. Gerekli kapsam: `webhooks:manage`.","parameters":[{"name":"id","in":"path","required":true,"description":"Webhook ucunun kimliği.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebhookRequest"}}}},"responses":{"200":{"description":"Güncellendi.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Webhook"}}}}}},"401":{"$ref":"#/components/responses/Error","description":"API anahtarı yok, geçersiz, iptal edilmiş ya da süresi dolmuş (`E_API_KEY_INVALID`)."},"403":{"$ref":"#/components/responses/Error","description":"Kapsam yok (`E_API_SCOPE`), IP kısıtı (`E_API_KEY_IP`) ya da pakette API erişimi yok (`E_PLAN_FEATURE`)."},"404":{"$ref":"#/components/responses/Error","description":"Uç yok."},"429":{"$ref":"#/components/responses/Error","description":"Hız sınırı aşıldı (`E_RATE_LIMITED`); `Retry-After` başlığı saniye cinsinden bekleme süresini verir."}}},"delete":{"tags":["Webhook'lar"],"summary":"Webhook ucunu sil","description":"Gerekli kapsam: `webhooks:manage`.","parameters":[{"name":"id","in":"path","required":true,"description":"Webhook ucunun kimliği.","schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Silindi."},"401":{"$ref":"#/components/responses/Error","description":"API anahtarı yok, geçersiz, iptal edilmiş ya da süresi dolmuş (`E_API_KEY_INVALID`)."},"403":{"$ref":"#/components/responses/Error","description":"Kapsam yok (`E_API_SCOPE`), IP kısıtı (`E_API_KEY_IP`) ya da pakette API erişimi yok (`E_PLAN_FEATURE`)."},"404":{"$ref":"#/components/responses/Error","description":"Uç yok."},"429":{"$ref":"#/components/responses/Error","description":"Hız sınırı aşıldı (`E_RATE_LIMITED`); `Retry-After` başlığı saniye cinsinden bekleme süresini verir."}}}},"/webhooks/{id}/rotate-secret":{"post":{"tags":["Webhook'lar"],"summary":"Gizli anahtarı döndür","description":"Eski gizli anahtar HEMEN geçersiz olur. Yeni anahtar yalnız bu yanıtta döner. Gerekli kapsam: `webhooks:manage`.","parameters":[{"name":"id","in":"path","required":true,"description":"Webhook ucunun kimliği.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Yeni gizli anahtar.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/WebhookWithSecret"}}}}}},"401":{"$ref":"#/components/responses/Error","description":"API anahtarı yok, geçersiz, iptal edilmiş ya da süresi dolmuş (`E_API_KEY_INVALID`)."},"403":{"$ref":"#/components/responses/Error","description":"Kapsam yok (`E_API_SCOPE`), IP kısıtı (`E_API_KEY_IP`) ya da pakette API erişimi yok (`E_PLAN_FEATURE`)."},"404":{"$ref":"#/components/responses/Error","description":"Uç yok."},"429":{"$ref":"#/components/responses/Error","description":"Hız sınırı aşıldı (`E_RATE_LIMITED`); `Retry-After` başlığı saniye cinsinden bekleme süresini verir."}}}},"/webhooks/{id}/test":{"post":{"tags":["Webhook'lar"],"summary":"Test olayı gönder","description":"Yalnız bu uca `webhook.test` olayı gönderilir (tek deneme). Sonucu teslim günlüğünden izleyin. Gerekli kapsam: `webhooks:manage`.","parameters":[{"name":"id","in":"path","required":true,"description":"Webhook ucunun kimliği.","schema":{"type":"string","format":"uuid"}}],"responses":{"202":{"description":"Kuyruğa alındı.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/WebhookDelivery"}}}}}},"401":{"$ref":"#/components/responses/Error","description":"API anahtarı yok, geçersiz, iptal edilmiş ya da süresi dolmuş (`E_API_KEY_INVALID`)."},"403":{"$ref":"#/components/responses/Error","description":"Kapsam yok (`E_API_SCOPE`), IP kısıtı (`E_API_KEY_IP`) ya da pakette API erişimi yok (`E_PLAN_FEATURE`)."},"404":{"$ref":"#/components/responses/Error","description":"Uç yok."},"429":{"$ref":"#/components/responses/Error","description":"Hız sınırı aşıldı (`E_RATE_LIMITED`); `Retry-After` başlığı saniye cinsinden bekleme süresini verir."}}}},"/webhooks/{id}/deliveries":{"get":{"tags":["Webhook'lar"],"summary":"Teslim günlüğü","description":"Son 100 teslim (yeniden eskiye); yanıt gövdesi ve yük saklanmaz/listelenmez. Gerekli kapsam: `webhooks:manage`.","parameters":[{"name":"id","in":"path","required":true,"description":"Webhook ucunun kimliği.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Teslim günlüğü.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDelivery"}}}}}}},"401":{"$ref":"#/components/responses/Error","description":"API anahtarı yok, geçersiz, iptal edilmiş ya da süresi dolmuş (`E_API_KEY_INVALID`)."},"403":{"$ref":"#/components/responses/Error","description":"Kapsam yok (`E_API_SCOPE`), IP kısıtı (`E_API_KEY_IP`) ya da pakette API erişimi yok (`E_PLAN_FEATURE`)."},"404":{"$ref":"#/components/responses/Error","description":"Uç yok."},"429":{"$ref":"#/components/responses/Error","description":"Hız sınırı aşıldı (`E_RATE_LIMITED`); `Retry-After` başlığı saniye cinsinden bekleme süresini verir."}}}},"/webhooks/{id}/deliveries/{deliveryId}/redeliver":{"post":{"tags":["Webhook'lar"],"summary":"Teslimi yeniden gönder","description":"Aynı olay kimliğiyle yeni teslim oluşturur (alıcı `id` ile tekilleştirir). Uç devre dışıysa 409. Gerekli kapsam: `webhooks:manage`.","parameters":[{"name":"id","in":"path","required":true,"description":"Webhook ucunun kimliği.","schema":{"type":"string","format":"uuid"}},{"name":"deliveryId","in":"path","required":true,"description":"Teslim kimliği.","schema":{"type":"string","format":"uuid"}}],"responses":{"202":{"description":"Kuyruğa alındı.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/WebhookDelivery"}}}}}},"401":{"$ref":"#/components/responses/Error","description":"API anahtarı yok, geçersiz, iptal edilmiş ya da süresi dolmuş (`E_API_KEY_INVALID`)."},"403":{"$ref":"#/components/responses/Error","description":"Kapsam yok (`E_API_SCOPE`), IP kısıtı (`E_API_KEY_IP`) ya da pakette API erişimi yok (`E_PLAN_FEATURE`)."},"404":{"$ref":"#/components/responses/Error","description":"Uç ya da teslim yok."},"409":{"$ref":"#/components/responses/Error","description":"Uç devre dışı."},"429":{"$ref":"#/components/responses/Error","description":"Hız sınırı aşıldı (`E_RATE_LIMITED`); `Retry-After` başlığı saniye cinsinden bekleme süresini verir."}}}}},"webhooks":{"call.ringing":{"post":{"summary":"Gelen çağrı çalmaya başladı","description":"Gelen çağrının satırı açıldığında (CRM ekran açılışı için). Doğrudan bir dahiliye gelen çağrıda `extension` dolu, sesli yanıt/zil grubu/kuyruk akışında null.","parameters":[{"name":"Morsantral-Signature","in":"header","required":true,"description":"`t=<unix sn>,v1=<hex>`: HMAC-SHA256(gizli anahtar, `<t>.<ham gövde>`).","schema":{"type":"string"}},{"name":"Morsantral-Event","in":"header","required":true,"description":"Olay türü.","schema":{"type":"string"}},{"name":"Morsantral-Event-Id","in":"header","required":true,"description":"Olay kimliği (yeniden gönderimde aynıdır).","schema":{"type":"string"}},{"name":"Morsantral-Delivery","in":"header","required":true,"description":"Teslim kimliği.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCallEvent"}}}},"responses":{"2XX":{"description":"Alındı. Yalnız 2xx başarıdır; diğer yanıtlar, zaman aşımı ve yönlendirme (3xx) başarısızlık sayılır ve yeniden denenir."}}}},"call.answered":{"post":{"summary":"Çağrı cevaplandı","description":"Köprü kurulduğunda, çağrı başına ilk kez.","parameters":[{"name":"Morsantral-Signature","in":"header","required":true,"description":"`t=<unix sn>,v1=<hex>`: HMAC-SHA256(gizli anahtar, `<t>.<ham gövde>`).","schema":{"type":"string"}},{"name":"Morsantral-Event","in":"header","required":true,"description":"Olay türü.","schema":{"type":"string"}},{"name":"Morsantral-Event-Id","in":"header","required":true,"description":"Olay kimliği (yeniden gönderimde aynıdır).","schema":{"type":"string"}},{"name":"Morsantral-Delivery","in":"header","required":true,"description":"Teslim kimliği.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCallEvent"}}}},"responses":{"2XX":{"description":"Alındı. Yalnız 2xx başarıdır; diğer yanıtlar, zaman aşımı ve yönlendirme (3xx) başarısızlık sayılır ve yeniden denenir."}}}},"call.ended":{"post":{"summary":"Çağrı bitti","description":"Bitiş ve sonuç bilindiğinde, bir kez: süre, yön, sonuç, dahili, numaralar.","parameters":[{"name":"Morsantral-Signature","in":"header","required":true,"description":"`t=<unix sn>,v1=<hex>`: HMAC-SHA256(gizli anahtar, `<t>.<ham gövde>`).","schema":{"type":"string"}},{"name":"Morsantral-Event","in":"header","required":true,"description":"Olay türü.","schema":{"type":"string"}},{"name":"Morsantral-Event-Id","in":"header","required":true,"description":"Olay kimliği (yeniden gönderimde aynıdır).","schema":{"type":"string"}},{"name":"Morsantral-Delivery","in":"header","required":true,"description":"Teslim kimliği.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCallEvent"}}}},"responses":{"2XX":{"description":"Alındı. Yalnız 2xx başarıdır; diğer yanıtlar, zaman aşımı ve yönlendirme (3xx) başarısızlık sayılır ve yeniden denenir."}}}},"call.missed":{"post":{"summary":"Çağrı cevapsız kaldı","description":"Gelen/iç çağrı bağlanmadan bittiğinde (`call.ended` ile birlikte).","parameters":[{"name":"Morsantral-Signature","in":"header","required":true,"description":"`t=<unix sn>,v1=<hex>`: HMAC-SHA256(gizli anahtar, `<t>.<ham gövde>`).","schema":{"type":"string"}},{"name":"Morsantral-Event","in":"header","required":true,"description":"Olay türü.","schema":{"type":"string"}},{"name":"Morsantral-Event-Id","in":"header","required":true,"description":"Olay kimliği (yeniden gönderimde aynıdır).","schema":{"type":"string"}},{"name":"Morsantral-Delivery","in":"header","required":true,"description":"Teslim kimliği.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCallEvent"}}}},"responses":{"2XX":{"description":"Alındı. Yalnız 2xx başarıdır; diğer yanıtlar, zaman aşımı ve yönlendirme (3xx) başarısızlık sayılır ve yeniden denenir."}}}},"voicemail.received":{"post":{"summary":"Sesli mesaj bırakıldı","description":"Ses içermez; kutu, arayan ve süre bilgisi.","parameters":[{"name":"Morsantral-Signature","in":"header","required":true,"description":"`t=<unix sn>,v1=<hex>`: HMAC-SHA256(gizli anahtar, `<t>.<ham gövde>`).","schema":{"type":"string"}},{"name":"Morsantral-Event","in":"header","required":true,"description":"Olay türü.","schema":{"type":"string"}},{"name":"Morsantral-Event-Id","in":"header","required":true,"description":"Olay kimliği (yeniden gönderimde aynıdır).","schema":{"type":"string"}},{"name":"Morsantral-Delivery","in":"header","required":true,"description":"Teslim kimliği.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookVoicemailEvent"}}}},"responses":{"2XX":{"description":"Alındı. Yalnız 2xx başarıdır; diğer yanıtlar, zaman aşımı ve yönlendirme (3xx) başarısızlık sayılır ve yeniden denenir."}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Panelde oluşturulan API anahtarı: `msk_<önek>_<sır>`."}},"responses":{"Error":{"description":"Hata.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"schemas":{"ErrorResponse":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"storeUrl":{"type":["string","null"]}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"V1Call":{"type":"object","properties":{"id":{"type":"string"},"direction":{"type":"string","enum":["inbound","outbound","internal"]},"from":{"type":"string"},"to":{"type":"string"},"status":{"type":"string","enum":["answered","unanswered","busy","failed","rejected","in_progress","blocked"]},"startedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"answeredAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"endedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"durationSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"talkSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"extension":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"name":{"type":"string"}},"required":["id","number","name"],"additionalProperties":false},{"type":"null"}]},"connectedExtension":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"name":{"type":"string"}},"required":["id","number","name"],"additionalProperties":false},{"type":"null"}]},"hangupCause":{"type":["string","null"]},"recording":{"anyOf":[{"type":"object","properties":{"durationSeconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["durationSeconds"],"additionalProperties":false},{"type":"null"}]}},"required":["id","direction","from","to","status","startedAt","answeredAt","endedAt","durationSeconds","talkSeconds","extension","connectedExtension","hangupCause","recording"],"additionalProperties":false},"V1Extension":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["active","disabled"]},"registered":{"type":"boolean"}},"required":["id","number","name","status","registered"],"additionalProperties":false},"V1Number":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"route":{"anyOf":[{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"hangup"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["extension","ivr","ring_group","time_condition","announcement","queue","voicemail","conference","external"]},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false}]},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","number","route","createdAt"],"additionalProperties":false},"Webhook":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"description":{"type":"string"},"events":{"type":"array","items":{"type":"string","enum":["call.ringing","call.answered","call.ended","call.missed","voicemail.received"]}},"enabled":{"type":"boolean"},"disabledReason":{"anyOf":[{"type":"string","enum":["failures"]},{"type":"null"}]},"consecutiveFailures":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","url","description","events","enabled","disabledReason","consecutiveFailures","createdAt","updatedAt"],"additionalProperties":false},"WebhookWithSecret":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"description":{"type":"string"},"events":{"type":"array","items":{"type":"string","enum":["call.ringing","call.answered","call.ended","call.missed","voicemail.received"]}},"enabled":{"type":"boolean"},"disabledReason":{"anyOf":[{"type":"string","enum":["failures"]},{"type":"null"}]},"consecutiveFailures":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"secret":{"type":"string"}},"required":["id","url","description","events","enabled","disabledReason","consecutiveFailures","createdAt","updatedAt","secret"],"additionalProperties":false},"WebhookDelivery":{"type":"object","properties":{"id":{"type":"string"},"endpointId":{"type":"string"},"eventId":{"type":"string"},"eventType":{"type":"string"},"kind":{"type":"string","enum":["event","test","redelivery"]},"status":{"type":"string","enum":["pending","sending","succeeded","failed","cancelled"]},"attempts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"nextAttemptAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"lastStatus":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"lastError":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"finishedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]}},"required":["id","endpointId","eventId","eventType","kind","status","attempts","nextAttemptAt","lastStatus","lastError","createdAt","finishedAt"],"additionalProperties":false},"OriginateRequest":{"type":"object","properties":{"extension":{"type":"string","minLength":1,"maxLength":36},"to":{"type":"string","minLength":1,"maxLength":32}},"required":["extension","to"]},"OriginateResult":{"type":"object","properties":{"requestId":{"type":"string"},"extensionId":{"type":"string"},"status":{"type":"string","const":"requested"}},"required":["requestId","extensionId","status"],"additionalProperties":false},"CreateWebhookRequest":{"type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":500},"description":{"type":"string","maxLength":100},"events":{"minItems":1,"maxItems":16,"type":"array","items":{"type":"string","enum":["call.ringing","call.answered","call.ended","call.missed","voicemail.received"]}}},"required":["url","events"]},"UpdateWebhookRequest":{"type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":500},"description":{"type":"string","maxLength":100},"events":{"minItems":1,"maxItems":16,"type":"array","items":{"type":"string","enum":["call.ringing","call.answered","call.ended","call.missed","voicemail.received"]}},"enabled":{"type":"boolean"}}},"WebhookCallData":{"type":"object","properties":{"callId":{"type":"string"},"direction":{"type":"string","enum":["inbound","outbound","internal"]},"from":{"type":"string"},"to":{"type":"string"},"extension":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"name":{"type":"string"}},"required":["id","number","name"],"additionalProperties":false},{"type":"null"}]},"connectedExtension":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"name":{"type":"string"}},"required":["id","number","name"],"additionalProperties":false},{"type":"null"}]},"startedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"answeredAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"endedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"durationSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"talkSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"result":{"type":"string","enum":["answered","unanswered","busy","failed","rejected","in_progress","blocked"]},"hangupCause":{"type":["string","null"]}},"required":["callId","direction","from","to","extension","connectedExtension","startedAt","answeredAt","endedAt"],"additionalProperties":false},"WebhookCallEvent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"call.ringing"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"data":{"type":"object","properties":{"callId":{"type":"string"},"direction":{"type":"string","enum":["inbound","outbound","internal"]},"from":{"type":"string"},"to":{"type":"string"},"extension":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"name":{"type":"string"}},"required":["id","number","name"],"additionalProperties":false},{"type":"null"}]},"connectedExtension":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"name":{"type":"string"}},"required":["id","number","name"],"additionalProperties":false},{"type":"null"}]},"startedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"answeredAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"endedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"durationSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"talkSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"result":{"type":"string","enum":["answered","unanswered","busy","failed","rejected","in_progress","blocked"]},"hangupCause":{"type":["string","null"]}},"required":["callId","direction","from","to","extension","connectedExtension","startedAt","answeredAt","endedAt"],"additionalProperties":false}},"required":["id","type","createdAt","data"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"call.answered"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"data":{"type":"object","properties":{"callId":{"type":"string"},"direction":{"type":"string","enum":["inbound","outbound","internal"]},"from":{"type":"string"},"to":{"type":"string"},"extension":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"name":{"type":"string"}},"required":["id","number","name"],"additionalProperties":false},{"type":"null"}]},"connectedExtension":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"name":{"type":"string"}},"required":["id","number","name"],"additionalProperties":false},{"type":"null"}]},"startedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"answeredAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"endedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"durationSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"talkSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"result":{"type":"string","enum":["answered","unanswered","busy","failed","rejected","in_progress","blocked"]},"hangupCause":{"type":["string","null"]}},"required":["callId","direction","from","to","extension","connectedExtension","startedAt","answeredAt","endedAt"],"additionalProperties":false}},"required":["id","type","createdAt","data"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"call.ended"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"data":{"type":"object","properties":{"callId":{"type":"string"},"direction":{"type":"string","enum":["inbound","outbound","internal"]},"from":{"type":"string"},"to":{"type":"string"},"extension":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"name":{"type":"string"}},"required":["id","number","name"],"additionalProperties":false},{"type":"null"}]},"connectedExtension":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"name":{"type":"string"}},"required":["id","number","name"],"additionalProperties":false},{"type":"null"}]},"startedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"answeredAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"endedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"durationSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"talkSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"result":{"type":"string","enum":["answered","unanswered","busy","failed","rejected","in_progress","blocked"]},"hangupCause":{"type":["string","null"]}},"required":["callId","direction","from","to","extension","connectedExtension","startedAt","answeredAt","endedAt"],"additionalProperties":false}},"required":["id","type","createdAt","data"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"call.missed"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"data":{"type":"object","properties":{"callId":{"type":"string"},"direction":{"type":"string","enum":["inbound","outbound","internal"]},"from":{"type":"string"},"to":{"type":"string"},"extension":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"name":{"type":"string"}},"required":["id","number","name"],"additionalProperties":false},{"type":"null"}]},"connectedExtension":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"name":{"type":"string"}},"required":["id","number","name"],"additionalProperties":false},{"type":"null"}]},"startedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"answeredAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"endedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"durationSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"talkSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"result":{"type":"string","enum":["answered","unanswered","busy","failed","rejected","in_progress","blocked"]},"hangupCause":{"type":["string","null"]}},"required":["callId","direction","from","to","extension","connectedExtension","startedAt","answeredAt","endedAt"],"additionalProperties":false}},"required":["id","type","createdAt","data"],"additionalProperties":false}]},"WebhookVoicemailEvent":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"voicemail.received"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"data":{"type":"object","properties":{"messageId":{"type":"string"},"box":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]}},"required":["id","name"],"additionalProperties":false},"from":{"type":"string"},"durationSeconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"recordedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["messageId","box","from","durationSeconds","recordedAt"],"additionalProperties":false}},"required":["id","type","createdAt","data"],"additionalProperties":false},"WebhookTestEvent":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"webhook.test"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"data":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}},"required":["id","type","createdAt","data"],"additionalProperties":false}}}}