{"openapi":"3.1.0","info":{"title":"Comvo API","version":"1.0.0","description":"Comvo geri bildirim platformunun genel API'si. Anahtarı panelde Ayarlar > API Anahtarları'ndan oluşturun.\n\n- Kimlik: `Authorization: Bearer sk_live_...` (test: `sk_test_...`; test anahtarıyla oluşan her şey ayrı tutulur, raporlara girmez).\n- Yazma isteklerinde `Idempotency-Key` gönderin: aynı anahtarla tekrar gelen istek yeniden işlenmez, ilk yanıt döner (24 saat).\n- Listeler imleçlidir: `next_cursor` değerini `cursor` parametresiyle gönderin.\n- Hatalar RFC 9457 `application/problem+json`; `code` alanı makinece okunur.\n- Hız sınırı anahtar başına dakikada 600 istek (toplu uçlar 30); `RateLimit-*` başlıklarına bakın."},"servers":[{"url":"https://my.comvo.com.tr/api/v1"}],"tags":[{"name":"Kimlik"},{"name":"Anketler"},{"name":"Olaylar"},{"name":"Davetler"},{"name":"Kişiler"},{"name":"Yanıtlar"},{"name":"Organizasyon"},{"name":"Metrikler"},{"name":"Webhook'lar"}],"paths":{"/me":{"get":{"tags":["Kimlik"],"summary":"Anahtar bilgisi","security":[{"bearer":[]}],"x-scope":"","description":"Entegrasyonu denemek için: anahtar geçerli mi, hangi kapsamlar var.","responses":{"200":{"description":"Başarılı","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}}},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}},"operationId":"getMe"}},"/surveys":{"get":{"tags":["Anketler"],"summary":"Anketleri listele","security":[{"bearer":[]}],"x-scope":"surveys:read","description":"\n\nKapsam: `surveys:read`","responses":{"200":{"description":"Başarılı","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SurveyList"}}}},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}},"operationId":"listSurveys","parameters":[{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/cursor"}]}},"/surveys/{id}":{"get":{"tags":["Anketler"],"summary":"Anket ve soruları","security":[{"bearer":[]}],"x-scope":"surveys:read","description":"\n\nKapsam: `surveys:read`","responses":{"200":{"description":"Başarılı","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Survey"}}}},"404":{"$ref":"#/components/responses/E404"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}},"operationId":"getSurvey","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"srv_..."}]}},"/events":{"post":{"tags":["Olaylar"],"summary":"Olay gönder","security":[{"bearer":[]}],"x-scope":"events:write","description":"İşlem olaylarını (sipariş teslim edildi, servis kaydı kapandı, çağrı bitti) gönderin. Panelde bu türe bağlı her etkin tetik için: anket yayında mı, kişi ayrıldı mı, sıklık sınırı, kanal (kişinin e-posta/telefon bilgisine göre) denetlenir; uyarsa davet açılır ve gecikmeli mesaj planlanır. Aynı olayı iki kez göndermemek için `Idempotency-Key` kullanın.\n\nKapsam: `events:write`","responses":{"202":{"description":"Alındı; hangi tetiğin ne zaman, hangi kanaldan anket göndereceği ya da neden atlandığı döner","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"400":{"$ref":"#/components/responses/E400"},"409":{"$ref":"#/components/responses/E409"},"422":{"$ref":"#/components/responses/E422"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}},"operationId":"createEvent","parameters":[{"$ref":"#/components/parameters/idempotency"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventInput"}}}}}},"/events/batch":{"post":{"tags":["Olaylar"],"summary":"Toplu olay (en fazla 500)","security":[{"bearer":[]}],"x-scope":"events:write","description":"\n\nKapsam: `events:write`","responses":{"202":{"description":"Başarılı","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventBatchResult"}}}},"400":{"$ref":"#/components/responses/E400"},"422":{"$ref":"#/components/responses/E422"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}},"operationId":"createEventBatch","parameters":[{"$ref":"#/components/parameters/idempotency"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["events"],"properties":{"events":{"type":"array","maxItems":500,"items":{"$ref":"#/components/schemas/EventInput"}}}}}}}}},"/events/{id}":{"get":{"tags":["Olaylar"],"summary":"Olay sonucu","security":[{"bearer":[]}],"x-scope":"events:write","description":"\n\nKapsam: `events:write`","responses":{"200":{"description":"Başarılı","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"404":{"$ref":"#/components/responses/E404"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}},"operationId":"getEvent","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"evt_..."}]}},"/contacts/{external_id}":{"get":{"tags":["Kişiler"],"summary":"Kişi","security":[{"bearer":[]}],"x-scope":"contacts:write","description":"\n\nKapsam: `contacts:write`","responses":{"200":{"description":"Başarılı","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}}},"404":{"$ref":"#/components/responses/E404"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}},"operationId":"getContact","parameters":[{"name":"external_id","in":"path","required":true,"schema":{"type":"string"},"description":"Sizin müşteri numaranız"}]},"put":{"tags":["Kişiler"],"summary":"Kişiyi oluştur ya da güncelle","security":[{"bearer":[]}],"x-scope":"contacts:write","description":"`opted_out: true` ile kişi anket mesajlarından çıkarılır (kendi izin yönetiminizle eşitlemek için).\n\nKapsam: `contacts:write`","responses":{"200":{"description":"Güncellendi","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}}},"201":{"description":"Oluşturuldu","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}}},"422":{"$ref":"#/components/responses/E422"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}},"operationId":"putContact","parameters":[{"name":"external_id","in":"path","required":true,"schema":{"type":"string"},"description":"Sizin müşteri numaranız"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactInput"}}}}},"delete":{"tags":["Kişiler"],"summary":"KVKK: kişiyi sil","security":[{"bearer":[]}],"x-scope":"contacts:write","description":"Kişi kaydı ve iletişim bilgisi silinir; yanıtları kişiden koparılıp anonimleşir (istatistikte kalır), kişisel bağlam alanları ve iletişim cevapları silinir, bekleyen mesajları iptal edilir. Geri alınamaz.\n\nKapsam: `contacts:write`","responses":{"200":{"description":"Başarılı","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactErasure"}}}},"404":{"$ref":"#/components/responses/E404"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}},"operationId":"eraseContact","parameters":[{"name":"external_id","in":"path","required":true,"schema":{"type":"string"},"description":"Sizin müşteri numaranız"}]}},"/contacts/{external_id}/export":{"get":{"tags":["Kişiler"],"summary":"KVKK: kişinin verisinin dökümü","security":[{"bearer":[]}],"x-scope":"contacts:write","description":"Erişim hakkı başvurusu için: kişi, davetler, mesajlar ve yanıtlar.\n\nKapsam: `contacts:write`","responses":{"200":{"description":"Başarılı","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactExport"}}}},"404":{"$ref":"#/components/responses/E404"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}},"operationId":"exportContact","parameters":[{"name":"external_id","in":"path","required":true,"schema":{"type":"string"},"description":"Sizin müşteri numaranız"}]}},"/invitations":{"post":{"tags":["Davetler"],"summary":"Davet oluştur","security":[{"bearer":[]}],"x-scope":"invitations:write","description":"Kişiye özel tek kullanımlık bağlantı. Bağlamdaki her alan yürürlükteki aydınlatma metninde olmalı; yoksa `privacy_notice_not_covering` (422).\n\nKapsam: `invitations:write`","responses":{"201":{"description":"Oluşturuldu; `url` kişiye gönderilecek bağlantı","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invitation"}}}},"400":{"$ref":"#/components/responses/E400"},"409":{"$ref":"#/components/responses/E409"},"422":{"$ref":"#/components/responses/E422"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}},"operationId":"createInvitation","parameters":[{"$ref":"#/components/parameters/idempotency"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationInput"}}}}}},"/invitations/batch":{"post":{"tags":["Davetler"],"summary":"Toplu davet (en fazla 1000)","security":[{"bearer":[]}],"x-scope":"invitations:write","description":"Hatalı kalem diğerlerini durdurmaz; sonuç kalem sırasıyla döner.\n\nKapsam: `invitations:write`","responses":{"200":{"description":"Başarılı","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchResult"}}}},"400":{"$ref":"#/components/responses/E400"},"422":{"$ref":"#/components/responses/E422"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}},"operationId":"createInvitationBatch","parameters":[{"$ref":"#/components/parameters/idempotency"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["invitations"],"properties":{"invitations":{"type":"array","maxItems":1000,"items":{"$ref":"#/components/schemas/InvitationInput"}}}}}}}}},"/invitations/{id}":{"get":{"tags":["Davetler"],"summary":"Davet durumu","security":[{"bearer":[]}],"x-scope":"invitations:write","description":"\n\nKapsam: `invitations:write`","responses":{"200":{"description":"Başarılı","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invitation"}}}},"404":{"$ref":"#/components/responses/E404"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}},"operationId":"getInvitation","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"inv_..."}]}},"/invitations/{id}/cancel":{"post":{"tags":["Davetler"],"summary":"Daveti iptal et","security":[{"bearer":[]}],"x-scope":"invitations:write","description":"\n\nKapsam: `invitations:write`","responses":{"200":{"description":"Başarılı","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invitation"}}}},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}},"operationId":"cancelInvitation","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"inv_..."},{"$ref":"#/components/parameters/idempotency"}]}},"/responses":{"get":{"tags":["Yanıtlar"],"summary":"Yanıtları listele","security":[{"bearer":[]}],"x-scope":"responses:read","description":"Yalnız tamamlanmış yanıtlar, anahtarın moduna (canlı/test) ve birim kısıtına göre. Kişisel veri yalnız `responses:pii` kapsamıyla.\n\nKapsam: `responses:read`","responses":{"200":{"description":"Başarılı","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseList"}}}},"422":{"$ref":"#/components/responses/E422"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}},"operationId":"listResponses","parameters":[{"name":"survey","in":"query","required":false,"schema":{"type":"string"},"description":"Anket kimliği"},{"name":"org_unit","in":"query","required":false,"schema":{"type":"string"},"description":"Birim kodu ya da kimliği (alt ağaç dahil)"},{"name":"touchpoint","in":"query","required":false,"schema":{"type":"string"},"description":"Temas noktası anahtarı"},{"name":"transaction_ref","in":"query","required":false,"schema":{"type":"string"},"description":"İşlem no (sipariş, fiş)"},{"name":"case_status","in":"query","required":false,"schema":{"enum":["new","in_progress","resolved"]},"description":"Vaka durumu"},{"name":"priority","in":"query","required":false,"schema":{"enum":["normal","high","critical"]},"description":"Öncelik"},{"name":"completed_since","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Bu zamandan sonra tamamlanan"},{"name":"updated_since","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Bu zamandan sonra değişen (eşitleme için)"},{"name":"order","in":"query","required":false,"schema":{"enum":["asc","desc"]},"description":"Sıra (varsayılan desc)"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/cursor"}]}},"/responses/{id}":{"get":{"tags":["Yanıtlar"],"summary":"Yanıt","security":[{"bearer":[]}],"x-scope":"responses:read","description":"\n\nKapsam: `responses:read`","responses":{"200":{"description":"Başarılı","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}}},"404":{"$ref":"#/components/responses/E404"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}},"operationId":"getResponse","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"rsp_..."}]},"patch":{"tags":["Yanıtlar"],"summary":"Vaka durumunu, önceliği ya da sorumluyu değiştir","security":[{"bearer":[]}],"x-scope":"responses:write","description":"Değişiklik vaka geçmişine \"API: anahtar adı\" ile yazılır ve abone webhook'lara case.* olayı gider.\n\nKapsam: `responses:write`","responses":{"200":{"description":"Başarılı","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}}},"404":{"$ref":"#/components/responses/E404"},"422":{"$ref":"#/components/responses/E422"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}},"operationId":"updateResponse","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"rsp_..."},{"$ref":"#/components/parameters/idempotency"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseUpdate"}}}}}},"/responses/{id}/notes":{"post":{"tags":["Yanıtlar"],"summary":"Vakaya not ekle","security":[{"bearer":[]}],"x-scope":"responses:write","description":"\n\nKapsam: `responses:write`","responses":{"201":{"description":"Başarılı","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Note"}}}},"404":{"$ref":"#/components/responses/E404"},"422":{"$ref":"#/components/responses/E422"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}},"operationId":"createNote","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"rsp_..."},{"$ref":"#/components/parameters/idempotency"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["body"],"properties":{"body":{"type":"string","maxLength":5000}}}}}}}},"/org-units":{"get":{"tags":["Organizasyon"],"summary":"Birimleri listele","security":[{"bearer":[]}],"x-scope":"org:read","description":"\n\nKapsam: `org:read`","responses":{"200":{"description":"Başarılı","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgUnitList"}}}},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}},"operationId":"listOrgUnits","parameters":[{"name":"updated_since","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Bu zamandan sonra değişen"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/cursor"}]}},"/org-units/{code}":{"get":{"tags":["Organizasyon"],"summary":"Birim","security":[{"bearer":[]}],"x-scope":"org:read","description":"\n\nKapsam: `org:read`","responses":{"200":{"description":"Başarılı","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgUnit"}}}},"404":{"$ref":"#/components/responses/E404"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}},"operationId":"getOrgUnit","parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string"},"description":"Birim kodu ya da kimliği"}]},"put":{"tags":["Organizasyon"],"summary":"Birimi koduyla oluştur ya da güncelle","security":[{"bearer":[]}],"x-scope":"org:write","description":"\n\nKapsam: `org:write`","responses":{"200":{"description":"Güncellendi","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgUnit"}}}},"201":{"description":"Oluşturuldu","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgUnit"}}}},"404":{"$ref":"#/components/responses/E404"},"422":{"$ref":"#/components/responses/E422"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}},"operationId":"putOrgUnit","parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string"},"description":"Dış sistemdeki birim kodu (harf, rakam, . _ -)"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgUnitInput"}}}}}},"/people/{code}":{"put":{"tags":["Organizasyon"],"summary":"Personeli koduyla oluştur ya da güncelle","security":[{"bearer":[]}],"x-scope":"org:write","description":"\n\nKapsam: `org:write`","responses":{"200":{"description":"Güncellendi","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Person"}}}},"201":{"description":"Oluşturuldu","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Person"}}}},"404":{"$ref":"#/components/responses/E404"},"422":{"$ref":"#/components/responses/E422"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}},"operationId":"putPerson","parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string"},"description":"Personel kodu"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"org_unit":{"type":"string"},"email":{"type":"string","format":"email"},"is_active":{"type":"boolean"}}}}}}}},"/touchpoints":{"get":{"tags":["Organizasyon"],"summary":"Temas noktalarını listele","security":[{"bearer":[]}],"x-scope":"org:read","description":"\n\nKapsam: `org:read`","responses":{"200":{"description":"Başarılı","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TouchpointList"}}}},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}},"operationId":"listTouchpoints","parameters":[{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/cursor"}]}},"/touchpoints/{key}":{"put":{"tags":["Organizasyon"],"summary":"Temas noktasını anahtarıyla oluştur ya da güncelle","security":[{"bearer":[]}],"x-scope":"org:write","description":"\n\nKapsam: `org:write`","responses":{"200":{"description":"Güncellendi","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Touchpoint"}}}},"201":{"description":"Oluşturuldu","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Touchpoint"}}}},"422":{"$ref":"#/components/responses/E422"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}},"operationId":"putTouchpoint","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string"},"description":"Anahtar (küçük harf, rakam, _)"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"is_active":{"type":"boolean"}}}}}}}},"/metrics":{"get":{"tags":["Metrikler"],"summary":"CSAT, NPS, CES ve kırılım","security":[{"bearer":[]}],"x-scope":"reports:read","description":"Panel raporlarıyla aynı hesap: canlı, tamamlanmış, şüpheli olmayan yanıtlar; kiracının saat diliminde günler.\n\nKapsam: `reports:read`","responses":{"200":{"description":"Başarılı","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Metrics"}}}},"404":{"$ref":"#/components/responses/E404"},"422":{"$ref":"#/components/responses/E422"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}},"operationId":"getMetrics","parameters":[{"name":"from","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"name":"group_by","in":"query","required":false,"schema":{"enum":["org_unit","touchpoint","person","channel","survey","day"]},"description":"Kırılım"},{"name":"level","in":"query","required":false,"schema":{"type":"string"},"description":"group_by=org_unit için seviye adı (ör. Bölge)"},{"name":"survey","in":"query","required":false,"schema":{"type":"string"},"description":"Anket kimliği"},{"name":"org_unit","in":"query","required":false,"schema":{"type":"string"},"description":"Birim kodu (alt ağaç)"},{"name":"touchpoint","in":"query","required":false,"schema":{"type":"string"},"description":"Temas noktası kimliği"},{"name":"channel","in":"query","required":false,"schema":{"type":"string"},"description":"qr, email, sms, link"}]}},"/webhook-endpoints":{"get":{"tags":["Webhook'lar"],"summary":"Webhook'ları listele","security":[{"bearer":[]}],"x-scope":"webhooks:manage","description":"\n\nKapsam: `webhooks:manage`","responses":{"200":{"description":"Başarılı","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointList"}}}},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}},"operationId":"listWebhookEndpoints","parameters":[{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/cursor"}]},"post":{"tags":["Webhook'lar"],"summary":"Webhook oluştur","security":[{"bearer":[]}],"x-scope":"webhooks:manage","description":"\n\nKapsam: `webhooks:manage`","responses":{"201":{"description":"Oluşturuldu; `secret` yalnız bu yanıtta","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}}},"422":{"$ref":"#/components/responses/E422"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}},"operationId":"createWebhookEndpoint","parameters":[{"$ref":"#/components/parameters/idempotency"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointInput"}}}}}},"/webhook-endpoints/{id}":{"get":{"tags":["Webhook'lar"],"summary":"Webhook","security":[{"bearer":[]}],"x-scope":"webhooks:manage","description":"\n\nKapsam: `webhooks:manage`","responses":{"200":{"description":"Başarılı","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}}},"404":{"$ref":"#/components/responses/E404"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}},"operationId":"getWebhookEndpoint","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"whk_..."}]},"patch":{"tags":["Webhook'lar"],"summary":"Webhook güncelle","security":[{"bearer":[]}],"x-scope":"webhooks:manage","description":"\n\nKapsam: `webhooks:manage`","responses":{"200":{"description":"Başarılı","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}}},"404":{"$ref":"#/components/responses/E404"},"422":{"$ref":"#/components/responses/E422"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}},"operationId":"updateWebhookEndpoint","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"whk_..."},{"$ref":"#/components/parameters/idempotency"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointInput"}}}}},"delete":{"tags":["Webhook'lar"],"summary":"Webhook sil","security":[{"bearer":[]}],"x-scope":"webhooks:manage","description":"\n\nKapsam: `webhooks:manage`","responses":{"204":{"description":"Silindi"},"404":{"$ref":"#/components/responses/E404"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}},"operationId":"deleteWebhookEndpoint","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"whk_..."}]}},"/webhook-deliveries":{"get":{"tags":["Webhook'lar"],"summary":"Gönderim kayıtları","security":[{"bearer":[]}],"x-scope":"webhooks:manage","description":"\n\nKapsam: `webhooks:manage`","responses":{"200":{"description":"Başarılı","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryList"}}}},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}},"operationId":"listWebhookDeliveries","parameters":[{"name":"endpoint","in":"query","required":false,"schema":{"type":"string"},"description":"whk_..."},{"name":"status","in":"query","required":false,"schema":{"enum":["pending","sending","retrying","succeeded","failed"]},"description":"Durum"},{"name":"event","in":"query","required":false,"schema":{"type":"string"},"description":"Olay"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/cursor"}]}},"/webhook-deliveries/{id}/redeliver":{"post":{"tags":["Webhook'lar"],"summary":"Yeniden gönder","security":[{"bearer":[]}],"x-scope":"webhooks:manage","description":"\n\nKapsam: `webhooks:manage`","responses":{"202":{"description":"Kuyruğa alındı","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDelivery"}}}},"404":{"$ref":"#/components/responses/E404"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}},"operationId":"redeliverWebhook","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"whd_..."},{"$ref":"#/components/parameters/idempotency"}]}}},"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"sk_live_... / sk_test_..."}},"parameters":{"limit":{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},"cursor":{"name":"cursor","in":"query","schema":{"type":"string"},"description":"Önceki sayfanın next_cursor değeri"},"idempotency":{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Aynı isteğin iki kez işlenmesini önler (24 saat)"}},"responses":{"E400":{"description":"Geçersiz istek","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"E401":{"description":"Kimlik doğrulanamadı","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"E403":{"description":"Yetersiz kapsam ya da erişim alanı dışında","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"E404":{"description":"Bulunamadı (ya da anahtarın alanı dışında)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"E409":{"description":"Çakışma","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"E422":{"description":"Doğrulama ya da iş kuralı hatası","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"E429":{"description":"Hız sınırı aşıldı","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"schemas":{"Problem":{"type":"object","required":["type","title","status","code"],"properties":{"type":{"type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"code":{"type":"string","description":"Makinece okunur hata kodu"},"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"fields":{"type":"array","items":{"type":"string"}},"required_scope":{"type":"string"}}},"Me":{"type":"object","required":["object","id","name","tenant","scopes","org_unit","livemode","expires_at"],"additionalProperties":false,"properties":{"object":{"const":"api_key"},"id":{"type":"string","pattern":"^key_[0-9a-z]{26}$","examples":["key_01k7x9q2m5c8v3n4b6z1t0r2w8"]},"name":{"type":"string"},"tenant":{"type":"object","required":["id","name"],"properties":{"id":{"type":"string","pattern":"^ten_[0-9a-z]{26}$","examples":["ten_01k7x9q2m5c8v3n4b6z1t0r2w8"]},"name":{"type":"string"}}},"scopes":{"type":"array","items":{"enum":["surveys:read","invitations:write","events:write","contacts:write","responses:read","responses:pii","responses:write","org:read","org:write","reports:read","webhooks:manage"]}},"org_unit":{"type":["string","null"]},"livemode":{"type":"boolean"},"expires_at":{"type":["string","null"],"format":"date-time"}}},"Survey":{"type":"object","required":["object","id","name","status","live","version","locales","touchpoint","created_at","updated_at"],"additionalProperties":false,"properties":{"object":{"const":"survey"},"id":{"type":"string","pattern":"^srv_[0-9a-z]{26}$","examples":["srv_01k7x9q2m5c8v3n4b6z1t0r2w8"]},"name":{"type":"string"},"status":{"enum":["draft","active","paused","archived"]},"live":{"type":"boolean"},"version":{"type":["integer","null"]},"locales":{"type":"array","items":{"type":"string"}},"touchpoint":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"questions":{"type":"array","items":{"type":"object","required":["key","type","title","metric","required","options"],"properties":{"key":{"type":"string"},"type":{"type":"string"},"title":{"type":"string"},"metric":{"type":["string","null"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"object","required":["key","label"],"properties":{"key":{"type":"string"},"label":{"type":"string"}}}}}}}}},"InvitationInput":{"type":"object","required":["survey"],"additionalProperties":false,"properties":{"survey":{"type":"string","description":"Anket kimliği (srv_...)"},"org_unit":{"type":"string","description":"Birim kodu (ör. IST-034) ya da kimliği"},"person":{"type":"string","description":"Personel kodu"},"touchpoint":{"type":"string","description":"Temas noktası anahtarı; yoksa anketinki"},"transaction_ref":{"type":"string","maxLength":128,"description":"Sipariş, fiş, servis kaydı no"},"contact":{"type":"object","additionalProperties":false,"properties":{"external_id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string","format":"email"},"phone":{"type":"string"},"locale":{"enum":["tr","en","ar","ru","de"]}}},"context":{"type":"object","description":"Panelde tanımlı bağlam alanları; aydınlatma metninde olmalı","additionalProperties":{"type":["string","number","boolean"]}},"max_uses":{"type":"integer","minimum":1,"maximum":100,"default":1},"expires_at":{"type":"string","format":"date-time","description":"Varsayılan 30 gün"}}},"Invitation":{"type":"object","required":["object","id","survey","status","url","channel","org_unit","person","touchpoint","contact","transaction_ref","context","max_uses","uses","expires_at","livemode","created_at"],"additionalProperties":false,"properties":{"object":{"const":"invitation"},"id":{"type":"string","pattern":"^inv_[0-9a-z]{26}$","examples":["inv_01k7x9q2m5c8v3n4b6z1t0r2w8"]},"survey":{"type":"string","pattern":"^srv_[0-9a-z]{26}$","examples":["srv_01k7x9q2m5c8v3n4b6z1t0r2w8"]},"status":{"enum":["pending","sent","started","responded","cancelled","expired"]},"url":{"type":["string","null"],"format":"uri","description":"Kişiye özel bağlantı. Yalnız oluşturma yanıtında dolu; sistem jetonu saklamaz."},"channel":{"type":"string"},"org_unit":{"type":["string","null"]},"person":{"type":["string","null"]},"touchpoint":{"type":["string","null"]},"contact":{"type":["object","null"],"required":["id","external_id"],"properties":{"id":{"type":"string","pattern":"^con_[0-9a-z]{26}$","examples":["con_01k7x9q2m5c8v3n4b6z1t0r2w8"]},"external_id":{"type":["string","null"]}}},"transaction_ref":{"type":["string","null"]},"context":{"type":"object"},"max_uses":{"type":"integer"},"uses":{"type":"integer"},"expires_at":{"type":["string","null"],"format":"date-time"},"livemode":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"}}},"BatchResult":{"type":"object","required":["object","created","failed","results"],"properties":{"object":{"const":"batch_result"},"created":{"type":"integer"},"failed":{"type":"integer"},"results":{"type":"array","items":{"type":"object","required":["index","ok"],"properties":{"index":{"type":"integer"},"ok":{"type":"boolean"},"invitation":{"$ref":"#/components/schemas/Invitation"},"error":{"type":"object","required":["code"],"properties":{"code":{"type":"string"}}}}}}}},"Response":{"type":"object","required":["object","id","survey","unit","touchpoint","person","channel","locale","completed_at","transaction_ref","scores","case","anonymous","contact","answers","panel_url"],"additionalProperties":false,"properties":{"object":{"const":"response"},"id":{"type":"string","pattern":"^rsp_[0-9a-z]{26}$","examples":["rsp_01k7x9q2m5c8v3n4b6z1t0r2w8"]},"survey":{"type":"object","required":["id","name","version"],"properties":{"id":{"type":"string","pattern":"^srv_[0-9a-z]{26}$","examples":["srv_01k7x9q2m5c8v3n4b6z1t0r2w8"]},"name":{"type":"string"},"version":{"type":"integer"}}},"unit":{"type":["object","null"],"required":["id","name","code","level"],"additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^org_[0-9a-z]{26}$","examples":["org_01k7x9q2m5c8v3n4b6z1t0r2w8"]},"name":{"type":"string"},"code":{"type":["string","null"]},"level":{"type":["string","null"]}}},"touchpoint":{"type":["object","null"],"required":["id","name"],"additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^tch_[0-9a-z]{26}$","examples":["tch_01k7x9q2m5c8v3n4b6z1t0r2w8"]},"name":{"type":"string"}}},"person":{"type":["object","null"],"required":["id","name"],"additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^per_[0-9a-z]{26}$","examples":["per_01k7x9q2m5c8v3n4b6z1t0r2w8"]},"name":{"type":"string"}}},"channel":{"type":"string"},"locale":{"type":"string"},"completed_at":{"type":["string","null"],"format":"date-time"},"transaction_ref":{"type":["string","null"]},"scores":{"type":"object","required":["csat","ces","nps"],"properties":{"csat":{"type":["number","null"]},"ces":{"type":["number","null"]},"nps":{"type":["integer","null"]}}},"case":{"type":"object","required":["status","priority","flagged","assignee","due_at"],"properties":{"status":{"enum":["new","in_progress","resolved"]},"priority":{"enum":["normal","high","critical"]},"flagged":{"type":"boolean"},"assignee":{"type":["object","null"],"required":["id","name"],"additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^mem_[0-9a-z]{26}$","examples":["mem_01k7x9q2m5c8v3n4b6z1t0r2w8"]},"name":{"type":"string"}}},"due_at":{"type":["string","null"],"format":"date-time"},"resolution_code":{"type":["string","null"],"description":"Çözülürken seçilen kapanış kodu (panelde Vaka Ayarları)"},"follow_up_result":{"enum":["resolved","partly","not_resolved",null],"description":"Çözüm memnuniyeti anketinde müşterinin cevabı"}}},"anonymous":{"type":"boolean"},"contact":{"type":["object","null"],"description":"Yalnız `responses:pii` kapsamıyla ve kişi anonim değilse","properties":{"name":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"external_id":{"type":["string","null"]}}},"answers":{"type":"array","items":{"type":"object","required":["key","type","title","metric","value","label"],"additionalProperties":false,"properties":{"key":{"type":"string"},"type":{"type":"string"},"title":{"type":"string"},"metric":{"type":["string","null"]},"value":{"description":"Sayı, seçenek anahtarı, anahtar dizisi ya da metin"},"label":{"description":"Seçenek etiketi (dizi olabilir) ya da null"}}}},"panel_url":{"type":"string","format":"uri"}}},"ResponseUpdate":{"type":"object","additionalProperties":false,"properties":{"case_status":{"enum":["new","in_progress","resolved"]},"priority":{"enum":["normal","high","critical"]},"assignee":{"type":["string","null"],"description":"Üye kimliği (mem_...); null = atamayı kaldır"},"resolution_code":{"type":["string","null"],"description":"case_status=resolved ile kapanış kodu anahtarı"}}},"Note":{"type":"object","required":["object","id","response","body","created_at"],"properties":{"object":{"const":"note"},"id":{"type":"string","pattern":"^act_[0-9a-z]{26}$","examples":["act_01k7x9q2m5c8v3n4b6z1t0r2w8"]},"response":{"type":"string","pattern":"^rsp_[0-9a-z]{26}$","examples":["rsp_01k7x9q2m5c8v3n4b6z1t0r2w8"]},"body":{"type":"string"},"created_at":{"type":"string","format":"date-time"}}},"OrgUnit":{"type":"object","required":["object","id","code","name","level","depth","parent","city","address","is_active","updated_at"],"additionalProperties":false,"properties":{"object":{"const":"org_unit"},"id":{"type":"string","pattern":"^org_[0-9a-z]{26}$","examples":["org_01k7x9q2m5c8v3n4b6z1t0r2w8"]},"code":{"type":["string","null"]},"name":{"type":"string"},"level":{"type":["string","null"]},"depth":{"type":["integer","null"]},"parent":{"type":["string","null"]},"city":{"type":["string","null"]},"address":{"type":["string","null"]},"is_active":{"type":"boolean"},"updated_at":{"type":"string","format":"date-time"}}},"OrgUnitInput":{"type":"object","required":["name"],"additionalProperties":false,"properties":{"name":{"type":"string"},"parent":{"type":["string","null"],"description":"Üst birim kodu; değişirse birim taşınır"},"level":{"type":"string","description":"Seviye adı; verilmezse üstün bir altı"},"city":{"type":"string"},"address":{"type":"string"},"review_url":{"type":"string","format":"uri"},"is_active":{"type":"boolean"}}},"Person":{"type":"object","required":["object","id","code","name","org_unit","is_active"],"additionalProperties":false,"properties":{"object":{"const":"person"},"id":{"type":"string","pattern":"^per_[0-9a-z]{26}$","examples":["per_01k7x9q2m5c8v3n4b6z1t0r2w8"]},"code":{"type":["string","null"]},"name":{"type":"string"},"org_unit":{"type":["string","null"]},"is_active":{"type":"boolean"}}},"Touchpoint":{"type":"object","required":["object","id","key","name","description","is_active"],"additionalProperties":false,"properties":{"object":{"const":"touchpoint"},"id":{"type":"string","pattern":"^tch_[0-9a-z]{26}$","examples":["tch_01k7x9q2m5c8v3n4b6z1t0r2w8"]},"key":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"is_active":{"type":"boolean"}}},"MetricSet":{"type":"object","required":["count","csat","satisfied","ces","nps","promoters","detractors","nps_count","critical"],"properties":{"count":{"type":"integer"},"csat":{"type":["number","null"]},"satisfied":{"type":["number","null"],"description":"CSAT >= 4 yüzdesi"},"ces":{"type":["number","null"]},"nps":{"type":["integer","null"]},"promoters":{"type":["number","null"]},"detractors":{"type":["number","null"]},"nps_count":{"type":"integer"},"critical":{"type":"integer"},"review_offered":{"type":"integer","description":"Google yorum daveti gösterilen"},"review_clicked":{"type":"integer","description":"Davete tıklayan"}}},"Metrics":{"type":"object","required":["object","range","summary","previous"],"properties":{"object":{"const":"metrics"},"range":{"type":"object","required":["from","to"],"properties":{"from":{"type":"string","format":"date"},"to":{"type":"string","format":"date"}}},"summary":{"$ref":"#/components/schemas/MetricSet"},"previous":{"$ref":"#/components/schemas/MetricSet","description":"Aynı uzunlukta önceki dönem"},"groups":{"type":"array","items":{"type":"object","required":["key","name","count","csat"],"properties":{"key":{"type":"string"},"name":{"type":"string"},"count":{"type":"integer"},"csat":{"type":["number","null"]},"satisfied":{"type":["number","null"]},"nps":{"type":["integer","null"]},"critical":{"type":"integer"},"delta":{"type":["number","null"]}}}}}},"WebhookEndpoint":{"type":"object","required":["object","id","name","url","events","filters","include_pii","header_names","is_active","retry_every_minutes","give_up_after_minutes","notify_on_failure","notify_emails","disable_after_failures","disabled_reason","created_at"],"properties":{"object":{"const":"webhook_endpoint"},"id":{"type":"string","pattern":"^whk_[0-9a-z]{26}$","examples":["whk_01k7x9q2m5c8v3n4b6z1t0r2w8"]},"name":{"type":"string"},"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"enum":["response.completed","response.flagged","case.assigned","case.status_changed","case.resolved","case.escalated"]}},"filters":{"type":"object","properties":{"surveys":{"type":"array","items":{"type":"string"}},"unit":{"type":"string"},"min_priority":{"enum":["high","critical"]}}},"include_pii":{"type":"boolean"},"header_names":{"type":"array","items":{"type":"string"}},"is_active":{"type":"boolean"},"retry_every_minutes":{"type":"integer"},"give_up_after_minutes":{"type":"integer","description":"0 = tekrar yok"},"notify_on_failure":{"type":"boolean"},"notify_emails":{"type":"array","items":{"type":"string"}},"disable_after_failures":{"type":["integer","null"]},"disabled_reason":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"secret":{"type":"string","description":"Yalnız oluşturma yanıtında"}}},"WebhookEndpointInput":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string"},"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"enum":["response.completed","response.flagged","case.assigned","case.status_changed","case.resolved","case.escalated"]}},"filters":{"type":"object"},"include_pii":{"type":"boolean"},"headers":{"type":"array","items":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"value":{"type":["string","null"]}}}},"retry_every_minutes":{"type":"integer","minimum":1,"maximum":1440,"default":5},"give_up_after_minutes":{"type":"integer","minimum":0,"maximum":10080,"default":1440},"notify_on_failure":{"type":"boolean"},"notify_emails":{"type":"array","items":{"type":"string","format":"email"}},"disable_after_failures":{"type":["integer","null"]},"is_active":{"type":"boolean"}}},"WebhookDelivery":{"type":"object","required":["object","id","endpoint","event","event_id","status","attempts","last_status_code","last_error","next_attempt_at","created_at"],"additionalProperties":false,"properties":{"object":{"const":"webhook_delivery"},"id":{"type":"string","pattern":"^whd_[0-9a-z]{26}$","examples":["whd_01k7x9q2m5c8v3n4b6z1t0r2w8"]},"endpoint":{"type":"string","pattern":"^whk_[0-9a-z]{26}$","examples":["whk_01k7x9q2m5c8v3n4b6z1t0r2w8"]},"event":{"type":"string"},"event_id":{"type":"string"},"status":{"enum":["pending","sending","retrying","succeeded","failed"]},"attempts":{"type":"integer"},"last_status_code":{"type":["integer","null"]},"last_error":{"type":["string","null"]},"next_attempt_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"}}},"EventInput":{"type":"object","required":["type"],"additionalProperties":false,"properties":{"type":{"type":"string","pattern":"^[a-z0-9][a-z0-9_.]{0,63}$","description":"Olay türü; panelde bu türe bağlı tetikler çalışır (ör. order_delivered)"},"occurred_at":{"type":"string","format":"date-time","description":"Olayın zamanı; gecikme buna eklenir. Yoksa şimdi."},"contact":{"type":"object","additionalProperties":false,"properties":{"external_id":{"type":"string","description":"Sizin müşteri numaranız (önerilir)"},"name":{"type":"string"},"email":{"type":"string","format":"email"},"phone":{"type":"string","description":"+90 5xx... ya da 05xx..."},"locale":{"enum":["tr","en","ar","ru","de"]}}},"org_unit":{"type":"string"},"person":{"type":"string"},"touchpoint":{"type":"string"},"transaction_ref":{"type":"string","maxLength":128},"context":{"type":"object","additionalProperties":{"type":["string","number","boolean"]}}}},"Event":{"type":"object","required":["object","id","type","occurred_at","matched_triggers","scheduled","skipped","livemode","created_at"],"additionalProperties":false,"properties":{"object":{"const":"event"},"id":{"type":"string","pattern":"^evt_[0-9a-z]{26}$","examples":["evt_01k7x9q2m5c8v3n4b6z1t0r2w8"]},"type":{"type":"string"},"occurred_at":{"type":"string","format":"date-time"},"matched_triggers":{"type":"integer"},"scheduled":{"type":"array","items":{"type":"object","required":["trigger","survey","invitation","message","channel","send_at"],"properties":{"trigger":{"type":"string","pattern":"^trg_[0-9a-z]{26}$","examples":["trg_01k7x9q2m5c8v3n4b6z1t0r2w8"]},"survey":{"type":"string","pattern":"^srv_[0-9a-z]{26}$","examples":["srv_01k7x9q2m5c8v3n4b6z1t0r2w8"]},"invitation":{"type":"string","pattern":"^inv_[0-9a-z]{26}$","examples":["inv_01k7x9q2m5c8v3n4b6z1t0r2w8"]},"message":{"type":"string","pattern":"^msg_[0-9a-z]{26}$","examples":["msg_01k7x9q2m5c8v3n4b6z1t0r2w8"]},"channel":{"enum":["email","sms"]},"send_at":{"type":"string","format":"date-time"}}}},"skipped":{"type":"array","items":{"type":"object","required":["trigger","reason","detail"],"properties":{"trigger":{"type":"string","pattern":"^trg_[0-9a-z]{26}$","examples":["trg_01k7x9q2m5c8v3n4b6z1t0r2w8"]},"detail":{"type":"string"},"reason":{"type":"string","description":"survey_not_live, opted_out, frequency_trigger, frequency_global, no_recipient, privacy_notice_not_covering, unknown_context_field, validation_failed"}}}},"livemode":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"}}},"EventBatchResult":{"type":"object","required":["object","created","failed","results"],"properties":{"object":{"const":"batch_result"},"created":{"type":"integer"},"failed":{"type":"integer"},"results":{"type":"array","items":{"type":"object","required":["index","ok"],"properties":{"index":{"type":"integer"},"ok":{"type":"boolean"},"event":{"$ref":"#/components/schemas/Event"},"error":{"type":"object"}}}}}},"Contact":{"type":"object","required":["object","id","external_id","name","email","phone","locale","opted_out","created_at"],"additionalProperties":false,"properties":{"object":{"const":"contact"},"id":{"type":"string","pattern":"^con_[0-9a-z]{26}$","examples":["con_01k7x9q2m5c8v3n4b6z1t0r2w8"]},"external_id":{"type":["string","null"]},"name":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"locale":{"type":["string","null"]},"opted_out":{"type":"boolean","description":"Anket mesajı almak istemiyor"},"created_at":{"type":"string","format":"date-time"}}},"ContactInput":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string"},"email":{"type":"string","format":"email"},"phone":{"type":"string"},"locale":{"enum":["tr","en","ar","ru","de"]},"opted_out":{"type":"boolean","description":"true: bu kişiye anket mesajı gönderilmez"}}},"ContactExport":{"type":"object","required":["object","contact","invitations","messages","responses","exported_at"],"properties":{"object":{"const":"contact_export"},"contact":{"$ref":"#/components/schemas/Contact"},"invitations":{"type":"array"},"messages":{"type":"array"},"responses":{"type":"array","items":{"type":"object"}},"exported_at":{"type":"string","format":"date-time"}}},"ContactErasure":{"type":"object","required":["object","erased","responses_anonymized"],"properties":{"object":{"const":"contact_erasure"},"erased":{"const":true},"responses_anonymized":{"type":"integer"}}},"SurveyList":{"type":"object","required":["object","data","has_more","next_cursor"],"additionalProperties":false,"properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Survey"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}}},"InvitationList":{"type":"object","required":["object","data","has_more","next_cursor"],"additionalProperties":false,"properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Invitation"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}}},"ResponseList":{"type":"object","required":["object","data","has_more","next_cursor"],"additionalProperties":false,"properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Response"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}}},"OrgUnitList":{"type":"object","required":["object","data","has_more","next_cursor"],"additionalProperties":false,"properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/OrgUnit"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}}},"TouchpointList":{"type":"object","required":["object","data","has_more","next_cursor"],"additionalProperties":false,"properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Touchpoint"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}}},"WebhookEndpointList":{"type":"object","required":["object","data","has_more","next_cursor"],"additionalProperties":false,"properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEndpoint"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}}},"WebhookDeliveryList":{"type":"object","required":["object","data","has_more","next_cursor"],"additionalProperties":false,"properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDelivery"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}}}}}}