Automate your customer service. Sign up free
API Version

You're browsing the legacy version of the API documentation. Switch to the latest stable version →

Archives

Whether you’re in the middle of a chat or you finished it some time ago, you can see the whole chat in the Archives.

Archives give you a real-time insight into every bot interaction and user input. They also provide you in valuable data about your visitors and guide you what adjustments you need to do to increase the efficiency of your chatbot.

Get list of chats

Returns all chats.

GET https://api.chatbot.com/archives

The results are divided into pages, each containing 40 chats. To access next pages of the results, use ?after=<last-chat-ID> parameter.

Request URL

curl --request GET \
	--url https://api.chatbot.com/archives \
	--header 'authorization: Bearer ${DEVELOPER_ACCESS_TOKEN}'

Response example

[
    {
        "id": "5a687c7cf35df0e64e4d1d88",
        "sessionId": "1034021451",
        "date": "2018-01-24T12:30:52.113Z",
        "metadata": {
            "default_source": "custom"
        },
        "lastMessage": {
            "resolvedQuery": "",
            "trigger": "welcome"
        }
    },
    {
        "id": "5a5dad9ef35df0e64e190c51",
        "sessionId": "S1516088695.P2CNX1BJFY",
        "date": "2018-01-16T07:45:34.641Z",
        "metadata": {
            "default_source": "livechat",
            "default_id": "S15234234.324234",
            "default_name": "John",
            "default_email": "john@example.com",
            "default_ip": "0.0.0.0",
            "default_city": "Wroclaw",
            "default_country": "Poland",
            "default_timezone": "Europe/Warsaw",
            "default_url": "https://example.com",
            "default_referrer": "https://example.com"
        },
        "lastMessage": {
            "resolvedQuery": "Hello"
        }
    }
]

Properties

Property Type Description
id String Chat id.
sessionId String Chat session id.
date String Chat start time
metadata Object Object which includes your chat attributes.
lastMessage Object Object which includes last send message in the chat.

Get single chat

Returns a single chat item for the given chat ID.

GET https://api.chatbot.com/archives/ID

Sample request

curl --request GET \
	--url https://api.chatbot.com/archives/ID \
	--header 'authorization: Bearer ${DEVELOPER_ACCESS_TOKEN}'

Sample response

{
    "id": "5a687c7cf35df0e64e4d1d88",
    "sessionId": "1034021451",
    "date": "2018-01-24T12:30:52.113Z",
    "metadata": {
        "default_source": "custom"
    },
    "conversation": [
        {
            "date": "2018-01-24T12:30:52.113Z",
            "source": "custom",
            "resolvedQuery": "",
            "trigger": "welcome",
            "confidence": 0.7,
            "score": 1,
            "lifespan": 2,
            "incomplete": false,
            "storyId": "5a5f5520698d03000748325e",
            "interaction": {
                "id": "5a5f5520698d03000748325f",
                "name": "Welcome Interaction",
                "action": "default.welcome",
                "type": "welcome"
            },
            "parameters": {
                "email": "test@wp.pl"
            },
            "fulfillment": []
        }
    ]
}

Properties

Property Type Description
id String Chat id.
sessionId String Chat session id.
date String Chat start time
metadata Object Object which includes your chat attributes.
conversation Array.<Object> Array of object which includes all returned results from the bot.

Start a free ChatBot trial
and build your first chatbot today!

Free 14-day trial No credit card required

Discover our text| products