See our other products: ChatBot - AI bot platform | - support ticket system | KnowledgeBase - help center for website

Help and support

Resources that will teach you everything about LiveChat.

How to get chat transcripts

by Justyna Kraszewska

If you’d like to keep an additional archive of your chats, you can get complete chat transcripts from LiveChat. This can come in handy if you need to keep past chats on file for all of your agents.

There are a couple ways to go about getting the transcripts.

Getting a transcript from Archives

This is the most basic method that allows you to grab individual chat transcripts. Useful when you don’t need to archive all of your chats but only some cases.

You can get a chat transcript from the Archives section. Select the chat, then click on the Send to email button, type in your email and click on Send to email again.

Getting a chat transcript from archives

Forwarding chat transcripts to email

You can forward your chat transcripts to a list of emails. To do that, go the Archives forwarding section, specify the addressees that should receive the transcripts and click on the Save changes button.

Forwarding chat transcripts to email
The transcripts will be automatically sent to the addresses on the list from the moment you save the changes on. The past transcripts, which were archived before introducing the changes, will not be forwarded.

Extracting transcripts using the API

An advanced way of getting your past chats. Using the API allows you to get the transcripts in bulk as well as just the specific conversations.

First of all, you will need a list of your chats. You can use the method to do that. Using this callback, you will be able to extract all chats from a particular time period.

When calling our Chats endpoint, the response is limited to the latest 100000 records on your LiveChat license, which gives you exactly 4000 pages with 25 chats per page. If you have more than 100000 chats on your license and you want to get them all, you will have to call our API several times.

In the first call, use the data range that covers the first 100000 chats. When making other calls, use the data range that includes the rest of your conversations.

Here’s an example request that will return all chats from group 1, starting from the 1st of January, 2015 and for one particular agent only:

curl "" -u  -H X-API-Version:2

When using our API, remember to always use HTTPS certificate, just as in the example above.

To learn more about the filtering options for this methods, check out our API documentation.

If you just need to store the chats, simply save the results to a file. Alternatively, you can use the API to send chats transcripts from the extracted chats to specified emails.

To do that, you need to use the Send chat transcripts to email method. You need to provide the receivers email as well as the CHAT_ID of the conversation (CHAT_IDs are available through the [GET] /chats method).

Here’s an example request:

curl ""  -u  -H X-API-Version:2  -d ""

If you need to send a bunch of chats this way and/or send them to several recipients, you can write a short script that would loop the request.

Sending transcripts automatically after chats

The final and most complex method of getting the chat transcripts involves using a LiveChat webhook. Using this method, you can receive a chat transcript after each of your chats.

Start by creating webhook. Go to the Webhooks section and click on the Add a webhook link.

Adding a webhook in LiveChat

Next, choose the chat ends option in the Event part of the setup. Leave all Data type options ticked.

You will need to provide the Target URL the webhook. This should be a file on your server. Create a blank file named “transcript-webhook” (for example in PHP), place it on you server and type in the address in the webhook setup.

Click on Add a webhook to finalize the webhook creation.

Finalizing webhook creation

Finally, you need to create the aforementioned .php file. The file should include a script that will automatically send a transcript when a chat is finished.

Here’s an example of such file:


$data = file_get_contents('php://input');
$data = json_decode($data);

if ($data->event_type === 'chat_ended') {
    // code to send email
	mail('', 'Chat transcript', print_r($data, true));

Once the file is on your server, the script will automatically send the transcript to the specified email or emails.

Did you find this helpful? Yes No
Thanks for your feedback.
47% of people found this helpful.

Start free LiveChat trial!

5-minute setup, test out the Team plan features for 14 days, no credit card required.

Rate us! Rate this chat to help us become better support. +