Returns contacts filtered by status and calculates how long they have been waiting (from last_inbound_message.created_at until now). Adds a βwaiting_timeβ field that represents (in seconds) how long that contact has been waiting. Sorted by waiting_time descending (longest wait first).
| Parameter | Type | Required | Description |
|---|---|---|---|
page | number | Yes | Page number (starts at 1) |
status | string | Yes | Contact status to filter by |
pipelineId | string | No | Filter by specific pipeline UUID |
| Status | Description |
|---|---|
unattended | New messages not yet attended by team member |
attended | Currently being handled by human team member |
ai-attended | Being handled by AI assistant |
ai-away | AI temporarily unavailable, waiting for human handoff |
| Field | Type | Description |
|---|---|---|
data | array | Array of contact objects with waiting times |
total | number | Total number of contacts matching criteria |
| Field | Type | Description |
|---|---|---|
id | string (UUID) | Contactβs unique identifier |
name | string | Contactβs name |
created_at | string (ISO) | Contact creation timestamp |
platform | string | Communication channel |
chat_status | string | Current chat status |
waiting_time | number | Time waiting for response (in seconds) |
active_ticket_v2 | object | null | Active ticket information |
assigned_agents | array | List of assigned team members |
waiting_time field is calculated as:
total field to determine total matching contacts| Status Code | Description |
|---|---|
| 400 | Bad Request - Invalid status or parameters |
| 401 | Unauthorized - Invalid or missing API key |
| 500 | Internal Server Error - Something went wrong |
API key
Page number
"1"
contact_created_at, ticket_created_at, last_inbound_message, last_outbound_message, id whatsapp, playground, instagram, webchat, web-whatsapp, messenger, sms Pipeline ID
"1234567890"
Status
unattended, attended, ai-attended, ai-away