Query External Chat Log List

Retrieve a list of external chat logs.

Request URL

GET {base_url}/{api_path}/external_chat_logs/list?access_token={access_token}

Request parameters

Parameter Required Type Description
channel_type No String The channel type.

Valid value:

  • all: All channel types.
  • sms: SMS channels.
  • whatsapp: WhatsApp.
  • facebook: Facebook.
  • livechat: Live chat.
cnv_id No String The unique ID of an external chat log.
Note: You can query external chat log's ID using the Query External Chat Log List interface.
current_handler No String The current conversation handler.
did_number No String The channel number.
from No String The sender of messages.
is_dealtwith No String The conversation handling status.

Valid value:

  • 0: Unhandled.
  • 1: Handled.
  • 2: All statuses.
only_deleted_handler No String Whether to include conversations handled by deleted extensions or queues.

Valid value:

  • 0: Disabled.
  • 1: Enabled.
order_by No String Define the display order.

Valid value:

  • desc: Descending order.
  • asc: Ascending order.
page No Integer Define which page is displayed.
page_size No Integer Define how many records per page.
sort_by No String Define the sorting field.

Valid value:

  • id: Sort by conversation ID.
  • time: Sort by creation time.
  • last_active_time: Sort by last active time.
  • channel_type: Sort by channel type.
  • did_number: Sort by channel number.
time_begin No String The start time of the time range.
Note: The time format depends on the date and time display format of PBX (set in System > Date and Time > Display Format on PBX).

Examples:

  • If the display format is Month/Day/Year and is 24-hours format, then the valid time format is MM/DD/YYYY HH:mm:ss.
  • If the display format is Year/Month/Day and is 12-hours format, then the valid time format is YYYY/MM/DD HH:mm:ss AM or YYYY/MM/DD HH:mm:ss PM.
time_end No String The end time of the time range.
Note: The time format depends on the date and time display format of PBX (set in System > Date and Time > Display Format on PBX).

Examples:

  • If the display format is Month/Day/Year and is 24-hours format, then the valid time format is MM/DD/YYYY HH:mm:ss.
  • If the display format is Year/Month/Day and is 12-hours format, then the valid time format is YYYY/MM/DD HH:mm:ss AM or YYYY/MM/DD HH:mm:ss PM.
time_type No String The time type.

Valid value:

  • time: Conversation creation time.
  • last_active_time: Last active time of conversations.
to No String The recipient of messages.

Response parameters

Parameter Type Description
errcode Integer Returned error code.
  • 0: Succeed.
  • Non-zero value: Failed.
Note: You can check the error code and error message in Error Code and Error Message.
errmsg String Returned message.
  • SUCCESS: Succeed.
  • FAILURE: Failed.
conversation_list Array<External_Chat_Conversation> The list of external chat logs.
total_number Integer The total number of external chat conversations.
External_Chat_Conversation
Parameter Type Description
cnv_id Integer The unique ID of the conversation.
cnv_gid String The global ID of the conversation.
time String The conversation creation time.
from Object<External_Chat_Participant> The sender of the conversation.
to Object<External_Chat_Participant> The recipient of the conversation.
channel_type String The channel type of the conversation.
  • sms: SMS.
  • whatsapp: WhatsApp.
  • facebook: Facebook.
  • livechat: Live chat.
did_number String The channel number of the conversation.
last_active_time String The last active time of the conversation.
current_handler Object<External_Chat_Participant> The current handler of the conversation.
is_dealtwith Integer The handling status of the conversation.
  • 0: Unhandled.
  • 1: Handled.
External_Chat_Participant
Parameter Type Description
type String The type of participant.
  • extension: The participant is an extension.
  • queue: The participant is a queue.
  • external: The participant is an external contact.
name String The name of the participant.
ext_num String The extension number of the participant.
external_num String The external number of the participant.
is_deleted Boolean Whether the participant has been deleted.
  • true: The participant has been deleted.
  • false: The participant has not been deleted.

Example

Request example

GET /openapi/v1.0/external_chat_logs/list?channel_type=all&is_dealtwith=2&page=1&page_size=2&access_token=xVx9wX2B38gSD0C2o4y9b9bd5QOPz2MK HTTP/1.1

Host: yeastardocs.example.yeastarcloud.com

Response example

HTTP/1.1 200 OK
{
    "errcode": 0,
    "errmsg": "SUCCESS",
    "total_number": 27,
    "conversation_list": [
        {
            "cnv_id": 27,
            "cnv_gid": "737cbec06e0541dfbfe3768d1ada4f8a",
            "time": "2026/08/22 23:06:43",
            "from": {
                "type": "external",
                "name": "Website Visitor",
                "external_num": "4f6909cf98294dadb3050219c0be217f"
            },
            "to": {
                "type": "extension",
                "name": "Sarah",
                "ext_num": "3200"
            },
            "channel_type": "livechat",
            "did_number": "LC00000",
            "last_active_time": "2026/08/23 23:06:46",
            "is_dealtwith": 1,
            "current_handler": {
                "type": "extension",
                "name": "Sarah",
                "ext_num": "3200"
            }
        },
        {
            "cnv_id": 26,
            "cnv_gid": "82e53eb2de90467f92b730a6b4ce06ad",
            "time": "2026/08/12 08:19:57",
            "from": {
                "type": "external",
                "name": "Website Visitor",
                "external_num": "8eaeff9a383e4175ad276383f4e2c310"
            },
            "to": {
                "type": "extension",
                "name": "Sarah",
                "ext_num": "3200"
            },
            "channel_type": "livechat",
            "did_number": "LC00000",
            "last_active_time": "2026/08/13 08:20:20",
            "is_dealtwith": 1,
            "current_handler": {
                "type": "extension",
                "name": "Sarah",
                "ext_num": "3200"
            }
        }
    ]
}