AI Connector Service — Webhook ve Proactive Mesajlaşma API Referansı
ProactiveMessageController — /api/proactive-messages
| # | Method | Route | Auth | Description |
|---|---|---|---|---|
| 1 | GET | /api/proactive-messages?agentId={guid}&page={int}&pageSize={int} | Required | Proactive mesaj listesi (PaginatedList<ProactiveMessageDto>) |
| 2 | POST | /api/proactive-messages | Required | Proaktif mesaj oluştur — 201 Created (CreateProactiveMessageCommand: agentId, trigger, payload) |
| 3 | PUT | /api/proactive-messages/{messageId:guid} | Required | Mesaj güncelle |
| 4 | DELETE | /api/proactive-messages/{messageId:guid} | Required | Mesaj sil |
Slack Webhook — /api/webhooks/slack
| # | Method | Route | Auth | Description |
|---|---|---|---|---|
| 5 | POST | /api/webhooks/slack | Bot Token (Slack OAuth) | Slack incoming mesaj webhook'ı — 200 OK (SlackWebhookHandler → event parse + agent'a yönlendirme) |
Request Body:
{
"token": "string (Slack verification token)",
"team_id": "string",
"channel_id": "string",
"user_id": "string",
"text": "string (kullanıcı mesajı)",
"event_ts": "string"
}
Response: { "status": "ok" }
Teams Webhook — /api/webhooks/teams
| # | Method | Route | Auth | Description |
|---|---|---|---|---|
| 6 | POST | /api/webhooks/teams | Bot Token (Teams OAuth) | Teams incoming mesaj webhook'ı — 200 OK (TeamsWebhookHandler) |
Request Body:
{
"type": "message",
"from": { "user": { "id": "string" } },
"channelId": "string",
"conversation": { "id": "string" },
"text": "string (kullanıcı mesajı)",
"serviceUrl": "string"
}
Telegram Webhook — /api/webhooks/telegram
| # | Method | Route | Auth | Description |
|---|---|---|---|---|
| 7 | POST | /api/webhooks/telegram | Bot Token (Telegram Bot API) | Telegram update webhook'ı — 200 OK (TelegramWebhookHandler) |
Request Body:
{
"update_id": "int",
"message": {
"chat": { "id": "long" },
"from": { "id": "long", "username": "string" },
"text": "string (kullanıcı mesajı)",
"date": "int"
}
}
WhatsApp Webhook — /api/webhooks/whatsapp
| # | Method | Route | Auth | Description |
|---|---|---|---|---|
| 8 | POST | /api/webhooks/whatsapp | Meta App Token | WhatsApp Business Cloud API webhook'ı — 200 OK (WhatsAppWebhookHandler) |
Request Body:
{
"object": "whatsapp_business_account",
"entry": [{
"id": "string",
"changes": [{
"value": {
"messaging_product": "whatsapp",
"contacts": [{ "wa_id": "string" }],
"messages": [{
"from": "string",
"id": "string",
"timestamp": "string",
"text": { "body": "string (kullanıcı mesajı)" },
"type": "text"
}]
}
}]
}]
}
Widget Chat — /api/widget
| # | Method | Route | Auth | Description |
|---|---|---|---|---|
| 9 | GET | /api/widget/{widgetId}/config | None (CORS origin whitelist) | Widget yapılandırması — 200 OK (WidgetConfigDto) |
| 10 | POST | /api/widget/{widgetId}/session/start | None (rate-limited: 60req/min/IP) | Anonim oturum başlatır — 201 Created ({ sessionId: "guid", token: "string" }) |
| 11 | POST | /api/widget/{widgetId}/session/otp-verify | None (rate-limited: 5 attempts/15min) | OTP doğrulama oturum — 200 OK ({ sessionId: "guid", verified: true }) |
Session Modes
| Mode | Auth | TTL |
|---|---|---|
| Anonim | Oturum token (localStorage) | 2 saat |
| OTP Doğrulamalı | SMS OTP | 8 saat |