Chat History API
The Chat History API allows for retrieving chat history for a specific day.
Endpoint: /api/account_chat/history
Parameters:
date
[required]: the date of historic chats to return. Must be inYYYY-MM-DD
format.group
[optional]: the name of the group to which the chat messages belong
Basic usage example:
$ curl --get \
--basic -u user1:***** \
-d "date=2020-02-20" \
"https://channel.me/api/account_chat/history"
Example with group:
$ curl --get \
--basic -u user1:***** \
-d "date=2020-02-20" \
-d "group=sales" \
"https://channel.me/api/account_chat/history"
Example response:
[ { "agent_id": 101, "agent_name": "Test Agent", "endtime": "2020-02-20T13:18:35+01:00", "feedback": null, "group_id": 303, "group_name": "example", "id": 708, "messages": [ { "at": "2020-02-20T13:18:35+01:00", "message": "Example message from Visitor", "name": "Visitor" } ], "missed_reason": null, "page_meta": null, "rating": null, "start_url": "https://your-site.com/sales.html", "starttime": "2020-02-20T13:22:01+01:00", "status": "closed", "subject": "", "title": "sales", "user_meta": null } ]