Contact Log in

Analytics API

In addition to the dashboard, thankful offers an API to access analytics data you can use to integrate with your own software.

Getting started

To get started with the API, you will need to generate an API Key. Head over to the API Key page page:

Api key page

Click on the Generate key button to create a new API key. Please copy the generated text and save it somewhere secure. This key will be used to authenticate every API request. Once the popup is dismissed, the key will not be shown again, so make sure to make a copy:

Generate api

Endpoints

The API supports GET request and will require one custom header X-API-Key in the following format.

GET https://dashboard.thankful.ai/api/v1/tickets

Request Header
	X-API-Key: xxxxx

The following parameters are supported:

Parameter Description Example
s Start Date in UTC
Default is 30 days ago
s=2019-05-20T00:00:00Z
e End Date in UTC
Default is current date
e=2019-06-20T23:59:59Z
a Action ID: Only displays tickets related to the selected action a=2001
ss Ticket Status ID:
1 -> Complete
2 -> Handoff
3 -> Pending
4 -> Reported
5 -> Training
6 -> Action Disabled
7 -> Transferred
8 -> Handoff Takeover

Defaults to all
ss=1,2,5
fs Channel: filter the messages by channel. Multiple comma seperated channel can be set.

1 -> Thankful Console
2 -> Email
3 -> SMS
4 -> Web form
5 -> Twitter
6 -> In App
7 -> Chat
8 -> API
9 -> Facebook

Defaults to all
fs=1,2,3

All parameters are optional.

Tickets

GET https://dashboard.thankful.ai/api/v1/tickets

Get the list of tickets received, captured, and resolved between the start and end date.

Response:

{
    "Period": {
        "Start": "2019-05-22T00:00:00Z",
        "End": "2019-06-21T23:59:59Z",
        "Min": "2018-05-22T00:00:00Z"
    },
    "TicketsOverTime": {
        "Received": [
            {
                "Val": 1456,
                "CreatedAt": "2019-05-22T00:00:00Z"
            },
            ...
        ],
        "Captured": [
            {
                "Val": 2800,
                "CreatedAt": "2019-05-22T00:00:00Z"
            },
            ...
        ],
	"Transferred": [
            {
                "Val": 500,
                "CreatedAt": "2019-05-22T00:00:00Z"
            },
            ...
        ],
        "Resolved": [
            {
                "Val": 621,
                "CreatedAt": "2019-05-22T00:00:00Z"
            },
            ...
        ],
        "ReceivedTotal": 60000,
        "CapturedTotal": 50000,
        "TransferredTotal": 10000,
        "ResolvedTotal": 30000,
        "ReceivedChange": -33.78378378378378,
        "CapturedChange": -32.86713286713287,
        "TransferredChange": 54.12308,
        "ResolvedChange": -39.285714285714285
    },
    "TopActions": [
        {
            "ID": 3759,
            "Name": "Return Order",
            "Capture": 94,
            "Resolve": 17,
            "Pending": 2,
            "Transfer": 30,
            "Handoff": 77,
            "Skip": 0,
            "Enabled": true
        },
        ...
    ],
    "Recommendations": [
        {
            "ActionID": 3257,
            "Impact": "Increase automation by 4%"
        },
        {
            "ActionID": 3210,
            "Impact": "Increase automation by 1%"
        }
    ]
}

Transfers and Handoffs

GET https://dashboard.thankful.ai/api/v1/handoffs

Get the total count of transfers and handoffs for each actions and their cause.

Response:

[
    {
        "ActionID": 3623,
        "Types": null
    },
    {
        "ActionID": 3759,
        "Types": [
            {
                "ID": 1,
                "Cause": "SLA breached",
                "ActionHandoffCount": 1
            },
            {
                "ID": 3,
                "Cause": "Failed to evaluate JS for step 95863: eval js code: TypeError: Cannot access member 'SG' of undefined",
                "ActionHandoffCount": 1
            },
            ...
        ]
    }
]

Savings

GET https://dashboard.thankful.ai/api/v1/savings

Get the total hours saved over a period of time.

Response:

{
	"Hours": 100.5
}

Actions

GET https://dashboard.thankful.ai/api/v1/actions

Get the action names associated with each ID for use with the other endpoints.

Response:

{
	"3000": "Return Order",
	"3016": "Track Order"
}