List Conversations

استرجاع كل محادثات WhatsApp.

GET/api/whatsapp/conversations🔒 Bearer JWT

Query Parameters

الحقلالنوعالوصف
filterenumunread | active | archived. افتراضي: غير المؤرشفة.
sortenumunread | oldest. افتراضي: الأحدث.

مثال طلب

curl "https://operix.operixdigital.com/api/whatsapp/conversations?filter=unread" \
  -H "Authorization: Bearer $TOKEN" \
  -H "X-Account-Id: acc_abc"

مثال استجابة

[
  {
    "id": "conv_xyz",
    "phone": "966500000000",
    "name": "أحمد",
    "lastMessage": "هل ممكن أعرف السعر؟",
    "unreadCount": 2,
    "isPinned": false,
    "isArchived": false,
    "priority": "normal",
    "labels": ["VIP"],
    "assignedAgentId": "ghanem",
    "aiMode": "HYBRID",
    "pendingApprovalCount": 1,
    "lastIncomingAt": "2026-05-27T10:00:00Z",
    "messages": [{"id": "msg_..", "content": "هل ممكن...", "direction": "inbound"}]
  }
]

Errors

الكودالرسالةالسبب
401Unauthorized