Aramaları Listele

Hesabınızdaki tüm aramaları listeleyin

Endpoint

GET/api/v1/calls

Hesabınızdaki tüm aramaları sayfalama ve filtreleme ile listeler.

Query Parametreleri

pageopsiyonel

Sayfa numarası (varsayılan: 1)

limitopsiyonel

Sayfa başına kayıt sayısı (varsayılan: 20, maksimum: 100)

assistantIdopsiyonel

Belirli bir asistana ait aramaları filtrele

phoneNumberIdopsiyonel

Belirli bir telefon numarasına ait aramaları filtrele

startDateopsiyonel

Başlangıç tarihi (ISO 8601 formatında)

endDateopsiyonel

Bitiş tarihi (ISO 8601 formatında)

directionopsiyonel

Arama yönü: inbound veya outbound

Örnek İstek

cURL
curl -X GET "https://api.wespoke.ai/api/v1/calls?page=1&limit=20" \
  -H "Authorization: Bearer YOUR_API_KEY"

Örnek Yanıt

200 OK
{
  "success": true,
  "data": [
    {
      "id": "call_123",
      "assistantId": "asst_456",
      "phoneNumberId": "phone_789",
      "direction": "inbound",
      "status": "completed",
      "startTime": "2025-01-15T10:30:00Z",
      "endTime": "2025-01-15T10:35:30Z",
      "duration": 330,
      "endReason": "user_hangup",
      "cost": "0.45",
      "from": "+905559876543",
      "to": "+905551234567",
      "messagesCount": 6,
      "recordingStatus": "completed",
      "recordingDuration": 330,
      "recordingFormat": "m4a",
      "isSuccess": true,
      "createdAt": "2025-01-15T10:30:00Z",
      "assistant": {
        "id": "asst_456",
        "name": "Müşteri Destek Asistanı"
      },
      "phoneNumber": {
        "id": "phone_789",
        "number": "+905551234567",
        "name": "Ana Hat"
      }
    },
    {
      "id": "call_124",
      "assistantId": "asst_456",
      "phoneNumberId": "phone_789",
      "direction": "inbound",
      "status": "completed",
      "startTime": "2025-01-15T11:00:00Z",
      "endTime": "2025-01-15T11:02:15Z",
      "duration": 135,
      "endReason": "assistant_hangup",
      "cost": "0.23",
      "from": "+905551112233",
      "to": "+905551234567",
      "messagesCount": 4,
      "recordingStatus": "completed",
      "recordingDuration": 135,
      "recordingFormat": "m4a",
      "isSuccess": true,
      "createdAt": "2025-01-15T11:00:00Z",
      "assistant": {
        "id": "asst_456",
        "name": "Müşteri Destek Asistanı"
      },
      "phoneNumber": {
        "id": "phone_789",
        "number": "+905551234567",
        "name": "Ana Hat"
      }
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 98,
    "pages": 5
  }
}

Yanıt Alanları

id

Aramanın benzersiz kimliği

assistantId

Aramayı gerçekleştiren asistanın kimliği

phoneNumberId

Kullanılan telefon numarasının kimliği

direction

Arama yönü: inbound (gelen) veya outbound (giden)

status

Arama durumu: queued, ringing, in-progress, completed, failed, busy, no-answer

duration

Arama süresi (saniye cinsinden)

endReason

Aramanın bitiş nedeni: user_hangup, assistant_hangup, error, vb.

cost

Toplam arama maliyeti (TL cinsinden)

recordingStatus

Kayıt durumu: none, pending, completed, failed

recordingDuration

Kayıt süresi (saniye cinsinden)

messagesCount

Arama sırasındaki toplam mesaj sayısı